standard-rails 1.3.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 +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +38 -34
- data/config/base.yml +9 -0
- data/lib/standard/rails/load_rubocop_rails_without_the_monkey_patch.rb +1 -2
- data/lib/standard/rails/plugin.rb +24 -4
- data/lib/standard/rails/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ea0660c280a673cb48a5ec20519c068fba6b58f30701b41413ee10c05dd9eb54
|
|
4
|
+
data.tar.gz: 71de2e96421805af3fff1844392bafb5548660a567c41e0a4c179276f42a8109
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a88c4f30efcc2cd513cfcbb9c2a41bc5dc68425c21beba0cbf1cd055a040e77f39e86c8dce92712067acfb221736b15f8c3b732afd7afac19a58a36a27eec597
|
|
7
|
+
data.tar.gz: 5c557c19a7bc9f60d4d8a41fc5558122daf3ba40bc9c40c1bb9bc2e15e2126fbabde094cbf04765e276be13a87251095a5360570bee084835d7f313d656b76e1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
|
|
5
|
+
## [1.4.0]
|
|
6
|
+
|
|
7
|
+
- Update to [rubocop-rails@2.31.0](https://github.com/rubocop/rubocop-rails/releases/tag/v2.31.0)
|
|
8
|
+
|
|
1
9
|
## [1.3.0]
|
|
2
10
|
|
|
3
11
|
- Update Gems
|
data/Gemfile.lock
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
standard-rails (1.
|
|
4
|
+
standard-rails (1.5.0)
|
|
5
5
|
lint_roller (~> 1.0)
|
|
6
|
-
rubocop-rails (~> 2.
|
|
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
|
|
@@ -21,36 +21,37 @@ GEM
|
|
|
21
21
|
mutex_m
|
|
22
22
|
securerandom (>= 0.3)
|
|
23
23
|
tzinfo (~> 2.0)
|
|
24
|
-
ast (2.4.
|
|
24
|
+
ast (2.4.3)
|
|
25
25
|
base64 (0.2.0)
|
|
26
26
|
benchmark (0.4.0)
|
|
27
|
-
bigdecimal (3.1.
|
|
28
|
-
concurrent-ruby (1.3.
|
|
29
|
-
connection_pool (2.
|
|
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.
|
|
32
|
+
i18n (1.14.7)
|
|
33
33
|
concurrent-ruby (~> 1.0)
|
|
34
|
-
json (2.
|
|
35
|
-
language_server-protocol (3.17.0.
|
|
34
|
+
json (2.13.2)
|
|
35
|
+
language_server-protocol (3.17.0.5)
|
|
36
36
|
lint_roller (1.1.0)
|
|
37
|
-
logger (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.
|
|
43
|
-
mutex_m (0.
|
|
44
|
-
parallel (1.
|
|
45
|
-
parser (3.3.
|
|
42
|
+
minitest (5.26.1)
|
|
43
|
+
mutex_m (0.3.0)
|
|
44
|
+
parallel (1.27.0)
|
|
45
|
+
parser (3.3.9.0)
|
|
46
46
|
ast (~> 2.4.1)
|
|
47
47
|
racc
|
|
48
|
+
prism (1.5.1)
|
|
48
49
|
racc (1.8.1)
|
|
49
|
-
rack (3.1.
|
|
50
|
+
rack (3.1.15)
|
|
50
51
|
rainbow (3.1.1)
|
|
51
|
-
rake (13.
|
|
52
|
-
regexp_parser (2.
|
|
53
|
-
rubocop (1.
|
|
52
|
+
rake (13.3.1)
|
|
53
|
+
regexp_parser (2.11.3)
|
|
54
|
+
rubocop (1.80.2)
|
|
54
55
|
json (~> 2.3)
|
|
55
56
|
language_server-protocol (~> 3.17.0.2)
|
|
56
57
|
lint_roller (~> 1.1.0)
|
|
@@ -58,44 +59,47 @@ GEM
|
|
|
58
59
|
parser (>= 3.3.0.2)
|
|
59
60
|
rainbow (>= 2.2.2, < 4.0)
|
|
60
61
|
regexp_parser (>= 2.9.3, < 3.0)
|
|
61
|
-
rubocop-ast (>= 1.
|
|
62
|
+
rubocop-ast (>= 1.46.0, < 2.0)
|
|
62
63
|
ruby-progressbar (~> 1.7)
|
|
63
64
|
unicode-display_width (>= 2.4.0, < 4.0)
|
|
64
|
-
rubocop-ast (1.
|
|
65
|
-
parser (>= 3.3.
|
|
66
|
-
|
|
65
|
+
rubocop-ast (1.46.0)
|
|
66
|
+
parser (>= 3.3.7.2)
|
|
67
|
+
prism (~> 1.4)
|
|
68
|
+
rubocop-performance (1.25.0)
|
|
67
69
|
lint_roller (~> 1.1)
|
|
68
|
-
rubocop (>= 1.
|
|
70
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
69
71
|
rubocop-ast (>= 1.38.0, < 2.0)
|
|
70
|
-
rubocop-rails (2.
|
|
72
|
+
rubocop-rails (2.33.4)
|
|
71
73
|
activesupport (>= 4.2.0)
|
|
72
74
|
lint_roller (~> 1.1)
|
|
73
75
|
rack (>= 1.1)
|
|
74
|
-
rubocop (>= 1.
|
|
75
|
-
rubocop-ast (>= 1.
|
|
76
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
77
|
+
rubocop-ast (>= 1.44.0, < 2.0)
|
|
76
78
|
ruby-progressbar (1.13.0)
|
|
77
|
-
securerandom (0.3.
|
|
79
|
+
securerandom (0.3.2)
|
|
78
80
|
simplecov (0.22.0)
|
|
79
81
|
docile (~> 1.1)
|
|
80
82
|
simplecov-html (~> 0.11)
|
|
81
83
|
simplecov_json_formatter (~> 0.1)
|
|
82
84
|
simplecov-html (0.13.1)
|
|
83
85
|
simplecov_json_formatter (0.1.4)
|
|
84
|
-
standard (1.
|
|
86
|
+
standard (1.51.1)
|
|
85
87
|
language_server-protocol (~> 3.17.0.2)
|
|
86
88
|
lint_roller (~> 1.0)
|
|
87
|
-
rubocop (~> 1.
|
|
89
|
+
rubocop (~> 1.80.2)
|
|
88
90
|
standard-custom (~> 1.0.0)
|
|
89
|
-
standard-performance (~> 1.
|
|
91
|
+
standard-performance (~> 1.8)
|
|
90
92
|
standard-custom (1.0.2)
|
|
91
93
|
lint_roller (~> 1.0)
|
|
92
94
|
rubocop (~> 1.50)
|
|
93
|
-
standard-performance (1.
|
|
95
|
+
standard-performance (1.8.0)
|
|
94
96
|
lint_roller (~> 1.1)
|
|
95
|
-
rubocop-performance (~> 1.
|
|
97
|
+
rubocop-performance (~> 1.25.0)
|
|
96
98
|
tzinfo (2.0.6)
|
|
97
99
|
concurrent-ruby (~> 1.0)
|
|
98
|
-
unicode-display_width (2.
|
|
100
|
+
unicode-display_width (3.2.0)
|
|
101
|
+
unicode-emoji (~> 4.1)
|
|
102
|
+
unicode-emoji (4.1.0)
|
|
99
103
|
|
|
100
104
|
PLATFORMS
|
|
101
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,14 +7,13 @@
|
|
|
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.
|
|
10
|
+
# Last updated from rubocop-rails v2.33.4
|
|
11
11
|
|
|
12
12
|
# frozen_string_literal: true
|
|
13
13
|
|
|
14
14
|
require "rubocop"
|
|
15
15
|
require "rack/utils"
|
|
16
16
|
require "active_support/inflector"
|
|
17
|
-
require "active_support/core_ext/object/blank"
|
|
18
17
|
|
|
19
18
|
require_path = Pathname.new(Gem.loaded_specs["rubocop-rails"].full_require_paths.first)
|
|
20
19
|
require require_path.join("rubocop/rails")
|
|
@@ -27,9 +27,7 @@ module Standard
|
|
|
27
27
|
LintRoller::Rules.new(
|
|
28
28
|
type: :object,
|
|
29
29
|
config_format: :rubocop,
|
|
30
|
-
value:
|
|
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
|
-
[
|
|
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,
|
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
|
+
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-
|
|
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.
|
|
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.
|
|
40
|
+
version: 2.33.4
|
|
41
41
|
description:
|
|
42
42
|
email:
|
|
43
43
|
- searls@gmail.com
|