kettle-soup-cover 3.0.14 → 3.0.15
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/CHANGELOG.md +42 -1
- data/README.md +2 -1
- data/lib/kettle/soup/cover/config.rb +3 -6
- data/lib/kettle/soup/cover/constants.rb +2 -0
- data/lib/kettle/soup/cover/coverage_thresholds.rb +62 -0
- data/lib/kettle/soup/cover/version.rb +1 -1
- data/lib/kettle/soup/cover.rb +2 -6
- data.tar.gz.sig +0 -0
- metadata +10 -8
- 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: 3bb6413d706639bbf337f05ae0194e9eadadc4f1895ce15d957e7acf1cebf3c9
|
|
4
|
+
data.tar.gz: 43bef6d581344f6362fabfc8288f1bb348faf123b922bb2f159fdc5f28ecec35
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0d727362c805584e8325ac03027b9ebfba6a13a051a49eb16a0994bb42dbbb6938caa6e6d63745878b25f31b864f000606372a1dd231310c4222e0c7812eaf59
|
|
7
|
+
data.tar.gz: 324aa2a82800376f0fa641fcebd758d928c819209d0bc346acf8502f77c5b2c8d4c2dcd3860b79a154687e2980a3a1ce91d9387f807e92f54d0b24656ae07200
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,45 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [3.0.15] - 2026-10-25
|
|
34
|
+
|
|
35
|
+
- TAG: [v3.0.15][3.0.15t]
|
|
36
|
+
- COVERAGE: 99.67% -- 303/304 lines in 13 files
|
|
37
|
+
- BRANCH COVERAGE: 91.11% -- 82/90 branches in 13 files
|
|
38
|
+
- 20.99% documented
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- `K_SOUP_COV_MIN_STRICT=true` opts into strict coverage criteria, enabling branch and
|
|
43
|
+
method coverage (and eval coverage where supported) and requiring 100% line, branch,
|
|
44
|
+
and method coverage when hard minimum enforcement is on.
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
- [kc] kettle-jem/prepare: updated 9 project files:
|
|
49
|
+
- dependencies (9)
|
|
50
|
+
|
|
51
|
+
- [kc] kettle-jem/template: updated 4 project files:
|
|
52
|
+
- dependencies (2)
|
|
53
|
+
- documentation (1)
|
|
54
|
+
- workflows (1)
|
|
55
|
+
|
|
56
|
+
### Fixed
|
|
57
|
+
|
|
58
|
+
- Strict branch, method, and supported eval metrics stay enabled in turbo_tests2 workers
|
|
59
|
+
even though hard threshold enforcement is disabled there, allowing final collation to
|
|
60
|
+
enforce the 100% line, branch, and method minimums.
|
|
61
|
+
|
|
62
|
+
- With `K_SOUP_COV_MIN_HARD=true` and `K_SOUP_COV_MIN_STRICT` unset or false,
|
|
63
|
+
the SimpleCov config and the turbo_tests2 collation now merge
|
|
64
|
+
`K_SOUP_COV_MIN_LINE` and `K_SOUP_COV_MIN_BRANCH` into the minimums a
|
|
65
|
+
project already configured (for example with SimpleCov's `strict` profile
|
|
66
|
+
in `.simplecov`) instead of replacing them. The higher value wins for each
|
|
67
|
+
criterion, and criteria kettle-soup-cover does not manage, such as method
|
|
68
|
+
coverage, are kept. Before, a project's method minimum was silently dropped
|
|
69
|
+
and its line and branch minimums could be lowered, with no way to restore
|
|
70
|
+
them after collation.
|
|
71
|
+
|
|
33
72
|
## [3.0.14] - 2026-10-25
|
|
34
73
|
|
|
35
74
|
- TAG: [v3.0.14][3.0.14t]
|
|
@@ -827,7 +866,9 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
827
866
|
|
|
828
867
|
- Initial release
|
|
829
868
|
|
|
830
|
-
[Unreleased]: https://github.com/kettle-dev/kettle-soup-cover/compare/v3.0.
|
|
869
|
+
[Unreleased]: https://github.com/kettle-dev/kettle-soup-cover/compare/v3.0.15...HEAD
|
|
870
|
+
[3.0.15]: https://github.com/kettle-dev/kettle-soup-cover/compare/v3.0.14...v3.0.15
|
|
871
|
+
[3.0.15t]: https://github.com/kettle-dev/kettle-soup-cover/releases/tag/v3.0.15
|
|
831
872
|
[3.0.14]: https://github.com/kettle-dev/kettle-soup-cover/compare/v3.0.13...v3.0.14
|
|
832
873
|
[3.0.14t]: https://github.com/kettle-dev/kettle-soup-cover/releases/tag/v3.0.14
|
|
833
874
|
[3.0.13]: https://github.com/kettle-dev/kettle-soup-cover/compare/v3.0.12...v3.0.13
|
data/README.md
CHANGED
|
@@ -597,6 +597,7 @@ See [LICENSE.md][📄license] for the official copyright notice.
|
|
|
597
597
|
<summary>Copyright holders</summary>
|
|
598
598
|
|
|
599
599
|
- Copyright (c) 2023-2026 Peter H. Boling
|
|
600
|
+
- Copyright (c) 2026 Erik Berlin
|
|
600
601
|
|
|
601
602
|
</details>
|
|
602
603
|
|
|
@@ -783,7 +784,7 @@ Thanks for RTFM. ☺️
|
|
|
783
784
|
[📌gitmoji]: https://gitmoji.dev
|
|
784
785
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
785
786
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
786
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.
|
|
787
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.304-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
787
788
|
[🔐security]: https://github.com/kettle-dev/kettle-soup-cover/blob/main/SECURITY.md
|
|
788
789
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
789
790
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
|
@@ -20,6 +20,8 @@ require_relative "constants" unless defined?(Kettle::Soup::Cover::Constants)
|
|
|
20
20
|
require_relative "loaders" unless defined?(Kettle::Soup::Cover::Loaders)
|
|
21
21
|
require_relative "formatters" unless defined?(Kettle::Soup::Cover) && Kettle::Soup::Cover.respond_to?(:configure_formatters!)
|
|
22
22
|
|
|
23
|
+
require_relative "coverage_thresholds" unless defined?(Kettle::Soup::Cover::CoverageThresholds)
|
|
24
|
+
|
|
23
25
|
SimpleCov.configure do
|
|
24
26
|
cover("lib/**/*.rb")
|
|
25
27
|
|
|
@@ -54,12 +56,7 @@ SimpleCov.configure do
|
|
|
54
56
|
# - If explicitly set to false (K_SOUP_COV_MIN_HARD=false), never enforce minimum coverage
|
|
55
57
|
# - If explicitly set to true (K_SOUP_COV_MIN_HARD=true), always enforce minimum coverage
|
|
56
58
|
# - If not set, defaults to IS_CI (enforce in CI, don't enforce locally)
|
|
57
|
-
|
|
58
|
-
minimum_coverage(
|
|
59
|
-
branch: Kettle::Soup::Cover::Constants::MIN_COVERAGE_BRANCH,
|
|
60
|
-
line: Kettle::Soup::Cover::Constants::MIN_COVERAGE_LINE
|
|
61
|
-
)
|
|
62
|
-
end
|
|
59
|
+
Kettle::Soup::Cover::CoverageThresholds.configure!(self)
|
|
63
60
|
end
|
|
64
61
|
|
|
65
62
|
# Clean up stale resultset entries from prior runs before SimpleCov.start.
|
|
@@ -76,6 +76,7 @@ module Kettle
|
|
|
76
76
|
end
|
|
77
77
|
MIN_COVERAGE_BRANCH = ENV_GET.call("MIN_BRANCH", "80").to_i
|
|
78
78
|
MIN_COVERAGE_LINE = ENV_GET.call("MIN_LINE", "80").to_i
|
|
79
|
+
MIN_COVERAGE_STRICT = ENV_GET.call("MIN_STRICT", Constants::FALSE).casecmp?(Constants::TRUE)
|
|
79
80
|
MULTI_FORMATTERS_DEFAULT = if IS_CI
|
|
80
81
|
Constants::TRUE
|
|
81
82
|
else
|
|
@@ -147,6 +148,7 @@ module Kettle
|
|
|
147
148
|
MERGE_TIMEOUT
|
|
148
149
|
MIN_COVERAGE_BRANCH
|
|
149
150
|
MIN_COVERAGE_LINE
|
|
151
|
+
MIN_COVERAGE_STRICT
|
|
150
152
|
MIN_COVERAGE_HARD
|
|
151
153
|
MIN_COVERAGE_HARD_REQUESTED
|
|
152
154
|
MULTI_FORMATTERS_DEFAULT
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Kettle
|
|
4
|
+
module Soup
|
|
5
|
+
module Cover
|
|
6
|
+
# Applies the selected SimpleCov minimum coverage policy.
|
|
7
|
+
module CoverageThresholds
|
|
8
|
+
module_function
|
|
9
|
+
|
|
10
|
+
def configure!(configuration)
|
|
11
|
+
configure_strict_criteria!(configuration)
|
|
12
|
+
configure_minimum!(configuration) if Constants::MIN_COVERAGE_HARD
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def configure_strict_criteria!(configuration)
|
|
16
|
+
return unless Constants::MIN_COVERAGE_STRICT
|
|
17
|
+
|
|
18
|
+
configuration.enable_coverage(:branch)
|
|
19
|
+
configuration.enable_coverage(:method)
|
|
20
|
+
if SimpleCov::Configuration.method_defined?(:coverage_for_eval_supported?) &&
|
|
21
|
+
configuration.coverage_for_eval_supported?
|
|
22
|
+
configuration.enable_coverage(:eval)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def configure_minimum!(configuration)
|
|
27
|
+
if Constants::MIN_COVERAGE_STRICT
|
|
28
|
+
configuration.minimum_coverage(line: 100, branch: 100, method: 100)
|
|
29
|
+
else
|
|
30
|
+
# SimpleCov's `minimum_coverage(hash)` replaces the whole minimums
|
|
31
|
+
# Hash, so merge into the minimums already configured (for example
|
|
32
|
+
# by the project's .simplecov) instead of dropping or lowering them.
|
|
33
|
+
configuration.minimum_coverage(
|
|
34
|
+
merge_minimum_coverage(
|
|
35
|
+
configuration.minimum_coverage,
|
|
36
|
+
branch: Constants::MIN_COVERAGE_BRANCH,
|
|
37
|
+
line: Constants::MIN_COVERAGE_LINE
|
|
38
|
+
)
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Merges minimums into minimums that are already configured.
|
|
44
|
+
#
|
|
45
|
+
# For each criterion the higher of the two values wins, so a minimum
|
|
46
|
+
# the project set itself is never lowered. Criteria only `existing`
|
|
47
|
+
# has, such as method coverage, are kept as they are.
|
|
48
|
+
#
|
|
49
|
+
# @param existing [Hash{Symbol => Numeric}] the current minimums, as
|
|
50
|
+
# answered by SimpleCov's `minimum_coverage` reader (empty when
|
|
51
|
+
# nothing is configured)
|
|
52
|
+
# @param minimums [Hash{Symbol => Numeric}] the minimums to merge in
|
|
53
|
+
# @return [Hash{Symbol => Numeric}] a new Hash (`existing` is left unmodified)
|
|
54
|
+
def merge_minimum_coverage(existing, minimums)
|
|
55
|
+
existing.merge(minimums) do |_criterion, current, minimum|
|
|
56
|
+
[current, minimum].compact.max
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -6,7 +6,7 @@ module Kettle
|
|
|
6
6
|
# Version namespace for this gem.
|
|
7
7
|
module Version
|
|
8
8
|
# Current gem version.
|
|
9
|
-
VERSION = "3.0.
|
|
9
|
+
VERSION = "3.0.15"
|
|
10
10
|
end
|
|
11
11
|
# Current gem version exposed at the traditional constant location.
|
|
12
12
|
VERSION = Version::VERSION # Traditional Constant Location
|
data/lib/kettle/soup/cover.rb
CHANGED
|
@@ -29,6 +29,7 @@ require "stringio"
|
|
|
29
29
|
require_relative "cover/constants"
|
|
30
30
|
require_relative "cover/loaders"
|
|
31
31
|
require_relative "cover/formatters"
|
|
32
|
+
require_relative "cover/coverage_thresholds"
|
|
32
33
|
require_relative "cover/version"
|
|
33
34
|
|
|
34
35
|
module Kettle
|
|
@@ -105,12 +106,7 @@ module Kettle
|
|
|
105
106
|
|
|
106
107
|
Kettle::Soup::Cover.configure_formatters!
|
|
107
108
|
|
|
108
|
-
|
|
109
|
-
minimum_coverage(
|
|
110
|
-
branch: Constants::MIN_COVERAGE_BRANCH,
|
|
111
|
-
line: Constants::MIN_COVERAGE_LINE
|
|
112
|
-
)
|
|
113
|
-
end
|
|
109
|
+
Kettle::Soup::Cover::CoverageThresholds.configure!(self)
|
|
114
110
|
end
|
|
115
111
|
end
|
|
116
112
|
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kettle-soup-cover
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.15
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter H. Boling
|
|
8
|
+
- Erik Berlin
|
|
8
9
|
bindir: exe
|
|
9
10
|
cert_chain:
|
|
10
11
|
- |
|
|
@@ -154,7 +155,7 @@ dependencies:
|
|
|
154
155
|
version: '1.1'
|
|
155
156
|
- - ">="
|
|
156
157
|
- !ruby/object:Gem::Version
|
|
157
|
-
version: 1.1.
|
|
158
|
+
version: 1.1.17
|
|
158
159
|
type: :runtime
|
|
159
160
|
prerelease: false
|
|
160
161
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -164,7 +165,7 @@ dependencies:
|
|
|
164
165
|
version: '1.1'
|
|
165
166
|
- - ">="
|
|
166
167
|
- !ruby/object:Gem::Version
|
|
167
|
-
version: 1.1.
|
|
168
|
+
version: 1.1.17
|
|
168
169
|
- !ruby/object:Gem::Dependency
|
|
169
170
|
name: kettle-dev
|
|
170
171
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -248,7 +249,7 @@ dependencies:
|
|
|
248
249
|
version: '0.1'
|
|
249
250
|
- - ">="
|
|
250
251
|
- !ruby/object:Gem::Version
|
|
251
|
-
version: 0.1.
|
|
252
|
+
version: 0.1.5
|
|
252
253
|
type: :development
|
|
253
254
|
prerelease: false
|
|
254
255
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -258,7 +259,7 @@ dependencies:
|
|
|
258
259
|
version: '0.1'
|
|
259
260
|
- - ">="
|
|
260
261
|
- !ruby/object:Gem::Version
|
|
261
|
-
version: 0.1.
|
|
262
|
+
version: 0.1.5
|
|
262
263
|
- !ruby/object:Gem::Dependency
|
|
263
264
|
name: appraisal2
|
|
264
265
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -392,6 +393,7 @@ files:
|
|
|
392
393
|
- lib/kettle/soup/cover.rb
|
|
393
394
|
- lib/kettle/soup/cover/config.rb
|
|
394
395
|
- lib/kettle/soup/cover/constants.rb
|
|
396
|
+
- lib/kettle/soup/cover/coverage_thresholds.rb
|
|
395
397
|
- lib/kettle/soup/cover/filters/gt_line_filter.rb
|
|
396
398
|
- lib/kettle/soup/cover/filters/lt_line_filter.rb
|
|
397
399
|
- lib/kettle/soup/cover/formatters.rb
|
|
@@ -407,10 +409,10 @@ licenses:
|
|
|
407
409
|
- AGPL-3.0-only
|
|
408
410
|
metadata:
|
|
409
411
|
homepage_uri: https://kettle-soup-cover.galtzo.com/
|
|
410
|
-
source_code_uri: https://github.com/kettle-dev/kettle-soup-cover/tree/v3.0.
|
|
411
|
-
changelog_uri: https://github.com/kettle-dev/kettle-soup-cover/blob/v3.0.
|
|
412
|
+
source_code_uri: https://github.com/kettle-dev/kettle-soup-cover/tree/v3.0.15
|
|
413
|
+
changelog_uri: https://github.com/kettle-dev/kettle-soup-cover/blob/v3.0.15/CHANGELOG.md
|
|
412
414
|
bug_tracker_uri: https://github.com/kettle-dev/kettle-soup-cover/issues
|
|
413
|
-
documentation_uri: https://www.rubydoc.info/gems/kettle-soup-cover/3.0.
|
|
415
|
+
documentation_uri: https://www.rubydoc.info/gems/kettle-soup-cover/3.0.15
|
|
414
416
|
funding_uri: https://github.com/sponsors/pboling
|
|
415
417
|
wiki_uri: https://github.com/kettle-dev/kettle-soup-cover/wiki
|
|
416
418
|
news_uri: https://www.railsbling.com/tags/kettle-soup-cover
|
metadata.gz.sig
CHANGED
|
Binary file
|