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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ff580775106b150ad84234df7b272b91db231053
4
- data.tar.gz: faeb3ce97bd80b4f0079105d2ac38025b4f5960d
3
+ metadata.gz: b42e23132942ef6df96fec3c692ff47835f16c81
4
+ data.tar.gz: b25bd4caf24782e145033074c4de66331338a8be
5
5
  SHA512:
6
- metadata.gz: 55ea4e22e9482933d3a5f082009dd3c1d7a74ec84e0bb27213b05d125a8a412c4f2134e2bddfbc0070e0167fb11808f9640d4f8b6a935c7bc7b3be0bb9cb8b0f
7
- data.tar.gz: c77b30809da19e0ea27b5c31f3d785d1bf231d0d81ef706fe363274341ae311360f8e537b2ea8b6707ac042bbade81e63ab9d89d68a7fc5dc48e763265a74c7d
6
+ metadata.gz: f1a633e62726375d702a804e32a3f2a8cf3fe903199f742ec8317e424a5a1699a8dde67cca8c85825d0e6489401a69ccd93992291698fb11c1316efc88e785bd
7
+ data.tar.gz: d8b06696c150d83cebe3419f14bd7a25d3d697941507bb3f7d4203c7874b7b2ef665ed6101a9c1220a27a0185c3d000a5ea39366c3837d3fc570380b924aeb84
data/.travis.yml CHANGED
@@ -2,8 +2,9 @@ language: ruby
2
2
  cache: bundler
3
3
  rvm:
4
4
  - 2.3.3
5
- - 2.4.0
5
+ - 2.4.1
6
6
  - ruby-head
7
7
  gemfile:
8
- - gemfiles/rubocop_0.47.0.gemfile
8
+ - gemfiles/rubocop_0.48.1.gemfile
9
+ - gemfiles/rubocop_0.47.1.gemfile
9
10
  - gemfiles/rubocop_head.gemfile
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.47.0" do
6
- gem "rubocop", "0.47.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
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rubocop", "0.47.0"
5
+ gem "rubocop", "0.47.1"
6
6
 
7
7
  gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.48.1"
6
+
7
+ gemspec :path => "../"
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.0"
38
+ spec.add_runtime_dependency "rubocop", ">= 0.47.1"
39
39
  spec.add_runtime_dependency "parallel", "~> 1.10.0"
40
40
  end
@@ -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? || !conf['Enabled']}
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
- !%w[Metrics/ParameterLists Metrics/BlockNesting].include?(cop_name)
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
@@ -1,3 +1,3 @@
1
1
  module Gry
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0"
3
3
  end
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.3.1
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-02-11 00:00:00.000000000 Z
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.0
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.0
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.0.gemfile
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.8
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.