Update to use Faraday ~> 1.0#10
Open
sshao wants to merge 6 commits into
Open
Conversation
sshao
force-pushed
the
faraday_1_0_upgrade
branch
from
May 14, 2020 19:37
26ad394 to
d68e633
Compare
Reached out to Iain, who's transferred ownership of this gem to us and has granted the appropriate permissions required on rubygems to manage the gem releases there.
Update ownership of gem
Faraday ships with https://github.com/lostisland/faraday/blob/master/docs/middleware/request/retry.md which appears to accomplish the same goals as Repeater, with equivalent options for customization.
Was already deprecated, deleting the related code.
sshao
force-pushed
the
faraday_1_0_upgrade
branch
from
May 21, 2020 20:55
d68e633 to
f99134b
Compare
Delete Mimetype, Repeater middlewares
sshao
force-pushed
the
faraday_1_0_upgrade
branch
from
May 22, 2020 17:01
f99134b to
bf07f70
Compare
https://github.com/lostisland/faraday/blob/019e1a841707718adad2fd05c602eb1a869b42bc/UPGRADING.md#faraday-10 Major changes are to the SelectiveErrors and Repeater middlewares. --- Update SelectiveErrors Middleware for Faraday 1.0 Faraday 1.0 removed subclasses under `Faraday::Error`. It also introduces new Error classes for a selection of HTTP status codes. SelectiveErrors has been updating to match the upstream raise_error middleware. https://github.com/lostisland/faraday/blob/019e1a841707718adad2fd05c602eb1a869b42bc/lib/faraday/response/raise_error.rb --- Also deletes the appraisals for faraday 0.8 and 0.9. Given the major Faraday 1.0 changes, faraday-conductivity by design will not work with both faraday 1.0 and faraday <1.0.
sshao
force-pushed
the
faraday_1_0_upgrade
branch
from
May 22, 2020 17:33
bf07f70 to
500ac34
Compare
Contributor
|
@bvicenzo it has already gone out, but under a different repo: https://github.com/enova/faraday-conductivity I no longer have access to this github organization |
|
Very thanks, @iain! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Faraday 1.0 Upgrading docs
Major changes are to the SelectiveErrors and Repeater middlewares.
Update SelectiveErrors Middleware for Faraday 1.0
Faraday 1.0 removed subclasses under
Faraday::Error. It also introduces new Error classes for a selection of HTTP status codes.SelectiveErrors has been updated to match the upstream raise_error middleware.
Update Repeater Middleware for Faraday 1.0
Repeater has been updated to catch all
Faraday::Errors in lieu of the deprecatedFaraday::Error::ClientError.Faraday::Errorwas chosen overFaraday::ClientError/Faraday::ServerErroras Repeater appears to be intended to retry on all Faraday errors in general, if Faraday is configured to do so (via middlewares raise_error or selective_errors).Note: the Retry middleware that ships with Faraday seems to accomplish the same goals as Repeater, with approximately the same options for customization. README updated to note this.