standard-rails 1.4.0 → 1.6.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 +31 -31
- data/config/base.yml +18 -0
- data/lib/standard/rails/load_rubocop_rails_without_the_monkey_patch.rb +1 -1
- data/lib/standard/rails/plugin.rb +24 -4
- data/lib/standard/rails/version.rb +1 -1
- metadata +5 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e74d25dbacdd73e1ee209eec9ac859dd51ccc9929b594349a1b47dcf66808df6
|
|
4
|
+
data.tar.gz: d5d302a78a82bdd84108ab2de494be0e2367988e35976c407c236e9949f19f9b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 993347a01c439274e4fa584e16cb42ec44034c1ebac1c5b3f059dd955e4c0b66733ccfc2442d62f8fc52bf349cce4295305d50eb6909ff73a1e28cd5c167e9de
|
|
7
|
+
data.tar.gz: 89c79e6eae106a9c1019ecb826070bd205d5afa2418ecc219d91d25f250cfdd10f3c599a314db4e47a459051bebfc4989fe07934bc07b94593da132d87ddb113
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [1.6.0]
|
|
2
|
+
|
|
3
|
+
- Update Rubocop Rails to [v2.34](https://github.com/rubocop/rubocop-rails/releases/tag/v2.34.2)
|
|
4
|
+
|
|
5
|
+
## [1.5.0]
|
|
6
|
+
|
|
7
|
+
- Update to [rubocop-rails@2.33.0](https://github.com/rubocop/rubocop-rails/releases/tag/v2.33.0)
|
|
8
|
+
|
|
1
9
|
## [1.4.0]
|
|
2
10
|
|
|
3
11
|
- 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
|
+
standard-rails (1.6.0)
|
|
5
5
|
lint_roller (~> 1.0)
|
|
6
|
-
rubocop-rails (~> 2.
|
|
6
|
+
rubocop-rails (~> 2.34.0)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
activesupport (7.1.
|
|
11
|
+
activesupport (7.1.6)
|
|
12
12
|
base64
|
|
13
13
|
benchmark (>= 0.3)
|
|
14
14
|
bigdecimal
|
|
@@ -22,36 +22,36 @@ GEM
|
|
|
22
22
|
securerandom (>= 0.3)
|
|
23
23
|
tzinfo (~> 2.0)
|
|
24
24
|
ast (2.4.3)
|
|
25
|
-
base64 (0.
|
|
26
|
-
benchmark (0.
|
|
27
|
-
bigdecimal (3.1
|
|
28
|
-
concurrent-ruby (1.3.
|
|
29
|
-
connection_pool (2.
|
|
25
|
+
base64 (0.3.0)
|
|
26
|
+
benchmark (0.5.0)
|
|
27
|
+
bigdecimal (3.3.1)
|
|
28
|
+
concurrent-ruby (1.3.5)
|
|
29
|
+
connection_pool (2.5.5)
|
|
30
30
|
docile (1.4.1)
|
|
31
|
-
drb (2.2.
|
|
32
|
-
i18n (1.14.
|
|
31
|
+
drb (2.2.3)
|
|
32
|
+
i18n (1.14.7)
|
|
33
33
|
concurrent-ruby (~> 1.0)
|
|
34
|
-
json (2.
|
|
35
|
-
language_server-protocol (3.17.0.
|
|
34
|
+
json (2.16.0)
|
|
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.
|
|
42
|
+
minitest (5.26.1)
|
|
43
|
+
mutex_m (0.3.0)
|
|
44
44
|
parallel (1.27.0)
|
|
45
|
-
parser (3.3.
|
|
45
|
+
parser (3.3.10.0)
|
|
46
46
|
ast (~> 2.4.1)
|
|
47
47
|
racc
|
|
48
|
-
prism (1.
|
|
48
|
+
prism (1.6.0)
|
|
49
49
|
racc (1.8.1)
|
|
50
|
-
rack (3.
|
|
50
|
+
rack (3.2.4)
|
|
51
51
|
rainbow (3.1.1)
|
|
52
|
-
rake (13.
|
|
53
|
-
regexp_parser (2.
|
|
54
|
-
rubocop (1.
|
|
52
|
+
rake (13.3.1)
|
|
53
|
+
regexp_parser (2.11.3)
|
|
54
|
+
rubocop (1.81.7)
|
|
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.
|
|
62
|
+
rubocop-ast (>= 1.47.1, < 2.0)
|
|
63
63
|
ruby-progressbar (~> 1.7)
|
|
64
64
|
unicode-display_width (>= 2.4.0, < 4.0)
|
|
65
|
-
rubocop-ast (1.
|
|
65
|
+
rubocop-ast (1.48.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.
|
|
72
|
+
rubocop-rails (2.34.2)
|
|
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.
|
|
77
|
+
rubocop-ast (>= 1.44.0, < 2.0)
|
|
78
78
|
ruby-progressbar (1.13.0)
|
|
79
|
-
securerandom (0.3.
|
|
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.
|
|
86
|
+
standard (1.52.0)
|
|
87
87
|
language_server-protocol (~> 3.17.0.2)
|
|
88
88
|
lint_roller (~> 1.0)
|
|
89
|
-
rubocop (~> 1.
|
|
89
|
+
rubocop (~> 1.81.7)
|
|
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.
|
|
101
|
-
unicode-emoji (~> 4.
|
|
102
|
-
unicode-emoji (4.0
|
|
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
|
|
|
@@ -153,6 +156,9 @@ Rails/EnumSyntax:
|
|
|
153
156
|
Rails/EnumUniqueness:
|
|
154
157
|
Enabled: true
|
|
155
158
|
|
|
159
|
+
Rails/Env:
|
|
160
|
+
Enabled: false
|
|
161
|
+
|
|
156
162
|
Rails/EnvLocal:
|
|
157
163
|
Enabled: true
|
|
158
164
|
|
|
@@ -177,6 +183,9 @@ Rails/FindBy:
|
|
|
177
183
|
Rails/FindById:
|
|
178
184
|
Enabled: true
|
|
179
185
|
|
|
186
|
+
Rails/FindByOrAssignmentMemoization:
|
|
187
|
+
Enabled: false
|
|
188
|
+
|
|
180
189
|
Rails/FindEach:
|
|
181
190
|
Enabled: true
|
|
182
191
|
|
|
@@ -198,6 +207,9 @@ Rails/HttpPositionalArguments:
|
|
|
198
207
|
Rails/HttpStatus:
|
|
199
208
|
Enabled: false
|
|
200
209
|
|
|
210
|
+
Rails/HttpStatusNameConsistency:
|
|
211
|
+
Enabled: true
|
|
212
|
+
|
|
201
213
|
Rails/I18nLazyLookup:
|
|
202
214
|
Enabled: false
|
|
203
215
|
|
|
@@ -249,6 +261,9 @@ Rails/NegateInclude:
|
|
|
249
261
|
Rails/NotNullColumn:
|
|
250
262
|
Enabled: false
|
|
251
263
|
|
|
264
|
+
Rails/OrderArguments:
|
|
265
|
+
Enabled: false
|
|
266
|
+
|
|
252
267
|
Rails/OrderById:
|
|
253
268
|
Enabled: false
|
|
254
269
|
|
|
@@ -285,6 +300,9 @@ Rails/RakeEnvironment:
|
|
|
285
300
|
Rails/ReadWriteAttribute:
|
|
286
301
|
Enabled: true
|
|
287
302
|
|
|
303
|
+
Rails/RedirectBackOrTo:
|
|
304
|
+
Enabled: true
|
|
305
|
+
|
|
288
306
|
Rails/RedundantActiveRecordAllMethod:
|
|
289
307
|
Enabled: false
|
|
290
308
|
|
|
@@ -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,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: standard-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin Searls
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: lint_roller
|
|
@@ -30,15 +29,14 @@ dependencies:
|
|
|
30
29
|
requirements:
|
|
31
30
|
- - "~>"
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 2.
|
|
32
|
+
version: 2.34.0
|
|
34
33
|
type: :runtime
|
|
35
34
|
prerelease: false
|
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
36
|
requirements:
|
|
38
37
|
- - "~>"
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 2.
|
|
41
|
-
description:
|
|
39
|
+
version: 2.34.0
|
|
42
40
|
email:
|
|
43
41
|
- searls@gmail.com
|
|
44
42
|
executables: []
|
|
@@ -67,7 +65,6 @@ metadata:
|
|
|
67
65
|
changelog_uri: https://github.com/testdouble/standard-rails/blob/main/CHANGELOG.md
|
|
68
66
|
rubygems_mfa_required: 'true'
|
|
69
67
|
default_lint_roller_plugin: Standard::Rails::Plugin
|
|
70
|
-
post_install_message:
|
|
71
68
|
rdoc_options: []
|
|
72
69
|
require_paths:
|
|
73
70
|
- lib
|
|
@@ -82,8 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
82
79
|
- !ruby/object:Gem::Version
|
|
83
80
|
version: '0'
|
|
84
81
|
requirements: []
|
|
85
|
-
rubygems_version: 3.
|
|
86
|
-
signing_key:
|
|
82
|
+
rubygems_version: 3.6.9
|
|
87
83
|
specification_version: 4
|
|
88
84
|
summary: A Standard plugin that adds Rails-specific rules to Standard
|
|
89
85
|
test_files: []
|