deep-cover-core 0.7.4 → 0.7.5

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: 603e2b385c1300a0de0cacb88c11f7217d4e980dcaff51155399213f75cf7f90
4
- data.tar.gz: 43fb569eb81b540c91b95548995309ce8f98c4c71d3d8187121142f58f392c51
3
+ metadata.gz: 145f22f7e6c3e70e0c871dc580344ea02c3ceda18ec0b09872442988d9b639a6
4
+ data.tar.gz: ff3df5117fbe2ce5e509c35b87aadafa0b26ac5817b63915d62fdffd8609f360
5
5
  SHA512:
6
- metadata.gz: b0462f47bfd1a5e95b963f0681dbae4432bdce6e1b21a4ec479900e21004954406f6e9a420212b47a0e7ab3cc13f867ef73d9bef06b4f0ba8638ee34c3a0492b
7
- data.tar.gz: f92c1bdabdc19b35b39a3df5cd433c84ca1ad145dfe5cd6347f20f3eafbba305f4e8ac027cf5dc813018acb339fb46360377cba325abc9ffe33a350175c6560a
6
+ metadata.gz: fe0e1f7d60fb023fcb2329431387b25862ab53820724effd5a70bd01b72ca6764d5f49c04cb0a78765c216561bcad97c85421b1a8379bfa209a01432e92db911
7
+ data.tar.gz: 9a3fa3c71d96e27dd87282aee10fb46778b9f5e3381edbbace6e82179a0f05911a1400d8066412fb56c142af227f945f346a925d05ca53af99c499a4ba64b67f
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.required_ruby_version = '>= 2.1.0'
25
25
 
26
26
  # Main dependency
27
- spec.add_runtime_dependency 'parser', '~> 2.5.0'
27
+ spec.add_runtime_dependency 'parser', '>= 2.5', '< 2.7'
28
28
 
29
29
  # Support
30
30
  spec.add_runtime_dependency 'backports', '>= 3.11.0'
@@ -44,5 +44,8 @@ Gem::Specification.new do |spec|
44
44
 
45
45
  # About every single release breaks something
46
46
  # Ruby 2.1 is no longer supported
47
- spec.add_development_dependency 'rubocop', '0.61.1' if RUBY_VERSION >= '2.2.0'
47
+ if RUBY_VERSION >= '2.3.0'
48
+ spec.add_development_dependency 'rubocop', '~> 0.74.0'
49
+ spec.add_development_dependency 'rubocop-performance'
50
+ end
48
51
  end
@@ -20,3 +20,4 @@ require 'backports/2.4.0/enumerable/sum'
20
20
  require 'backports/2.5.0/hash/slice'
21
21
  require 'backports/2.5.0/hash/transform_keys'
22
22
  require 'backports/2.5.0/kernel/yield_self'
23
+ require 'backports/2.6.0/hash/to_h'
@@ -11,8 +11,8 @@ module DeepCover
11
11
  # @param [Array(Parser::Source::Comment)] comments
12
12
  def initialize(covered_code, lookup = 'nocov')
13
13
  @covered_code = covered_code
14
- @lookup = /^#[\s#*-]*#{lookup}[\s#*-]*$/
15
- @ranges = nil
14
+ @lookup = /^#[\s#*-]*#{lookup}[\s#*-]*$/
15
+ @ranges = nil
16
16
  end
17
17
 
18
18
  def include?(range)
@@ -49,10 +49,9 @@ module DeepCover
49
49
 
50
50
  # {per_char: Stat, ...} => {per_char: {ignored: ...}, per_char_percent: 55.55, ...}
51
51
  def transform_data(data)
52
- Tools.merge(
53
- data.transform_values(&:to_h),
54
- *data.map { |type, stat| {:"#{type}_percent" => stat.percent_covered} }
55
- )
52
+ numbers = data.transform_values(&:to_h)
53
+ percent = data.to_h { |type, stat| [:"#{type}_percent", stat.percent_covered] }
54
+ numbers.merge(percent)
56
55
  end
57
56
  end
58
57
  end
@@ -4,7 +4,7 @@ module DeepCover
4
4
  module Tools::StripHeredoc
5
5
  # In-place implementation copied from active-support.
6
6
  IMPLEMENTATION = -> do
7
- gsub(/^#{scan(/^[ \t]*(?=\S)/).min}/, ''.freeze).tap do |stripped|
7
+ gsub(/^#{scan(/^[ \t]*(?=\S)/).min}/, '').tap do |stripped|
8
8
  stripped.freeze if frozen?
9
9
  end
10
10
  end
@@ -3,5 +3,5 @@
3
3
  top_level_module = Thread.current['_deep_cover_top_level_module'] || Object
4
4
 
5
5
  module top_level_module::DeepCover # rubocop:disable Naming/ClassAndModuleCamelCase
6
- VERSION = '0.7.4'
6
+ VERSION = '0.7.5'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deep-cover-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc-André Lafortune
@@ -9,22 +9,28 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-05-24 00:00:00.000000000 Z
12
+ date: 2019-08-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: parser
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: '2.5'
21
+ - - "<"
19
22
  - !ruby/object:Gem::Version
20
- version: 2.5.0
23
+ version: '2.7'
21
24
  type: :runtime
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
24
27
  requirements:
25
- - - "~>"
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ version: '2.5'
31
+ - - "<"
26
32
  - !ruby/object:Gem::Version
27
- version: 2.5.0
33
+ version: '2.7'
28
34
  - !ruby/object:Gem::Dependency
29
35
  name: backports
30
36
  requirement: !ruby/object:Gem::Requirement
@@ -141,16 +147,30 @@ dependencies:
141
147
  name: rubocop
142
148
  requirement: !ruby/object:Gem::Requirement
143
149
  requirements:
144
- - - '='
150
+ - - "~>"
145
151
  - !ruby/object:Gem::Version
146
- version: 0.61.1
152
+ version: 0.74.0
147
153
  type: :development
148
154
  prerelease: false
149
155
  version_requirements: !ruby/object:Gem::Requirement
150
156
  requirements:
151
- - - '='
157
+ - - "~>"
152
158
  - !ruby/object:Gem::Version
153
- version: 0.61.1
159
+ version: 0.74.0
160
+ - !ruby/object:Gem::Dependency
161
+ name: rubocop-performance
162
+ requirement: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ type: :development
168
+ prerelease: false
169
+ version_requirements: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
154
174
  description: Core functionality for the DeepCover gem.
155
175
  email:
156
176
  - github@marc-andre.ca
@@ -311,7 +331,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
311
331
  - !ruby/object:Gem::Version
312
332
  version: '0'
313
333
  requirements: []
314
- rubygems_version: 3.0.1
334
+ rubygems_version: 3.0.3
315
335
  signing_key:
316
336
  specification_version: 4
317
337
  summary: In depth coverage of your Ruby code.