standard-rails 1.4.0 → 1.5.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: 94a853d5e38a7fbff983f4e7f66ab2a7620cea0d88055b274b43edd9be3cfc7a
4
- data.tar.gz: 0edea69ea68bf021909e056b33de9927f5fa6148af91e8a0429544880e29a48c
3
+ metadata.gz: ea0660c280a673cb48a5ec20519c068fba6b58f30701b41413ee10c05dd9eb54
4
+ data.tar.gz: 71de2e96421805af3fff1844392bafb5548660a567c41e0a4c179276f42a8109
5
5
  SHA512:
6
- metadata.gz: d57a9ddb82bb4cbc7d58ac9e81bd5fe93e5fa558307b7e4dc2ba10efd222645dcd68ceef043c72754ec6a326f58a4856fb59ce0b4c490793ad70a9837595e777
7
- data.tar.gz: c60d49f54a7ea916bff8450f13aa7d9f209bf1afc477d0c73438ba896057ae95795a46382608a33db8a11dbbf50427ce5d52bb655e8f86cc7059c76e32c6929b
6
+ metadata.gz: a88c4f30efcc2cd513cfcbb9c2a41bc5dc68425c21beba0cbf1cd055a040e77f39e86c8dce92712067acfb221736b15f8c3b732afd7afac19a58a36a27eec597
7
+ data.tar.gz: 5c557c19a7bc9f60d4d8a41fc5558122daf3ba40bc9c40c1bb9bc2e15e2126fbabde094cbf04765e276be13a87251095a5360570bee084835d7f313d656b76e1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [1.5.0]
2
+
3
+ - Update to [rubocop-rails@2.33.0](https://github.com/rubocop/rubocop-rails/releases/tag/v2.33.0)
4
+
1
5
  ## [1.4.0]
2
6
 
3
7
  - Update to [rubocop-rails@2.31.0](https://github.com/rubocop/rubocop-rails/releases/tag/v2.31.0)
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- standard-rails (1.4.0)
4
+ standard-rails (1.5.0)
5
5
  lint_roller (~> 1.0)
6
- rubocop-rails (~> 2.31.0)
6
+ rubocop-rails (~> 2.33.4)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (7.1.5)
11
+ activesupport (7.1.5.1)
12
12
  base64
13
13
  benchmark (>= 0.3)
14
14
  bigdecimal
@@ -24,34 +24,34 @@ GEM
24
24
  ast (2.4.3)
25
25
  base64 (0.2.0)
26
26
  benchmark (0.4.0)
27
- bigdecimal (3.1.8)
28
- concurrent-ruby (1.3.4)
29
- connection_pool (2.4.1)
27
+ bigdecimal (3.1.9)
28
+ concurrent-ruby (1.3.5)
29
+ connection_pool (2.5.3)
30
30
  docile (1.4.1)
31
31
  drb (2.2.1)
32
- i18n (1.14.6)
32
+ i18n (1.14.7)
33
33
  concurrent-ruby (~> 1.0)
34
- json (2.11.3)
35
- language_server-protocol (3.17.0.4)
34
+ json (2.13.2)
35
+ language_server-protocol (3.17.0.5)
36
36
  lint_roller (1.1.0)
37
- logger (1.6.1)
37
+ logger (1.7.0)
38
38
  m (1.6.2)
39
39
  method_source (>= 0.6.7)
40
40
  rake (>= 0.9.2.2)
41
41
  method_source (1.1.0)
42
- minitest (5.25.5)
43
- mutex_m (0.2.0)
42
+ minitest (5.26.1)
43
+ mutex_m (0.3.0)
44
44
  parallel (1.27.0)
45
- parser (3.3.8.0)
45
+ parser (3.3.9.0)
46
46
  ast (~> 2.4.1)
47
47
  racc
48
- prism (1.4.0)
48
+ prism (1.5.1)
49
49
  racc (1.8.1)
50
- rack (3.1.7)
50
+ rack (3.1.15)
51
51
  rainbow (3.1.1)
52
- rake (13.2.1)
53
- regexp_parser (2.10.0)
54
- rubocop (1.75.4)
52
+ rake (13.3.1)
53
+ regexp_parser (2.11.3)
54
+ rubocop (1.80.2)
55
55
  json (~> 2.3)
56
56
  language_server-protocol (~> 3.17.0.2)
57
57
  lint_roller (~> 1.1.0)
@@ -59,34 +59,34 @@ GEM
59
59
  parser (>= 3.3.0.2)
60
60
  rainbow (>= 2.2.2, < 4.0)
61
61
  regexp_parser (>= 2.9.3, < 3.0)
62
- rubocop-ast (>= 1.44.0, < 2.0)
62
+ rubocop-ast (>= 1.46.0, < 2.0)
63
63
  ruby-progressbar (~> 1.7)
64
64
  unicode-display_width (>= 2.4.0, < 4.0)
65
- rubocop-ast (1.44.1)
65
+ rubocop-ast (1.46.0)
66
66
  parser (>= 3.3.7.2)
67
67
  prism (~> 1.4)
68
68
  rubocop-performance (1.25.0)
69
69
  lint_roller (~> 1.1)
70
70
  rubocop (>= 1.75.0, < 2.0)
71
71
  rubocop-ast (>= 1.38.0, < 2.0)
72
- rubocop-rails (2.31.0)
72
+ rubocop-rails (2.33.4)
73
73
  activesupport (>= 4.2.0)
74
74
  lint_roller (~> 1.1)
75
75
  rack (>= 1.1)
76
76
  rubocop (>= 1.75.0, < 2.0)
77
- rubocop-ast (>= 1.38.0, < 2.0)
77
+ rubocop-ast (>= 1.44.0, < 2.0)
78
78
  ruby-progressbar (1.13.0)
79
- securerandom (0.3.1)
79
+ securerandom (0.3.2)
80
80
  simplecov (0.22.0)
81
81
  docile (~> 1.1)
82
82
  simplecov-html (~> 0.11)
83
83
  simplecov_json_formatter (~> 0.1)
84
84
  simplecov-html (0.13.1)
85
85
  simplecov_json_formatter (0.1.4)
86
- standard (1.49.0)
86
+ standard (1.51.1)
87
87
  language_server-protocol (~> 3.17.0.2)
88
88
  lint_roller (~> 1.0)
89
- rubocop (~> 1.75.2)
89
+ rubocop (~> 1.80.2)
90
90
  standard-custom (~> 1.0.0)
91
91
  standard-performance (~> 1.8)
92
92
  standard-custom (1.0.2)
@@ -97,9 +97,9 @@ GEM
97
97
  rubocop-performance (~> 1.25.0)
98
98
  tzinfo (2.0.6)
99
99
  concurrent-ruby (~> 1.0)
100
- unicode-display_width (3.1.4)
101
- unicode-emoji (~> 4.0, >= 4.0.4)
102
- unicode-emoji (4.0.4)
100
+ unicode-display_width (3.2.0)
101
+ unicode-emoji (~> 4.1)
102
+ unicode-emoji (4.1.0)
103
103
 
104
104
  PLATFORMS
105
105
  arm64-darwin-20
data/config/base.yml CHANGED
@@ -33,6 +33,9 @@ Lint/SafeNavigationChain:
33
33
  Lint/UselessAccessModifier:
34
34
  Enabled: false
35
35
 
36
+ Lint/UselessMethodDefinition:
37
+ Enabled: false
38
+
36
39
  Rails/ActionControllerFlashBeforeRender:
37
40
  Enabled: false
38
41
 
@@ -177,6 +180,9 @@ Rails/FindBy:
177
180
  Rails/FindById:
178
181
  Enabled: true
179
182
 
183
+ Rails/FindByOrAssignmentMemoization:
184
+ Enabled: false
185
+
180
186
  Rails/FindEach:
181
187
  Enabled: true
182
188
 
@@ -249,6 +255,9 @@ Rails/NegateInclude:
249
255
  Rails/NotNullColumn:
250
256
  Enabled: false
251
257
 
258
+ Rails/OrderArguments:
259
+ Enabled: false
260
+
252
261
  Rails/OrderById:
253
262
  Enabled: false
254
263
 
@@ -7,7 +7,7 @@
7
7
  # of RuboCop built-in cops in this file, we need to monitor it for changes
8
8
  # in rubocop-rails and keep it up to date.
9
9
  #
10
- # Last updated from rubocop-rails v2.31.0
10
+ # Last updated from rubocop-rails v2.33.4
11
11
 
12
12
  # frozen_string_literal: true
13
13
 
@@ -27,9 +27,7 @@ module Standard
27
27
  LintRoller::Rules.new(
28
28
  type: :object,
29
29
  config_format: :rubocop,
30
- value: without_extended_rule_configs(
31
- rules_with_config_applied
32
- )
30
+ value: sanitize_rules(rules_with_config_applied)
33
31
  )
34
32
  end
35
33
 
@@ -54,10 +52,32 @@ module Standard
54
52
  # See: https://github.com/standardrb/standard-rails/issues/25#issuecomment-1881127173
55
53
  def without_extended_rule_configs(rules)
56
54
  rules.reject { |(name, _)|
57
- ["Style/InvertibleUnlessCondition", "Lint/SafeNavigationChain"].include?(name)
55
+ [
56
+ "Style/InvertibleUnlessCondition",
57
+ "Lint/SafeNavigationChain",
58
+ "Lint/UselessAccessModifier",
59
+ "Lint/UselessMethodDefinition"
60
+ ].include?(name)
58
61
  }.to_h
59
62
  end
60
63
 
64
+ # Normalize AllCops to avoid validator warnings without changing behavior:
65
+ # - MigratedSchemaVersion: rubocop-rails ships a UNIX-epoch default that
66
+ # skips nothing; removing it is equivalent unless a real timestamp is provided.
67
+ # - TargetRailsVersion: Standard may pre-seed a nil to placate merging; deleting
68
+ # only the nil value avoids a warning and lets RuboCop infer Rails version.
69
+ # See: https://github.com/standardrb/standard-rails/issues/72
70
+ def sanitize_rules(rules)
71
+ cleaned = without_extended_rule_configs(rules)
72
+ if cleaned["AllCops"].is_a?(Hash)
73
+ all_cops = cleaned["AllCops"].dup
74
+ all_cops.delete("MigratedSchemaVersion")
75
+ all_cops.delete("TargetRailsVersion") if all_cops.key?("TargetRailsVersion") && all_cops["TargetRailsVersion"].nil?
76
+ cleaned["AllCops"] = all_cops
77
+ end
78
+ cleaned
79
+ end
80
+
61
81
  # This is not fantastic.
62
82
  #
63
83
  # When you `require "rubocop-rails"`, it will not only load the cops,
@@ -1,5 +1,5 @@
1
1
  module Standard
2
2
  module Rails
3
- VERSION = "1.4.0"
3
+ VERSION = "1.5.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standard-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-05-13 00:00:00.000000000 Z
11
+ date: 2025-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lint_roller
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.31.0
33
+ version: 2.33.4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 2.31.0
40
+ version: 2.33.4
41
41
  description:
42
42
  email:
43
43
  - searls@gmail.com