standard-rails 1.0.1 → 1.0.2

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: 21a20b533745e4b6761fc789fe128b03e4b03e9921a30f14d85087d3398ed130
4
+ data.tar.gz: 11bbf5b4c1a2c69803d9c5ca12ddf9ee2ed62f82a4843a7df22fe14f0debdad0
5
5
  SHA512:
6
- metadata.gz: 63d213467768a22f8dd7bcb589c048e84661d26c5d86f547bc46113d37fe6c993efd61018222b0bcd9d064103b982751e64387194dadb13d149b0f3b9dfa9a43
7
- data.tar.gz: 85ec0dcdce846df434133d9ebd0bf0bb7f4044b4766297b828904a528e80d90850954853e31e89283df2902159a56d32fa763a8b5a6649fae3e8396aadc2b334
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,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- standard-rails (1.0.1)
4
+ standard-rails (1.0.2)
5
5
  lint_roller (~> 1.0)
6
6
  rubocop-rails (~> 2.23.1)
7
7
 
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:
@@ -427,6 +418,3 @@ Rails/WhereNot:
427
418
 
428
419
  Rails/WhereNotWithMultipleConditions:
429
420
  Enabled: false
430
-
431
- Style/InvertibleUnlessCondition:
432
- 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.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
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.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls