From 4fff4d9530ced9cae544ad19c386fd9f1210d9c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 08:21:12 +0000 Subject: [PATCH 1/2] Upgrade: Bump rubocop-rails from 2.25.1 to 2.26.0 Bumps [rubocop-rails](https://github.com/rubocop/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 ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index acd9123842..5972e4cf82 100644 --- a/Gemfile +++ b/Gemfile @@ -61,7 +61,7 @@ group :development do gem 'rack-mini-profiler' gem 'rubocop', '~> 1.61', require: false gem 'rubocop-performance', '~> 1.19', require: false - gem 'rubocop-rails', '~> 2.25', require: false + gem 'rubocop-rails', '~> 2.26', require: false gem 'rubocop-rspec', '~> 2.25', require: false gem 'web-console', '~> 4.2' end diff --git a/Gemfile.lock b/Gemfile.lock index 4fdc55d918..f1718b8a8b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -344,7 +344,7 @@ GEM omniauth (~> 2.0) orm_adapter (0.5.0) pagy (9.0.5) - parallel (1.26.1) + parallel (1.26.3) parallel_tests (4.7.1) parallel parser (3.3.4.2) @@ -482,7 +482,7 @@ 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) @@ -491,10 +491,10 @@ GEM rubocop-performance (1.21.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - 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 (2.31.0) rubocop (~> 1.40) @@ -647,7 +647,7 @@ DEPENDENCIES rspec_junit_formatter (~> 0.6) rubocop (~> 1.61) rubocop-performance (~> 1.19) - rubocop-rails (~> 2.25) + rubocop-rails (~> 2.26) rubocop-rspec (~> 2.25) ruby-progressbar (~> 1.13) scenic (~> 1.8) From f1ddd0e90351e6a24bcfa79f015a50defc23c86a Mon Sep 17 00:00:00 2001 From: Kevin Date: Tue, 27 Aug 2024 07:35:10 +0100 Subject: [PATCH 2/2] Chore: Fix new linting errors from bump --- app/models/flag.rb | 4 ++-- spec/rails_helper.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/flag.rb b/app/models/flag.rb index 7ffac07bf6..652defe3e8 100644 --- a/app/models/flag.rb +++ b/app/models/flag.rb @@ -18,8 +18,8 @@ class Flag < ApplicationRecord validates :resolved_by_id, presence: true, if: -> { status == 'resolved' } enum reason: REASONS.each_with_object({}) { |reason, hash| hash[reason.name] = reason.value } - enum status: { active: 0, resolved: 1 } - enum action_taken: { pending: 0, dismiss: 1, ban: 2, removed_project_submission: 3, notified_user: 4 } + enum :status, { active: 0, resolved: 1 } + enum :action_taken, { pending: 0, dismiss: 1, ban: 2, removed_project_submission: 3, notified_user: 4 } scope :by_status, ->(status) { where(status:) } scope :count_for, ->(status) { by_status(status).count } diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 073080110a..c3efbed115 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -8,7 +8,7 @@ abort('The Rails environment is running in production mode!') if Rails.env.production? require 'rspec/rails' -Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f } +Rails.root.glob('spec/support/**/*.rb').each { |f| require f } ActiveRecord::Migration[6.0].maintain_test_schema! require 'dotenv'