carwow_rubocop 4.0.0 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +1 -1
- data/Gemfile.lock +5 -5
- data/README.md +1 -1
- data/lib/rubocop/carwow/version.rb +1 -1
- data/lib/rubocop/cop/carwow/jobs.rb +8 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a298086f7e65b0263cc91fe3c8d074132c26d85080f7d6005d9ff93be25b5d4f
|
4
|
+
data.tar.gz: f4b3524c0cb7e68ada8939cb9f7e62cfc2a1eab9c7dd48e7d2934038b167c78d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8479fd94ca36b4f1afa7f5628dea506e6a51fbd28200b15e6f5d04328dea4bf451de345989a10572bb3e137d960e251e160a6a04702aa2b833cbb00ee1e83009
|
7
|
+
data.tar.gz: 027405a2b9112e32bc4e87977b5ba87289ce57fd2b25cb7edcb11ebf2c9b8dd50bc512a3b2989201fb89c17f09045acb66a838dab09abc03e27c12e9ef596c71
|
data/.circleci/config.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
carwow_rubocop (4.0.
|
4
|
+
carwow_rubocop (4.0.1)
|
5
5
|
rubocop (>= 0.93)
|
6
6
|
rubocop-performance
|
7
7
|
rubocop-rspec
|
@@ -36,7 +36,7 @@ GEM
|
|
36
36
|
diff-lcs (>= 1.2.0, < 2.0)
|
37
37
|
rspec-support (~> 3.10.0)
|
38
38
|
rspec-support (3.10.2)
|
39
|
-
rubocop (1.22.
|
39
|
+
rubocop (1.22.3)
|
40
40
|
parallel (~> 1.10)
|
41
41
|
parser (>= 3.0.0.0)
|
42
42
|
rainbow (>= 2.2.2, < 4.0)
|
@@ -45,12 +45,12 @@ GEM
|
|
45
45
|
rubocop-ast (>= 1.12.0, < 2.0)
|
46
46
|
ruby-progressbar (~> 1.7)
|
47
47
|
unicode-display_width (>= 1.4.0, < 3.0)
|
48
|
-
rubocop-ast (1.
|
48
|
+
rubocop-ast (1.13.0)
|
49
49
|
parser (>= 3.0.1.1)
|
50
|
-
rubocop-performance (1.
|
50
|
+
rubocop-performance (1.12.0)
|
51
51
|
rubocop (>= 1.7.0, < 2.0)
|
52
52
|
rubocop-ast (>= 0.4.0)
|
53
|
-
rubocop-rspec (2.
|
53
|
+
rubocop-rspec (2.6.0)
|
54
54
|
rubocop (~> 1.19)
|
55
55
|
ruby-progressbar (1.11.0)
|
56
56
|
unicode-display_width (2.1.0)
|
data/README.md
CHANGED
@@ -31,7 +31,7 @@ First Create a new file `.rubocop_carwow.yml` in the same directory as your `.ru
|
|
31
31
|
this file should contain
|
32
32
|
|
33
33
|
require:
|
34
|
-
-
|
34
|
+
- carwow_rubocop
|
35
35
|
|
36
36
|
Next add the following to `.rubocop.yml`
|
37
37
|
or add before `.rubocop_todo.yml` in your existing `inherit_from`
|
@@ -55,7 +55,7 @@ module RuboCop
|
|
55
55
|
def on_class(node)
|
56
56
|
return add_global_offense(NOT_CONFIGURED) if missing_config?
|
57
57
|
|
58
|
-
return if
|
58
|
+
return if any_ancestor_allowed?(node)
|
59
59
|
return if defining_allowed_job?(*node)
|
60
60
|
|
61
61
|
register_offenses(node)
|
@@ -63,6 +63,13 @@ module RuboCop
|
|
63
63
|
|
64
64
|
private
|
65
65
|
|
66
|
+
def any_ancestor_allowed?(class_node)
|
67
|
+
root_node = class_node.root? ? class_node : class_node.ancestors.last
|
68
|
+
root_node.each_descendant(:class).any? do |node|
|
69
|
+
allowed?(super_class(*node))
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
66
73
|
def allowed?(superclass)
|
67
74
|
cop_config.fetch('AllowedSuperclasses').include?(superclass)
|
68
75
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carwow_rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- carwow Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
168
|
- !ruby/object:Gem::Version
|
169
169
|
version: '0'
|
170
170
|
requirements: []
|
171
|
-
rubygems_version: 3.1.
|
171
|
+
rubygems_version: 3.1.4
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: carwow's rubocop configuration
|