Skip to content

Commit

Permalink
Update faraday to 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
learoyklinginsmith committed Oct 16, 2024
1 parent 013bda6 commit a39ca93
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 32 deletions.
32 changes: 5 additions & 27 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ PATH
remote: .
specs:
iron_bank (5.4.1)
faraday (~> 1)
faraday_middleware (~> 1)
faraday (~> 2)
faraday-retry (~> 2)
nokogiri (~> 1)

GEM
Expand Down Expand Up @@ -34,39 +34,17 @@ GEM
ruby2_keywords
factory_bot (6.2.1)
activesupport (>= 5.0.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
faraday (2.0.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)
faraday_middleware (1.2.0)
faraday (~> 1.0)
faraday-retry (2.2.0)
faraday (~> 2.0)
i18n (1.13.0)
concurrent-ruby (~> 1.0)
json (2.6.3)
kwalify (0.7.2)
method_source (1.0.0)
mini_portile2 (2.8.2)
minitest (5.18.0)
multipart-post (2.3.0)
mutex_m (0.2.0)
nokogiri (1.14.3)
mini_portile2 (~> 2.8.0)
Expand Down
4 changes: 2 additions & 2 deletions iron_bank.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_dependency "faraday", "~> 1"
spec.add_dependency "faraday_middleware", "~> 1"
spec.add_dependency "faraday", "~> 2"
spec.add_dependency "faraday-retry", "~> 2"
spec.add_dependency "nokogiri", "~> 1"
spec.metadata["rubygems_mfa_required"] = "true"
end
2 changes: 1 addition & 1 deletion lib/iron_bank.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# External librairies
require "csv"
require "faraday"
require "faraday_middleware"
require "fileutils"
require "json"
require "nokogiri"
require "faraday/retry"

# An opinionated Ruby interface to the Zuora REST API
module IronBank
Expand Down
2 changes: 1 addition & 1 deletion lib/iron_bank/faraday_middleware/response/raise_error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module FaradayMiddleware
module Response
# This class raises an exception based on the HTTP status code and the
# `success` flag (if present in the response) from Zuora.
class RaiseError < Faraday::Response::Middleware
class RaiseError < Faraday::Middleware
def on_complete(env)
(error = IronBank::Error.from_response(env.response)) && raise(error)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/iron_bank/faraday_middleware/response/renew_auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module FaradayMiddleware
# IronBank Faraday response middleware module
module Response
# This middleware reauthorize the request on unauthorized request
class RenewAuth < Faraday::Response::Middleware
class RenewAuth < Faraday::Middleware
def initialize(app, auth)
@auth = auth

Expand Down

0 comments on commit a39ca93

Please sign in to comment.