Skip to content

Commit

Permalink
bump the oauth2 gem
Browse files Browse the repository at this point in the history
  • Loading branch information
almathew committed Jan 21, 2025
1 parent 88fbe09 commit b075fce
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion aptible-auth.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions spec/oauth2/lib/token_exchange_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b075fce

Please sign in to comment.