kettle-changelog 1.0.14 → 1.0.16

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 785464a88ed0968be6078d022d8889d93ab6cde81c1be55b2c2fb8a45e8ab89e
4
- data.tar.gz: 361bf50949158e794157f32c579f0e81ebd745f52024b567a7ead733c4786c8a
3
+ metadata.gz: e6072cef22f9c1a91d39f3b7b03279f0abe772c4777944e220a84b4f7e961432
4
+ data.tar.gz: 747cbf50f0af54da01b65e619dd3dc629e3f4f7d05dc0ec8fc7655214965ce61
5
5
  SHA512:
6
- metadata.gz: 1dfb1bf117ae7537fbb1adb03c6071ecaa1a09bb7fb249dba2723e9aeb1e87c8e496f53c20a740f902f03284f8df8cf86ef1da7c14e92df7c9be166b2853269c
7
- data.tar.gz: 2626a7d405397e9103ad44273ee88a3fa4d70668ad4a28c06313b1ec156a552f0b4c1da650c5ab22d7caa4d28210ff18716116601fce478708282fe14a94c706
6
+ metadata.gz: 6e86be3891856e5c3a4cff045df5cf149e3527a360baa483d96617e3786a0a570e86cc2674f60882a37a191e6fd2528b2a77fd1b9a0cb9ec015d017af4051819
7
+ data.tar.gz: f735f88af50d17d5ddd519ea1d5768103bce821454ace82d29eec83a3f1943aa09562b896aaa2d6f68cab4b9df55f475dfbe97c9eb00e9d856b9c72e5487a8f4
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,36 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [1.0.16] - 2026-11-03
34
+
35
+ - TAG: [v1.0.16][1.0.16t]
36
+ - COVERAGE: 93.68% -- 1185/1265 lines in 7 files
37
+ - BRANCH COVERAGE: 77.96% -- 421/540 branches in 7 files
38
+ - 36.36% documented
39
+
40
+ ### Added
41
+
42
+ - `kettle-changelog --release-stats [--file PATH] [--json]` reads the latest released section's coverage, branch coverage and documentation stats back out of a changelog (read-only: no project root, git or network; reads stdin when `--file` is omitted). Only the exact generated line shapes count, `[Unreleased]` and older releases are ignored, and it exits 1 when line coverage is not recorded. Backed by `Kettle::Changelog::ReleaseStats.parse`.
43
+
44
+ ## [1.0.15] - 2026-10-28
45
+
46
+ - TAG: [v1.0.15][1.0.15t]
47
+ - COVERAGE: 93.53% -- 1157/1237 lines in 6 files
48
+ - BRANCH COVERAGE: 77.55% -- 411/530 branches in 6 files
49
+ - 37.84% documented
50
+
51
+ ### Changed
52
+
53
+ - [kc] kettle-jem/prepare: updated 10 project files:
54
+ - configuration (1)
55
+ - dependencies (9)
56
+
57
+ - [kc] kettle-jem/template: updated 7 project files:
58
+ - dependencies (3)
59
+ - documentation (1)
60
+ - other (2)
61
+ - workflows (1)
62
+
33
63
  ## [1.0.14] - 2026-10-25
34
64
 
35
65
  - TAG: [v1.0.14][1.0.14t]
@@ -338,7 +368,11 @@ Please file a bug if you notice a violation of semantic versioning.
338
368
 
339
369
  - Initial release
340
370
 
341
- [Unreleased]: https://github.com/kettle-dev/kettle-changelog/compare/v1.0.14...HEAD
371
+ [Unreleased]: https://github.com/kettle-dev/kettle-changelog/compare/v1.0.16...HEAD
372
+ [1.0.16]: https://github.com/kettle-dev/kettle-changelog/compare/v1.0.15...v1.0.16
373
+ [1.0.16t]: https://github.com/kettle-dev/kettle-changelog/releases/tag/v1.0.16
374
+ [1.0.15]: https://github.com/kettle-dev/kettle-changelog/compare/v1.0.14...v1.0.15
375
+ [1.0.15t]: https://github.com/kettle-dev/kettle-changelog/releases/tag/v1.0.15
342
376
  [1.0.14]: https://github.com/kettle-dev/kettle-changelog/compare/v1.0.13...v1.0.14
343
377
  [1.0.14t]: https://github.com/kettle-dev/kettle-changelog/releases/tag/v1.0.14
344
378
  [1.0.13]: https://github.com/kettle-dev/kettle-changelog/compare/v1.0.12...v1.0.13
data/README.md CHANGED
@@ -38,12 +38,12 @@ I've summarized my thoughts in [this blog post](https://dev.to/galtzo/hostile-ta
38
38
 
39
39
  ### Compatibility
40
40
 
41
- Compatible with MRI Ruby 4.0.0+.
41
+ The gem's declared runtime compatibility floor is MRI Ruby 4.0.0+, with concordant releases of JRuby and TruffleRuby.
42
42
  CI workflows and Appraisals are generated for MRI Ruby 4.0.0+.
43
43
  The current MRI CI lane runs on Linux and macOS.
44
- This test floor is configured by `ruby.test_minimum` in `.kettle-jem.yml` and
45
- may be higher than the gem's runtime compatibility floor when legacy Rubies are
46
- not practical for the current toolchain.
44
+ The test floor is configured by `ruby.test_minimum` in `.kettle-jem.yml`.
45
+ When it is higher than the runtime floor, older runtime-compatible Rubies are
46
+ not covered by the generated CI or Appraisal matrix.
47
47
 
48
48
  <a href="https://github.com/kettle-dev"><img alt="kettle-dev Logo by Aboling0, CC BY-SA 4.0" src="https://logos.galtzo.com/assets/images/kettle-dev/avatar-128px.svg" width="14%" align="right"/></a>
49
49
 
@@ -132,7 +132,7 @@ Use `--yes` for non-interactive release automation. Add a note without preparing
132
132
  bundle exec kettle-changelog --add-unreleased-entry --section Fixed --entry "Describe the fix."
133
133
  ```
134
134
 
135
- Useful queries and maintenance commands include `--pending-release`, `--release-state`, `--reformat`, `--update-prep`, `--json`, and `--events=changelog`. Run `bundle exec kettle-changelog --help` for the complete option list.
135
+ Useful queries and maintenance commands include `--pending-release`, `--release-state`, `--release-stats`, `--reformat`, `--update-prep`, `--json`, and `--events=changelog`. Run `bundle exec kettle-changelog --help` for the complete option list.
136
136
 
137
137
  ## 🔐 Security
138
138
 
@@ -383,7 +383,7 @@ Thanks for RTFM. ☺️
383
383
  [📌gitmoji]: https://gitmoji.dev
384
384
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
385
385
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
386
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-1.237-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
386
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-1.265-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
387
387
  [🔐security]: https://github.com/kettle-dev/kettle-changelog/blob/main/SECURITY.md
388
388
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
389
389
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
data/exe/kettle-changelog CHANGED
@@ -63,7 +63,7 @@ end
63
63
 
64
64
  if ARGV.include?("-h") || ARGV.include?("--help")
65
65
  puts <<~USAGE
66
- Usage: kettle-changelog [--version VERSION] [--yes] [--coverage-gemfile PATH] [--update-prep|--reformat|--backfill-released-version VERSION] [--pending-release] [--release-state] [--refresh-cache] [--add-unreleased-entry --section SECTION --entry TEXT] [--upsert-unreleased-entry --section SECTION --key KEY --entry TEXT] [--json|--events[=TYPES]] [--no-strict] [--no-coverage-threshold]
66
+ Usage: kettle-changelog [--version VERSION] [--yes] [--coverage-gemfile PATH] [--update-prep|--reformat|--backfill-released-version VERSION] [--pending-release] [--release-state] [--release-stats [--file PATH]] [--refresh-cache] [--add-unreleased-entry --section SECTION --entry TEXT] [--upsert-unreleased-entry --section SECTION --key KEY --entry TEXT] [--json|--events[=TYPES]] [--no-strict] [--no-coverage-threshold]
67
67
 
68
68
  Detects the current version from lib/**/version.rb, the latest live release, and
69
69
  the most recent CHANGELOG.md release section, then prompts to confirm the selected plan:
@@ -82,6 +82,8 @@ if ARGV.include?("-h") || ARGV.include?("--help")
82
82
  --pending-release Query whether the changelog has release work pending; exits 0 for yes, 1 for no
83
83
  --release-state,
84
84
  --release-status Print changelog release state, including latest published release and pending sources
85
+ --release-stats Print the latest released section's coverage/doc stats from a changelog (read-only;
86
+ --file PATH or stdin; add --json; exits 1 when line coverage is not recorded)
85
87
  --refresh-cache Bypass cached gem.coop version data for this invocation
86
88
  --add-unreleased-entry Add one entry to an existing section under ## [Unreleased]
87
89
  --upsert-unreleased-entry Insert or replace one [kc]-keyed entry under ## [Unreleased]
@@ -209,6 +211,24 @@ begin
209
211
 
210
212
  historical_backfill_version = extract_option_arg!(ARGV, "--backfill-released-version")
211
213
  coverage_gemfile = extract_option_arg!(ARGV, "--coverage-gemfile")
214
+ release_stats_query = ARGV.delete("--release-stats")
215
+ release_stats_file = extract_option_arg!(ARGV, "--file")
216
+
217
+ if release_stats_query
218
+ # Read-only: no project root, git, network or version detection. Reads --file PATH, or stdin when absent/"-".
219
+ text = (release_stats_file.nil? || release_stats_file == "-") ? $stdin.read : File.read(release_stats_file)
220
+ stats = Kettle::Changelog::ReleaseStats.parse(text)
221
+ if json_output
222
+ puts(JSON.pretty_generate(stats))
223
+ elsif stats
224
+ cov = stats[:coverage]
225
+ released = [stats[:version], stats[:date] && "(#{stats[:date]})"].compact.join(" ")
226
+ puts("#{released}: " + (cov ? "#{format("%.2f", cov[:percent])}% line coverage (#{cov[:covered]}/#{cov[:total]} lines in #{cov[:files]} files)" : "no line coverage recorded"))
227
+ else
228
+ puts("No released section found.")
229
+ end
230
+ exit((stats && stats[:coverage]) ? 0 : 1)
231
+ end
212
232
 
213
233
  if upsert_unreleased_entry
214
234
  section = extract_option_arg!(ARGV, "--section")
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Kettle
4
+ module Changelog
5
+ # Reads the generated stats back out of a changelog's latest released section.
6
+ #
7
+ # The writer (CLI) puts these lines directly under each release heading:
8
+ #
9
+ # ## [2.1.0] - 2026-10-25
10
+ # - TAG: [v2.1.0][2.1.0t]
11
+ # - COVERAGE: 98.48% -- 649/659 lines in 16 files
12
+ # - BRANCH COVERAGE: 93.53% -- 217/232 branches in 16 files
13
+ # - 90.83% documented
14
+ #
15
+ # Only these exact shapes count. `[Unreleased]` is ignored, and so are older releases: a gem whose
16
+ # latest release lacks the lines reports nothing rather than a stale number from an earlier one.
17
+ module ReleaseStats
18
+ NUMBER = '(\d+(?:\.\d+)?)'
19
+ RELEASE_HEADING = /\A## \[(\d+\.\d+\.\d+[0-9A-Za-z.+-]*)\](?: - (\d{4}-\d{2}-\d{2}))?/
20
+ LINE_COVERAGE = /\A- COVERAGE: #{NUMBER}% -- (\d+)\/(\d+) lines in (\d+) files\s*\z/
21
+ BRANCH_COVERAGE = /\A- BRANCH COVERAGE: #{NUMBER}% -- (\d+)\/(\d+) branches in (\d+) files\s*\z/
22
+ DOCUMENTED = /\A- #{NUMBER}%\s+documented\s*\z/
23
+
24
+ module_function
25
+
26
+ # @param text [String] full CHANGELOG.md contents
27
+ # @return [Hash, nil] nil when the changelog has no released section; otherwise
28
+ # {version:, date:, coverage:, branch_coverage:, documented:} with nil for anything not found
29
+ def parse(text)
30
+ lines = text.to_s.lines
31
+ start = lines.index { |l| l.match?(RELEASE_HEADING) }
32
+ return unless start
33
+
34
+ heading = lines[start].match(RELEASE_HEADING)
35
+ stats = {version: heading[1], date: heading[2], coverage: nil, branch_coverage: nil, documented: nil}
36
+ lines[(start + 1)..].each do |line|
37
+ break if line.start_with?("#") # next heading, or the first ### subsection: the stats lines come before both
38
+
39
+ if (m = line.match(LINE_COVERAGE))
40
+ stats[:coverage] ||= counts(m)
41
+ elsif (m = line.match(BRANCH_COVERAGE))
42
+ stats[:branch_coverage] ||= counts(m)
43
+ elsif (m = line.match(DOCUMENTED))
44
+ stats[:documented] ||= m[1].to_f
45
+ end
46
+ end
47
+ stats
48
+ end
49
+
50
+ def counts(match)
51
+ {percent: match[1].to_f, covered: match[2].to_i, total: match[3].to_i, files: match[4].to_i}
52
+ end
53
+ private_class_method :counts
54
+ end
55
+ end
56
+ end
@@ -5,7 +5,7 @@ module Kettle
5
5
  # Version namespace for this gem.
6
6
  module Version
7
7
  # Current gem version.
8
- VERSION = "1.0.14"
8
+ VERSION = "1.0.16"
9
9
  end
10
10
  # Current gem version exposed at the traditional constant location.
11
11
  VERSION = Version::VERSION # Traditional Constant Location
@@ -10,6 +10,7 @@ module Kettle
10
10
 
11
11
  autoload :CLI, "kettle/changelog/cli"
12
12
  autoload :EntryAdder, "kettle/changelog/entry_adder"
13
+ autoload :ReleaseStats, "kettle/changelog/release_stats"
13
14
  autoload :KeyedEntryUpserter, "kettle/changelog/keyed_entry_upserter"
14
15
  autoload :TransferMerger, "kettle/changelog/transfer_merger"
15
16
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kettle-changelog
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.14
4
+ version: 1.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -66,7 +66,7 @@ dependencies:
66
66
  version: '3.1'
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: 3.1.25
69
+ version: 3.1.26
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '3.1'
77
77
  - - ">="
78
78
  - !ruby/object:Gem::Version
79
- version: 3.1.25
79
+ version: 3.1.26
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: version_gem
82
82
  requirement: !ruby/object:Gem::Requirement
@@ -86,7 +86,7 @@ dependencies:
86
86
  version: '1.1'
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 1.1.16
89
+ version: 1.1.17
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
@@ -96,7 +96,7 @@ dependencies:
96
96
  version: '1.1'
97
97
  - - ">="
98
98
  - !ruby/object:Gem::Version
99
- version: 1.1.16
99
+ version: 1.1.17
100
100
  - !ruby/object:Gem::Dependency
101
101
  name: bundler-audit
102
102
  requirement: !ruby/object:Gem::Requirement
@@ -154,7 +154,7 @@ dependencies:
154
154
  version: '0.1'
155
155
  - - ">="
156
156
  - !ruby/object:Gem::Version
157
- version: 0.1.4
157
+ version: 0.1.5
158
158
  type: :development
159
159
  prerelease: false
160
160
  version_requirements: !ruby/object:Gem::Requirement
@@ -164,7 +164,7 @@ dependencies:
164
164
  version: '0.1'
165
165
  - - ">="
166
166
  - !ruby/object:Gem::Version
167
- version: 0.1.4
167
+ version: 0.1.5
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: appraisal2
170
170
  requirement: !ruby/object:Gem::Requirement
@@ -194,7 +194,7 @@ dependencies:
194
194
  version: '2.0'
195
195
  - - ">="
196
196
  - !ruby/object:Gem::Version
197
- version: 2.0.27
197
+ version: 2.0.29
198
198
  type: :development
199
199
  prerelease: false
200
200
  version_requirements: !ruby/object:Gem::Requirement
@@ -204,7 +204,7 @@ dependencies:
204
204
  version: '2.0'
205
205
  - - ">="
206
206
  - !ruby/object:Gem::Version
207
- version: 2.0.27
207
+ version: 2.0.29
208
208
  - !ruby/object:Gem::Dependency
209
209
  name: turbo_tests2
210
210
  requirement: !ruby/object:Gem::Requirement
@@ -296,6 +296,7 @@ files:
296
296
  - lib/kettle/changelog/cli.rb
297
297
  - lib/kettle/changelog/entry_adder.rb
298
298
  - lib/kettle/changelog/keyed_entry_upserter.rb
299
+ - lib/kettle/changelog/release_stats.rb
299
300
  - lib/kettle/changelog/transfer_merger.rb
300
301
  - lib/kettle/changelog/version.rb
301
302
  - sig/kettle/changelog.rbs
@@ -304,10 +305,10 @@ licenses:
304
305
  - AGPL-3.0-only
305
306
  metadata:
306
307
  homepage_uri: https://kettle-changelog.galtzo.com
307
- source_code_uri: https://github.com/kettle-dev/kettle-changelog/tree/v1.0.14
308
- changelog_uri: https://github.com/kettle-dev/kettle-changelog/blob/v1.0.14/CHANGELOG.md
308
+ source_code_uri: https://github.com/kettle-dev/kettle-changelog/tree/v1.0.16
309
+ changelog_uri: https://github.com/kettle-dev/kettle-changelog/blob/v1.0.16/CHANGELOG.md
309
310
  bug_tracker_uri: https://github.com/kettle-dev/kettle-changelog/issues
310
- documentation_uri: https://www.rubydoc.info/gems/kettle-changelog/1.0.14
311
+ documentation_uri: https://www.rubydoc.info/gems/kettle-changelog/1.0.16
311
312
  funding_uri: https://github.com/sponsors/pboling
312
313
  wiki_uri: https://github.com/kettle-dev/kettle-changelog/wiki
313
314
  news_uri: https://www.railsbling.com/tags/kettle-changelog
metadata.gz.sig CHANGED
Binary file