Skip to content

Commit

Permalink
Merge pull request #27 from taylorbrooks/faraday-2
Browse files Browse the repository at this point in the history
Use new version of Faraday gem
  • Loading branch information
seven1m authored Apr 14, 2023
2 parents 963a645 + 947d85b commit 478a2ca
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2.1.0 (April 14, 2023)

- Chore: Use 2.x version of Faraday

# 2.0.2 (January 10, 2023)

- Fix: fix bug handling 204 No Content responses
Expand Down
1 change: 1 addition & 0 deletions lib/pco/api.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require_relative 'api/endpoint'
require_relative 'api/errors'
require_relative 'api/version'

module PCO
module API
Expand Down
4 changes: 2 additions & 2 deletions lib/pco/api/endpoint.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'faraday'
require 'faraday_middleware'
require 'faraday/excon'

module PCO
module API
Expand Down Expand Up @@ -141,7 +141,7 @@ def _build_connection
Faraday.new(url: url) do |faraday|
faraday.response :json, content_type: /\bjson$/
if @basic_auth_token && @basic_auth_secret
faraday.request :basic_auth, @basic_auth_token, @basic_auth_secret
faraday.request :authorization, :basic, @basic_auth_token, @basic_auth_secret
elsif @oauth_access_token
faraday.request :authorization, 'Bearer', @oauth_access_token
else
Expand Down
2 changes: 1 addition & 1 deletion lib/pco/api/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module PCO
module API
VERSION = '2.0.2'
VERSION = '2.1.0'
end
end
7 changes: 3 additions & 4 deletions pco_api.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ Gem::Specification.new do |s|
s.files = Dir["lib/**/*", "README.md"]
s.test_files = Dir["spec/**/*"]

s.add_dependency "faraday", "~> 1.8"
s.add_dependency "faraday_middleware", "~> 1.2"
s.add_dependency "excon", ">= 0.71.0"
s.add_dependency "faraday", "> 2.0"
s.add_dependency "faraday-excon", "~> 2.1"
s.add_development_dependency "rspec", "~> 3.2"
s.add_development_dependency "webmock", "~> 1.21"
s.add_development_dependency "pry", "~> 0.10"
end
end

0 comments on commit 478a2ca

Please sign in to comment.