covered 0.22.0 → 0.22.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/bake/covered/validate.rb +13 -1
- data/lib/covered/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- 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: c83b08be821b20f583a8e9f7c0c5eff4ded0852016e73e93d3a29f63ed33d79b
|
4
|
+
data.tar.gz: 8a8cf40418633108d9b5bbb491eaf0c06dc7be5f53a11f2bbc3fac4abfca5cd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25f75fb59e078f2d89ca296a583a70d3b93817a4bb3e7863dbecc40a0bc13c21d0a0a66a536960c967483f27a036e25063960d40d52c20dde94fe320b34cb634
|
7
|
+
data.tar.gz: 7e594df30c68df8df4cf71f0b8063f69dc0e3885d962cc176bbf0a2bf1c2408d6ab6fe2df31f524bcfc5d6162954a7e6f598084d76c851266fad317e0fbb65f0
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/bake/covered/validate.rb
CHANGED
@@ -15,18 +15,30 @@ end
|
|
15
15
|
def validate(paths: nil, minimum: 1.0)
|
16
16
|
policy = Covered::Policy.new
|
17
17
|
|
18
|
-
paths
|
18
|
+
# Load the default path if no paths are specified:
|
19
|
+
paths ||= Dir.glob(Covered::Persist::DEFAULT_PATH, base: context.root)
|
20
|
+
|
21
|
+
# If no paths are specified, raise an error:
|
22
|
+
if paths.empty?
|
23
|
+
raise ArgumentError, "No coverage paths specified!"
|
24
|
+
end
|
25
|
+
|
26
|
+
# Load all coverage information:
|
27
|
+
paths.each do |path|
|
19
28
|
# It would be nice to have a better algorithm here than just ignoring mtime - perhaps using checksums?
|
20
29
|
Covered::Persist.new(policy.output, path).load!(ignore_mtime: true)
|
21
30
|
end
|
22
31
|
|
32
|
+
# Calculate statistics:
|
23
33
|
statistics = Covered::Statistics.new
|
24
34
|
|
25
35
|
policy.each do |coverage|
|
26
36
|
statistics << coverage
|
27
37
|
end
|
28
38
|
|
39
|
+
# Print statistics:
|
29
40
|
statistics.print($stderr)
|
30
41
|
|
42
|
+
# Validate statistics and raise an error if they are not met:
|
31
43
|
statistics.validate!(minimum)
|
32
44
|
end
|
data/lib/covered/version.rb
CHANGED
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.22.
|
4
|
+
version: 0.22.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -42,7 +42,7 @@ cert_chain:
|
|
42
42
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
43
43
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
44
44
|
-----END CERTIFICATE-----
|
45
|
-
date: 2023-07-
|
45
|
+
date: 2023-07-17 00:00:00.000000000 Z
|
46
46
|
dependencies:
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: console
|
metadata.gz.sig
CHANGED
Binary file
|