deep-cover 0.1.11 → 0.1.12
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87db799f1d293b8ec1f537de9d4da1f0e64fdc3d
|
4
|
+
data.tar.gz: 7d2406c8639b80ddc55169983322074049b3726c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a1307e9bd830c0eee32251b73a95a9933e85a57225e837231a2a77ba6c81eea69496918f95d7bec8fc650dc9655539f42d941076123dba031ac1c1c56a09548
|
7
|
+
data.tar.gz: d379b6d29d5a7c4a9d60466e2aac46cc5fb6c6157c0798cb763bbf770f94de2b31fe555a7121a45891f9b9d1a216bb900b27f6eded6cc79e60c41471e6900c28
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require_relative '../deep_cover'
|
2
|
+
require_relative '../deep_cover/core_ext/coverage_replacement'
|
@@ -5,6 +5,8 @@ module DeepCover
|
|
5
5
|
module CLI
|
6
6
|
class InstrumentedCloneReporter
|
7
7
|
include Tools
|
8
|
+
# matches regular files, .files, ..files, but not '.' or '..'
|
9
|
+
GLOB_ALL_CONTENT = '{,.[^.],..?}*'
|
8
10
|
|
9
11
|
def initialize(gem_path, command: 'rake', **options)
|
10
12
|
@command = command
|
@@ -17,13 +19,16 @@ module DeepCover
|
|
17
19
|
end
|
18
20
|
@dest_root = Pathname('~/test_deep_cover').expand_path
|
19
21
|
@dest_root = Pathname.new(Dir.mktmpdir("deep_cover_test")) unless @dest_root.exist?
|
20
|
-
|
22
|
+
|
23
|
+
FileUtils.rm_rf(Dir.glob("#{@dest_root}/#{GLOB_ALL_CONTENT}"))
|
21
24
|
gem_relative_path = gem_path.relative_path_from(@root_path)
|
22
25
|
@main_path = @dest_root.join(gem_relative_path)
|
23
26
|
end
|
24
27
|
|
25
28
|
def copy
|
26
|
-
|
29
|
+
return true if @copied
|
30
|
+
FileUtils.cp_r(Dir.glob("#{@root_path}/#{GLOB_ALL_CONTENT}"), @dest_root)
|
31
|
+
@copied = true
|
27
32
|
end
|
28
33
|
|
29
34
|
def patch_ruby_file(ruby_file)
|
@@ -84,7 +89,7 @@ module DeepCover
|
|
84
89
|
def cover
|
85
90
|
coverage = Coverage.new
|
86
91
|
each_gem_path do |dest_path|
|
87
|
-
|
92
|
+
FileUtils.cp_r("#{dest_path}/lib", "#{dest_path}/lib_original")
|
88
93
|
Tools.dump_covered_code(File.join(dest_path, 'lib_original'),
|
89
94
|
coverage: coverage, root_path: @dest_root.to_s,
|
90
95
|
dest_path: File.join(dest_path, 'lib'))
|
@@ -51,8 +51,11 @@ module DeepCover
|
|
51
51
|
if prev.equal? watched_body
|
52
52
|
prev.flow_entry_count - prev.flow_completion_count
|
53
53
|
else # RESBODIES
|
54
|
-
|
55
|
-
|
54
|
+
if prev.exception
|
55
|
+
prev.exception.flow_completion_count - prev.execution_count
|
56
|
+
else
|
57
|
+
prev.flow_entry_count - prev.execution_count
|
58
|
+
end
|
56
59
|
end
|
57
60
|
end
|
58
61
|
end
|
data/lib/deep_cover/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deep-cover
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
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: 2017-11-
|
12
|
+
date: 2017-11-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: parser
|