Skip to content

Commit

Permalink
Upgrade faraday gem to v1.x [ch20108] (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikanade authored Aug 11, 2020
1 parent 6863c9d commit e3f1c43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion chartmogul-ruby.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.add_dependency 'faraday', '~> 0.17.3'
spec.add_dependency 'faraday', '~> 1.0.0'

spec.add_development_dependency 'bundler', '~> 2'
spec.add_development_dependency 'pry', '~> 0.12.2'
Expand Down
4 changes: 2 additions & 2 deletions lib/chartmogul/api_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def self.connection

def self.handling_errors
yield
rescue Faraday::ClientError => e
rescue Faraday::ClientError, Faraday::ServerError => e
e.response ? handle_request_error(e) : handle_other_error(e)
rescue StandardError => e
handle_other_error(e)
Expand Down Expand Up @@ -86,7 +86,7 @@ def self.build_connection
faraday.request :retry, max: ChartMogul.max_retries, retry_statuses: RETRY_STATUSES,
max_interval: MAX_INTERVAL, backoff_factor: BACKOFF_FACTOR,
interval_randomness: INTERVAL_RANDOMNESS, interval: INTERVAL, exceptions: RETRY_EXCEPTIONS
faraday.use Faraday::Adapter::NetHttp
faraday.adapter Faraday::Adapter::NetHttp
end
end
end
Expand Down

0 comments on commit e3f1c43

Please sign in to comment.