-
Notifications
You must be signed in to change notification settings - Fork 26
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
Bump faraday dep version from >= 0.9.2 to >= 2 and migrate custom middleware. Fixes ylecuyer/survey-gizmo-ruby#121 #122
base: master
Are you sure you want to change the base?
Conversation
…d migrate custom middleware
@@ -18,8 +18,7 @@ Gem::Specification.new do |gem| | |||
gem.add_dependency 'activesupport', '>= 3.0' | |||
gem.add_dependency 'addressable', '>= 2' | |||
gem.add_dependency 'awesome_print', '>= 1' | |||
gem.add_dependency 'faraday', '>= 0.9.1' | |||
gem.add_dependency 'faraday_middleware' | |||
gem.add_dependency 'faraday', '>= 2.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you remove ruby 2.4 and 2.5 from CI as faraday >2 requires at least tuby 2.6 and any way those version are already EOL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed 2.4
and 2.5
Also updated gemspec to set min ruby version to >=2.6
Awaiting maintainer to run the Test workflow
All <3
Ruby is EOL, would you like further adjustments to remove all 2.x
versions?
Followed the faraday ~2 update docs here
Also used referenced a some legacy and current faraday source code to guide me in the migration of the custom
ParseSurveyGizmo
middlewareThe new middleware template offered for faraday 2, contains some useful code comments
lostisland/faraday-middleware-template/blob/main/template/lib/gem_path/middleware.rb.erb
The legacy
ResponseMiddleware
classlostisland/faraday_middleware/blob/main/lib/faraday_middleware/response_middleware.rb
The new implementation of JSON Response Middleware that is bundled with faraday 2
/lostisland/faraday/blob/main/lib/faraday/response/json.rb
Tests that cover the custom parser are passing. Wasn't sure if there was a need for adding more. I'm fairly new to Ruby to any pointer welcomed and I'm happy to add some specs given a bit of direction 🙏