diff --git a/.rubocop.yml b/.rubocop.yml index 2dcfed086..816628fa0 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,15 +1,13 @@ inherit_from: .rubocop_todo.yml inherit_mode: { merge: [Exclude] } -require: +plugins: - rubocop-capybara - rubocop-factory_bot - - rubocop-rspec_rails - -plugins: - rubocop-rails - rubocop-rake - rubocop-rspec + - rubocop-rspec_rails AllCops: DisplayCopNames: true @@ -59,6 +57,7 @@ Style/Documentation: { Enabled: false } Bundler/GemComment: { Enabled: false } Bundler/GemVersion: { Enabled: false } +Capybara/AmbiguousClick: { Enabled: false } Layout/SingleLineBlockChain: { Enabled: false } Lint/ConstantResolution: { Enabled: false } Rails/BulkChangeTable: { Enabled: false } diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 4b63c89c9..e9ed9f4ab 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,11 +1,17 @@ # This configuration was generated by # `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 400` -# on 2024-03-23 21:41:23 UTC using RuboCop version 1.62.1. +# on 2025-03-17 18:44:59 UTC using RuboCop version 1.74.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. +# Offense count: 3 +Capybara/NegationMatcherAfterVisit: + Exclude: + - 'spec/system/account_setup_spec.rb' + - 'spec/system/stories_index_spec.rb' + # Offense count: 6 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle. @@ -18,18 +24,6 @@ Layout/HashAlignment: - 'db/migrate/20240314031221_create_good_job_labels_index.rb' - 'db/migrate/20240314031223_create_index_good_job_jobs_for_candidate_lookup.rb' -# Offense count: 28 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns. -# URISchemes: http, https -Layout/LineLength: - Exclude: - - 'db/migrate/20230801025231_create_index_good_jobs_jobs_on_priority_created_at_when_unfinished.rb' - - 'db/migrate/20240314031219_recreate_good_job_cron_indexes_with_conditional.rb' - - 'db/migrate/20240314031221_create_good_job_labels_index.rb' - - 'db/migrate/20240314031222_remove_good_job_active_id_index.rb' - - 'db/migrate/20240314031223_create_index_good_job_jobs_for_candidate_lookup.rb' - # Offense count: 19 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowMultilineFinalElement. @@ -55,21 +49,6 @@ Lint/NumberConversion: - 'spec/models/feed_spec.rb' - 'spec/models/story_spec.rb' -# Offense count: 3 -# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max. -Metrics/AbcSize: - Exclude: - - 'db/migrate/20230801025232_create_good_job_batches.rb' - - 'db/migrate/20230801025233_create_good_job_executions.rb' - - 'db/migrate/20240314031219_recreate_good_job_cron_indexes_with_conditional.rb' - -# Offense count: 1 -# Configuration parameters: CountComments, Max, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode. -# AllowedMethods: refine -Metrics/BlockLength: - Exclude: - - 'db/migrate/20240314031219_recreate_good_job_cron_indexes_with_conditional.rb' - # Offense count: 1 # Configuration parameters: AllowedMethods, AllowedPatterns, Max. Metrics/CyclomaticComplexity: @@ -92,7 +71,7 @@ Metrics/PerceivedComplexity: - 'db/migrate/20240314031219_recreate_good_job_cron_indexes_with_conditional.rb' # Offense count: 2 -# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros. +# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros, UseSorbetSigs. # NamePrefix: is_, has_, have_ # ForbiddenPrefixes: is_, has_, have_ # AllowedMethods: is_a? @@ -106,7 +85,7 @@ RSpec/Be: Exclude: - 'spec/commands/feed/import_from_opml_spec.rb' -# Offense count: 12 +# Offense count: 13 # Configuration parameters: Prefixes, AllowedPatterns. # Prefixes: when, with, without RSpec/ContextWording: @@ -123,7 +102,7 @@ RSpec/DescribeClass: Exclude: - 'spec/integration/feed_importing_spec.rb' -# Offense count: 33 +# Offense count: 34 # Configuration parameters: Max, CountAsOne. RSpec/ExampleLength: Exclude: @@ -155,7 +134,7 @@ RSpec/MessageExpectation: - 'spec/tasks/remove_old_stories_spec.rb' - 'spec/utils/i18n_support_spec.rb' -# Offense count: 25 +# Offense count: 26 # Configuration parameters: Max. RSpec/MultipleExpectations: Exclude: @@ -222,14 +201,13 @@ Rails/SaveBang: - 'app/repositories/user_repository.rb' - 'db/migrate/20130821020313_update_nil_entry_ids.rb' -# Offense count: 3 +# Offense count: 2 # Configuration parameters: ForbiddenMethods, AllowedMethods. # ForbiddenMethods: decrement!, decrement_counter, increment!, increment_counter, insert, insert!, insert_all, insert_all!, toggle!, touch, touch_all, update_all, update_attribute, update_column, update_columns, update_counters, upsert, upsert_all Rails/SkipsModelValidations: Exclude: - 'db/migrate/20140421224454_fix_invalid_unicode.rb' - 'db/migrate/20141102103617_fix_invalid_titles_with_unicode_line_endings.rb' - - 'db/migrate/20230223231930_add_username_to_users.rb' # Offense count: 5 # Configuration parameters: Include. diff --git a/Gemfile.lock b/Gemfile.lock index 72268d97b..92e1c2977 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,29 +1,29 @@ GEM remote: https://rubygems.org/ specs: - actioncable (8.0.1) - actionpack (= 8.0.1) - activesupport (= 8.0.1) + actioncable (8.0.2) + actionpack (= 8.0.2) + activesupport (= 8.0.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (8.0.1) - actionpack (= 8.0.1) - activejob (= 8.0.1) - activerecord (= 8.0.1) - activestorage (= 8.0.1) - activesupport (= 8.0.1) + actionmailbox (8.0.2) + actionpack (= 8.0.2) + activejob (= 8.0.2) + activerecord (= 8.0.2) + activestorage (= 8.0.2) + activesupport (= 8.0.2) mail (>= 2.8.0) - actionmailer (8.0.1) - actionpack (= 8.0.1) - actionview (= 8.0.1) - activejob (= 8.0.1) - activesupport (= 8.0.1) + actionmailer (8.0.2) + actionpack (= 8.0.2) + actionview (= 8.0.2) + activejob (= 8.0.2) + activesupport (= 8.0.2) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (8.0.1) - actionview (= 8.0.1) - activesupport (= 8.0.1) + actionpack (8.0.2) + actionview (= 8.0.2) + activesupport (= 8.0.2) nokogiri (>= 1.8.5) rack (>= 2.2.4) rack-session (>= 1.0.1) @@ -31,35 +31,35 @@ GEM rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (8.0.1) - actionpack (= 8.0.1) - activerecord (= 8.0.1) - activestorage (= 8.0.1) - activesupport (= 8.0.1) + actiontext (8.0.2) + actionpack (= 8.0.2) + activerecord (= 8.0.2) + activestorage (= 8.0.2) + activesupport (= 8.0.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (8.0.1) - activesupport (= 8.0.1) + actionview (8.0.2) + activesupport (= 8.0.2) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (8.0.1) - activesupport (= 8.0.1) + activejob (8.0.2) + activesupport (= 8.0.2) globalid (>= 0.3.6) - activemodel (8.0.1) - activesupport (= 8.0.1) - activerecord (8.0.1) - activemodel (= 8.0.1) - activesupport (= 8.0.1) + activemodel (8.0.2) + activesupport (= 8.0.2) + activerecord (8.0.2) + activemodel (= 8.0.2) + activesupport (= 8.0.2) timeout (>= 0.4.0) - activestorage (8.0.1) - actionpack (= 8.0.1) - activejob (= 8.0.1) - activerecord (= 8.0.1) - activesupport (= 8.0.1) + activestorage (8.0.2) + actionpack (= 8.0.2) + activejob (= 8.0.2) + activerecord (= 8.0.2) + activesupport (= 8.0.2) marcel (~> 1.0) - activesupport (8.0.1) + activesupport (8.0.2) base64 benchmark (>= 0.3) bigdecimal @@ -189,7 +189,7 @@ GEM method_source (1.1.0) mini_mime (1.1.5) mini_portile2 (2.8.8) - minitest (5.25.4) + minitest (5.25.5) msgpack (1.8.0) multi_xml (0.7.1) bigdecimal (~> 3.1) @@ -203,7 +203,7 @@ GEM net-smtp (0.5.1) net-protocol nio4r (2.7.4) - nokogiri (1.18.3) + nokogiri (1.18.4) mini_portile2 (~> 2.8.2) racc (~> 1.4) ostruct (0.6.1) @@ -239,20 +239,20 @@ GEM rack (>= 1.3) rackup (2.2.1) rack (>= 3) - rails (8.0.1) - actioncable (= 8.0.1) - actionmailbox (= 8.0.1) - actionmailer (= 8.0.1) - actionpack (= 8.0.1) - actiontext (= 8.0.1) - actionview (= 8.0.1) - activejob (= 8.0.1) - activemodel (= 8.0.1) - activerecord (= 8.0.1) - activestorage (= 8.0.1) - activesupport (= 8.0.1) + rails (8.0.2) + actioncable (= 8.0.2) + actionmailbox (= 8.0.2) + actionmailer (= 8.0.2) + actionpack (= 8.0.2) + actiontext (= 8.0.2) + actionview (= 8.0.2) + activejob (= 8.0.2) + activemodel (= 8.0.2) + activerecord (= 8.0.2) + activestorage (= 8.0.2) + activesupport (= 8.0.2) bundler (>= 1.15.0) - railties (= 8.0.1) + railties (= 8.0.2) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -260,9 +260,9 @@ GEM rails-html-sanitizer (1.6.2) loofah (~> 2.21) 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.1) - actionpack (= 8.0.1) - activesupport (= 8.0.1) + railties (8.0.2) + actionpack (= 8.0.2) + activesupport (= 8.0.2) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -300,7 +300,7 @@ GEM rspec-mocks (~> 3.13) rspec-support (~> 3.13) rspec-support (3.13.2) - rubocop (1.73.2) + rubocop (1.74.0) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -311,11 +311,12 @@ GEM rubocop-ast (>= 1.38.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.38.1) + rubocop-ast (1.39.0) parser (>= 3.3.1.0) - rubocop-capybara (2.21.0) - rubocop (~> 1.41) - rubocop-factory_bot (2.27.0) + rubocop-capybara (2.22.1) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) + rubocop-factory_bot (2.27.1) lint_roller (~> 1.1) rubocop (~> 1.72, >= 1.72.1) rubocop-rails (2.30.3) @@ -330,9 +331,10 @@ GEM rubocop-rspec (3.5.0) lint_roller (~> 1.1) rubocop (~> 1.72, >= 1.72.1) - rubocop-rspec_rails (2.30.0) - rubocop (~> 1.61) - rubocop-rspec (~> 3, >= 3.0.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) rubyzip (2.4.1) sass (3.7.4)