From 0e240a45517f11b6b906bd377e405684a75022d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Guti=C3=A9rrez?= Date: Tue, 26 Aug 2025 17:22:05 -0600 Subject: [PATCH 1/4] Upgrade gems, use github actions and improve codebase --- .github/workflows/testing.yml | 28 +++ .rubocop.yml | 7 +- .ruby-version | 1 + Gemfile | 14 +- Gemfile.lock | 374 +++++++++++++++++------------- Rakefile | 2 +- gamora.gemspec | 2 +- lib/gamora/authentication/base.rb | 4 +- spec/rails_helper.rb | 31 ++- 9 files changed, 276 insertions(+), 187 deletions(-) create mode 100644 .github/workflows/testing.yml create mode 100644 .ruby-version diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml new file mode 100644 index 0000000..1d51992 --- /dev/null +++ b/.github/workflows/testing.yml @@ -0,0 +1,28 @@ +name: Testing + +on: + pull_request: + branches: + - main + +permissions: + contents: read + checks: write + +jobs: + test: + name: Running tests + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: .ruby-version + bundler-cache: true + + - name: Run tests + run: bundle exec rake diff --git a/.rubocop.yml b/.rubocop.yml index 776d49d..046a5e6 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,8 +1,11 @@ -require: rubocop-rspec +plugins: + - rubocop-rake + - rubocop-rspec + - rubocop-rspec_rails AllCops: NewCops: enable - TargetRubyVersion: 2.7 + TargetRubyVersion: 3.2 Exclude: - "spec/dummy/**/*" - "spec/spec_helper.rb" diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..4f5e697 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.4.5 diff --git a/Gemfile b/Gemfile index f70e4b5..d318d17 100644 --- a/Gemfile +++ b/Gemfile @@ -5,9 +5,11 @@ source "https://rubygems.org" # Specify your gem's dependencies in gamora.gemspec gemspec -gem "rake", "~> 13.2" -gem "rspec-rails", "~> 6.1" -gem "rubocop", "~> 1.65" -gem "rubocop-rspec", "~> 3.0", require: false -gem "sqlite3", "~> 1.7" -gem "webmock", "~> 3.23" +gem "rake", "~> 13.3" +gem "rspec-rails", "~> 8.0" +gem "rubocop", "~> 1.80" +gem "rubocop-rake", require: false +gem "rubocop-rspec", require: false +gem "rubocop-rspec_rails", require: false +gem "sqlite3", "~> 2.7" +gem "webmock", "~> 3.25" diff --git a/Gemfile.lock b/Gemfile.lock index d5bdb02..b99dcd8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,117 +8,119 @@ PATH GEM remote: https://rubygems.org/ specs: - actioncable (7.1.3.4) - actionpack (= 7.1.3.4) - activesupport (= 7.1.3.4) + actioncable (8.0.2.1) + actionpack (= 8.0.2.1) + activesupport (= 8.0.2.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.1.3.4) - actionpack (= 7.1.3.4) - activejob (= 7.1.3.4) - activerecord (= 7.1.3.4) - activestorage (= 7.1.3.4) - activesupport (= 7.1.3.4) - mail (>= 2.7.1) - net-imap - net-pop - net-smtp - actionmailer (7.1.3.4) - actionpack (= 7.1.3.4) - actionview (= 7.1.3.4) - activejob (= 7.1.3.4) - activesupport (= 7.1.3.4) - mail (~> 2.5, >= 2.5.4) - net-imap - net-pop - net-smtp + actionmailbox (8.0.2.1) + actionpack (= 8.0.2.1) + activejob (= 8.0.2.1) + activerecord (= 8.0.2.1) + activestorage (= 8.0.2.1) + activesupport (= 8.0.2.1) + mail (>= 2.8.0) + actionmailer (8.0.2.1) + actionpack (= 8.0.2.1) + actionview (= 8.0.2.1) + activejob (= 8.0.2.1) + activesupport (= 8.0.2.1) + mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.1.3.4) - actionview (= 7.1.3.4) - activesupport (= 7.1.3.4) + actionpack (8.0.2.1) + actionview (= 8.0.2.1) + activesupport (= 8.0.2.1) nokogiri (>= 1.8.5) - racc rack (>= 2.2.4) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - actiontext (7.1.3.4) - actionpack (= 7.1.3.4) - activerecord (= 7.1.3.4) - activestorage (= 7.1.3.4) - activesupport (= 7.1.3.4) + useragent (~> 0.16) + actiontext (8.0.2.1) + actionpack (= 8.0.2.1) + activerecord (= 8.0.2.1) + activestorage (= 8.0.2.1) + activesupport (= 8.0.2.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.1.3.4) - activesupport (= 7.1.3.4) + actionview (8.0.2.1) + activesupport (= 8.0.2.1) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.1.3.4) - activesupport (= 7.1.3.4) + activejob (8.0.2.1) + activesupport (= 8.0.2.1) globalid (>= 0.3.6) - activemodel (7.1.3.4) - activesupport (= 7.1.3.4) - activerecord (7.1.3.4) - activemodel (= 7.1.3.4) - activesupport (= 7.1.3.4) + activemodel (8.0.2.1) + activesupport (= 8.0.2.1) + activerecord (8.0.2.1) + activemodel (= 8.0.2.1) + activesupport (= 8.0.2.1) timeout (>= 0.4.0) - activestorage (7.1.3.4) - actionpack (= 7.1.3.4) - activejob (= 7.1.3.4) - activerecord (= 7.1.3.4) - activesupport (= 7.1.3.4) + activestorage (8.0.2.1) + actionpack (= 8.0.2.1) + activejob (= 8.0.2.1) + activerecord (= 8.0.2.1) + activesupport (= 8.0.2.1) marcel (~> 1.0) - activesupport (7.1.3.4) + activesupport (8.0.2.1) base64 + benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) - ast (2.4.2) - base64 (0.2.0) - bigdecimal (3.1.8) + ast (2.4.3) + base64 (0.3.0) + benchmark (0.4.1) + bigdecimal (3.2.2) builder (3.3.0) - concurrent-ruby (1.3.3) - connection_pool (2.4.1) + concurrent-ruby (1.3.5) + connection_pool (2.5.3) crack (1.0.0) bigdecimal rexml crass (1.0.6) - date (3.3.4) - diff-lcs (1.5.1) - drb (2.2.1) - erubi (1.13.0) - faraday (2.10.0) - faraday-net_http (>= 2.0, < 3.2) + date (3.4.1) + diff-lcs (1.6.2) + drb (2.2.3) + erb (5.0.2) + erubi (1.13.1) + faraday (2.13.4) + faraday-net_http (>= 2.0, < 3.5) + json logger - faraday-net_http (3.1.0) - net-http + faraday-net_http (3.4.1) + net-http (>= 0.5.0) globalid (1.2.1) activesupport (>= 6.1) - hashdiff (1.1.0) + hashdiff (1.2.0) hashie (5.0.0) - i18n (1.14.5) + i18n (1.14.7) concurrent-ruby (~> 1.0) - io-console (0.7.2) - irb (1.14.0) + io-console (0.8.1) + irb (1.15.2) + pp (>= 0.6.0) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.7.2) - jwt (2.8.2) + json (2.13.2) + jwt (3.1.2) base64 - language_server-protocol (3.17.0.3) - logger (1.6.0) - loofah (2.22.0) + language_server-protocol (3.17.0.5) + lint_roller (1.1.0) + logger (1.7.0) + loofah (2.24.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -128,155 +130,199 @@ GEM net-smtp marcel (1.0.4) mini_mime (1.1.5) - mini_portile2 (2.8.7) - minitest (5.24.1) - multi_xml (0.7.1) + minitest (5.25.5) + multi_xml (0.7.2) bigdecimal (~> 3.1) - mutex_m (0.2.0) - net-http (0.4.1) + net-http (0.6.0) uri - net-imap (0.4.14) + net-imap (0.5.9) date net-protocol net-pop (0.1.2) net-protocol net-protocol (0.2.2) timeout - net-smtp (0.5.0) + net-smtp (0.5.1) net-protocol - nio4r (2.7.3) - nokogiri (1.16.6) - mini_portile2 (~> 2.8.2) + nio4r (2.7.4) + nokogiri (1.18.9-aarch64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.9-aarch64-linux-musl) + racc (~> 1.4) + nokogiri (1.18.9-arm-linux-gnu) racc (~> 1.4) - oauth2 (2.0.9) - faraday (>= 0.17.3, < 3.0) - jwt (>= 1.0, < 3.0) + nokogiri (1.18.9-arm-linux-musl) + racc (~> 1.4) + nokogiri (1.18.9-arm64-darwin) + racc (~> 1.4) + nokogiri (1.18.9-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.18.9-x86_64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.9-x86_64-linux-musl) + racc (~> 1.4) + oauth2 (2.0.12) + faraday (>= 0.17.3, < 4.0) + jwt (>= 1.0, < 4.0) + logger (~> 1.2) multi_xml (~> 0.5) rack (>= 1.2, < 4) - snaky_hash (~> 2.0) - version_gem (~> 1.1) - parallel (1.25.1) - parser (3.3.4.0) + snaky_hash (~> 2.0, >= 2.0.3) + version_gem (>= 1.1.8, < 3) + parallel (1.27.0) + parser (3.3.9.0) ast (~> 2.4.1) racc - psych (5.1.2) + pp (0.6.2) + prettyprint + prettyprint (0.2.0) + prism (1.4.0) + psych (5.2.6) + date stringio - public_suffix (6.0.0) - racc (1.8.0) - rack (3.1.7) - rack-session (2.0.0) + public_suffix (6.0.2) + racc (1.8.1) + rack (3.2.0) + rack-session (2.1.1) + base64 (>= 0.1.0) rack (>= 3.0.0) - rack-test (2.1.0) + rack-test (2.2.0) rack (>= 1.3) - rackup (2.1.0) + rackup (2.2.1) rack (>= 3) - webrick (~> 1.8) - rails (7.1.3.4) - actioncable (= 7.1.3.4) - actionmailbox (= 7.1.3.4) - actionmailer (= 7.1.3.4) - actionpack (= 7.1.3.4) - actiontext (= 7.1.3.4) - actionview (= 7.1.3.4) - activejob (= 7.1.3.4) - activemodel (= 7.1.3.4) - activerecord (= 7.1.3.4) - activestorage (= 7.1.3.4) - activesupport (= 7.1.3.4) + rails (8.0.2.1) + actioncable (= 8.0.2.1) + actionmailbox (= 8.0.2.1) + actionmailer (= 8.0.2.1) + actionpack (= 8.0.2.1) + actiontext (= 8.0.2.1) + actionview (= 8.0.2.1) + activejob (= 8.0.2.1) + activemodel (= 8.0.2.1) + activerecord (= 8.0.2.1) + activestorage (= 8.0.2.1) + activesupport (= 8.0.2.1) bundler (>= 1.15.0) - railties (= 7.1.3.4) - rails-dom-testing (2.2.0) + railties (= 8.0.2.1) + rails-dom-testing (2.3.0) activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.0) + rails-html-sanitizer (1.6.2) loofah (~> 2.21) - nokogiri (~> 1.14) - railties (7.1.3.4) - actionpack (= 7.1.3.4) - activesupport (= 7.1.3.4) - irb + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) + railties (8.0.2.1) + actionpack (= 8.0.2.1) + activesupport (= 8.0.2.1) + irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) thor (~> 1.0, >= 1.2.2) zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.2.1) - rdoc (6.7.0) + rake (13.3.0) + rdoc (6.14.2) + erb psych (>= 4.0.0) - regexp_parser (2.9.2) - reline (0.5.9) + regexp_parser (2.11.2) + reline (0.6.2) io-console (~> 0.5) - rexml (3.3.2) - strscan - rspec-core (3.13.0) + rexml (3.4.2) + rspec-core (3.13.5) rspec-support (~> 3.13.0) - rspec-expectations (3.13.1) + rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.1) + rspec-mocks (3.13.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-rails (6.1.3) - actionpack (>= 6.1) - activesupport (>= 6.1) - railties (>= 6.1) + rspec-rails (8.0.2) + actionpack (>= 7.2) + activesupport (>= 7.2) + railties (>= 7.2) rspec-core (~> 3.13) rspec-expectations (~> 3.13) rspec-mocks (~> 3.13) rspec-support (~> 3.13) - rspec-support (3.13.1) - rubocop (1.65.0) + rspec-support (3.13.5) + rubocop (1.80.0) json (~> 2.3) - language_server-protocol (>= 3.17.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.46.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.31.3) - parser (>= 3.3.1.0) - rubocop-rspec (3.0.3) - rubocop (~> 1.61) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.46.0) + parser (>= 3.3.7.2) + prism (~> 1.4) + rubocop-rake (0.7.1) + lint_roller (~> 1.1) + rubocop (>= 1.72.1) + rubocop-rspec (3.6.0) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) + rubocop-rspec_rails (2.31.0) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) + rubocop-rspec (~> 3.5) ruby-progressbar (1.13.0) - snaky_hash (2.0.1) - hashie - version_gem (~> 1.1, >= 1.1.1) - sqlite3 (1.7.3) - mini_portile2 (~> 2.8.0) - stringio (3.1.1) - strscan (3.1.0) - thor (1.3.1) - timeout (0.4.1) + securerandom (0.4.1) + snaky_hash (2.0.3) + hashie (>= 0.1.0, < 6) + version_gem (>= 1.1.8, < 3) + sqlite3 (2.7.3-aarch64-linux-gnu) + sqlite3 (2.7.3-aarch64-linux-musl) + sqlite3 (2.7.3-arm-linux-gnu) + sqlite3 (2.7.3-arm-linux-musl) + sqlite3 (2.7.3-arm64-darwin) + sqlite3 (2.7.3-x86_64-darwin) + sqlite3 (2.7.3-x86_64-linux-gnu) + sqlite3 (2.7.3-x86_64-linux-musl) + stringio (3.1.7) + thor (1.4.0) + timeout (0.4.3) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.5.0) - uri (0.13.0) - version_gem (1.1.4) - webmock (3.23.1) + unicode-display_width (3.1.5) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) + uri (1.0.3) + useragent (0.16.11) + version_gem (1.1.8) + webmock (3.25.1) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webrick (1.8.1) - websocket-driver (0.7.6) + websocket-driver (0.8.0) + base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - zeitwerk (2.6.16) + zeitwerk (2.7.3) PLATFORMS - ruby + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-musl + arm64-darwin + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl DEPENDENCIES gamora! - rake (~> 13.2) - rspec-rails (~> 6.1) - rubocop (~> 1.65) - rubocop-rspec (~> 3.0) - sqlite3 (~> 1.7) - webmock (~> 3.23) + rake (~> 13.3) + rspec-rails (~> 8.0) + rubocop (~> 1.80) + rubocop-rake + rubocop-rspec + rubocop-rspec_rails + sqlite3 (~> 2.7) + webmock (~> 3.25) BUNDLED WITH - 2.4.21 + 2.7.1 diff --git a/Rakefile b/Rakefile index 2f782fa..60fdbc1 100644 --- a/Rakefile +++ b/Rakefile @@ -16,4 +16,4 @@ require "rubocop/rake_task" RuboCop::RakeTask.new -task default: %i[spec rubocop] +task default: %i[rubocop spec] diff --git a/gamora.gemspec b/gamora.gemspec index a5b2f41..7db6a4d 100644 --- a/gamora.gemspec +++ b/gamora.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |spec| spec.summary = "OpenID Connect Relying Party for rails apps." spec.description = "Gamora aims to provide most of the functionality that is commonly required in an OIDC Client." spec.license = "MIT" - spec.required_ruby_version = ">= 2.7.0" + spec.required_ruby_version = ">= 3.2" # Prevent pushing this gem to RubyGems.org. To allow pushes either set the "allowed_push_host" # to allow pushing to a single host or delete this section to allow pushing to any host. diff --git a/lib/gamora/authentication/base.rb b/lib/gamora/authentication/base.rb index 62bbe87..aa7f6a4 100644 --- a/lib/gamora/authentication/base.rb +++ b/lib/gamora/authentication/base.rb @@ -63,7 +63,7 @@ def resource_owner_claims(access_token) cache_key = cache_key(:userinfo, access_token) expires_in = Configuration.userinfo_cache_expires_in - Rails.cache.fetch(cache_key, { expires_in: expires_in }) do + Rails.cache.fetch(cache_key, expires_in: expires_in) do oauth_client.userinfo(access_token) end end @@ -72,7 +72,7 @@ def introspect_access_token(access_token) cache_key = cache_key(:introspect, access_token) expires_in = Configuration.introspect_cache_expires_in - Rails.cache.fetch(cache_key, { expires_in: expires_in }) do + Rails.cache.fetch(cache_key, expires_in: expires_in) do oauth_client.introspect(access_token) end end diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index aaa4ec8..9b11779 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -6,6 +6,9 @@ require_relative "dummy/config/environment" # Prevent database truncation if the environment is production abort("The Rails environment is running in production mode!") if Rails.env.production? +# Uncomment the line below in case you have `--require rails_helper` in the `.rspec` file +# that will avoid rails generators crashing because migrations haven't been run yet +# return unless Rails.env.test? require "rspec/rails" require "webmock/rspec" # Add additional requires below this line. Rails is not loaded until this point! @@ -23,9 +26,11 @@ # directory. Alternatively, in the individual `*_spec.rb` files, manually # require only the support files necessary. # -# Dir[Rails.root.join("spec", "support", "**", "*.rb")].sort.each { |f| require f } +# Rails.root.glob('spec/support/**/*.rb').sort_by(&:to_s).each { |f| require f } -# Checks for pending migrations and applies them before tests are run. +# Ensures that the test database schema matches the current schema file. +# If there are pending migrations it will invoke `db:test:prepare` to +# recreate the test database by loading the schema. # If you are not using ActiveRecord, you can remove these lines. begin ActiveRecord::Migration.maintain_test_schema! @@ -34,7 +39,9 @@ end RSpec.configure do |config| # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures - config.fixture_path = "#{Rails.root}/spec/fixtures" + config.fixture_paths = [ + Rails.root.join("spec/fixtures") + ] # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, remove the following line or assign false @@ -44,19 +51,21 @@ # You can uncomment this line to turn off ActiveRecord support entirely. # config.use_active_record = false - # RSpec Rails can automatically mix in different behaviours to your tests - # based on their file location, for example enabling you to call `get` and - # `post` in specs under `spec/controllers`. + # RSpec Rails uses metadata to mix in different behaviours to your tests, + # for example enabling you to call `get` and `post` in request specs. e.g.: # - # You can disable this behaviour by removing the line below, and instead - # explicitly tag your specs with their type, e.g.: - # - # RSpec.describe UsersController, type: :controller do + # RSpec.describe UsersController, type: :request do # # ... # end # # The different available types are documented in the features, such as in - # https://rspec.info/features/6-0/rspec-rails + # https://rspec.info/features/8-0/rspec-rails + # + # You can also this infer these behaviours automatically by location, e.g. + # /spec/models would pull in the same behaviour as `type: :model` but this + # behaviour is considered legacy and will be removed in a future version. + # + # To enable this behaviour uncomment the line below. config.infer_spec_type_from_file_location! # Filter lines from Rails gems in backtraces. From d6a0b11f680e90f336024068ba7a6de79ed7e9bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Guti=C3=A9rrez?= Date: Tue, 26 Aug 2025 17:27:14 -0600 Subject: [PATCH 2/4] Fix tests --- .rubocop.yml | 1 - Gemfile | 1 - Gemfile.lock | 5 ----- 3 files changed, 7 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 046a5e6..2eb8ba1 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,7 +1,6 @@ plugins: - rubocop-rake - rubocop-rspec - - rubocop-rspec_rails AllCops: NewCops: enable diff --git a/Gemfile b/Gemfile index d318d17..12cb8f8 100644 --- a/Gemfile +++ b/Gemfile @@ -10,6 +10,5 @@ gem "rspec-rails", "~> 8.0" gem "rubocop", "~> 1.80" gem "rubocop-rake", require: false gem "rubocop-rspec", require: false -gem "rubocop-rspec_rails", require: false gem "sqlite3", "~> 2.7" gem "webmock", "~> 3.25" diff --git a/Gemfile.lock b/Gemfile.lock index b99dcd8..e476759 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -265,10 +265,6 @@ GEM rubocop-rspec (3.6.0) lint_roller (~> 1.1) rubocop (~> 1.72, >= 1.72.1) - rubocop-rspec_rails (2.31.0) - lint_roller (~> 1.1) - rubocop (~> 1.72, >= 1.72.1) - rubocop-rspec (~> 3.5) ruby-progressbar (1.13.0) securerandom (0.4.1) snaky_hash (2.0.3) @@ -320,7 +316,6 @@ DEPENDENCIES rubocop (~> 1.80) rubocop-rake rubocop-rspec - rubocop-rspec_rails sqlite3 (~> 2.7) webmock (~> 3.25) From 3cb094b1d1e6f67d230a49e19b5714d9b9e6a911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Guti=C3=A9rrez?= Date: Tue, 26 Aug 2025 17:28:49 -0600 Subject: [PATCH 3/4] Fix tests --- .rubocop.yml | 1 + Gemfile | 1 + Gemfile.lock | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index 2eb8ba1..046a5e6 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,6 +1,7 @@ plugins: - rubocop-rake - rubocop-rspec + - rubocop-rspec_rails AllCops: NewCops: enable diff --git a/Gemfile b/Gemfile index 12cb8f8..d318d17 100644 --- a/Gemfile +++ b/Gemfile @@ -10,5 +10,6 @@ gem "rspec-rails", "~> 8.0" gem "rubocop", "~> 1.80" gem "rubocop-rake", require: false gem "rubocop-rspec", require: false +gem "rubocop-rspec_rails", require: false gem "sqlite3", "~> 2.7" gem "webmock", "~> 3.25" diff --git a/Gemfile.lock b/Gemfile.lock index e476759..b99dcd8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -265,6 +265,10 @@ GEM rubocop-rspec (3.6.0) lint_roller (~> 1.1) rubocop (~> 1.72, >= 1.72.1) + rubocop-rspec_rails (2.31.0) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) + rubocop-rspec (~> 3.5) ruby-progressbar (1.13.0) securerandom (0.4.1) snaky_hash (2.0.3) @@ -316,6 +320,7 @@ DEPENDENCIES rubocop (~> 1.80) rubocop-rake rubocop-rspec + rubocop-rspec_rails sqlite3 (~> 2.7) webmock (~> 3.25) From 535d36225c486025c2ca613125b16f2854e49c22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Guti=C3=A9rrez?= Date: Tue, 26 Aug 2025 17:32:50 -0600 Subject: [PATCH 4/4] Fix rubocop --- .rubocop.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.rubocop.yml b/.rubocop.yml index 046a5e6..ef6551f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -9,6 +9,7 @@ AllCops: Exclude: - "spec/dummy/**/*" - "spec/spec_helper.rb" + - "vendor/**/*" Style/StringLiterals: Enabled: true