gry 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -2
- data/Appraisals +6 -2
- data/gemfiles/{rubocop_0.47.0.gemfile → rubocop_0.47.1.gemfile} +1 -1
- data/gemfiles/rubocop_0.48.1.gemfile +7 -0
- data/gry.gemspec +1 -1
- data/lib/gry/rubocop_adapter.rb +7 -3
- data/lib/gry/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b42e23132942ef6df96fec3c692ff47835f16c81
|
4
|
+
data.tar.gz: b25bd4caf24782e145033074c4de66331338a8be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1a633e62726375d702a804e32a3f2a8cf3fe903199f742ec8317e424a5a1699a8dde67cca8c85825d0e6489401a69ccd93992291698fb11c1316efc88e785bd
|
7
|
+
data.tar.gz: d8b06696c150d83cebe3419f14bd7a25d3d697941507bb3f7d4203c7874b7b2ef665ed6101a9c1220a27a0185c3d000a5ea39366c3837d3fc570380b924aeb84
|
data/.travis.yml
CHANGED
data/Appraisals
CHANGED
@@ -2,6 +2,10 @@ appraise "rubocop-head" do
|
|
2
2
|
gem "rubocop", github: 'bbatsov/rubocop'
|
3
3
|
end
|
4
4
|
|
5
|
-
appraise "rubocop-0.
|
6
|
-
gem "rubocop", "0.
|
5
|
+
appraise "rubocop-0.48.1" do
|
6
|
+
gem "rubocop", "0.48.1"
|
7
|
+
end
|
8
|
+
|
9
|
+
appraise "rubocop-0.47.1" do
|
10
|
+
gem "rubocop", "0.47.1"
|
7
11
|
end
|
data/gry.gemspec
CHANGED
@@ -35,6 +35,6 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.add_development_dependency "meowcop", ">= 1.7.0"
|
36
36
|
spec.add_development_dependency "appraisal"
|
37
37
|
|
38
|
-
spec.add_runtime_dependency "rubocop", ">= 0.47.
|
38
|
+
spec.add_runtime_dependency "rubocop", ">= 0.47.1"
|
39
39
|
spec.add_runtime_dependency "parallel", "~> 1.10.0"
|
40
40
|
end
|
data/lib/gry/rubocop_adapter.rb
CHANGED
@@ -11,7 +11,7 @@ module Gry
|
|
11
11
|
conf
|
12
12
|
.select{|key, cop_conf| !enforced_styles(cop_conf).empty? || metrics_cop?(key) }
|
13
13
|
.reject{|key, _cop_conf| !rails? && key.start_with?('Rails/')}
|
14
|
-
.select{|key, _cop_conf| conf = config_specified_by_user.for_cop(key); conf.empty? ||
|
14
|
+
.select{|key, _cop_conf| conf = config_specified_by_user.for_cop(key); conf.empty? || conf.keys == ['Enabled']} # Ignore always configured cops
|
15
15
|
.keys
|
16
16
|
end
|
17
17
|
|
@@ -25,8 +25,12 @@ module Gry
|
|
25
25
|
# @param cop_name [String]
|
26
26
|
# @return [Boolean]
|
27
27
|
def metrics_cop?(cop_name)
|
28
|
-
cop_name.start_with?('Metrics')
|
29
|
-
|
28
|
+
return false unless cop_name.start_with?('Metrics')
|
29
|
+
# https://github.com/bbatsov/rubocop/pull/4055
|
30
|
+
exclude_cops = Gem::Version.new(RuboCop::Version.version) >= Gem::Version.new('0.48.0') ?
|
31
|
+
%w[Metrics/BlockNesting] :
|
32
|
+
%w[Metrics/ParameterLists Metrics/BlockNesting]
|
33
|
+
!exclude_cops.include?(cop_name)
|
30
34
|
end
|
31
35
|
|
32
36
|
def to_supported_styles(enforced_style)
|
data/lib/gry/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masataka Kuwabara
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -198,14 +198,14 @@ dependencies:
|
|
198
198
|
requirements:
|
199
199
|
- - ">="
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version: 0.47.
|
201
|
+
version: 0.47.1
|
202
202
|
type: :runtime
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
206
|
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version: 0.47.
|
208
|
+
version: 0.47.1
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
210
|
name: parallel
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -241,7 +241,8 @@ files:
|
|
241
241
|
- bin/console
|
242
242
|
- bin/setup
|
243
243
|
- exe/gry
|
244
|
-
- gemfiles/rubocop_0.47.
|
244
|
+
- gemfiles/rubocop_0.47.1.gemfile
|
245
|
+
- gemfiles/rubocop_0.48.1.gemfile
|
245
246
|
- gemfiles/rubocop_head.gemfile
|
246
247
|
- gry.gemspec
|
247
248
|
- lib/gry.rb
|
@@ -274,7 +275,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
274
275
|
version: '0'
|
275
276
|
requirements: []
|
276
277
|
rubyforge_project:
|
277
|
-
rubygems_version: 2.6.
|
278
|
+
rubygems_version: 2.6.10
|
278
279
|
signing_key:
|
279
280
|
specification_version: 4
|
280
281
|
summary: Gry generates `.rubocop.yml` automatically from your source code.
|