nxt_cop 2.5.1 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37e3e6ce44d270ed989ace3bdbe47d00a77d0d176decb7cdb3c7370a20794b2a
4
- data.tar.gz: 1f8697b0a0292a3e54a4c68b7fc95bfda02d9927be3595e05e0d2b579c41feb5
3
+ metadata.gz: 76938ca59f2255af82693f8cf1534dbb0bb3ad224eb3f5c6d30bd94ddc42b7cf
4
+ data.tar.gz: fdbdc00ddba245ce27af0420423e180cf8afcbb7eb467b2a948e71c349a87a15
5
5
  SHA512:
6
- metadata.gz: 27b559ee3b7e857065ea5a71f2c0ccdeab9ba9fc515fc0ee3ec48823d1526c39012d707f4a2410afbe7c603cb7d15ff013e3c3f823c0db07afc8b5d8b60def00
7
- data.tar.gz: cc093f2b2857318ac0550999b35c0883070a47d2e8667591db59f029d5229c7cf74e74628e208ae47ecdeafdd8a7967fcabc8718858037d58be1846451d58364
6
+ metadata.gz: 9476da83fe2bfda0c43a094deb7241932e93f45cc0eddca7c3344358d2023836c886ec671840deee7dc703e0041049bfc2d09ea9be680c0eb075ed2865cef12e
7
+ data.tar.gz: fe3e61c4cdad0caeff80a4e7f676f8aae378799d84b1806fd97d397e9639175cbb98554345ec942b06efcc42c29ad22cd4cabd733c4137de4f867eb9fd6286bb
data/.circleci/config.yml CHANGED
@@ -10,7 +10,7 @@ jobs:
10
10
  parallelism: 1
11
11
  resource_class: small
12
12
  docker:
13
- - image: cimg/ruby:3.3.2
13
+ - image: cimg/ruby:4.0.1
14
14
  steps:
15
15
  - checkout
16
16
  - ruby/install-deps:
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.3.2
1
+ 4.0.1
data/.tool-versions CHANGED
@@ -1 +1 @@
1
- ruby 3.3.2
1
+ ruby 4.0.1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ # v2.8.0 2026-01-26
2
+ ## What's Changed
3
+ - Updates the ruby version to 4.0.1
4
+ - Updates dependencies
5
+
6
+ # v2.7.0 2025-11-20
7
+
8
+ ## What's Changed
9
+
10
+ - Uses the new API for extensions, which was introduced in Rubocop 1.72 (https://docs.rubocop.org/rubocop/plugin_migration_guide.html).
11
+
12
+ # v2.6.0 2025-02-26
13
+
14
+ ## What's Changed
15
+
16
+ - Moves customs cops to namespace `Rubocop::Cop::NxtCop` so they can be required directly from the application without it being part of nxt_cop's `default.yml`.
17
+
1
18
  # v2.5.1 2024-06-12
2
19
  ## What's Changed
3
20
  - Adds rubocop-rspec_rails to `.default.yml` to restore previous functionality
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nxt_cop (2.5.1)
5
- rubocop (~> 1.60)
4
+ nxt_cop (2.8.0)
5
+ rubocop (~> 1.72)
6
6
  rubocop-capybara (~> 2.21)
7
7
  rubocop-factory_bot (~> 2.26)
8
8
  rubocop-rails (~> 2.8)
@@ -12,87 +12,100 @@ PATH
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- activesupport (7.1.3.4)
15
+ activesupport (8.1.2)
16
16
  base64
17
17
  bigdecimal
18
- concurrent-ruby (~> 1.0, >= 1.0.2)
18
+ concurrent-ruby (~> 1.0, >= 1.3.1)
19
19
  connection_pool (>= 2.2.5)
20
20
  drb
21
21
  i18n (>= 1.6, < 2)
22
+ json
23
+ logger (>= 1.4.2)
22
24
  minitest (>= 5.1)
23
- mutex_m
24
- tzinfo (~> 2.0)
25
- ast (2.4.2)
26
- base64 (0.2.0)
27
- bigdecimal (3.1.8)
28
- concurrent-ruby (1.3.3)
29
- connection_pool (2.4.1)
30
- diff-lcs (1.5.1)
31
- drb (2.2.1)
32
- i18n (1.14.5)
25
+ securerandom (>= 0.3)
26
+ tzinfo (~> 2.0, >= 2.0.5)
27
+ uri (>= 0.13.1)
28
+ ast (2.4.3)
29
+ base64 (0.3.0)
30
+ bigdecimal (4.0.1)
31
+ concurrent-ruby (1.3.6)
32
+ connection_pool (3.0.2)
33
+ diff-lcs (1.6.2)
34
+ drb (2.2.3)
35
+ i18n (1.14.8)
33
36
  concurrent-ruby (~> 1.0)
34
- json (2.7.2)
35
- language_server-protocol (3.17.0.3)
36
- minitest (5.23.1)
37
- mutex_m (0.2.0)
38
- parallel (1.25.1)
39
- parser (3.3.2.0)
37
+ json (2.18.0)
38
+ language_server-protocol (3.17.0.5)
39
+ lint_roller (1.1.0)
40
+ logger (1.7.0)
41
+ minitest (6.0.1)
42
+ prism (~> 1.5)
43
+ parallel (1.27.0)
44
+ parser (3.3.10.1)
40
45
  ast (~> 2.4.1)
41
46
  racc
42
- racc (1.8.0)
43
- rack (3.1.0)
47
+ prism (1.8.0)
48
+ racc (1.8.1)
49
+ rack (3.2.4)
44
50
  rainbow (3.1.1)
45
- rake (13.2.1)
46
- regexp_parser (2.9.2)
47
- rexml (3.3.0)
48
- strscan
49
- rspec (3.13.0)
51
+ rake (13.3.1)
52
+ regexp_parser (2.11.3)
53
+ rspec (3.13.2)
50
54
  rspec-core (~> 3.13.0)
51
55
  rspec-expectations (~> 3.13.0)
52
56
  rspec-mocks (~> 3.13.0)
53
- rspec-core (3.13.0)
57
+ rspec-core (3.13.6)
54
58
  rspec-support (~> 3.13.0)
55
- rspec-expectations (3.13.0)
59
+ rspec-expectations (3.13.5)
56
60
  diff-lcs (>= 1.2.0, < 2.0)
57
61
  rspec-support (~> 3.13.0)
58
- rspec-mocks (3.13.1)
62
+ rspec-mocks (3.13.7)
59
63
  diff-lcs (>= 1.2.0, < 2.0)
60
64
  rspec-support (~> 3.13.0)
61
- rspec-support (3.13.1)
65
+ rspec-support (3.13.6)
62
66
  rspec_junit_formatter (0.6.0)
63
67
  rspec-core (>= 2, < 4, != 2.12.0)
64
- rubocop (1.64.1)
68
+ rubocop (1.82.1)
65
69
  json (~> 2.3)
66
- language_server-protocol (>= 3.17.0)
70
+ language_server-protocol (~> 3.17.0.2)
71
+ lint_roller (~> 1.1.0)
67
72
  parallel (~> 1.10)
68
73
  parser (>= 3.3.0.2)
69
74
  rainbow (>= 2.2.2, < 4.0)
70
- regexp_parser (>= 1.8, < 3.0)
71
- rexml (>= 3.2.5, < 4.0)
72
- rubocop-ast (>= 1.31.1, < 2.0)
75
+ regexp_parser (>= 2.9.3, < 3.0)
76
+ rubocop-ast (>= 1.48.0, < 2.0)
73
77
  ruby-progressbar (~> 1.7)
74
- unicode-display_width (>= 2.4.0, < 3.0)
75
- rubocop-ast (1.31.3)
76
- parser (>= 3.3.1.0)
77
- rubocop-capybara (2.21.0)
78
- rubocop (~> 1.41)
79
- rubocop-factory_bot (2.26.1)
80
- rubocop (~> 1.61)
81
- rubocop-rails (2.25.0)
78
+ unicode-display_width (>= 2.4.0, < 4.0)
79
+ rubocop-ast (1.49.0)
80
+ parser (>= 3.3.7.2)
81
+ prism (~> 1.7)
82
+ rubocop-capybara (2.22.1)
83
+ lint_roller (~> 1.1)
84
+ rubocop (~> 1.72, >= 1.72.1)
85
+ rubocop-factory_bot (2.28.0)
86
+ lint_roller (~> 1.1)
87
+ rubocop (~> 1.72, >= 1.72.1)
88
+ rubocop-rails (2.34.3)
82
89
  activesupport (>= 4.2.0)
90
+ lint_roller (~> 1.1)
83
91
  rack (>= 1.1)
84
- rubocop (>= 1.33.0, < 2.0)
85
- rubocop-ast (>= 1.31.1, < 2.0)
86
- rubocop-rspec (3.0.1)
87
- rubocop (~> 1.61)
88
- rubocop-rspec_rails (2.30.0)
89
- rubocop (~> 1.61)
90
- rubocop-rspec (~> 3, >= 3.0.1)
92
+ rubocop (>= 1.75.0, < 2.0)
93
+ rubocop-ast (>= 1.44.0, < 2.0)
94
+ rubocop-rspec (3.9.0)
95
+ lint_roller (~> 1.1)
96
+ rubocop (~> 1.81)
97
+ rubocop-rspec_rails (2.32.0)
98
+ lint_roller (~> 1.1)
99
+ rubocop (~> 1.72, >= 1.72.1)
100
+ rubocop-rspec (~> 3.5)
91
101
  ruby-progressbar (1.13.0)
92
- strscan (3.1.0)
102
+ securerandom (0.4.1)
93
103
  tzinfo (2.0.6)
94
104
  concurrent-ruby (~> 1.0)
95
- unicode-display_width (2.5.0)
105
+ unicode-display_width (3.2.0)
106
+ unicode-emoji (~> 4.1)
107
+ unicode-emoji (4.2.0)
108
+ uri (1.1.1)
96
109
 
97
110
  PLATFORMS
98
111
  ruby
data/default.yml CHANGED
@@ -1,16 +1,18 @@
1
+ plugins:
2
+ - rubocop-factory_bot
3
+ - rubocop-rails
4
+ - rubocop-rspec
5
+ - rubocop-rspec_rails
6
+
1
7
  require:
2
- - rubocop-factory_bot
3
- - rubocop-rails
4
- - rubocop-rspec
5
- - rubocop-rspec_rails
6
- - ./custom_cops/nxt_core/rails/use_of_rails_logger.rb
8
+ - rubocop/cop/nxt_cop/use_of_rails_logger.rb
7
9
 
8
10
  inherit_mode:
9
11
  merge:
10
12
  - Exclude
11
13
  - Include
12
14
 
13
- Rails/UseOfRailsLogger:
15
+ NxtCop/UseOfRailsLogger:
14
16
  Description: "Custom Getsafe cop to ensure the correct logger is used"
15
17
 
16
18
  AllCops:
@@ -27,7 +29,6 @@ AllCops:
27
29
  DisabledByDefault: false
28
30
  NewCops: disable # to avoid warnings. TODO: remove this setting and add new cops from the warning.
29
31
 
30
-
31
32
  Layout/ArgumentAlignment:
32
33
  EnforcedStyle: with_fixed_indentation
33
34
  Layout/ArrayAlignment:
@@ -65,35 +66,44 @@ Layout/FirstArrayElementLineBreak:
65
66
  Layout/MultilineMethodParameterLineBreaks:
66
67
  Enabled: true
67
68
 
69
+ # Lint
68
70
  Lint:
69
71
  Enabled: true
70
72
  Lint/AmbiguousBlockAssociation:
71
73
  Exclude:
72
74
  - spec/**/*
75
+ Lint/AssignmentInCondition:
76
+ Enabled: true
77
+ Lint/DuplicateHashKey:
78
+ Enabled: true
79
+ Lint/DuplicateRegexpCharacterClassElement:
80
+ Enabled: true
81
+ Lint/EmptyInPattern:
82
+ Enabled: true
83
+ Lint/IncompatibleIoSelectWithFiberScheduler:
84
+ Enabled: true
85
+ Lint/LambdaWithoutLiteralBlock:
86
+ Enabled: true
73
87
  Lint/Loop:
74
- Enabled: false
88
+ Enabled: true
75
89
  Lint/MissingSuper:
76
- Enabled: false
77
- Lint/SymbolConversion:
78
- EnforcedStyle: consistent
79
- Style/TrailingCommaInHashLiteral:
80
- Enabled: false
81
- Style/HashSyntax:
82
90
  Enabled: true
83
- EnforcedShorthandSyntax: either
84
- Security:
85
- EnabledByDefault: true
86
- Style/Semicolon:
87
- Exclude:
88
- - spec/**/*
89
- Rails/TimeZone:
91
+ Lint/NoReturnInBeginEndBlocks:
90
92
  Enabled: true
91
- Rails/Date:
93
+ Lint/NumberedParameterAssignment:
92
94
  Enabled: true
93
- RSpec:
94
- Enabled: false
95
- RSpec/Focus:
95
+ Lint/RefinementImportMethods:
96
+ Enabled: true
97
+ Lint/RequireRelativeSelfPath:
98
+ Enabled: true
99
+ Lint/ToEnumArguments:
96
100
  Enabled: true
101
+ Lint/UnexpectedBlockArity:
102
+ Enabled: true
103
+ Lint/UselessRuby2Keywords:
104
+ Enabled: true
105
+ Lint/SymbolConversion:
106
+ EnforcedStyle: consistent
97
107
  Lint/AmbiguousAssignment:
98
108
  Enabled: true
99
109
  Lint/DeprecatedConstants:
@@ -117,39 +127,15 @@ Lint/RedundantDirGlobSort:
117
127
  Lint/RequireRangeParentheses:
118
128
  Enabled: true
119
129
 
120
- # These checks are valid, but better left to programmer's discretion, as the effects of such code are harmless.
130
+ # Lint - These checks are valid, but better left to programmer's discretion, as the effects of such code are harmless.
121
131
  Lint/DuplicateBranch:
122
132
  Enabled: false
123
- Lint/DuplicateRegexpCharacterClassElement:
124
- Enabled: false
125
133
  Lint/EmptyBlock:
126
134
  Enabled: false
127
135
  Lint/EmptyClass:
128
136
  Enabled: false
129
- Lint/EmptyInPattern:
130
- Enabled: false
131
- Lint/UnexpectedBlockArity:
132
- Enabled: false
133
-
134
- # These code patterns are rare/nonexistent in our code, so checking for them is a waste of time
135
- Lint/IncompatibleIoSelectWithFiberScheduler:
136
- Enabled: false
137
- Lint/LambdaWithoutLiteralBlock:
138
- Enabled: false
139
- Lint/NoReturnInBeginEndBlocks: # ❌ ENABLE THIS!
140
- Enabled: false
141
- Lint/NumberedParameterAssignment:
142
- Enabled: false
143
- Lint/RefinementImportMethods:
144
- Enabled: false
145
- Lint/RequireRelativeSelfPath:
146
- Enabled: false
147
- Lint/ToEnumArguments:
148
- Enabled: false
149
- Lint/UselessRuby2Keywords:
150
- Enabled: false
151
137
 
152
- # Since we don't have all cops enabled by default we have to add every new cop explicitly
138
+ # Lint - Since we don't have all cops enabled by default we have to add every new cop explicitly
153
139
  Lint/DuplicateMagicComment:
154
140
  Enabled: true
155
141
  Lint/UselessRescue:
@@ -161,6 +147,25 @@ Lint/MixedCaseRange:
161
147
  Lint/RedundantRegexpQuantifiers:
162
148
  Enabled: true
163
149
 
150
+ Style/TrailingCommaInHashLiteral:
151
+ Enabled: false
152
+ Style/HashSyntax:
153
+ Enabled: true
154
+ EnforcedShorthandSyntax: either
155
+ Security:
156
+ EnabledByDefault: true
157
+ Style/Semicolon:
158
+ Exclude:
159
+ - spec/**/*
160
+ Rails/TimeZone:
161
+ Enabled: true
162
+ Rails/Date:
163
+ Enabled: true
164
+ RSpec:
165
+ Enabled: false
166
+ RSpec/Focus:
167
+ Enabled: true
168
+
164
169
  # This is default cops we want to keep disabled:
165
170
  Style/FrozenStringLiteralComment:
166
171
  Enabled: false
@@ -308,7 +313,7 @@ Rails/IndexBy:
308
313
  Enabled: false
309
314
  Rails/Pick:
310
315
  Enabled: false
311
- Style/CombinableLoops: # hard to autocorrect properly
316
+ Style/CombinableLoops: # hard to autocorrect properly
312
317
  Enabled: false
313
318
  FactoryBot/CreateList:
314
319
  Enabled: false
@@ -320,7 +325,7 @@ Style/GuardClause:
320
325
  Enabled: false
321
326
  Style/PercentLiteralDelimiters:
322
327
  Enabled: false
323
- Style/StringConcatenation: # heavily used in insurance service
328
+ Style/StringConcatenation: # heavily used in insurance service
324
329
  Enabled: false
325
330
  Style/InverseMethods:
326
331
  Enabled: false
@@ -393,7 +398,7 @@ Rails/UniqueValidationWithoutIndex: # definitely enable!!!
393
398
  Enabled: false
394
399
  Rails/Validation: # discuss with the team
395
400
  Enabled: false
396
- Rails/LexicallyScopedActionFilter: # enable and manually disable offences
401
+ Rails/LexicallyScopedActionFilter: # enable and manually disable offences
397
402
  Enabled: false
398
403
  Security/Open:
399
404
  Enabled: false
@@ -1,3 +1,3 @@
1
1
  module NxtCop
2
- VERSION = '2.5.1'.freeze
2
+ VERSION = '2.8.0'.freeze
3
3
  end
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module CustomCops
4
- module NxtCore
5
- module Rails
3
+ module Rubocop
4
+ module Cop
5
+ module NxtCop
6
6
  # Ensures that the NxtCore logger is used instead of `Rails.logger`.
7
7
  class UseOfRailsLogger < RuboCop::Cop::Base
8
8
  extend RuboCop::Cop::AutoCorrector
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rubocop/cop/nxt_cop/use_of_rails_logger'
data/nxt_cop.gemspec CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
33
33
 
34
34
  spec.required_ruby_version = '>= 3.2'
35
35
 
36
- spec.add_dependency 'rubocop', '~> 1.60'
36
+ spec.add_dependency 'rubocop', '~> 1.72'
37
37
  spec.add_dependency 'rubocop-capybara', '~> 2.21'
38
38
  spec.add_dependency 'rubocop-factory_bot', '~> 2.26'
39
39
  spec.add_dependency 'rubocop-rails', '~> 2.8'
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nxt_cop
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.1
4
+ version: 2.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Livingstone
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-06-12 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rubocop
@@ -16,14 +15,14 @@ dependencies:
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: '1.60'
18
+ version: '1.72'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: '1.60'
25
+ version: '1.72'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: rubocop-capybara
29
28
  requirement: !ruby/object:Gem::Requirement
@@ -150,8 +149,6 @@ dependencies:
150
149
  - - ">="
151
150
  - !ruby/object:Gem::Version
152
151
  version: '0'
153
- description:
154
- email:
155
152
  executables: []
156
153
  extensions: []
157
154
  extra_rdoc_files: []
@@ -172,9 +169,10 @@ files:
172
169
  - bin/guard
173
170
  - bin/rspec
174
171
  - bin/setup
175
- - custom_cops/nxt_core/rails/use_of_rails_logger.rb
176
172
  - default.yml
177
173
  - lib/nxt_cop/version.rb
174
+ - lib/rubocop/cop/nxt_cop.rb
175
+ - lib/rubocop/cop/nxt_cop/use_of_rails_logger.rb
178
176
  - nxt_cop.gemspec
179
177
  homepage: https://github.com/nxt-insurance/nxt_cop
180
178
  licenses:
@@ -184,7 +182,6 @@ metadata:
184
182
  homepage_uri: https://github.com/nxt-insurance/nxt_cop
185
183
  source_code_uri: https://github.com/nxt-insurance/nxt_cop
186
184
  changelog_uri: https://github.com/nxt-insurance/nxt_cop/CHANGELOG.md
187
- post_install_message:
188
185
  rdoc_options: []
189
186
  require_paths:
190
187
  - lib
@@ -199,8 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
196
  - !ruby/object:Gem::Version
200
197
  version: '0'
201
198
  requirements: []
202
- rubygems_version: 3.5.9
203
- signing_key:
199
+ rubygems_version: 4.0.3
204
200
  specification_version: 4
205
201
  summary: Getsafe shared Rubocop.
206
202
  test_files: []