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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d4068cf73e42feb7446c80e133d59bffa5b1f0c4470026622822f7552dabda2
4
- data.tar.gz: fe9517317d00fe427bf5b4b0b85a079291541647d02395910b387a9e9220ae95
3
+ metadata.gz: c5a8d712b09a62ea00fd09526b773256fc6378296e41e3abec2eb1792d962ded
4
+ data.tar.gz: b4e22948ec8e3e6e78cfe67e5ce07cb37953a3069668e93ba2dbd4d6c70da01e
5
5
  SHA512:
6
- metadata.gz: '0038497474c96ede779378af2a0ca669f979ddfbc209a42762ac3199e6ce214de185673ebace77d7adc5fb270815803162412ab69b96b5a4c9ddd5f175a3e6a7'
7
- data.tar.gz: 299c83743a10e8ed36eca554fe5052cd03bd572caa06142011769a11ba0a8135f09609ae305cbddf3f6c4e7787e373d602a4c4584fb2d7752d7c1ab9926e7b31
6
+ metadata.gz: 61d0cb25ff4ea9bf1d69ef41e96d6ef45705e9fea093716110bb6926065a35886f2541c888a76ae073444f4a1550a8ccfb22d804ffe7e740440184b221a44029
7
+ data.tar.gz: 76c8b82e307d08afa7c3595ff5eba232dbcff7058e7c2275a8650af9d56957e193b080bcc62ce0a1e5a70f5a2242d25d4791bebfb9a8058fa54b97623d6fa5c4
@@ -29,7 +29,7 @@ module Covered
29
29
 
30
30
  @trace = TracePoint.new(:line, :call) do |event|
31
31
  if path = event.path
32
- @output.mark(path, event.lineno)
32
+ @output.mark(path, event.lineno, 1)
33
33
  end
34
34
  end
35
35
  end
@@ -49,6 +49,8 @@ module Covered
49
49
 
50
50
  def initialize(token: nil, service: nil, job_id: nil)
51
51
  @token = token
52
+ @service = service
53
+ @job_id = job_id
52
54
  end
53
55
 
54
56
  def detect_service
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, *args)
39
+ def mark(path, lineno, value)
40
40
  coverage = (@paths[path] ||= Coverage.new(path))
41
41
 
42
- coverage.mark(*args)
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, *args)
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, base = "")
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
- if @base
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[@path.size+1..-1]
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 /^(test|spec|vendor)/
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"
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Covered
22
- VERSION = "0.10.1"
22
+ VERSION = "0.10.2"
23
23
  end
@@ -28,8 +28,8 @@ module Covered
28
28
 
29
29
  attr :output
30
30
 
31
- def mark(*args)
32
- @output.mark(*args) if @output
31
+ def mark(path, lineno, value)
32
+ @output.mark(path, lineno, value) if @output
33
33
  end
34
34
 
35
35
  def enable
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: covered
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams