firespring_dev_commands 2.1.21.pre.alpha.6 → 2.1.21.pre.alpha.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8854ab66747e26c22780c4e6756df86dac09bc5a8029fae51f1382d29d18c27f
|
4
|
+
data.tar.gz: ca3ddd354a8faddb180d827891886ce78483accb7e7f1e2e5b5b9d6bcc9d36f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4aace4ef89ab6ec98008184ffb58d71febc920bcc85195a3fe2fa645a4109f8523348cdfae5e281a731d6ce6ddac3769a101800ee7b6e63ad31f4efcfa2f84c4
|
7
|
+
data.tar.gz: c700fd928018dc384757fddeae412eb4990323b94b47a16026736738d43e4a8ff12202b15014ebd0b92d30f5705dcffeab439a78e61ea711e0074ecff22d6cec
|
@@ -9,7 +9,7 @@ module Dev
|
|
9
9
|
@filename = filename
|
10
10
|
@local_filename = File.join(local_path || '.', @filename)
|
11
11
|
@container_filename = File.join(container_path || '.', @filename)
|
12
|
-
@threshold = threshold
|
12
|
+
@threshold = threshold
|
13
13
|
end
|
14
14
|
|
15
15
|
# Remove any previous versions of the local file that will be output
|
@@ -32,10 +32,24 @@ module Dev
|
|
32
32
|
|
33
33
|
# Load the file from disk and parse with ox
|
34
34
|
report = Ox.load(File.read(local_filename), mode: :hash)
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
35
|
+
_, _, files = report[:coverage]
|
36
|
+
|
37
|
+
covered = missed = 0
|
38
|
+
files.dig(:packages, :package)&.each do |_attrs, packages|
|
39
|
+
_, _, lines = *packages&.dig(:classes, :class)
|
40
|
+
lines&.dig(:lines, :line)&.each do |it|
|
41
|
+
it = it&.first if it.is_a?(Array)
|
42
|
+
if it&.dig(:hits).to_i.positive?
|
43
|
+
covered += 1
|
44
|
+
else
|
45
|
+
missed += 1
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
puts "Lines missing coverage was #{missed}"
|
51
|
+
puts "Configured threshold was #{threshold}" if threshold
|
52
|
+
raise 'Code coverage not met' if threshold && missed > threshold
|
39
53
|
end
|
40
54
|
end
|
41
55
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firespring_dev_commands
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.21.pre.alpha.
|
4
|
+
version: 2.1.21.pre.alpha.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Firespring
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|