From d080289ba837264b0ea60043795a54e901c34dc2 Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Wed, 29 Apr 2026 16:44:49 +0100 Subject: [PATCH 01/16] build: update simplecov dependencies --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 475605e..8f0350f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,7 +10,7 @@ GEM base64 (0.1.1) coderay (1.1.3) diff-lcs (1.5.0) - docile (1.4.0) + docile (1.4.1) json (2.6.3) language_server-protocol (3.17.0.3) method_source (1.0.0) @@ -66,7 +66,7 @@ GEM docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) - simplecov-html (0.12.3) + simplecov-html (0.13.2) simplecov-lcov (0.9.0) simplecov_json_formatter (0.1.4) unicode-display_width (2.4.2) From a0b8f2b6aa80dbcc92c998b4f93050681073d4be Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Wed, 29 Apr 2026 17:04:30 +0100 Subject: [PATCH 02/16] style: update rubocop todo --- .rubocop.yml | 4 ++++ .rubocop_todo.yml | 7 +------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index f818d06..488a7bf 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -23,6 +23,10 @@ Metrics/BlockLength: - describe - context +# This isn't something we need to be strict about, and the default of 5 is too low for our tests. +RSpec/MultipleMemoizedHelpers: + Max: 7 + # Increase the acceptable nesting levels. While we don't want # 4 nested contexts, it appears that the cop is also counting # describe. So by the time we've described out class, and the method diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 50661b3..28e258a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,12 +1,7 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2023-09-22 13:23:22 UTC using RuboCop version 1.56.3. +# on 2026-04-29 16:04:16 UTC using RuboCop version 1.56.3. # 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: 13 -# Configuration parameters: AllowSubject. -RSpec/MultipleMemoizedHelpers: - Max: 7 From 81862502a6cfd8b541fa445b99db602cb409f8fc Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Wed, 29 Apr 2026 17:07:25 +0100 Subject: [PATCH 03/16] style: enable all cops by default --- .rubocop.yml | 24 +++----------------- .rubocop_todo.yml | 56 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 22 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 488a7bf..d146f97 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -13,6 +13,9 @@ inherit_from: .rubocop_todo.yml require: rubocop-rspec +AllCops: + NewCops: enable + Layout/LineLength: Max: 120 @@ -34,24 +37,3 @@ RSpec/MultipleMemoizedHelpers: # but feels a little strict to me. RSpec/NestedGroups: Max: 4 - -# Pending cops in 0.83 can be removed once enabled in bulk -# see https://docs.rubocop.org/en/latest/versioning/: -Layout/SpaceAroundMethodCallOperator: - Enabled: true -Lint/RaiseException: - Enabled: true -Lint/StructNewOverride: - Enabled: true -Style/ExponentialNotation: - Enabled: true -Style/HashEachMethods: - Enabled: true -Style/HashTransformKeys: - Enabled: true -Style/HashTransformValues: - Enabled: true -Layout/EmptyLinesAroundAttributeAccessor: - Enabled: true -Style/SlicingWithRange: - Enabled: true diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 28e258a..ec2a96a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,7 +1,61 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2026-04-29 16:04:16 UTC using RuboCop version 1.56.3. +# on 2026-04-29 16:06:50 UTC using RuboCop version 1.56.3. # 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: 9 +# Configuration parameters: EnforcedStyle, AllowedGems, Include. +# SupportedStyles: Gemfile, gems.rb, gemspec +# Include: **/*.gemspec, **/Gemfile, **/gems.rb +Gemspec/DevelopmentDependencies: + Exclude: + - 'record_loader.gemspec' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: Severity, Include. +# Include: **/*.gemspec +Gemspec/RequireMFA: + Exclude: + - 'record_loader.gemspec' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: aligned, indented +Layout/LineEndStringConcatenationIndentation: + Exclude: + - 'record_loader.gemspec' + +# Offense count: 2 +# This cop supports unsafe autocorrection (--autocorrect-all). +RSpec/BeEq: + Exclude: + - 'spec/record_loader/attribute_spec.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: be, be_nil +RSpec/BeNil: + Exclude: + - 'spec/record_loader_spec.rb' + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle. +# SupportedStyles: hash, symbol +RSpec/MetadataStyle: + Exclude: + - 'spec/record_loader/attribute_spec.rb' + - 'spec/record_loader/base_spec.rb' + +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +RSpec/SortMetadata: + Exclude: + - 'spec/record_loader/attribute_spec.rb' + - 'spec/record_loader/base_spec.rb' From e9f4d25146326a60f41d665950dfeff1d5c36cba Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Wed, 29 Apr 2026 16:46:49 +0100 Subject: [PATCH 04/16] build: update rubocop dependencies --- .rubocop.yml | 4 +-- Gemfile.lock | 57 ++++++++++++++++++++----------------------- record_loader.gemspec | 2 +- 3 files changed, 30 insertions(+), 33 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index d146f97..b7d06da 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -9,9 +9,9 @@ inherit_from: .rubocop_todo.yml # RuboCop will start looking for the configuration file in the directory # where the inspected file is and continue its way up to the root directory. # -# See https://github.com/rubocop-hq/rubocop/blob/master/manual/configuration.md +# See https://docs.rubocop.org/rubocop/latest/configuration.html -require: rubocop-rspec +plugins: rubocop-rspec AllCops: NewCops: enable diff --git a/Gemfile.lock b/Gemfile.lock index 8f0350f..40803ac 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,26 +6,26 @@ PATH GEM remote: https://rubygems.org/ specs: - ast (2.4.2) - base64 (0.1.1) + ast (2.4.3) coderay (1.1.3) diff-lcs (1.5.0) docile (1.4.1) - json (2.6.3) - language_server-protocol (3.17.0.3) + json (2.19.4) + language_server-protocol (3.17.0.5) + lint_roller (1.1.0) method_source (1.0.0) - parallel (1.23.0) - parser (3.2.2.3) + parallel (1.28.0) + parser (3.3.11.1) ast (~> 2.4.1) racc + prism (1.9.0) pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - racc (1.7.1) + racc (1.8.1) rainbow (3.1.1) rake (13.0.6) - regexp_parser (2.8.1) - rexml (3.2.6) + regexp_parser (2.12.0) rspec (3.12.0) rspec-core (~> 3.12.0) rspec-expectations (~> 3.12.0) @@ -39,28 +39,23 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.56.3) - base64 (~> 0.1.1) + rubocop (1.86.1) json (~> 2.3) - language_server-protocol (>= 3.17.0) - parallel (~> 1.10) - parser (>= 3.2.2.3) + 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 (>= 1.8, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.1, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.29.0) - parser (>= 3.2.1.0) - rubocop-capybara (2.19.0) - rubocop (~> 1.41) - rubocop-factory_bot (2.24.0) - rubocop (~> 1.33) - rubocop-rspec (2.24.0) - rubocop (~> 1.33) - rubocop-capybara (~> 2.17) - rubocop-factory_bot (~> 2.22) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.49.1) + parser (>= 3.3.7.2) + prism (~> 1.7) + rubocop-rspec (3.9.0) + lint_roller (~> 1.1) + rubocop (~> 1.81) ruby-progressbar (1.13.0) simplecov (0.22.0) docile (~> 1.1) @@ -69,7 +64,9 @@ GEM simplecov-html (0.13.2) simplecov-lcov (0.9.0) simplecov_json_formatter (0.1.4) - unicode-display_width (2.4.2) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) + unicode-emoji (4.2.0) yard (0.9.34) PLATFORMS @@ -82,7 +79,7 @@ DEPENDENCIES record_loader! rspec (~> 3.12) rubocop (~> 1.56) - rubocop-rspec (~> 2.24) + rubocop-rspec (~> 3.0) simplecov (~> 0.22) simplecov-lcov (~> 0.9) yard (~> 0.9) diff --git a/record_loader.gemspec b/record_loader.gemspec index 9d65c29..a0389e8 100644 --- a/record_loader.gemspec +++ b/record_loader.gemspec @@ -46,7 +46,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec', '~> 3.12' spec.add_development_dependency 'rubocop', '~> 1.56' - spec.add_development_dependency 'rubocop-rspec', '~> 2.24' + spec.add_development_dependency 'rubocop-rspec', '~> 3.0' spec.add_development_dependency 'simplecov', '~> 0.22' spec.add_development_dependency 'simplecov-lcov', '~> 0.9' spec.add_development_dependency 'yard', '~> 0.9' From d35b445b01cdcd0c6078c30167d57b1c97421640 Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Wed, 29 Apr 2026 17:08:13 +0100 Subject: [PATCH 05/16] style: update rubocop todo --- .rubocop_todo.yml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index ec2a96a..d36c9e3 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,23 +1,20 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2026-04-29 16:06:50 UTC using RuboCop version 1.56.3. +# on 2026-04-29 16:07:57 UTC using RuboCop version 1.86.1. # 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: 9 -# Configuration parameters: EnforcedStyle, AllowedGems, Include. +# Configuration parameters: EnforcedStyle, AllowedGems. # SupportedStyles: Gemfile, gems.rb, gemspec -# Include: **/*.gemspec, **/Gemfile, **/gems.rb Gemspec/DevelopmentDependencies: Exclude: - 'record_loader.gemspec' # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: Severity, Include. -# Include: **/*.gemspec Gemspec/RequireMFA: Exclude: - 'record_loader.gemspec' @@ -59,3 +56,18 @@ RSpec/SortMetadata: Exclude: - 'spec/record_loader/attribute_spec.rb' - 'spec/record_loader/base_spec.rb' + +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: EnforcedStyle, AllowedParentClasses. +# SupportedStyles: class_keyword, class_new, class_definition +Style/EmptyClassDefinition: + Exclude: + - 'lib/record_loader.rb' + +# Offense count: 3 +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/ReduceToHash: + Exclude: + - 'lib/generators/record_loader/record_loader_generator.rb' + - 'lib/record_loader.rb' From 2b8e7dd264a93b4b82dea0583e0531e2bd89733f Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Wed, 29 Apr 2026 17:11:58 +0100 Subject: [PATCH 06/16] style: remove deprecated config --- .rubocop.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index b7d06da..2cdbd28 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -19,13 +19,6 @@ AllCops: Layout/LineLength: Max: 120 -# Blocks are used to structure tests and are part of the rspec dsl. -# The standard BlockLength limits are too stringent for this purpose. -Metrics/BlockLength: - ExcludedMethods: - - describe - - context - # This isn't something we need to be strict about, and the default of 5 is too low for our tests. RSpec/MultipleMemoizedHelpers: Max: 7 From bec2411c68c70b0fb77a9733cf9941c2514d9e19 Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Wed, 29 Apr 2026 17:14:19 +0100 Subject: [PATCH 07/16] build: add rubocop-rake --- .rubocop.yml | 4 +++- .rubocop_todo.yml | 10 ++++++++-- Gemfile.lock | 4 ++++ record_loader.gemspec | 1 + 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 2cdbd28..38d552b 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -11,7 +11,9 @@ inherit_from: .rubocop_todo.yml # # See https://docs.rubocop.org/rubocop/latest/configuration.html -plugins: rubocop-rspec +plugins: +- rubocop-rake +- rubocop-rspec AllCops: NewCops: enable diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index d36c9e3..8b072c6 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,12 +1,12 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2026-04-29 16:07:57 UTC using RuboCop version 1.86.1. +# on 2026-04-29 16:14:00 UTC using RuboCop version 1.86.1. # 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: 9 +# Offense count: 10 # Configuration parameters: EnforcedStyle, AllowedGems. # SupportedStyles: Gemfile, gems.rb, gemspec Gemspec/DevelopmentDependencies: @@ -57,6 +57,12 @@ RSpec/SortMetadata: - 'spec/record_loader/attribute_spec.rb' - 'spec/record_loader/base_spec.rb' +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +Rake/Desc: + Exclude: + - 'Rakefile' + # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, AllowedParentClasses. diff --git a/Gemfile.lock b/Gemfile.lock index 40803ac..3196b27 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,6 +53,9 @@ GEM rubocop-ast (1.49.1) parser (>= 3.3.7.2) prism (~> 1.7) + rubocop-rake (0.7.1) + lint_roller (~> 1.1) + rubocop (>= 1.72.1) rubocop-rspec (3.9.0) lint_roller (~> 1.1) rubocop (~> 1.81) @@ -79,6 +82,7 @@ DEPENDENCIES record_loader! rspec (~> 3.12) rubocop (~> 1.56) + rubocop-rake (~> 0.7.1) rubocop-rspec (~> 3.0) simplecov (~> 0.22) simplecov-lcov (~> 0.9) diff --git a/record_loader.gemspec b/record_loader.gemspec index a0389e8..664ab35 100644 --- a/record_loader.gemspec +++ b/record_loader.gemspec @@ -46,6 +46,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec', '~> 3.12' spec.add_development_dependency 'rubocop', '~> 1.56' + spec.add_development_dependency 'rubocop-rake', '~> 0.7.1' spec.add_development_dependency 'rubocop-rspec', '~> 3.0' spec.add_development_dependency 'simplecov', '~> 0.22' spec.add_development_dependency 'simplecov-lcov', '~> 0.9' From 55994c2442f5cd306e8d1fecc537322d40bba68e Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Wed, 29 Apr 2026 17:17:43 +0100 Subject: [PATCH 08/16] style: clean rubocop.yml bundle add ruboclean bundle exec ruboclean --preserve-comments --- .rubocop.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index 38d552b..8b2b1c2 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,4 +1,6 @@ -inherit_from: .rubocop_todo.yml +--- + +inherit_from: ".rubocop_todo.yml" # The behaviour of RuboCop can be controlled via the .rubocop.yml # configuration file. It makes it possible to enable/disable From e5fb2ca6c34598f67d2fe47fdaba75dc50f38c6f Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Wed, 29 Apr 2026 17:15:15 +0100 Subject: [PATCH 09/16] style: lint Gemspec/DevelopmentDependencies --- .rubocop.yml | 3 +++ .rubocop_todo.yml | 7 ------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 8b2b1c2..73cd60b 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -20,6 +20,9 @@ plugins: AllCops: NewCops: enable +Gemspec/DevelopmentDependencies: + EnforcedStyle: gemspec + Layout/LineLength: Max: 120 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 8b072c6..2de247d 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -6,13 +6,6 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 10 -# Configuration parameters: EnforcedStyle, AllowedGems. -# SupportedStyles: Gemfile, gems.rb, gemspec -Gemspec/DevelopmentDependencies: - Exclude: - - 'record_loader.gemspec' - # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). Gemspec/RequireMFA: From e1f64b3b745a7054b896669ccd05377c73ca0172 Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Wed, 29 Apr 2026 17:23:27 +0100 Subject: [PATCH 10/16] style: lint Layout/LineEndStringConcatenationIndentation --- .rubocop_todo.yml | 17 ++++++++--------- record_loader.gemspec | 3 +-- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 2de247d..7cdc76a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2026-04-29 16:14:00 UTC using RuboCop version 1.86.1. +# on 2026-04-29 16:23:05 UTC using RuboCop version 1.86.1. # 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 @@ -12,14 +12,6 @@ Gemspec/RequireMFA: Exclude: - 'record_loader.gemspec' -# Offense count: 1 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: EnforcedStyle, IndentationWidth. -# SupportedStyles: aligned, indented -Layout/LineEndStringConcatenationIndentation: - Exclude: - - 'record_loader.gemspec' - # Offense count: 2 # This cop supports unsafe autocorrection (--autocorrect-all). RSpec/BeEq: @@ -64,6 +56,13 @@ Style/EmptyClassDefinition: Exclude: - 'lib/record_loader.rb' +# Offense count: 1 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals. +Style/GuardClause: + Exclude: + - 'record_loader.gemspec' + # Offense count: 3 # This cop supports unsafe autocorrection (--autocorrect-all). Style/ReduceToHash: diff --git a/record_loader.gemspec b/record_loader.gemspec index 664ab35..743cb26 100644 --- a/record_loader.gemspec +++ b/record_loader.gemspec @@ -27,8 +27,7 @@ Gem::Specification.new do |spec| spec.metadata['source_code_uri'] = 'https://www.github.com/sanger/record_loader' # spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here." else - raise 'RubyGems 2.0 or newer is required to protect against ' \ - 'public gem pushes.' + raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.' end # Specify which files should be added to the gem when it is released. From 5d2e12e207e0694f02af80ec80c85137c7173305 Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Wed, 29 Apr 2026 17:24:44 +0100 Subject: [PATCH 11/16] style: lint RSpec/BeEq --- .rubocop_todo.yml | 6 ------ spec/record_loader/attribute_spec.rb | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 7cdc76a..1b1aa01 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -12,12 +12,6 @@ Gemspec/RequireMFA: Exclude: - 'record_loader.gemspec' -# Offense count: 2 -# This cop supports unsafe autocorrection (--autocorrect-all). -RSpec/BeEq: - Exclude: - - 'spec/record_loader/attribute_spec.rb' - # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. diff --git a/spec/record_loader/attribute_spec.rb b/spec/record_loader/attribute_spec.rb index 7ee39e8..950f9d2 100644 --- a/spec/record_loader/attribute_spec.rb +++ b/spec/record_loader/attribute_spec.rb @@ -178,13 +178,13 @@ context 'without a default' do let(:default) { nil } - it { is_expected.to eq false } + it { is_expected.to be false } end context 'with a default' do let(:default) { true } - it { is_expected.to eq true } + it { is_expected.to be true } end end end From 4e1892754ab069b2166e4b8aa8e998c3809e5bb8 Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Wed, 29 Apr 2026 17:25:22 +0100 Subject: [PATCH 12/16] style: lint RSpec/BeNil --- .rubocop_todo.yml | 8 -------- spec/record_loader_spec.rb | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 1b1aa01..d5e1a20 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -12,14 +12,6 @@ Gemspec/RequireMFA: Exclude: - 'record_loader.gemspec' -# Offense count: 1 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: EnforcedStyle. -# SupportedStyles: be, be_nil -RSpec/BeNil: - Exclude: - - 'spec/record_loader_spec.rb' - # Offense count: 2 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. diff --git a/spec/record_loader_spec.rb b/spec/record_loader_spec.rb index a8a401a..3972111 100644 --- a/spec/record_loader_spec.rb +++ b/spec/record_loader_spec.rb @@ -2,6 +2,6 @@ RSpec.describe RecordLoader do it 'has a version number' do - expect(RecordLoader::VERSION).not_to be nil + expect(RecordLoader::VERSION).not_to be_nil end end From a6d264001ae86246e8adaf03c6f41d30976a5d25 Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Wed, 29 Apr 2026 17:25:48 +0100 Subject: [PATCH 13/16] style: lint RSpec/MetadataStyle --- .rubocop_todo.yml | 16 ---------------- spec/record_loader/attribute_spec.rb | 2 +- spec/record_loader/base_spec.rb | 2 +- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index d5e1a20..3c73a1a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -12,22 +12,6 @@ Gemspec/RequireMFA: Exclude: - 'record_loader.gemspec' -# Offense count: 2 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: EnforcedStyle. -# SupportedStyles: hash, symbol -RSpec/MetadataStyle: - Exclude: - - 'spec/record_loader/attribute_spec.rb' - - 'spec/record_loader/base_spec.rb' - -# Offense count: 2 -# This cop supports safe autocorrection (--autocorrect). -RSpec/SortMetadata: - Exclude: - - 'spec/record_loader/attribute_spec.rb' - - 'spec/record_loader/base_spec.rb' - # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). Rake/Desc: diff --git a/spec/record_loader/attribute_spec.rb b/spec/record_loader/attribute_spec.rb index 950f9d2..f83539e 100644 --- a/spec/record_loader/attribute_spec.rb +++ b/spec/record_loader/attribute_spec.rb @@ -2,7 +2,7 @@ require 'record_loader/attribute' -RSpec.describe RecordLoader::Attribute, type: :model, loader: true do +RSpec.describe RecordLoader::Attribute, :loader, type: :model do subject(:attribute) do described_class.new(name, type, default) end diff --git a/spec/record_loader/base_spec.rb b/spec/record_loader/base_spec.rb index effa5ac..5223bd0 100644 --- a/spec/record_loader/base_spec.rb +++ b/spec/record_loader/base_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe RecordLoader::Base, type: :model, loader: true do +RSpec.describe RecordLoader::Base, :loader, type: :model do subject(:record_loader) do allow(ENV).to receive(:fetch).with('WIP', '').and_return(wip_flags) custom_subclass.new(**options) From d7ce22cb10b9dfc7770b4f435c02c1a07d63bc23 Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Wed, 29 Apr 2026 17:30:39 +0100 Subject: [PATCH 14/16] style: lint Rake/Desc --- .rubocop_todo.yml | 5 ----- Rakefile | 3 ++- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 3c73a1a..09678ac 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -12,11 +12,6 @@ Gemspec/RequireMFA: Exclude: - 'record_loader.gemspec' -# Offense count: 1 -# This cop supports safe autocorrection (--autocorrect). -Rake/Desc: - Exclude: - - 'Rakefile' # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). diff --git a/Rakefile b/Rakefile index 73b9664..9dec6b5 100644 --- a/Rakefile +++ b/Rakefile @@ -1,9 +1,10 @@ # frozen_string_literal: true # We add preflight to the release task pre-requisites before loading in the -# bundler/gem_tasks to ensure that it runs first. This is becuase 'release' is +# bundler/gem_tasks to ensure that it runs first. This is because 'release' is # actually composed entirely of pre-requisites and so would otherwise end up # running the pre-flight tasks AFTER everything else +desc 'Runs the preflight checklist before building a release' task release: :preflight require 'bundler/gem_tasks' From ca2b25654ed13f3d39fb1dde2cfa6e8d072afede Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Wed, 29 Apr 2026 17:32:07 +0100 Subject: [PATCH 15/16] style: lint Style/EmptyClassDefinition: --- .rubocop.yml | 4 ++++ .rubocop_todo.yml | 8 -------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 73cd60b..c29e870 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -37,3 +37,7 @@ RSpec/MultipleMemoizedHelpers: # but feels a little strict to me. RSpec/NestedGroups: Max: 4 + +# The single-line syntax can be clearer than the multi-line version for multiple definitions +Style/EmptyClassDefinition: + Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 09678ac..235beb3 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -13,14 +13,6 @@ Gemspec/RequireMFA: - 'record_loader.gemspec' -# Offense count: 1 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: EnforcedStyle, AllowedParentClasses. -# SupportedStyles: class_keyword, class_new, class_definition -Style/EmptyClassDefinition: - Exclude: - - 'lib/record_loader.rb' - # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals. From 47372ab40727dfa26a49b051ccde6faf03252dda Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Wed, 29 Apr 2026 18:07:08 +0100 Subject: [PATCH 16/16] style: update rubocop todo --- .rubocop_todo.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 235beb3..601fba3 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2026-04-29 16:23:05 UTC using RuboCop version 1.86.1. +# on 2026-04-29 17:06:59 UTC using RuboCop version 1.86.1. # 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 @@ -12,7 +12,6 @@ Gemspec/RequireMFA: Exclude: - 'record_loader.gemspec' - # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.