Skip to content

Update to Faraday 1.0 #808

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

Merged
merged 5 commits into from
Apr 3, 2020
Merged

Update to Faraday 1.0 #808

merged 5 commits into from
Apr 3, 2020

Conversation

picandocodigo
Copy link
Member

@picandocodigo picandocodigo commented Mar 24, 2020

Migration to Faraday 1.0.

  • We were already using adapter method to set the adapter, so that's 👍
  • We were checking handlers for loaded adapters in the specs, I changed them to use Faraday's adapters.
  • The client initializer was modified but this should not disrupt final users at all, check 0fdc653 for more information.
  • Migrated error checking to remove the deprecated Faraday::Error namespace.
  • This change is not compatible with Typhoeus. The latest release is 1.3.1, but it's still using the deprecated Faraday::Error namespace. This has been fixed on master, but the last release was November 6, 2018. Version 1.4.0 should be ok once it's released.
  • Note: Faraday 1.0 drops official support for JRuby. It installs fine on the tests we run with JRuby in this repo, but it's something we should pay attention to.

Reference: Upgrading - Faraday 1.0

@lizdeika
Copy link

That looks promising! As it also cleansup from "stoned" gem :)
I think that Changelog should also include a message for default change from typhoeus to patron

@picandocodigo
Copy link
Member Author

@lizdeika thanks for taking a look! 😁

The change from typhoeus to patron is only in the documentation example on how to set the adapter. By default, the client will still use the Faraday HTTP library.

I added a note about Typhoeus, hopefully we'll get a new release soon and the issue will go away 😄

@picandocodigo picandocodigo added 7.16 8.0 For 8.0 release labels Mar 26, 2020
Migrating to Faraday 1.0 means we check with `adapter` to see which one has been
selected. I also changed the order in which the given block is ran. There's a
case where one of the adapter libraries could be loaded and an adapter is passed
in with the block, but `__auto_detect_adapter` would overwrite this. So the
block is now ran last.
@picandocodigo picandocodigo merged commit 021d041 into 7.x Apr 3, 2020
@picandocodigo picandocodigo deleted the update_faraday_7.x branch April 3, 2020 08:52
@picandocodigo picandocodigo mentioned this pull request Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants