covered 0.28.3 → 0.28.4
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/bake/covered/policy.rb +1 -1
- data/lib/covered/config.rb +7 -4
- data/lib/covered/version.rb +1 -1
- data/readme.md +4 -0
- data/releases.md +4 -0
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4b93f36c2c327716433d7c25ae05e314386641b284382b0abc6fa6e6a1624446
|
|
4
|
+
data.tar.gz: bb786d0a98e3306f2a53d9d5633bc12cac305e5a490ee12ba806a971711ebfc6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 44c48274208099fd337cb4633cd11a576aea8c967c9310ffb29ceba496bb69a7b6a9faf090eba52039a9943a716d3018c0950da3e3db97bd4f2038599710d6bf
|
|
7
|
+
data.tar.gz: 5010cdc77a2e0c21b19270119d8aad373207b5cbded6b130dec06f2ea57e9b47fd8e9b9e624267141541b23ce90974d1ac62beebf28b502cf1b507f9ea59956c
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/bake/covered/policy.rb
CHANGED
|
@@ -14,7 +14,7 @@ end
|
|
|
14
14
|
# Defaults to the default coverage path if no paths are specified.
|
|
15
15
|
# @parameter paths [Array(String)] The coverage database paths.
|
|
16
16
|
def current(paths: nil, reports: Covered::Config.reports)
|
|
17
|
-
return Covered::Config.load(root: context.root, reports: reports).policy_for(paths)
|
|
17
|
+
return Covered::Config.load(root: context.root, reports: reports, persist: false).policy_for(paths)
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
# Validate the coverage of multiple test runs.
|
data/lib/covered/config.rb
CHANGED
|
@@ -36,8 +36,9 @@ module Covered
|
|
|
36
36
|
# Load the project coverage configuration for the given root.
|
|
37
37
|
# @parameter root [String] The project root.
|
|
38
38
|
# @parameter reports [String | Boolean | Array | Object | Nil] The report configuration.
|
|
39
|
+
# @parameter persist [Boolean] Whether the configured policy should persist coverage to the default database.
|
|
39
40
|
# @returns [Covered::Config] The loaded configuration instance.
|
|
40
|
-
def self.load(root: self.root, reports: self.reports)
|
|
41
|
+
def self.load(root: self.root, reports: self.reports, persist: true)
|
|
41
42
|
derived = Class.new(self)
|
|
42
43
|
|
|
43
44
|
if path = self.path(root)
|
|
@@ -46,16 +47,18 @@ module Covered
|
|
|
46
47
|
derived.prepend(config)
|
|
47
48
|
end
|
|
48
49
|
|
|
49
|
-
return derived.new(root, reports)
|
|
50
|
+
return derived.new(root, reports, persist)
|
|
50
51
|
end
|
|
51
52
|
|
|
52
53
|
# Initialize the configuration for a project root and reports.
|
|
53
54
|
# @parameter root [String] The project root.
|
|
54
55
|
# @parameter reports [String | Boolean | Array | Object | Nil] The report configuration.
|
|
55
|
-
|
|
56
|
+
# @parameter persist [Boolean] Whether the configured policy should persist coverage to the default database.
|
|
57
|
+
def initialize(root, reports, persist = true)
|
|
56
58
|
@root = root
|
|
57
59
|
@reports = reports
|
|
58
60
|
@policy = nil
|
|
61
|
+
@persist = persist
|
|
59
62
|
|
|
60
63
|
@environment = nil
|
|
61
64
|
end
|
|
@@ -169,7 +172,7 @@ module Covered
|
|
|
169
172
|
policy.include(pattern)
|
|
170
173
|
end
|
|
171
174
|
|
|
172
|
-
policy.persist!
|
|
175
|
+
policy.persist! if @persist
|
|
173
176
|
|
|
174
177
|
policy.reports!(@reports)
|
|
175
178
|
end
|
data/lib/covered/version.rb
CHANGED
data/readme.md
CHANGED
|
@@ -34,6 +34,10 @@ Please see the [project documentation](https://socketry.github.io/covered/) for
|
|
|
34
34
|
|
|
35
35
|
Please see the [project releases](https://socketry.github.io/covered/releases/index) for all releases.
|
|
36
36
|
|
|
37
|
+
### v0.28.4
|
|
38
|
+
|
|
39
|
+
- Ensure coverage validation loads explicit coverage databases without reloading the default persisted database.
|
|
40
|
+
|
|
37
41
|
### v0.28.3
|
|
38
42
|
|
|
39
43
|
- Ignore nil coverage reports so validation can run without `COVERAGE` configured.
|
data/releases.md
CHANGED
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|