Skip to content

v7.17.10

Compare
Choose a tag to compare
@picandocodigo picandocodigo released this 07 Nov 16:37
· 1624 commits to main since this release

Backports support for Faraday 2 from elastic-transport. ¡Gracias santiagorodriguez96!

This version of the gem now supports Faraday v2. If you don't have a locked version of Faraday in your project, when you upgrade your gems, Faraday v2 will be installed. The main change on dependencies when using Faraday v2 is all adapters, except for the default net_http one, have been moved out of Faraday into separate gems. This means if you're not using the default adapter and you migrate to Faraday v2, you'll need to add the adapter gems to your Gemfile.

These are the gems required for the different adapters with Faraday 2, instead of the libraries on which they were based:

# HTTPCLient
gem 'faraday-httpclient'

# NetHTTPPersistent
gem 'faraday-net_http_persistent'

# Patron
gem 'faraday-patron'

# Typhoeus
gem 'faraday-typhoeus'

Things should work fine if you migrate to Faraday 2 as long as you include the adapter (unless you're using the default one net-http), but worst case scenario, you can always lock the version of Faraday in your project to 1.x:
gem 'faraday', '~> 1'

Be aware if migrating to Faraday v2 that it requires at least Ruby 2.6, unlike Faraday v1 which requires 2.4.

Troubleshooting

If you see a message like:
:adapter is not registered on Faraday::Adapter (Faraday::Error)
Then you probably need to include the adapter library in your gemfile and require it.

Please submit an issue if you encounter any problems.