rubocop 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rubocop/config_obsoletion/extracted_cop.rb +6 -6
- data/lib/rubocop/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7e78bdb76ac54d034e71f715292180a9982c1c08096fd8546c52f8786b703bd
|
4
|
+
data.tar.gz: e94b644cff4449332cd0be3dda1e41d2911f3bfd88fb14862534c0e29736a374
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54d96669e8524f0fc27ccc4ed75c44c2ce6c143298ed26affe5739eff1dd3aa9f24d0278e9df8e764c6ceb53b7f868764df783ccfd51d8a9bd633623124e150c
|
7
|
+
data.tar.gz: f6516450c7473cf56f6d330da24fd2b73827a07603ecda6bba672c470ae7490e97071a118d168f4288e37792289e97cb4503362915e9daa0ce1c79bd1d0def28
|
@@ -15,29 +15,29 @@ module RuboCop
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def violated?
|
18
|
-
return false if
|
18
|
+
return false if feature_loaded?
|
19
19
|
|
20
|
-
|
20
|
+
affected_cops.any?
|
21
21
|
end
|
22
22
|
|
23
23
|
def rule_message
|
24
24
|
msg = '%<name>s been extracted to the `%<gem>s` gem.'
|
25
25
|
format(msg,
|
26
|
-
name:
|
26
|
+
name: affected_cops.size > 1 ? "`#{department}` cops have" : "`#{old_name}` has",
|
27
27
|
gem: gem)
|
28
28
|
end
|
29
29
|
|
30
30
|
private
|
31
31
|
|
32
|
-
def
|
32
|
+
def affected_cops
|
33
33
|
return old_name unless old_name.end_with?('*')
|
34
34
|
|
35
35
|
# Handle whole departments (expressed as `Department/*`)
|
36
36
|
config.keys.grep(Regexp.new("^#{department}"))
|
37
37
|
end
|
38
38
|
|
39
|
-
def
|
40
|
-
|
39
|
+
def feature_loaded?
|
40
|
+
config.loaded_features.include?(gem)
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
data/lib/rubocop/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-12-
|
13
|
+
date: 2020-12-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: parallel
|