simplecov 0.21.1 → 0.21.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/simplecov/exit_codes/maximum_coverage_drop_check.rb +19 -9
- data/lib/simplecov/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e5385d84c9f26fc48afe9fb5b4883d431a7f346c116ea21ca7b65a744e19db8
|
4
|
+
data.tar.gz: 78f2089648f1167fac351d819c7eb7579ae4a4cae323882a2b56f245481296e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 071375d821a918217c1318bca354dde933d04c572761c247ecb77f976b8085a489d3dfe7463994b88705685f1c0f5d1e7861d79df0f949935982f45e342ad862
|
7
|
+
data.tar.gz: ca85cde65a7f2f6987be16d542e571312cd763f6fadca1ebcc1f44be7a7fc70f7375ba79a3afe44c893f4db118fd6e6ef81292e858f962647df19defa80f0ebc
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
0.21.2 (2021-01-09)
|
2
|
+
==========
|
3
|
+
|
4
|
+
## Bugfixes
|
5
|
+
* `maximum_coverage_drop` won't fail any more if `.last_run.json` is still in the old format. Thanks [@petertellgren](https://github.com/petertellgren)
|
6
|
+
* `maximum_coverage_drop` won't fail if an expectation is specified for a previous unrecorded criterion, it will just pass (there's nothing, so nothing to drop)
|
7
|
+
* fixed bug in `maximum_coverage_drop` calculation that could falsely report it had dropped for minimal differences
|
8
|
+
|
1
9
|
0.21.1 (2021-01-04)
|
2
10
|
==========
|
3
11
|
|
@@ -51,22 +51,32 @@ module SimpleCov
|
|
51
51
|
{
|
52
52
|
criterion: criterion,
|
53
53
|
max_drop: percent,
|
54
|
-
drop_percent:
|
55
|
-
SimpleCov.round_coverage(
|
56
|
-
result.coverage_statistics.fetch(criterion).percent
|
57
|
-
)
|
54
|
+
drop_percent: drop_percent(criterion)
|
58
55
|
}
|
59
56
|
end
|
60
57
|
end
|
61
58
|
|
59
|
+
# if anyone says "max_coverage_drop 0.000000000000000001" I appologize. Please don't.
|
60
|
+
MAX_DROP_ACCURACY = 10
|
61
|
+
def drop_percent(criterion)
|
62
|
+
drop = last_coverage(criterion) -
|
63
|
+
SimpleCov.round_coverage(
|
64
|
+
result.coverage_statistics.fetch(criterion).percent
|
65
|
+
)
|
66
|
+
|
67
|
+
# floats, I tell ya.
|
68
|
+
# irb(main):001:0* 80.01 - 80.0
|
69
|
+
# => 0.010000000000005116
|
70
|
+
drop.floor(MAX_DROP_ACCURACY)
|
71
|
+
end
|
72
|
+
|
62
73
|
def last_coverage(criterion)
|
63
74
|
last_coverage_percent = last_run[:result][criterion]
|
64
75
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
end
|
76
|
+
# fallback for old file format
|
77
|
+
last_coverage_percent = last_run[:result][:covered_percent] if !last_coverage_percent && criterion == :line
|
78
|
+
|
79
|
+
last_coverage_percent || 0
|
70
80
|
end
|
71
81
|
end
|
72
82
|
end
|
data/lib/simplecov/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplecov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.21.
|
4
|
+
version: 0.21.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christoph Olszowka
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-01-
|
12
|
+
date: 2021-01-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: docile
|
@@ -116,9 +116,9 @@ licenses:
|
|
116
116
|
metadata:
|
117
117
|
bug_tracker_uri: https://github.com/simplecov-ruby/simplecov/issues
|
118
118
|
changelog_uri: https://github.com/simplecov-ruby/simplecov/blob/main/CHANGELOG.md
|
119
|
-
documentation_uri: https://www.rubydoc.info/gems/simplecov/0.21.
|
119
|
+
documentation_uri: https://www.rubydoc.info/gems/simplecov/0.21.2
|
120
120
|
mailing_list_uri: https://groups.google.com/forum/#!forum/simplecov
|
121
|
-
source_code_uri: https://github.com/simplecov-ruby/simplecov/tree/v0.21.
|
121
|
+
source_code_uri: https://github.com/simplecov-ruby/simplecov/tree/v0.21.2
|
122
122
|
post_install_message:
|
123
123
|
rdoc_options: []
|
124
124
|
require_paths:
|