deep-cover-core 0.7.5 → 0.7.6

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: 145f22f7e6c3e70e0c871dc580344ea02c3ceda18ec0b09872442988d9b639a6
4
- data.tar.gz: ff3df5117fbe2ce5e509c35b87aadafa0b26ac5817b63915d62fdffd8609f360
3
+ metadata.gz: 1bf24929f7466a5ba34eb280c6ea6b65c12a49a8f17faf72dcc52e4ee2df0b07
4
+ data.tar.gz: dee82a216bd81089e76b607d1da044b3adb58ef5f5941c8d74e0fd65b893f6b1
5
5
  SHA512:
6
- metadata.gz: fe0e1f7d60fb023fcb2329431387b25862ab53820724effd5a70bd01b72ca6764d5f49c04cb0a78765c216561bcad97c85421b1a8379bfa209a01432e92db911
7
- data.tar.gz: 9a3fa3c71d96e27dd87282aee10fb46778b9f5e3381edbbace6e82179a0f05911a1400d8066412fb56c142af227f945f346a925d05ca53af99c499a4ba64b67f
6
+ metadata.gz: f37f3e8c56ce00fdc4e111157f7d0d1bf4ddf7d16c07974e07252d1aea3b46232ffb391a934b68776573a6a96a845324b9e5addb0e8d3cd40c797a961d686d68
7
+ data.tar.gz: 555bcbbfa58c144d2033dc684f8ce07a5f963424538cf236f10f1a04f9d6c92b1d146d1ac963e346ec5fe1e9245cd4a6e2a35c46922000b39b032dc996687b27
@@ -23,7 +23,7 @@ module DeepCover
23
23
  end
24
24
 
25
25
  def +(other)
26
- self.class.new(to_h.merge(other.to_h) { |k, a, b| a + b })
26
+ self.class.new(**to_h.merge(other.to_h) { |k, a, b| a + b })
27
27
  end
28
28
 
29
29
  def total
@@ -31,7 +31,7 @@ module DeepCover
31
31
  end
32
32
 
33
33
  def with(**values)
34
- self.class.new(to_h.merge(values))
34
+ self.class.new(**to_h.merge(values))
35
35
  end
36
36
 
37
37
  def potentially_executable
@@ -47,13 +47,13 @@ module DeepCover
47
47
  raise 'coverage measurement is not enabled' unless running?
48
48
  if @started_args == OLD_COVERAGE_SENTINEL
49
49
  DeepCover.coverage.covered_codes.map do |covered_code|
50
- [covered_code.path.to_s, covered_code.line_coverage(allow_partial: false)]
50
+ [covered_code.path.to_s, covered_code.line_coverage(**DeepCover.config.to_h)]
51
51
  end.to_h
52
52
  else
53
53
  DeepCover.coverage.covered_codes.map do |covered_code|
54
54
  cov = {}
55
55
  cov[:branches] = DeepCover::Analyser::Ruby25LikeBranch.new(covered_code).results if @started_args[:branches]
56
- cov[:lines] = covered_code.line_coverage(allow_partial: false) if @started_args[:lines]
56
+ cov[:lines] = covered_code.line_coverage(**DeepCover.config.to_h) if @started_args[:lines]
57
57
  cov[:methods] = {} if @started_args[:methods]
58
58
  [covered_code.path.to_s, cov]
59
59
  end.to_h
@@ -56,7 +56,7 @@ module DeepCover
56
56
  self
57
57
  end
58
58
 
59
- # If a file wasn't required, it won't be in the trackers. This adds those mossing files
59
+ # If a file wasn't required, it won't be in the trackers. This adds those missing files
60
60
  def add_missing_covered_codes
61
61
  top_level_path = DeepCover.config.paths.detect do |path|
62
62
  next unless path.is_a?(String)
@@ -77,9 +77,16 @@ module DeepCover
77
77
  return
78
78
  end
79
79
 
80
+ skipped = []
80
81
  DeepCover.all_tracked_file_paths.each do |path|
81
- covered_code(path, tracker_hits: :zeroes)
82
+ begin
83
+ covered_code(path, tracker_hits: :zeroes)
84
+ rescue Parser::SyntaxError
85
+ skipped << path
86
+ end
82
87
  end
88
+ warn "The following files could not be parsed:\n" + skipped.join("\n") unless skipped.empty?
89
+
83
90
  nil
84
91
  end
85
92
 
@@ -46,7 +46,7 @@ module DeepCover
46
46
  next unless File.exist?(path_with_ext)
47
47
 
48
48
  # https://github.com/jruby/jruby/issues/5465
49
- path_with_ext = File.realpath(path_with_ext) if RUBY_PLATFORM == 'java' && JRUBY_VERSION >= '9.2.5'
49
+ path_with_ext = File.realpath(path_with_ext) if RUBY_PLATFORM == 'java' && Gem::Version.new(JRUBY_VERSION) >= Gem::Version.new('9.2.5')
50
50
  return path_with_ext
51
51
  end
52
52
  else
@@ -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.5'
6
+ VERSION = '0.7.6'
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.5
4
+ version: 0.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc-André Lafortune
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-08-03 00:00:00.000000000 Z
12
+ date: 2019-11-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: parser
@@ -331,7 +331,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
331
331
  - !ruby/object:Gem::Version
332
332
  version: '0'
333
333
  requirements: []
334
- rubygems_version: 3.0.3
334
+ rubyforge_project:
335
+ rubygems_version: 2.7.7
335
336
  signing_key:
336
337
  specification_version: 4
337
338
  summary: In depth coverage of your Ruby code.