From 9ffdbcb269bca762da1d9c977061d91ad0c9ee47 Mon Sep 17 00:00:00 2001 From: Alessio Zampatti Date: Fri, 6 Oct 2023 11:38:44 +0200 Subject: [PATCH 1/2] fix adapter options for faraday 1.x, fixes #177 (#178) * fix adapter options for faraday 1.x, fixes #177 * fix initialize * revert initialize, add option for faraday1.x --- lib/adyen/client.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/adyen/client.rb b/lib/adyen/client.rb index 39714486..80be0ebb 100644 --- a/lib/adyen/client.rb +++ b/lib/adyen/client.rb @@ -23,7 +23,13 @@ def initialize(ws_user: nil, ws_password: nil, api_key: nil, oauth_token: nil, e @oauth_token = oauth_token @env = env @adapter = adapter || Faraday.default_adapter - @adapter_options = adapter_options || Faraday.default_adapter_options + if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.1') + # for faraday 2.1 and higher + @adapter_options = adapter_options || Faraday.default_adapter_options + else + # for faraday 1.x and 2.0 + @adapter_options = adapter_options || {} + end @mock_service_url_base = mock_service_url_base || "http://localhost:#{mock_port}" @live_url_prefix = live_url_prefix @connection_options = connection_options || Faraday::ConnectionOptions.new From a0b0dc452669d9758365bf3bf36a887a84531b7b Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Fri, 6 Oct 2023 09:38:59 +0000 Subject: [PATCH 2/2] chore(release): bump to 7.3.1 --- lib/adyen/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/adyen/version.rb b/lib/adyen/version.rb index dcfde052..39a65caf 100644 --- a/lib/adyen/version.rb +++ b/lib/adyen/version.rb @@ -1,4 +1,4 @@ module Adyen NAME = 'adyen-ruby-api-library'.freeze - VERSION = '7.3.0'.freeze + VERSION = '7.3.1'.freeze end