From 116ab78f5f798d21d62be27c215cfadb641285b0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 02:32:42 +0000 Subject: [PATCH 1/2] Bump rubocop-rails from 2.25.1 to 2.26.0 in the rubocop group Bumps the rubocop group with 1 update: [rubocop-rails](https://github.com/rubocop/rubocop-rails). Updates `rubocop-rails` from 2.25.1 to 2.26.0 - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.25.1...v2.26.0) --- updated-dependencies: - dependency-name: rubocop-rails dependency-type: direct:development update-type: version-update:semver-minor dependency-group: rubocop ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2787c38c6..e9612ca61 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -313,7 +313,7 @@ GEM actionpack (>= 4.2) omniauth (~> 2.0) optimist (3.1.0) - parallel (1.26.2) + parallel (1.26.3) parser (3.3.4.2) ast (~> 2.4.1) racc @@ -458,16 +458,16 @@ GEM rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.32.0) + rubocop-ast (1.32.1) parser (>= 3.3.1.0) rubocop-capybara (2.21.0) rubocop (~> 1.41) rubocop-factory_bot (2.26.1) rubocop (~> 1.61) - rubocop-rails (2.25.1) + rubocop-rails (2.26.0) 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.4) rubocop (~> 1.61) From 0d2879eed896303e0a657d89612dae359610481c Mon Sep 17 00:00:00 2001 From: Thomas COMES Date: Mon, 26 Aug 2024 14:09:14 +0200 Subject: [PATCH 2/2] Rubocop is a cop --- app/lib/seeds.rb | 2 +- app/models/abstract_blog_post.rb | 2 +- app/models/prolong_token_wizard.rb | 2 +- spec/rails_helper.rb | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/lib/seeds.rb b/app/lib/seeds.rb index 685c56c9b..b8bf8205d 100644 --- a/app/lib/seeds.rb +++ b/app/lib/seeds.rb @@ -215,6 +215,6 @@ def create_user_authorization_request_role(params = {}) end def load_all_models! - Dir[Rails.root.join('app/models/**/*.rb')].each { |f| require f } + Rails.root.glob('app/models/**/*.rb').each { |f| require f } end end diff --git a/app/models/abstract_blog_post.rb b/app/models/abstract_blog_post.rb index 2729dffe1..21eae25c8 100644 --- a/app/models/abstract_blog_post.rb +++ b/app/models/abstract_blog_post.rb @@ -21,6 +21,6 @@ def self.all end def self.blog_posts_files - Dir[Rails.root.join('config/blog_posts', api, '*.md')] + Rails.root.glob("config/blog_posts/#{api}/*.md") end end diff --git a/app/models/prolong_token_wizard.rb b/app/models/prolong_token_wizard.rb index 90e96905e..b7b7735a1 100644 --- a/app/models/prolong_token_wizard.rb +++ b/app/models/prolong_token_wizard.rb @@ -4,7 +4,7 @@ class ProlongTokenWizard < ApplicationRecord delegate :prolong!, to: :token delegate :authorization_request, to: :token - enum status: { + enum :status, { owner: 0, project_purpose: 10, contacts: 20, diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 9e95b44b7..4a4e2ae46 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -20,8 +20,8 @@ # option on the command line or in ~/.rspec, .rspec or `.rspec-local`. # Require helpers files containing factories -Dir[Rails.root.join('spec/helpers/**/*.rb')].each { |f| require f } -Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f } +Rails.root.glob('spec/helpers/**/*.rb').each { |f| require f } +Rails.root.glob('spec/support/**/*.rb').each { |f| require f } # Checks for pending migration and applies them before tests are run. # If you are not using ActiveRecord, you can remove this line.