standard-rails 1.0.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 21a20b533745e4b6761fc789fe128b03e4b03e9921a30f14d85087d3398ed130
4
- data.tar.gz: 11bbf5b4c1a2c69803d9c5ca12ddf9ee2ed62f82a4843a7df22fe14f0debdad0
3
+ metadata.gz: 17071619c6ac263340a987452f8a7de6c50ad61881ae1b2d342be96b2014828a
4
+ data.tar.gz: 7b3ce1c594c244991658e30f9476638df29209090d9059769e2b573c038aa509
5
5
  SHA512:
6
- metadata.gz: f40c5286a74fd60bad778ba9aeb35b9e6368edf5fc9bff23822afe8cbadcd72c4f7f5a4915481e7f98c55d094f92cdf0c4901c63e80c64091e56e6af53e81746
7
- data.tar.gz: 20031a03010687d9e46deb65c6d28d1113e21583f1f4465b2f3f8120ab6cc07ed1c604e1965429a83afcbf99698dd9c31cf6c820f29b6410188688eddf07e751
6
+ metadata.gz: 76d8edc3965b26dd67ca994cad332d009e2db26975d5d7ec1f62807eb5c6804aff274fbce72f85d51b38e7afb8417c1eab3f112a2ee464d75d705141213d2f71
7
+ data.tar.gz: 603fe9220903e1bd7cbe14cc880776ee8eae0411ed61dbd2cce850672b1734ab253cf6486f20ea9e63fdf04f972f65133d63e3d6c81f6f1508836b9ba662e510
data/CHANGELOG.md CHANGED
@@ -1,10 +1,28 @@
1
+ ## [1.2.0]
2
+
3
+ - Update to [rubocop-rails@2.26.0](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md#2260-2024-08-24)
4
+ - Enable new [Rails/EnumSyntax](https://github.com/rubocop/rubocop-rails/blob/master/docs/modules/ROOT/pages/cops_rails.adoc#railsenumsyntax)
5
+ - Exclude [Rails/ApplicationModel](/commit/94029ecc04635bdcda9c54bfcca27f6f9656205d) from migrations
6
+ - Disable [Rails/HelperInstanceVariable](https://github.com/rubocop/rubocop-rails/blob/master/docs/modules/ROOT/pages/cops_rails.adoc#railshelperinstancevariable)
7
+ - Disable [Rails/WhereRange](https://github.com/standardrb/standard-rails/pull/57)
8
+ - Disable [Rails/BulkChangeTable](https://github.com/standardrb/standard-rails/pull/55)
9
+ - Disable [Rails/InverseOf](https://github.com/standardrb/standard-rails/pull/54)
10
+ - Disable [Rails/HasManyOrHasOneDependent](https://github.com/standardrb/standard-rails/pull/53)
11
+ - Disable [Rails/EnvironmentVariableAccess](https://github.com/standardrb/standard-rails/pull/47)
12
+
13
+ ## [1.1.0]
14
+
15
+ - Minimum Ruby version increased to 3.0
16
+ - rubocop-rails upgraded to 2.25.x
17
+ - Lots of rule cleanup
18
+
1
19
  ## [1.0.2]
2
20
 
3
21
  - Clear warnings about cops extended by rubocop-rails [#25](https://github.com/standardrb/standard-rails/issues/25)
4
22
 
5
23
  ## [1.0.1]
6
24
 
7
- - Fix errors int he initial config [#24](https://github.com/standardrb/standard-rails/pull/24)
25
+ - Fix errors in the initial config [#24](https://github.com/standardrb/standard-rails/pull/24)
8
26
 
9
27
  ## [1.0.0]
10
28
 
data/Gemfile.lock CHANGED
@@ -1,86 +1,88 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- standard-rails (1.0.2)
4
+ standard-rails (1.2.0)
5
5
  lint_roller (~> 1.0)
6
- rubocop-rails (~> 2.23.1)
6
+ rubocop-rails (~> 2.26.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (7.1.2)
11
+ activesupport (7.2.1)
12
12
  base64
13
13
  bigdecimal
14
- concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ concurrent-ruby (~> 1.0, >= 1.3.1)
15
15
  connection_pool (>= 2.2.5)
16
16
  drb
17
17
  i18n (>= 1.6, < 2)
18
+ logger (>= 1.4.2)
18
19
  minitest (>= 5.1)
19
- mutex_m
20
- tzinfo (~> 2.0)
20
+ securerandom (>= 0.3)
21
+ tzinfo (~> 2.0, >= 2.0.5)
21
22
  ast (2.4.2)
22
23
  base64 (0.2.0)
23
- bigdecimal (3.1.5)
24
- concurrent-ruby (1.2.2)
24
+ bigdecimal (3.1.8)
25
+ concurrent-ruby (1.3.4)
25
26
  connection_pool (2.4.1)
26
- drb (2.2.0)
27
- ruby2_keywords
28
- i18n (1.14.1)
27
+ drb (2.2.1)
28
+ i18n (1.14.5)
29
29
  concurrent-ruby (~> 1.0)
30
- json (2.7.1)
30
+ json (2.7.2)
31
31
  language_server-protocol (3.17.0.3)
32
32
  lint_roller (1.1.0)
33
+ logger (1.6.0)
33
34
  m (1.6.2)
34
35
  method_source (>= 0.6.7)
35
36
  rake (>= 0.9.2.2)
36
- method_source (1.0.0)
37
- minitest (5.20.0)
38
- mutex_m (0.2.0)
39
- parallel (1.24.0)
40
- parser (3.3.0.2)
37
+ method_source (1.1.0)
38
+ minitest (5.25.1)
39
+ parallel (1.26.3)
40
+ parser (3.3.4.2)
41
41
  ast (~> 2.4.1)
42
42
  racc
43
- racc (1.7.3)
44
- rack (3.0.8)
43
+ racc (1.8.1)
44
+ rack (3.1.7)
45
45
  rainbow (3.1.1)
46
- rake (13.1.0)
47
- regexp_parser (2.9.0)
48
- rexml (3.2.6)
49
- rubocop (1.59.0)
46
+ rake (13.2.1)
47
+ regexp_parser (2.9.2)
48
+ rexml (3.3.6)
49
+ strscan
50
+ rubocop (1.65.1)
50
51
  json (~> 2.3)
51
52
  language_server-protocol (>= 3.17.0)
52
53
  parallel (~> 1.10)
53
- parser (>= 3.2.2.4)
54
+ parser (>= 3.3.0.2)
54
55
  rainbow (>= 2.2.2, < 4.0)
55
- regexp_parser (>= 1.8, < 3.0)
56
+ regexp_parser (>= 2.4, < 3.0)
56
57
  rexml (>= 3.2.5, < 4.0)
57
- rubocop-ast (>= 1.30.0, < 2.0)
58
+ rubocop-ast (>= 1.31.1, < 2.0)
58
59
  ruby-progressbar (~> 1.7)
59
60
  unicode-display_width (>= 2.4.0, < 3.0)
60
- rubocop-ast (1.30.0)
61
- parser (>= 3.2.1.0)
62
- rubocop-performance (1.20.2)
61
+ rubocop-ast (1.32.1)
62
+ parser (>= 3.3.1.0)
63
+ rubocop-performance (1.21.1)
63
64
  rubocop (>= 1.48.1, < 2.0)
64
- rubocop-ast (>= 1.30.0, < 2.0)
65
- rubocop-rails (2.23.1)
65
+ rubocop-ast (>= 1.31.1, < 2.0)
66
+ rubocop-rails (2.26.0)
66
67
  activesupport (>= 4.2.0)
67
68
  rack (>= 1.1)
68
- rubocop (>= 1.33.0, < 2.0)
69
- rubocop-ast (>= 1.30.0, < 2.0)
69
+ rubocop (>= 1.52.0, < 2.0)
70
+ rubocop-ast (>= 1.31.1, < 2.0)
70
71
  ruby-progressbar (1.13.0)
71
- ruby2_keywords (0.0.5)
72
- standard (1.33.0)
72
+ securerandom (0.3.1)
73
+ standard (1.40.0)
73
74
  language_server-protocol (~> 3.17.0.2)
74
75
  lint_roller (~> 1.0)
75
- rubocop (~> 1.59.0)
76
+ rubocop (~> 1.65.0)
76
77
  standard-custom (~> 1.0.0)
77
- standard-performance (~> 1.3)
78
+ standard-performance (~> 1.4)
78
79
  standard-custom (1.0.2)
79
80
  lint_roller (~> 1.0)
80
81
  rubocop (~> 1.50)
81
- standard-performance (1.3.0)
82
+ standard-performance (1.4.0)
82
83
  lint_roller (~> 1.1)
83
- rubocop-performance (~> 1.20.1)
84
+ rubocop-performance (~> 1.21.0)
85
+ strscan (3.1.0)
84
86
  tzinfo (2.0.6)
85
87
  concurrent-ruby (~> 1.0)
86
88
  unicode-display_width (2.5.0)
@@ -89,6 +91,7 @@ PLATFORMS
89
91
  arm64-darwin-20
90
92
  arm64-darwin-21
91
93
  arm64-darwin-22
94
+ arm64-darwin-23
92
95
  x86_64-linux
93
96
 
94
97
  DEPENDENCIES
@@ -99,4 +102,4 @@ DEPENDENCIES
99
102
  standard-rails!
100
103
 
101
104
  BUNDLED WITH
102
- 2.4.10
105
+ 2.5.17
data/README.md CHANGED
@@ -36,6 +36,20 @@ plugins:
36
36
  target_rails_version: 7.0
37
37
  ```
38
38
 
39
+ ### Ignoring violations from old migrations
40
+
41
+ Rails migrations are intended to be written as forward-compatible and subsequently unchanged, but they may contain Standard Ruby violations. Rather than apply fixes to those old migrations (and risk changing their behavior), you can ignore them in your `.standard.yml` like this:
42
+
43
+ ```ruby
44
+ ignore:
45
+ # Legacy migrations
46
+ - 'db/migrate/201*.rb'
47
+ - 'db/migrate/2020*.rb'
48
+ - 'db/migrate/2021*.rb'
49
+ - 'db/migrate/2022*.rb'
50
+ - 'db/migrate/2023*.rb'
51
+ ```
52
+
39
53
  ## Code of Conduct
40
54
 
41
55
  This project follows Test Double's [code of
data/config/base.yml CHANGED
@@ -37,7 +37,7 @@ Rails/ActionControllerTestCase:
37
37
  Enabled: false
38
38
 
39
39
  Rails/ActionFilter:
40
- Enabled: true
40
+ Enabled: false
41
41
 
42
42
  Rails/ActionOrder:
43
43
  Enabled: false
@@ -74,6 +74,8 @@ Rails/ApplicationMailer:
74
74
 
75
75
  Rails/ApplicationRecord:
76
76
  Enabled: true
77
+ Exclude:
78
+ - 'db/migrate/**/*'
77
79
 
78
80
  Rails/ArelStar:
79
81
  Enabled: true
@@ -91,7 +93,7 @@ Rails/Blank:
91
93
  Enabled: true
92
94
 
93
95
  Rails/BulkChangeTable:
94
- Enabled: true
96
+ Enabled: false
95
97
 
96
98
  Rails/CompactBlank:
97
99
  Enabled: true
@@ -134,7 +136,7 @@ Rails/DurationArithmetic:
134
136
  Enabled: true
135
137
 
136
138
  Rails/DynamicFindBy:
137
- Enabled: true
139
+ Enabled: false
138
140
 
139
141
  Rails/EagerEvaluationLogMessage:
140
142
  Enabled: true
@@ -142,6 +144,9 @@ Rails/EagerEvaluationLogMessage:
142
144
  Rails/EnumHash:
143
145
  Enabled: true
144
146
 
147
+ Rails/EnumSyntax:
148
+ Enabled: true
149
+
145
150
  Rails/EnumUniqueness:
146
151
  Enabled: true
147
152
 
@@ -152,7 +157,7 @@ Rails/EnvironmentComparison:
152
157
  Enabled: true
153
158
 
154
159
  Rails/EnvironmentVariableAccess:
155
- Enabled: true
160
+ Enabled: false
156
161
 
157
162
  Rails/Exit:
158
163
  Enabled: true
@@ -179,10 +184,10 @@ Rails/HasAndBelongsToMany:
179
184
  Enabled: true
180
185
 
181
186
  Rails/HasManyOrHasOneDependent:
182
- Enabled: true
187
+ Enabled: false
183
188
 
184
189
  Rails/HelperInstanceVariable:
185
- Enabled: true
190
+ Enabled: false
186
191
 
187
192
  Rails/HttpPositionalArguments:
188
193
  Enabled: true
@@ -215,7 +220,7 @@ Rails/Inquiry:
215
220
  Enabled: false
216
221
 
217
222
  Rails/InverseOf:
218
- Enabled: true
223
+ Enabled: false
219
224
 
220
225
  Rails/LexicallyScopedActionFilter:
221
226
  Enabled: true
@@ -239,7 +244,7 @@ Rails/NotNullColumn:
239
244
  Enabled: false
240
245
 
241
246
  Rails/OrderById:
242
- Enabled: true
247
+ Enabled: false
243
248
 
244
249
  Rails/Output:
245
250
  Enabled: true
@@ -254,7 +259,7 @@ Rails/Pluck:
254
259
  Enabled: true
255
260
 
256
261
  Rails/PluckId:
257
- Enabled: true
262
+ Enabled: false
258
263
 
259
264
  Rails/PluckInWhere:
260
265
  Enabled: true
@@ -338,7 +343,7 @@ Rails/SafeNavigationWithBlank:
338
343
  Enabled: true
339
344
 
340
345
  Rails/SaveBang:
341
- Enabled: true
346
+ Enabled: false
342
347
 
343
348
  Rails/SchemaComment:
344
349
  Enabled: false
@@ -396,7 +401,7 @@ Rails/UnknownEnv:
396
401
  Enabled: false
397
402
 
398
403
  Rails/UnusedIgnoredColumns:
399
- Enabled: true
404
+ Enabled: false
400
405
 
401
406
  Rails/UnusedRenderContent:
402
407
  Enabled: true
@@ -418,3 +423,6 @@ Rails/WhereNot:
418
423
 
419
424
  Rails/WhereNotWithMultipleConditions:
420
425
  Enabled: false
426
+
427
+ Rails/WhereRange:
428
+ Enabled: false
@@ -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.23.1
10
+ # Last updated from rubocop-rails v2.26.0
11
11
 
12
12
  # frozen_string_literal: true
13
13
 
@@ -53,7 +53,7 @@ module Standard
53
53
  #
54
54
  # See: https://github.com/standardrb/standard-rails/issues/25#issuecomment-1881127173
55
55
  def without_extended_rule_configs(rules)
56
- rules.reject { |(name,_)|
56
+ rules.reject { |(name, _)|
57
57
  ["Style/InvertibleUnlessCondition", "Lint/SafeNavigationChain"].include?(name)
58
58
  }.to_h
59
59
  end
@@ -1,5 +1,5 @@
1
1
  module Standard
2
2
  module Rails
3
- VERSION = "1.0.2"
3
+ VERSION = "1.2.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.0.2
4
+ version: 1.2.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: 2024-01-08 00:00:00.000000000 Z
11
+ date: 2024-08-26 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.23.1
33
+ version: 2.26.0
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.23.1
40
+ version: 2.26.0
41
41
  description:
42
42
  email:
43
43
  - searls@gmail.com
@@ -75,14 +75,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
75
75
  requirements:
76
76
  - - ">="
77
77
  - !ruby/object:Gem::Version
78
- version: 2.7.0
78
+ version: 3.0.0
79
79
  required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  requirements: []
85
- rubygems_version: 3.4.21
85
+ rubygems_version: 3.5.14
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: A Standard plugin that adds Rails-specific rules to Standard