From 78bd1ce2aa48855ec8baf0b66c771c7c52414d35 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Sun, 22 Sep 2024 05:15:25 +0000 Subject: [PATCH 1/2] Update rubocop-rails to version 2.26.2 --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 35172b08..b8b4df6b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -311,10 +311,10 @@ GEM rubocop (~> 1.41) rubocop-factory_bot (2.26.1) rubocop (~> 1.61) - rubocop-rails (2.25.1) + rubocop-rails (2.26.2) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 1.33.0, < 2.0) + rubocop (>= 1.52.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) rubocop-rspec (3.0.5) rubocop (~> 1.61) From 61da528c59ac6781bc4328f00f6d67573b880dc7 Mon Sep 17 00:00:00 2001 From: Dani Donisa Date: Mon, 23 Sep 2024 17:23:26 +0200 Subject: [PATCH 2/2] Fix Rails/RootPathnameMethods cop --- spec/rails_helper.rb | 2 +- spec/support/sphinx_helpers.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 619fe4fe..7f947e9d 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -21,7 +21,7 @@ # run twice. It is recommended that you do not name files matching this glob to # end with _spec.rb. You can configure this pattern with the --pattern # option on the command line or in ~/.rspec, .rspec or `.rspec-local`. -Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f } +Rails.root.glob('spec/support/**/*.rb').each { |f| require f } # Checks for pending migrations before tests are run. # If you are not using ActiveRecord, you can remove this line. diff --git a/spec/support/sphinx_helpers.rb b/spec/support/sphinx_helpers.rb index 55cc4c2b..92f08cdd 100644 --- a/spec/support/sphinx_helpers.rb +++ b/spec/support/sphinx_helpers.rb @@ -6,6 +6,6 @@ def index end def index_finished? - Dir[Rails.root.join(ThinkingSphinx::Test.config.indices_location, '*.{new,tmp}*')].empty? + Rails.root.glob("#{ThinkingSphinx::Test.config.indices_location}/*.{new,tmp}*").empty? end end