Skip to content

Commit

Permalink
Remove support for Faraday 1.x.
Browse files Browse the repository at this point in the history
  • Loading branch information
shashankmehra committed Jan 30, 2024
1 parent 14dcd6b commit d07aa2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions lib/rabbitmq/http/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -450,11 +450,7 @@ def initialize_connection(endpoint, options = {})
adapter = options.delete(:adapter) || Faraday.default_adapter

@connection = Faraday.new(options) do |conn|
if Gem::Version.new(Faraday::VERSION) < Gem::Version.new("2.0")
conn.request :basic_auth, user, password
else
conn.request :authorization, :basic, user, password
end
conn.request :authorization, :basic, user, password

conn.use Faraday::FollowRedirects::Middleware, :limit => 3
conn.use Faraday::Response::RaiseError
Expand Down
2 changes: 1 addition & 1 deletion rabbitmq_http_api_client.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ Gem::Specification.new do |gem|
gem.add_dependency 'addressable', '~> 2.7'
gem.add_dependency 'hashie', '~> 4.1'
gem.add_dependency 'multi_json', '~> 1.15'
gem.add_dependency 'faraday', '>= 1.3', '< 3'
gem.add_dependency 'faraday', '~> 2.0'
gem.add_dependency 'faraday-follow_redirects', '~> 0.3'
end

0 comments on commit d07aa2e

Please sign in to comment.