Skip to content

Upgrade Faraday to v2 & drop faraday_middleware#41

Open
stympy wants to merge 1 commit intomaximadeka:masterfrom
stympy:upgrade-faraday-v2
Open

Upgrade Faraday to v2 & drop faraday_middleware#41
stympy wants to merge 1 commit intomaximadeka:masterfrom
stympy:upgrade-faraday-v2

Conversation

@stympy
Copy link

@stympy stympy commented Feb 13, 2026

I was working on a faraday upgrade yesterday, and this was one of my dependencies that needed to be updated. I did a bit of analysis with a tool I just built, and I found that several forks of this repo have independently fixed the faraday dependency. I had Claude put together this PR based on that research.

This fixes #38

faraday_middleware was absorbed into Faraday core in v2, so f.response :json continues to work without the extra gem.

  • Bump faraday dependency from ~> 1.0 to >= 2.0
  • Remove faraday_middleware runtime dependency
  • Remove require "faraday_middleware" from connection.rb
  • Move f.adapter :net_http to end of Faraday block (required by v2)
  • Upgrade webmock ~> 3.0 (v2 lacks write_timeout support needed by Faraday 2)
  • Add base64 gem (removed from Ruby 3.4 default gems, needed by webmock)

faraday_middleware was absorbed into Faraday core in v2, so
`f.response :json` continues to work without the extra gem.

- Bump faraday dependency from ~> 1.0 to >= 2.0
- Remove faraday_middleware runtime dependency
- Remove `require "faraday_middleware"` from connection.rb
- Move `f.adapter :net_http` to end of Faraday block (required by v2)
- Upgrade webmock ~> 3.0 (v2 lacks write_timeout support needed by Faraday 2)
- Add base64 gem (removed from Ruby 3.4 default gems, needed by webmock)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Update Faraday version to >= 2.0

1 participant