deep-cover-core 0.7.5 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bf24929f7466a5ba34eb280c6ea6b65c12a49a8f17faf72dcc52e4ee2df0b07
|
4
|
+
data.tar.gz: dee82a216bd81089e76b607d1da044b3adb58ef5f5941c8d74e0fd65b893f6b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(
|
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(
|
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
|
data/lib/deep_cover/coverage.rb
CHANGED
@@ -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
|
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
|
-
|
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
|
data/lib/deep_cover/version.rb
CHANGED
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
|
+
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-
|
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
|
-
|
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.
|