covered 0.19.0 → 0.19.1

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: d7f641ef55ad67441aee4c21d0f7221b955f17340baf9e51d7c133c58c5343ae
4
- data.tar.gz: 43ccf1cf59d39fef08a271a2a3b97c4756b9e08916a4fb31efcd5903d8ff14cc
3
+ metadata.gz: 22da5b4e371b8fb06056b96b3f6a9a0d7755a1684e9e4371d45beae886ba9616
4
+ data.tar.gz: c841065dece4f121afd7e4b3fe070327c0de15c5fedd972e089950eccf11375b
5
5
  SHA512:
6
- metadata.gz: cf1576281c6fb28953788771f793c88ed0cb96b26795d78fbbd15a60f216140c69f24b3a5621279e5bde25fb00e77bb3a8c398f2512c465d7fa62f85ff35a792
7
- data.tar.gz: bfe434cc0c0d3162e87192b714d3459341178649907e187ec9d3aa93e2567f9eea98b9e0cc8831379a647913b9d1862d51e3dc852c42a7ffb37277f04640ff5b
6
+ metadata.gz: c63bdb36d6fb7573cf9bd82fe2bc6f441729470d40b2b5043c164b4ff6d8d6e43513a88692443942613bbb307964814d5b7510325d1da53bdac93b2301d50328
7
+ data.tar.gz: eb1812bc6debd69bd01004ab0042aa45167a56788fecee49f2f1710689a1cd6fa6d99026352d5a45eaecb0f904720763d7cc3de600a870ac1fdb656a70b80406
checksums.yaml.gz.sig CHANGED
@@ -1,4 +1,4 @@
1
- (K�������y6��ȫ�L�4[Q׺��2<�V
2
- T{��|���EB��DWݒ��%д�+�?T6��y�Z�X�rw.m�H�
3
- �^�ڠIQ4
4
- S ��;&:"�Gw?B^15cS��}_y����Px�� ��SPn�������<`��tS��}Ou�:*Mze�|jmuД|@f�|А�kf�b�=ٗ�3@�>9?���Q6>���@ftT_��u��~]߼�X��N���E�`BO���(�ܳ�қ��
1
+ <�HkH����;������҇*O}1л�Ak�����
2
+ �qe���]�y: �����P��r
3
+ sGQh�G��)�<��c
4
+ ���nXs�ըG]y(���Mwk;�Z�������!^!�{����!��s1 Q6y q
@@ -28,7 +28,7 @@ module Covered
28
28
 
29
29
  super
30
30
  end
31
-
31
+
32
32
  def execute(source, binding: TOPLEVEL_BINDING)
33
33
  enable
34
34
 
@@ -75,8 +75,6 @@ module Covered
75
75
 
76
76
  # Override this method to implement your own policy.
77
77
  def make_policy(policy)
78
- policy.cache!
79
-
80
78
  # Only files in the root would be tracked:
81
79
  policy.root(@root)
82
80
 
@@ -16,7 +16,7 @@ module Covered
16
16
  def initialize(output, path = DEFAULT_PATH)
17
17
  super(output)
18
18
 
19
- @path = path
19
+ @path = self.expand_path(path)
20
20
  @touched = Set.new
21
21
  end
22
22
 
@@ -51,6 +51,7 @@ module Covered
51
51
  def serialize(coverage)
52
52
  {
53
53
  # We want to use relative paths so that moving the repo won't break everything:
54
+ pid: Process.pid,
54
55
  path: relative_path(coverage.path),
55
56
  mtime: File.mtime(coverage.path).to_f,
56
57
  counts: coverage.counts,
@@ -6,7 +6,6 @@
6
6
  require_relative "summary"
7
7
  require_relative "files"
8
8
  require_relative "capture"
9
- require_relative "cache"
10
9
  require_relative "persist"
11
10
 
12
11
  module Covered
@@ -28,28 +27,24 @@ module Covered
28
27
  super
29
28
  end
30
29
 
31
- def include(*args)
32
- @output = Include.new(@output, *args)
30
+ def include(...)
31
+ @output = Include.new(@output, ...)
33
32
  end
34
33
 
35
- def skip(*args)
36
- @output = Skip.new(@output, *args)
34
+ def skip(...)
35
+ @output = Skip.new(@output, ...)
37
36
  end
38
37
 
39
- def only(*args)
40
- @output = Only.new(@output, *args)
38
+ def only(...)
39
+ @output = Only.new(@output, ...)
41
40
  end
42
41
 
43
- def root(*args)
44
- @output = Root.new(@output, *args)
42
+ def root(...)
43
+ @output = Root.new(@output, ...)
45
44
  end
46
45
 
47
- def cache!
48
- @output = Cache.new(@output)
49
- end
50
-
51
- def persist!
52
- @output = Persist.new(@output)
46
+ def persist!(...)
47
+ @output = Persist.new(@output, ...)
53
48
  end
54
49
 
55
50
  def capture
@@ -87,8 +82,8 @@ module Covered
87
82
  return klass.new
88
83
  end
89
84
 
90
- def call(*args)
91
- self.new.call(*args)
85
+ def call(...)
86
+ self.new.call(...)
92
87
  end
93
88
 
94
89
  def to_s
@@ -123,9 +118,9 @@ module Covered
123
118
  end
124
119
  end
125
120
 
126
- def call(*args)
121
+ def call(...)
127
122
  @reports.each do |report|
128
- report.call(self, *args)
123
+ report.call(self, ...)
129
124
  end
130
125
  end
131
126
  end
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2018-2022, by Samuel Williams.
5
5
 
6
6
  module Covered
7
- VERSION = "0.19.0"
7
+ VERSION = "0.19.1"
8
8
  end
data.tar.gz.sig CHANGED
Binary file
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.19.0
4
+ version: 0.19.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -41,7 +41,7 @@ cert_chain:
41
41
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
42
42
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
43
43
  -----END CERTIFICATE-----
44
- date: 2022-12-29 00:00:00.000000000 Z
44
+ date: 2022-12-30 00:00:00.000000000 Z
45
45
  dependencies:
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: console
@@ -136,7 +136,6 @@ files:
136
136
  - bake/covered/debug.rb
137
137
  - bake/covered/validate.rb
138
138
  - lib/covered.rb
139
- - lib/covered/cache.rb
140
139
  - lib/covered/capture.rb
141
140
  - lib/covered/config.rb
142
141
  - lib/covered/coverage.rb
metadata.gz.sig CHANGED
Binary file
data/lib/covered/cache.rb DELETED
@@ -1,50 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Released under the MIT License.
4
- # Copyright, 2022, by Samuel Williams.
5
-
6
- require_relative 'wrapper'
7
-
8
- require 'coverage'
9
-
10
- module Covered
11
- class Cache < Wrapper
12
- def initialize(output)
13
- super(output)
14
-
15
- @marks = nil
16
- end
17
-
18
- def mark(path, lineno, count = 1)
19
- if @marks
20
- @marks.push(path, lineno, count)
21
- else
22
- super
23
- end
24
- end
25
-
26
- def enable
27
- @marks = []
28
-
29
- super
30
- end
31
-
32
- def flush
33
- if @marks
34
- @marks.each_slice(3) do |path, lineno, count|
35
- @output.mark(path, lineno, count)
36
- end
37
-
38
- @marks = nil
39
- end
40
-
41
- super
42
- end
43
-
44
- def disable
45
- super
46
-
47
- flush
48
- end
49
- end
50
- end