Bump faraday from ~> 1.5 to ~> 2

Updates the basic-auth middleware call to the Faraday 2 form
(`request :authorization, :basic, ...`). Faraday 2.x requires Ruby >=
3.0, so drop Ruby 2.7 from the CI matrix and pin
`required_ruby_version = '>= 3.0'` in the gemspec.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
isaac-hammes 2026-05-01 08:26:10 -04:00
parent 6b6d6f73cd
commit 421ea216d8
4 changed files with 60 additions and 66 deletions

View file

@ -18,7 +18,6 @@ jobs:
strategy: strategy:
matrix: matrix:
ruby-version: ruby-version:
- '2.7'
- '3.0' - '3.0'
- '3.1' - '3.1'
- '3.2' - '3.2'

View file

@ -3,110 +3,104 @@ PATH
specs: specs:
vmfloaty (1.8.1) vmfloaty (1.8.1)
commander (>= 4.4.3, < 4.7.0) commander (>= 4.4.3, < 4.7.0)
faraday (~> 1.5, >= 1.5.1) faraday (~> 2)
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
addressable (2.8.6) addressable (2.9.0)
public_suffix (>= 2.0.2, < 6.0) public_suffix (>= 2.0.2, < 8.0)
ast (2.4.2) ast (2.4.3)
bigdecimal (3.1.8) bigdecimal (4.1.2)
coderay (1.1.3) coderay (1.1.3)
commander (4.6.0) commander (4.6.0)
highline (~> 2.0.0) highline (~> 2.0.0)
crack (1.0.0) crack (1.0.1)
bigdecimal bigdecimal
rexml rexml
diff-lcs (1.5.1) diff-lcs (1.6.2)
docile (1.4.0) docile (1.4.1)
faraday (1.10.3) faraday (2.14.1)
faraday-em_http (~> 1.0) faraday-net_http (>= 2.0, < 3.5)
faraday-em_synchrony (~> 1.0) json
faraday-excon (~> 1.1) logger
faraday-httpclient (~> 1.0) faraday-net_http (3.4.2)
faraday-multipart (~> 1.0) net-http (~> 0.5)
faraday-net_http (~> 1.0) hashdiff (1.2.1)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
hashdiff (1.1.0)
highline (2.0.3) highline (2.0.3)
json (2.7.2) io-console (0.8.2)
language_server-protocol (3.17.0.3) json (2.19.4)
method_source (1.0.0) language_server-protocol (3.17.0.5)
multipart-post (2.3.0) lint_roller (1.1.0)
parallel (1.26.3) logger (1.7.0)
parser (3.3.5.0) method_source (1.1.0)
net-http (0.9.1)
uri (>= 0.11.1)
parallel (1.28.0)
parser (3.3.11.1)
ast (~> 2.4.1) ast (~> 2.4.1)
racc racc
pry (0.14.2) prism (1.9.0)
pry (0.16.0)
coderay (~> 1.1) coderay (~> 1.1)
method_source (~> 1.0) method_source (~> 1.0)
public_suffix (5.0.5) reline (>= 0.6.0)
public_suffix (6.0.2)
racc (1.8.1) racc (1.8.1)
rainbow (3.1.1) rainbow (3.1.1)
rake (13.2.1) rake (13.4.2)
rb-readline (0.5.5) rb-readline (0.5.5)
regexp_parser (2.9.2) regexp_parser (2.12.0)
rexml (3.3.6) reline (0.6.3)
strscan io-console (~> 0.5)
rspec (3.13.0) rexml (3.4.4)
rspec (3.13.2)
rspec-core (~> 3.13.0) rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0) rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0) rspec-mocks (~> 3.13.0)
rspec-core (3.13.0) rspec-core (3.13.6)
rspec-support (~> 3.13.0) rspec-support (~> 3.13.0)
rspec-expectations (3.13.0) rspec-expectations (3.13.5)
diff-lcs (>= 1.2.0, < 2.0) diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0) rspec-support (~> 3.13.0)
rspec-mocks (3.13.0) rspec-mocks (3.13.8)
diff-lcs (>= 1.2.0, < 2.0) diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0) rspec-support (~> 3.13.0)
rspec-support (3.13.0) rspec-support (3.13.7)
rubocop (1.66.1) rubocop (1.86.1)
json (~> 2.3) json (~> 2.3)
language_server-protocol (>= 3.17.0) language_server-protocol (~> 3.17.0.2)
parallel (~> 1.10) lint_roller (~> 1.1.0)
parallel (>= 1.10)
parser (>= 3.3.0.2) parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0) regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0) rubocop-ast (>= 1.49.0, < 2.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0) unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.32.3) rubocop-ast (1.49.1)
parser (>= 3.3.1.0) parser (>= 3.3.7.2)
prism (~> 1.7)
ruby-progressbar (1.13.0) ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
simplecov (0.22.0) simplecov (0.22.0)
docile (~> 1.1) docile (~> 1.1)
simplecov-html (~> 0.11) simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1) simplecov_json_formatter (~> 0.1)
simplecov-html (0.13.1) simplecov-html (0.13.2)
simplecov-lcov (0.8.0) simplecov-lcov (0.8.0)
simplecov_json_formatter (0.1.4) simplecov_json_formatter (0.1.4)
strscan (3.1.0) unicode-display_width (3.2.0)
unicode-display_width (2.5.0) unicode-emoji (~> 4.1)
webmock (3.23.1) unicode-emoji (4.2.0)
uri (1.1.1)
webmock (3.26.2)
addressable (>= 2.8.0) addressable (>= 2.8.0)
crack (>= 0.3.2) crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0) hashdiff (>= 0.4.0, < 2.0.0)
PLATFORMS PLATFORMS
aarch64-linux aarch64-linux
x86_64-darwin-22
x86_64-linux x86_64-linux
DEPENDENCIES DEPENDENCIES
@ -122,4 +116,4 @@ DEPENDENCIES
webmock (~> 3.23) webmock (~> 3.23)
BUNDLED WITH BUNDLED WITH
2.4.8 2.5.15

View file

@ -37,7 +37,7 @@ class Http
Faraday.new(url: url, ssl: { verify: false }) do |faraday| Faraday.new(url: url, ssl: { verify: false }) do |faraday|
faraday.request :url_encoded faraday.request :url_encoded
faraday.request :basic_auth, user, password faraday.request :authorization, :basic, user, password
faraday.response :logger if verbose faraday.response :logger if verbose
faraday.adapter Faraday.default_adapter faraday.adapter Faraday.default_adapter
end end

View file

@ -20,7 +20,8 @@ Gem::Specification.new do |s|
s.files = Dir['LICENSE', 'README.md', 'lib/**/*', 'extras/**/*'] s.files = Dir['LICENSE', 'README.md', 'lib/**/*', 'extras/**/*']
s.test_files = Dir['spec/**/*'] s.test_files = Dir['spec/**/*']
s.require_path = 'lib' s.require_path = 'lib'
s.required_ruby_version = '>= 3.0'
s.add_dependency 'commander', '>= 4.4.3', '< 4.7.0' 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 end