Skip to content

Remove net-http adapter and update docs#1336

Merged
iMacTia merged 2 commits intomainfrom
remove-net-http-adapter
Oct 25, 2021
Merged

Remove net-http adapter and update docs#1336
iMacTia merged 2 commits intomainfrom
remove-net-http-adapter

Conversation

@iMacTia
Copy link
Copy Markdown
Member

@iMacTia iMacTia commented Oct 25, 2021

Description

  • Adapt tests to work without net_http adapter
  • Switch Faraday.default_adapter to :test.
  • Update UPGRADING.md and README.md
  • Remove net_http dependency and code references

Todos

List any remaining work that needs to be done, i.e:

  • Tests
  • Documentation

Adapt tests to work without net_http adapter.
Switch `Faraday.default_adapter` to `:test`.
Update UPGRADING.md and README.md
@iMacTia iMacTia requested a review from olleolleolle October 25, 2021 08:30
Comment thread UPGRADING.md
* If you're relying on `Faraday.default_adapter` (e.g. if you use `Faraday.get` or other verb class methods, or not
specifying an adapter in your connection initializer), then you'll now need to set it yourself. It previously
defaulted to `:net_http`, but it now defaults to `:test`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this section could have a pasteable example of doing what the text says?

Suggested change
Faraday.default_adapter = :net_http

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Well, and some "you could do this" text.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know you could have multi-line code snippets inside list items!!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every day is a school day!

context 'with simple url' do
let(:url) { 'http://example.com' }
let!(:stubbed) { stub_request(:get, 'http://example.com?a=a&p=3') }
let(:stubs) { Faraday::Adapter::Test::Stubs.new }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sparkling improvement!

Copy link
Copy Markdown
Member

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Wonderful!

Comment thread UPGRADING.md
* If you're relying on `Faraday.default_adapter` (e.g. if you use `Faraday.get` or other verb class methods, or not
specifying an adapter in your connection initializer), then you'll now need to set it yourself. It previously
defaulted to `:net_http`, but it now defaults to `:test`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Well, and some "you could do this" text.)

Comment thread UPGRADING.md
* If you're relying on `Faraday.default_adapter` (e.g. if you use `Faraday.get` or other verb class methods, or not
specifying an adapter in your connection initializer), then you'll now need to set it yourself. It previously
defaulted to `:net_http`, but it now defaults to `:test`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every day is a school day!

@iMacTia iMacTia merged commit c010031 into main Oct 25, 2021
@iMacTia iMacTia deleted the remove-net-http-adapter branch October 25, 2021 10:17
jrochkind pushed a commit to jrochkind/faraday that referenced this pull request Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants