Bump to Faraday 2

Faraday 2 was released in early 2022. As part of this major release,
authentication helper methods (such as basic_auth) were removed from the
Connection object and into middleware.

This commit updates vmfloaty's dependency on Faraday to ~> 2 and updates
the Http class to use the new authentication middleware.

This upgrade is helpful because, in a CI context, vmfloaty is often
installed alongside other gems that use Faraday >= 2, and vmfloaty's
current dependency on Faraday ~> 1.5, >= 1.5.1 can cause unexpected
dependency resolution.

You can read more about this unexpected dependency behavior in this
GitHub issue: https://github.com/puppetlabs/orchestrator_client-ruby/issues/41
This commit is contained in:
Michael Hashizume 2025-11-03 12:19:52 -08:00
parent 6b6d6f73cd
commit b9562bc9eb
3 changed files with 53 additions and 63 deletions

View file

@ -22,5 +22,5 @@ Gem::Specification.new do |s|
s.require_path = 'lib'
s.add_dependency 'commander', '>= 4.4.3', '< 4.7.0'
s.add_dependency 'faraday', '~> 1.5', '>= 1.5.1'
s.add_dependency 'faraday', '~> 2'
end