diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6dac23..80cfb87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - RUBY_VERSION: [2.2, 2.3, 2.5, 2.6] + RUBY_VERSION: [2.6, 2.7] steps: - name: Check out code uses: actions/checkout@v4 diff --git a/aptible-auth.gemspec b/aptible-auth.gemspec index 62dca05..4f4f7a3 100644 --- a/aptible-auth.gemspec +++ b/aptible-auth.gemspec @@ -21,9 +21,10 @@ Gem::Specification.new do |spec| spec.require_paths = ['lib'] spec.add_dependency 'aptible-resource', '~> 1.0' + spec.add_dependency 'concurrent-ruby', '1.3.4' spec.add_dependency 'gem_config' spec.add_dependency 'multipart-post', '2.1.1' - spec.add_dependency 'oauth2', '1.4.7' + spec.add_dependency 'oauth2', '2.0.9' spec.add_development_dependency 'aptible-tasks', '>= 0.6.0' spec.add_development_dependency 'pry' diff --git a/spec/oauth2/lib/token_exchange_spec.rb b/spec/oauth2/lib/token_exchange_spec.rb index 4692a44..c4432ee 100644 --- a/spec/oauth2/lib/token_exchange_spec.rb +++ b/spec/oauth2/lib/token_exchange_spec.rb @@ -4,14 +4,14 @@ RSpec.describe OAuth2::Strategy::TokenExchange do let(:client) do cli = OAuth2::Client.new('abc', 'def', :site => 'http://api.example.com') - cli.connection.build do |b| + cli.connection.builder.build do |b| b.adapter :test do |stub| stub.post('/oauth/token') do |env| case @mode when 'formencoded' [200, {'Content-Type' => 'application/x-www-form-urlencoded'}, 'expires_in=600&access_token=salmon&refresh_token=trout'] when 'json' - [200, {'Content-Type' => 'application/json'}, '{"expires_in":600,"access_token":"salmon","refresh_token":"trout"}'] + [200, {'Content-Type' => 'application/json'}, {"expires_in" => 600, "access_token" => "salmon", "refresh_token" => "trout"}] end end end