Skip to content

Conversation

CGA1123
Copy link
Contributor

@CGA1123 CGA1123 commented Oct 2, 2019

Faraday 0.16.x changed the key names, this should allow us to support
both 0.15.x and 0.16.x for now.
(reverted in 0.17.x)

Adds backwards-compatible support for Faraday 1.0.

Other alternatives to fix are to remove the call to .to_hash and access directly with #[], or to call #body.

The prefered solution appears to be to use #body. However, there is some benefit in being explicit I suppose - please let me know what you would prefer.

Closes: #114
Related: lostisland/faraday#847


Edit: Updated for faraday-1.0.0

Faraday 0.16.x changed the key names, this should allow us to support
both 0.15.x and 0.16.x for now
@sourcelevel-bot
Copy link

Hello, @CGA1123! This is your first Pull Request that will be reviewed by SourceLevel, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information.

@CGA1123 CGA1123 changed the title Fallback to :response_body if :body is not set Fallback to :response_body if :body is not set (faraday 1.0 support) Mar 27, 2020
@CGA1123
Copy link
Contributor Author

CGA1123 commented Mar 27, 2020

Hey @lucasmazza @tegon not sure who is maintaining this now but you are the most recent mergers 😄

It would be quite nice to have this merged in to allow support for faraday-1.0.0!

@georgeguimaraes georgeguimaraes merged commit a053789 into sourcelevel:master Apr 6, 2020
@georgeguimaraes
Copy link
Member

Thanks @CGA1123! I've merged it and hope to release a new version supporting Faraday 1.0.x soon.

@CGA1123
Copy link
Contributor Author

CGA1123 commented Apr 6, 2020

@georgeguimaraes Thanks! 🥳

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.

Broken with faraday 0.16.x
3 participants