standard-rails 1.0.0 → 1.0.2

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: 6df4391f1643cf7182142c98baf7b9d33b0aa51a92878829d6de1622f9b44092
4
- data.tar.gz: be681bb55367b1374b5aad990b0b3528e6fc89d1627d42b015315bd542022c61
3
+ metadata.gz: 21a20b533745e4b6761fc789fe128b03e4b03e9921a30f14d85087d3398ed130
4
+ data.tar.gz: 11bbf5b4c1a2c69803d9c5ca12ddf9ee2ed62f82a4843a7df22fe14f0debdad0
5
5
  SHA512:
6
- metadata.gz: 9abed8ffd41b108a7b986a0f190db3c99e3287d744d69fb90a79bea930b1e9ccf8840d9c1dff92e0565c77dc0eb3c3e8671803642d0e3d1c5dd6e3d9f1017881
7
- data.tar.gz: b2287c190702ecc615acd8312b96735280dd19a3b41210e9358a71b7bfb3bd65af84e187ef00174b698e1ebee68923a84e60267928bc2c417d5bbcf03f1693b7
6
+ metadata.gz: f40c5286a74fd60bad778ba9aeb35b9e6368edf5fc9bff23822afe8cbadcd72c4f7f5a4915481e7f98c55d094f92cdf0c4901c63e80c64091e56e6af53e81746
7
+ data.tar.gz: 20031a03010687d9e46deb65c6d28d1113e21583f1f4465b2f3f8120ab6cc07ed1c604e1965429a83afcbf99698dd9c31cf6c820f29b6410188688eddf07e751
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [1.0.2]
2
+
3
+ - Clear warnings about cops extended by rubocop-rails [#25](https://github.com/standardrb/standard-rails/issues/25)
4
+
5
+ ## [1.0.1]
6
+
7
+ - Fix errors int he initial config [#24](https://github.com/standardrb/standard-rails/pull/24)
8
+
1
9
  ## [1.0.0]
2
10
 
3
11
  - Update Rubocop Rails to [v2.23.1](https://github.com/rubocop/rubocop-rails/releases/tag/v2.23.1)
data/Gemfile.lock CHANGED
@@ -1,79 +1,89 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- standard-rails (1.0.0)
4
+ standard-rails (1.0.2)
5
5
  lint_roller (~> 1.0)
6
6
  rubocop-rails (~> 2.23.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (7.0.7.2)
11
+ activesupport (7.1.2)
12
+ base64
13
+ bigdecimal
12
14
  concurrent-ruby (~> 1.0, >= 1.0.2)
15
+ connection_pool (>= 2.2.5)
16
+ drb
13
17
  i18n (>= 1.6, < 2)
14
18
  minitest (>= 5.1)
19
+ mutex_m
15
20
  tzinfo (~> 2.0)
16
21
  ast (2.4.2)
17
- base64 (0.1.1)
22
+ base64 (0.2.0)
23
+ bigdecimal (3.1.5)
18
24
  concurrent-ruby (1.2.2)
25
+ connection_pool (2.4.1)
26
+ drb (2.2.0)
27
+ ruby2_keywords
19
28
  i18n (1.14.1)
20
29
  concurrent-ruby (~> 1.0)
21
- json (2.6.3)
30
+ json (2.7.1)
22
31
  language_server-protocol (3.17.0.3)
23
32
  lint_roller (1.1.0)
24
- m (1.6.1)
33
+ m (1.6.2)
25
34
  method_source (>= 0.6.7)
26
35
  rake (>= 0.9.2.2)
27
36
  method_source (1.0.0)
28
37
  minitest (5.20.0)
29
- parallel (1.23.0)
30
- parser (3.2.2.3)
38
+ mutex_m (0.2.0)
39
+ parallel (1.24.0)
40
+ parser (3.3.0.2)
31
41
  ast (~> 2.4.1)
32
42
  racc
33
- racc (1.7.1)
43
+ racc (1.7.3)
34
44
  rack (3.0.8)
35
45
  rainbow (3.1.1)
36
- rake (13.0.6)
37
- regexp_parser (2.8.1)
46
+ rake (13.1.0)
47
+ regexp_parser (2.9.0)
38
48
  rexml (3.2.6)
39
- rubocop (1.56.2)
40
- base64 (~> 0.1.1)
49
+ rubocop (1.59.0)
41
50
  json (~> 2.3)
42
51
  language_server-protocol (>= 3.17.0)
43
52
  parallel (~> 1.10)
44
- parser (>= 3.2.2.3)
53
+ parser (>= 3.2.2.4)
45
54
  rainbow (>= 2.2.2, < 4.0)
46
55
  regexp_parser (>= 1.8, < 3.0)
47
56
  rexml (>= 3.2.5, < 4.0)
48
- rubocop-ast (>= 1.28.1, < 2.0)
57
+ rubocop-ast (>= 1.30.0, < 2.0)
49
58
  ruby-progressbar (~> 1.7)
50
59
  unicode-display_width (>= 2.4.0, < 3.0)
51
60
  rubocop-ast (1.30.0)
52
61
  parser (>= 3.2.1.0)
53
- rubocop-performance (1.19.0)
54
- rubocop (>= 1.7.0, < 2.0)
55
- rubocop-ast (>= 0.4.0)
62
+ rubocop-performance (1.20.2)
63
+ rubocop (>= 1.48.1, < 2.0)
64
+ rubocop-ast (>= 1.30.0, < 2.0)
56
65
  rubocop-rails (2.23.1)
57
66
  activesupport (>= 4.2.0)
58
67
  rack (>= 1.1)
59
68
  rubocop (>= 1.33.0, < 2.0)
60
69
  rubocop-ast (>= 1.30.0, < 2.0)
61
70
  ruby-progressbar (1.13.0)
62
- standard (1.31.0)
71
+ ruby2_keywords (0.0.5)
72
+ standard (1.33.0)
63
73
  language_server-protocol (~> 3.17.0.2)
64
74
  lint_roller (~> 1.0)
65
- rubocop (~> 1.56.0)
75
+ rubocop (~> 1.59.0)
66
76
  standard-custom (~> 1.0.0)
67
- standard-performance (~> 1.2)
77
+ standard-performance (~> 1.3)
68
78
  standard-custom (1.0.2)
69
79
  lint_roller (~> 1.0)
70
80
  rubocop (~> 1.50)
71
- standard-performance (1.2.0)
81
+ standard-performance (1.3.0)
72
82
  lint_roller (~> 1.1)
73
- rubocop-performance (~> 1.19.0)
83
+ rubocop-performance (~> 1.20.1)
74
84
  tzinfo (2.0.6)
75
85
  concurrent-ruby (~> 1.0)
76
- unicode-display_width (2.4.2)
86
+ unicode-display_width (2.5.0)
77
87
 
78
88
  PLATFORMS
79
89
  arm64-darwin-20
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:
@@ -134,7 +125,7 @@ Rails/DotSeparatedKeys:
134
125
 
135
126
  Rails/DuplicateAssociation:
136
127
  Enabled: true
137
- Autocorrect: false
128
+ AutoCorrect: false
138
129
 
139
130
  Rails/DuplicateScope:
140
131
  Enabled: true
@@ -370,9 +361,6 @@ Rails/SquishedSQLHeredocs:
370
361
  Rails/StripHeredoc:
371
362
  Enabled: true
372
363
 
373
- Rails/StripHeredoc:
374
- Enabled: true
375
-
376
364
  Rails/TableNameAssignment:
377
365
  Enabled: false
378
366
 
@@ -430,6 +418,3 @@ Rails/WhereNot:
430
418
 
431
419
  Rails/WhereNotWithMultipleConditions:
432
420
  Enabled: false
433
-
434
- Style/InvertibleUnlessCondition:
435
- Enabled: false
@@ -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.0"
3
+ VERSION = "1.0.2"
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.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-27 00:00:00.000000000 Z
11
+ date: 2024-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lint_roller
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  requirements: []
85
- rubygems_version: 3.3.7
85
+ rubygems_version: 3.4.21
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: A Standard plugin that adds Rails-specific rules to Standard