Skip to content

Commit

Permalink
set faraday version to 2.7.4
Browse files Browse the repository at this point in the history
change Faraday authorization methodology

more liberal versioning of Faraday
  • Loading branch information
culley-stripe committed May 9, 2024
1 parent 12db9dd commit 1aa5753
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ecwid_api.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec"

spec.add_dependency "faraday", "~> 2.7.4"
spec.add_dependency "faraday", ">= 2.7.4"
end
2 changes: 1 addition & 1 deletion lib/ecwid_api/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def initialize(store_id, token, options={})
options[:adapter] ||= Faraday.default_adapter
@store_id, @token, @adapter = store_id, token, options[:adapter]

@connection = Faraday.new(url: store_url(uri_base: options[:uri_base]), params: { token: @token }) do |conn|
@connection = Faraday.new(url: store_url(uri_base: options[:uri_base]), headers: { 'Authorization' => "Bearer #{@token}" }) do |conn|
# conn.request :oauth2, token, param_name: :token, token_type: :param
conn.request :json
conn.response :json
Expand Down

0 comments on commit 1aa5753

Please sign in to comment.