deep-cover 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/deep_cover/cli/debugger.rb +1 -1
- data/lib/deep_cover/node/assignments.rb +22 -3
- data/lib/deep_cover/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2b3fc6dc22a4c501fd7090466901a9174a9ed0a782218970d1c23bcacb9ea56
|
4
|
+
data.tar.gz: 4ea988ee9e3feea82db9df67cf3da0dd4d44229fb233becbff97953e4833730e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c0737e921cdc4c6cd4cb4461bb2f7bdd95c4f9b71d0132cda39b6005fd16cd062df45042f8fd0cb7474cf3320281feef60e4903e41d62bf6b5269c344169020
|
7
|
+
data.tar.gz: 752569da3e00e55e136f797903e8686e2a6f5fac70050dcc42c525a104d93dd9174ccd11d17b804b83f9b76c645242d6da823a7e879ca4932a81adca23a2cdab
|
data/README.md
CHANGED
@@ -46,7 +46,7 @@ These examples are direct outputs from our HTML reporter:
|
|
46
46
|
Feature | MRI | DeepCover
|
47
47
|
-------------------|:----------:|:--------:
|
48
48
|
Line coverage | partial | ✓
|
49
|
-
|
49
|
+
Node coverage | no | ✓
|
50
50
|
Branch coverage | partial | ✓
|
51
51
|
Method coverage | ✓ | ~
|
52
52
|
Slowdown | < 1% | ~20%
|
@@ -54,7 +54,7 @@ Platform support | Ruby 2.5+ | Ruby 2.1+, JRuby
|
|
54
54
|
|
55
55
|
**Line coverage**: MRI doesn't cover some lines (e.g. `when some_value`).
|
56
56
|
|
57
|
-
**
|
57
|
+
**Node coverage**: MRI provides no way to tell which parts of any line is evaluated. DeepCover covers everything.
|
58
58
|
|
59
59
|
**Method coverage**: MRI considers every method defined, including methods defined on objects or via `define_method`, `class_eval`, etc. For Istanbul output, DeepCover has a different approach and covers all `def` and all blocks.
|
60
60
|
|
@@ -55,12 +55,28 @@ module DeepCover
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
-
#
|
58
|
+
# Some multiple assignments are the only cases where Ruby
|
59
|
+
# syntax rules won't allow us to insert tracking code
|
60
|
+
# where we'd like it to be run.
|
61
|
+
#
|
62
|
+
# For example:
|
63
|
+
#
|
64
|
+
# method.a, b, method_2.c = [...]
|
65
|
+
#
|
66
|
+
# We'd like to add a tracker after the call to `a=` and
|
67
|
+
# before the assignment to b and the call to `method_2`.
|
68
|
+
#
|
69
|
+
# We can't really do this with simple insertions, so
|
70
|
+
# we temporarily of strategy for BackwardsStrategy
|
71
|
+
#
|
59
72
|
class Masgn < Node
|
60
73
|
class BackwardsNode < Node
|
61
74
|
include BackwardsStrategy
|
62
75
|
end
|
63
76
|
|
77
|
+
# We can't rewrite `self.bar` within a multiple assignment in the
|
78
|
+
# case that `bar=` is private, so remain conservative and don't add
|
79
|
+
# trackers.
|
64
80
|
class SelfReceiver < BackwardsNode
|
65
81
|
executed_loc_keys :expression
|
66
82
|
end
|
@@ -73,8 +89,7 @@ module DeepCover
|
|
73
89
|
has_tracker :entry
|
74
90
|
has_child actual_receiver: Node
|
75
91
|
def rewrite
|
76
|
-
|
77
|
-
'(%{local} = (%{node});%{entry_tracker}; %{local}=%{local})'
|
92
|
+
'(%{entry_tracker};%{node})'
|
78
93
|
end
|
79
94
|
alias_method :flow_entry_count, :entry_tracker_hits
|
80
95
|
end
|
@@ -105,6 +120,10 @@ module DeepCover
|
|
105
120
|
}
|
106
121
|
end
|
107
122
|
end
|
123
|
+
|
124
|
+
def execution_count
|
125
|
+
receiver.flow_completion_count
|
126
|
+
end
|
108
127
|
end
|
109
128
|
|
110
129
|
class ConstantScopeWrapper < Node
|
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.5.
|
4
|
+
version: 0.5.7
|
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: 2018-06-
|
12
|
+
date: 2018-06-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: parser
|