From 2df782f66c6158f05821938fe0b31d522c045f08 Mon Sep 17 00:00:00 2001 From: aram price Date: Fri, 5 May 2023 13:20:52 -0700 Subject: [PATCH 1/3] Ruby workflow tests current rubies Ruby versions < 3.0 are EOL: https://endoflife.date/ruby This change replaces `2.6` and `2.7` with `3.1`, and `3.2` in the test matrix --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 53990a3..292e8ce 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: ['2.6', '2.7', '3.0'] + ruby-version: ['3.0', '3.1', '3.2'] steps: - uses: actions/checkout@v3 From 9e1344808cfcbad3a57112301fc3bf8912b37e16 Mon Sep 17 00:00:00 2001 From: aram price Date: Mon, 8 May 2023 10:23:53 -0700 Subject: [PATCH 2/3] Allow action ruby/setup-ruby@v1 to float This removes a lock to version `ruby/setup-ruby@d2b39ad0b52eca07d23f3aa14fdf2a3fcc1f411c # v1.148.0` --- .github/workflows/ruby.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 292e8ce..709e555 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -29,8 +29,7 @@ jobs: - name: Set up Ruby # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, # change this to (see https://github.com/ruby/setup-ruby#versioning): - # uses: ruby/setup-ruby@v1 - uses: ruby/setup-ruby@d2b39ad0b52eca07d23f3aa14fdf2a3fcc1f411c # v1.148.0 + uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically From 93e5fa57bf269bd5953e1542662d66cefdd0c200 Mon Sep 17 00:00:00 2001 From: aram price Date: Mon, 8 May 2023 10:53:53 -0700 Subject: [PATCH 3/3] Unpin `rake` and `rspec` Update the phrasing of some expectations --- Gemfile | 2 -- omniauth-uaa-oauth2.gemspec | 2 +- spec/omniauth/strategies/uaa_oauth2_spec.rb | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index c997314..8c49c77 100644 --- a/Gemfile +++ b/Gemfile @@ -13,8 +13,6 @@ source 'http://rubygems.org' -gem 'rake', '< 11.0' - gemspec group :example do diff --git a/omniauth-uaa-oauth2.gemspec b/omniauth-uaa-oauth2.gemspec index 36fbe42..1e064fa 100644 --- a/omniauth-uaa-oauth2.gemspec +++ b/omniauth-uaa-oauth2.gemspec @@ -18,6 +18,6 @@ Gem::Specification.new do |gem| gem.add_runtime_dependency 'omniauth', '>= 1', '< 3' gem.add_runtime_dependency 'cf-uaa-lib', ['>= 3.2', '< 5.0'] - gem.add_development_dependency 'rspec', '~> 2.6.0' + gem.add_development_dependency 'rspec' gem.add_development_dependency 'rake' end diff --git a/spec/omniauth/strategies/uaa_oauth2_spec.rb b/spec/omniauth/strategies/uaa_oauth2_spec.rb index cfd6b47..43ecd0f 100644 --- a/spec/omniauth/strategies/uaa_oauth2_spec.rb +++ b/spec/omniauth/strategies/uaa_oauth2_spec.rb @@ -126,14 +126,14 @@ def app; lambda{|env| [200, {}, ["Hello."]]} end describe 'empty?' do it 'is empty when initialized without info' do token = OmniAuth::Strategies::CFAccessToken.new - token.empty?.should be_true + token.should be_empty end it 'is not empty when initialized with info' do token = OmniAuth::Strategies::CFAccessToken.new({ 'access_token' => 'some-token', }) - token.empty?.should be_false + token.should_not be_empty end end