mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 13:28:42 -05:00
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:
parent
6b6d6f73cd
commit
b9562bc9eb
3 changed files with 53 additions and 63 deletions
|
|
@ -37,7 +37,7 @@ class Http
|
|||
|
||||
Faraday.new(url: url, ssl: { verify: false }) do |faraday|
|
||||
faraday.request :url_encoded
|
||||
faraday.request :basic_auth, user, password
|
||||
faraday.request :authorization, :basic, user, password
|
||||
faraday.response :logger if verbose
|
||||
faraday.adapter Faraday.default_adapter
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue