Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faraday upgrade docs #1009

Merged
merged 3 commits into from
Jul 13, 2024
Merged

Faraday upgrade docs #1009

merged 3 commits into from
Jul 13, 2024

Conversation

pcai
Copy link
Member

@pcai pcai commented Jul 10, 2024

What kind of change is this?

Take a first pass at docs for faraday changes. Looking for feedback on wording as well as what else to include

Also minor cleanup throughout that was missed in original pr, basically all cosmetic nits.

@pcai
Copy link
Member Author

pcai commented Jul 10, 2024

cc @LukeIGS in case you are able to take a look, tried to turn your comments into a guide for users of the lib, it could definitely use a proofread if you have the time.

@LukeIGS
Copy link
Contributor

LukeIGS commented Jul 10, 2024

So far the biggest thing i see missing is a mention about how custom adapters function now, they use the faraday approach instead of the httpi approach,
https://lostisland.github.io/faraday/#/adapters/index

As seen here... also i noticed the option's doc comment still mentions httpi (because of course i missed another one)
https://github.com/savonrb/savon/blob/main/spec/savon/options_spec.rb#L914

Essentially they take an array which gets forwarded to Faraday.new |c| c.adapter(:adapter_key, *) end where the first entry of the array is the adapter key, and all following entries are parameters for the adapter... So for example

stubs = Faraday::Adapter::Test::Stubs.new
stubs.get(@server.url('authentication')) do
    [200, {'Content-Type': 'application/xml'}, Fixture.wsdl('authentication')]
end

Savon.client(
  adapter: [:test, stubs]
)

would initialize all downstream faraday connections with the the inbuilt faraday test adapter and its first argument is a stubs list. This would likely be necessary if someone decided they wanted to use Typhoeus or something.

I'm mulling over how the heck i'd write that into the docs...

@pcai
Copy link
Member Author

pcai commented Jul 13, 2024

i merge this in for now so i can begin to prepare the release out of main

@pcai pcai merged commit 2130aea into main Jul 13, 2024
13 checks passed
@pcai pcai deleted the faraday-upgr-docs branch July 13, 2024 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants