Skip to content

Commit

Permalink
Merge pull request #63 from BranchIntl/support_faraday_2_X
Browse files Browse the repository at this point in the history
Support Faraday version 2.x
  • Loading branch information
michaelklishin authored Jan 30, 2024
2 parents 72bbdf4 + 24b4d5c commit 6b5a22b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions lib/rabbitmq/http/client.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require "addressable/uri"
require "hashie"
require "faraday"
require "faraday_middleware"
require "faraday/follow_redirects"
require "multi_json"
require "uri"

Expand Down Expand Up @@ -450,9 +450,9 @@ def initialize_connection(endpoint, options = {})
adapter = options.delete(:adapter) || Faraday.default_adapter

@connection = Faraday.new(options) do |conn|
conn.request :basic_auth, user, password
conn.request :authorization, :basic, user, password

conn.use FaradayMiddleware::FollowRedirects, :limit => 3
conn.use Faraday::FollowRedirects::Middleware, :limit => 3
conn.use Faraday::Response::RaiseError
conn.response :json, :content_type => /\bjson$/

Expand Down
2 changes: 1 addition & 1 deletion lib/rabbitmq/http/client/health_checks.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "hashie"
require "faraday"
require "faraday_middleware"
require "faraday/follow_redirects"
require "multi_json"
require "uri"

Expand Down
2 changes: 1 addition & 1 deletion lib/rabbitmq/http/client/request_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "hashie"
require "faraday"
require "faraday_middleware"
require "faraday/follow_redirects"
require "multi_json"
require "uri"

Expand Down
2 changes: 1 addition & 1 deletion lib/rabbitmq/http/client/response_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "hashie"
require "faraday"
require "faraday_middleware"
require "faraday/follow_redirects"
require "multi_json"
require "uri"

Expand Down
4 changes: 2 additions & 2 deletions 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'
gem.add_dependency 'faraday_middleware', '~> 1.2'
gem.add_dependency 'faraday', '~> 2.0'
gem.add_dependency 'faraday-follow_redirects', '~> 0.3'
end

0 comments on commit 6b5a22b

Please sign in to comment.