covered 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/covered/capture.rb +1 -1
- data/lib/covered/coveralls.rb +2 -0
- data/lib/covered/files.rb +6 -11
- data/lib/covered/policy/default.rb +1 -1
- data/lib/covered/version.rb +1 -1
- data/lib/covered/wrapper.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5a8d712b09a62ea00fd09526b773256fc6378296e41e3abec2eb1792d962ded
|
4
|
+
data.tar.gz: b4e22948ec8e3e6e78cfe67e5ce07cb37953a3069668e93ba2dbd4d6c70da01e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61d0cb25ff4ea9bf1d69ef41e96d6ef45705e9fea093716110bb6926065a35886f2541c888a76ae073444f4a1550a8ccfb22d804ffe7e740440184b221a44029
|
7
|
+
data.tar.gz: 76c8b82e307d08afa7c3595ff5eba232dbcff7058e7c2275a8650af9d56957e193b080bcc62ce0a1e5a70f5a2242d25d4791bebfb9a8058fa54b97623d6fa5c4
|
data/lib/covered/capture.rb
CHANGED
data/lib/covered/coveralls.rb
CHANGED
data/lib/covered/files.rb
CHANGED
@@ -36,10 +36,10 @@ module Covered
|
|
36
36
|
@paths.empty?
|
37
37
|
end
|
38
38
|
|
39
|
-
def mark(path,
|
39
|
+
def mark(path, lineno, value)
|
40
40
|
coverage = (@paths[path] ||= Coverage.new(path))
|
41
41
|
|
42
|
-
coverage.mark(
|
42
|
+
coverage.mark(lineno, value)
|
43
43
|
|
44
44
|
return coverage
|
45
45
|
end
|
@@ -93,7 +93,7 @@ module Covered
|
|
93
93
|
true
|
94
94
|
end
|
95
95
|
|
96
|
-
def mark(path,
|
96
|
+
def mark(path, lineno, value)
|
97
97
|
super if accept?(path)
|
98
98
|
end
|
99
99
|
|
@@ -109,21 +109,16 @@ module Covered
|
|
109
109
|
end
|
110
110
|
|
111
111
|
class Skip < Filter
|
112
|
-
def initialize(output, pattern
|
112
|
+
def initialize(output, pattern)
|
113
113
|
super(output)
|
114
114
|
|
115
115
|
@pattern = pattern
|
116
|
-
@base = self.expand_path(base)
|
117
116
|
end
|
118
117
|
|
119
118
|
attr :pattern
|
120
119
|
|
121
120
|
def accept? path
|
122
|
-
|
123
|
-
path = relative_path(path)
|
124
|
-
end
|
125
|
-
|
126
|
-
!(@pattern === path)
|
121
|
+
!@pattern.match?(path)
|
127
122
|
end
|
128
123
|
end
|
129
124
|
|
@@ -156,7 +151,7 @@ module Covered
|
|
156
151
|
|
157
152
|
def relative_path(path)
|
158
153
|
if path.start_with?(@path)
|
159
|
-
path
|
154
|
+
path.slice(@path.size+1, path.size)
|
160
155
|
else
|
161
156
|
super
|
162
157
|
end
|
@@ -25,7 +25,7 @@ $covered = Covered.policy do
|
|
25
25
|
root Dir.pwd
|
26
26
|
|
27
27
|
# We will ignore any files in the test or spec directory:
|
28
|
-
skip
|
28
|
+
skip /^.*\/(test|spec|vendor)\//
|
29
29
|
|
30
30
|
# We will include all files under lib, even if they aren't loaded:
|
31
31
|
include "lib/**/*.rb"
|
data/lib/covered/version.rb
CHANGED
data/lib/covered/wrapper.rb
CHANGED