standard-rails 1.0.1 → 1.1.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: 5eeb3e6ba8d4da6c2401a846947814610787ca970fb46f12a9e3afbdb5b5b17e
4
- data.tar.gz: 267862f4b09d3a910eee0f38c7851443a6e4a7264502ca22c1e43424e7315fd3
3
+ metadata.gz: 9a8e0a868c15dffa225605d8233191a4c1193847290ae27c38182eb049f2f088
4
+ data.tar.gz: 7ce125bd0b23320baa7f47c6a9cc176cbcbe076bc013be49fe34e6115c88d719
5
5
  SHA512:
6
- metadata.gz: 63d213467768a22f8dd7bcb589c048e84661d26c5d86f547bc46113d37fe6c993efd61018222b0bcd9d064103b982751e64387194dadb13d149b0f3b9dfa9a43
7
- data.tar.gz: 85ec0dcdce846df434133d9ebd0bf0bb7f4044b4766297b828904a528e80d90850954853e31e89283df2902159a56d32fa763a8b5a6649fae3e8396aadc2b334
6
+ metadata.gz: c9c41b4f8cfcbfb09d89051f781b01ca1f6bba083c8cd05220ad423f914e2dc9504e56756a15605d73f4dfcd4ae1345cae54d42d86f1faa0d65914c5367fb644
7
+ data.tar.gz: e5cf5f65ca9775f942b0a6ff2b71739cfbff596f27ff36a6920903e1ffdb9f2172bea011867d8b8425c1fbeab8dd7d6c48249b4035286718d785e14cf9f9b1f5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.1.0]
2
+
3
+ - Minimum Ruby version increased to 3.0
4
+ - rubocop-rails upgraded to 2.25.x
5
+ - Lots of rule cleanup
6
+
7
+ ## [1.0.2]
8
+
9
+ - Clear warnings about cops extended by rubocop-rails [#25](https://github.com/standardrb/standard-rails/issues/25)
10
+
11
+ ## [1.0.1]
12
+
13
+ - Fix errors int he initial config [#24](https://github.com/standardrb/standard-rails/pull/24)
14
+
1
15
  ## [1.0.0]
2
16
 
3
17
  - Update Rubocop Rails to [v2.23.1](https://github.com/rubocop/rubocop-rails/releases/tag/v2.23.1)
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- standard-rails (1.0.1)
4
+ standard-rails (1.1.0)
5
5
  lint_roller (~> 1.0)
6
- rubocop-rails (~> 2.23.1)
6
+ rubocop-rails (~> 2.25.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
@@ -37,7 +37,7 @@ GEM
37
37
  minitest (5.20.0)
38
38
  mutex_m (0.2.0)
39
39
  parallel (1.24.0)
40
- parser (3.3.0.2)
40
+ parser (3.3.3.0)
41
41
  ast (~> 2.4.1)
42
42
  racc
43
43
  racc (1.7.3)
@@ -57,16 +57,16 @@ GEM
57
57
  rubocop-ast (>= 1.30.0, < 2.0)
58
58
  ruby-progressbar (~> 1.7)
59
59
  unicode-display_width (>= 2.4.0, < 3.0)
60
- rubocop-ast (1.30.0)
61
- parser (>= 3.2.1.0)
60
+ rubocop-ast (1.31.3)
61
+ parser (>= 3.3.1.0)
62
62
  rubocop-performance (1.20.2)
63
63
  rubocop (>= 1.48.1, < 2.0)
64
64
  rubocop-ast (>= 1.30.0, < 2.0)
65
- rubocop-rails (2.23.1)
65
+ rubocop-rails (2.25.0)
66
66
  activesupport (>= 4.2.0)
67
67
  rack (>= 1.1)
68
68
  rubocop (>= 1.33.0, < 2.0)
69
- rubocop-ast (>= 1.30.0, < 2.0)
69
+ rubocop-ast (>= 1.31.1, < 2.0)
70
70
  ruby-progressbar (1.13.0)
71
71
  ruby2_keywords (0.0.5)
72
72
  standard (1.33.0)
@@ -89,6 +89,7 @@ PLATFORMS
89
89
  arm64-darwin-20
90
90
  arm64-darwin-21
91
91
  arm64-darwin-22
92
+ arm64-darwin-23
92
93
  x86_64-linux
93
94
 
94
95
  DEPENDENCIES
@@ -99,4 +100,4 @@ DEPENDENCIES
99
100
  standard-rails!
100
101
 
101
102
  BUNDLED WITH
102
- 2.4.10
103
+ 2.5.11
data/config/base.yml CHANGED
@@ -19,15 +19,6 @@ AllCops:
19
19
  # as the default.
20
20
  TargetRailsVersion: ~
21
21
 
22
- # This cop from rubocop was added to the Rubocop-Rails
23
- # config as part of this PR:
24
- # https://github.com/rubocop/rubocop-rails/pull/1014
25
- # in order to support some Rails-specific methods. At the
26
- # time of writing, it's disabled in Standard, so it's
27
- # disabled here.
28
- Lint/RedundantSafeNavigation:
29
- Enabled: false
30
-
31
22
  Lint/SafeNavigationChain:
32
23
  Enabled: true
33
24
  AllowedMethods:
@@ -46,7 +37,7 @@ Rails/ActionControllerTestCase:
46
37
  Enabled: false
47
38
 
48
39
  Rails/ActionFilter:
49
- Enabled: true
40
+ Enabled: false
50
41
 
51
42
  Rails/ActionOrder:
52
43
  Enabled: false
@@ -143,7 +134,7 @@ Rails/DurationArithmetic:
143
134
  Enabled: true
144
135
 
145
136
  Rails/DynamicFindBy:
146
- Enabled: true
137
+ Enabled: false
147
138
 
148
139
  Rails/EagerEvaluationLogMessage:
149
140
  Enabled: true
@@ -248,7 +239,7 @@ Rails/NotNullColumn:
248
239
  Enabled: false
249
240
 
250
241
  Rails/OrderById:
251
- Enabled: true
242
+ Enabled: false
252
243
 
253
244
  Rails/Output:
254
245
  Enabled: true
@@ -263,7 +254,7 @@ Rails/Pluck:
263
254
  Enabled: true
264
255
 
265
256
  Rails/PluckId:
266
- Enabled: true
257
+ Enabled: false
267
258
 
268
259
  Rails/PluckInWhere:
269
260
  Enabled: true
@@ -347,7 +338,7 @@ Rails/SafeNavigationWithBlank:
347
338
  Enabled: true
348
339
 
349
340
  Rails/SaveBang:
350
- Enabled: true
341
+ Enabled: false
351
342
 
352
343
  Rails/SchemaComment:
353
344
  Enabled: false
@@ -405,7 +396,7 @@ Rails/UnknownEnv:
405
396
  Enabled: false
406
397
 
407
398
  Rails/UnusedIgnoredColumns:
408
- Enabled: true
399
+ Enabled: false
409
400
 
410
401
  Rails/UnusedRenderContent:
411
402
  Enabled: true
@@ -428,5 +419,5 @@ Rails/WhereNot:
428
419
  Rails/WhereNotWithMultipleConditions:
429
420
  Enabled: false
430
421
 
431
- Style/InvertibleUnlessCondition:
432
- Enabled: false
422
+ Rails/WhereRange:
423
+ Enabled: true
@@ -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.25.0
11
11
 
12
12
  # frozen_string_literal: true
13
13
 
@@ -27,7 +27,9 @@ module Standard
27
27
  LintRoller::Rules.new(
28
28
  type: :object,
29
29
  config_format: :rubocop,
30
- value: rules_with_config_applied
30
+ value: without_extended_rule_configs(
31
+ rules_with_config_applied
32
+ )
31
33
  )
32
34
  end
33
35
 
@@ -44,6 +46,18 @@ module Standard
44
46
  )
45
47
  end
46
48
 
49
+ # rubocop-rails adds additional options to a couple out-of-the-box cops
50
+ # but Standard (1) doesn't enable these to begin with and (2) doesn't
51
+ # allow rules' configs to be edited once they are defined, so we'll just
52
+ # remove them here
53
+ #
54
+ # See: https://github.com/standardrb/standard-rails/issues/25#issuecomment-1881127173
55
+ def without_extended_rule_configs(rules)
56
+ rules.reject { |(name, _)|
57
+ ["Style/InvertibleUnlessCondition", "Lint/SafeNavigationChain"].include?(name)
58
+ }.to_h
59
+ end
60
+
47
61
  # This is not fantastic.
48
62
  #
49
63
  # 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.0.1"
3
+ VERSION = "1.1.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.1
4
+ version: 1.1.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-06-21 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.25.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.25.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.9
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: A Standard plugin that adds Rails-specific rules to Standard