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

Use updated Faraday syntax #53

Merged

Conversation

markedmondson
Copy link
Contributor

Updates the authorization syntax for Faraday v1.x as per https://lostisland.github.io/faraday/middleware/authentication to remove the deprecation warning:

WARNING: `Faraday::Connection#authorization` is deprecated; it will be removed in version 2.0.
While initializing your connection, use `#request(:authorization, ...)` instead.
See https://lostisland.github.io/faraday/middleware/authentication for more usage info.

Fixes #49

@technicalpickles
Copy link
Owner

Do you know what version introduces the new syntax? We'd need to make sure the faraday dependency reflects that.

@standingwave
Copy link

Do you know what version introduces the new syntax? We'd need to make sure the faraday dependency reflects that.

Hello there! Any chance of getting this merged so this gem can co-habitate with other tools that use Faraday 2.0+?

I did a bit of quick research and it looks like the deprecation of Faraday::Connection#authorization happened with Faraday 1.7.1 here lostisland/faraday#1306.

If I'm understanding your question correctly, the new syntax is actually old, they just got rid of some helper methods which made the interface more confusing.

@technicalpickles technicalpickles merged commit 714e324 into technicalpickles:master Aug 10, 2023
@lparry
Copy link

lparry commented Sep 15, 2023

Hello there! Any chance of getting this merged so this gem can co-habitate with other tools that use Faraday 2.0+?

@standingwave Do you have a trick for getting around the faraday ~> 1.0 gemspec version restriction to use this in a bundle with something requiring Faraday 2.0+? I found some discussion on bundler for a feature to override versions but it looks like it never made it to fruition

@jasondoc3
Copy link
Collaborator

@lparry I know it's been awhile, but here's a PR that should make this gem compatible with both faraday 1 and 2

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.

WARNING: Faraday::Connection#authorization is deprecated; it will be removed in version 2.0.
5 participants