kettle-changelog 1.0.4 → 1.0.5
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 +2 -3
- data/CHANGELOG.md +14 -1
- data/README.md +1 -1
- data/lib/kettle/changelog/cli.rb +42 -9
- data/lib/kettle/changelog/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +6 -6
- 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: 987f0528fbdee3c91c47d9675fe79fe3e4993f69c4b759ee7413a07c0b6eece9
|
|
4
|
+
data.tar.gz: d20d9e1fff2153b932cb3961d8bb56fd8bd02b0e9257b4b2844eaaa70ac7cb11
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d379f0164efc1c4d7214607eb2e745895dce3cb5e0702da2d27d63f62f376ec077b842061e74d98a93ca4ad9015cc3200e4daf8ca73a3d9ba338e8bbb339fc61
|
|
7
|
+
data.tar.gz: 21ecb7793e5b0ebc36d2e0987419a3b9f900267ce04e1edabdfa18c5c3f3e72bc112d6456a95bdc2b8f79df77dc7cf58cd7b2057049aa90238ebd501d1796a8d
|
checksums.yaml.gz.sig
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
^�ǡ-�6Z�ꃳ���,�$��.\�ambU6�@�XuN �ѹ��}�T
|
|
1
|
+
���{щ��\�6��"c�[G�s�Znʢ�}/V�s���b�m��qB�{Θ@#��j�Ahe�?·*9��Zd����Y�C��4�;�a�8�^�̲�Rh �zNRяTjG�J��,��w�`�>D����#h嫗b�~�b�Vf�'Fm#
|
|
2
|
+
?>Gc��õ~1g&L?3�ŵy ��Ny�S��������+���FoI��?B�j_4�3��m_7����m���0{���̊��U2F�8IJN ?V���f�Ni�ʤM�Ѧx��QD�')E��踷V�?���"K�b��dQvvf�*��#�Ro�, ->&�R{ �����Aah���L4�4r
|
|
4
3
|
w���z��cs���V�����
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,17 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [1.0.5] - 2026-08-28
|
|
34
|
+
|
|
35
|
+
- TAG: [v1.0.5][1.0.5t]
|
|
36
|
+
- COVERAGE: 94.05% -- 1075/1143 lines in 6 files
|
|
37
|
+
- BRANCH COVERAGE: 76.95% -- 374/486 branches in 6 files
|
|
38
|
+
- 39.39% documented
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- Backfill missing release-tag Markdown references only when the matching local Git tag exists.
|
|
43
|
+
|
|
33
44
|
## [1.0.4] - 2026-08-28
|
|
34
45
|
|
|
35
46
|
- TAG: [v1.0.4][1.0.4t]
|
|
@@ -168,7 +179,9 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
168
179
|
|
|
169
180
|
- Initial release
|
|
170
181
|
|
|
171
|
-
[Unreleased]: https://github.com/kettle-dev/kettle-changelog/compare/v1.0.
|
|
182
|
+
[Unreleased]: https://github.com/kettle-dev/kettle-changelog/compare/v1.0.5...HEAD
|
|
183
|
+
[1.0.5]: https://github.com/kettle-dev/kettle-changelog/compare/v1.0.4...v1.0.5
|
|
184
|
+
[1.0.5t]: https://github.com/kettle-dev/kettle-changelog/releases/tag/v1.0.5
|
|
172
185
|
[1.0.4]: https://github.com/kettle-dev/kettle-changelog/compare/v1.0.3...v1.0.4
|
|
173
186
|
[1.0.4t]: https://github.com/kettle-dev/kettle-changelog/releases/tag/v1.0.4
|
|
174
187
|
[1.0.3]: https://github.com/kettle-dev/kettle-changelog/compare/v1.0.2...v1.0.3
|
data/README.md
CHANGED
|
@@ -397,7 +397,7 @@ Thanks for RTFM. ☺️
|
|
|
397
397
|
[📌gitmoji]: https://gitmoji.dev
|
|
398
398
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
399
399
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
400
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-1.
|
|
400
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-1.143-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
401
401
|
[🔐security]: https://github.com/kettle-dev/kettle-changelog/blob/main/SECURITY.md
|
|
402
402
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
403
403
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
data/lib/kettle/changelog/cli.rb
CHANGED
|
@@ -23,6 +23,8 @@ module Kettle
|
|
|
23
23
|
LINK_REF_DEF_RE = /^\s*\[[^\]]+\]:\s+\S+/
|
|
24
24
|
# Matches an ATX heading at H4 or deeper (####, #####, ...)
|
|
25
25
|
DEEP_HEADING_RE = /^\#{4,}\s/
|
|
26
|
+
# Matches the canonical release-tag row emitted for each release section.
|
|
27
|
+
TAG_REFERENCE_USAGE_RE = /^ {0,3}- TAG: \[v(#{CHANGELOG_VERSION_PATTERN_SOURCE})\]\[\1t\]\s*$/o
|
|
26
28
|
|
|
27
29
|
# Initialize the changelog CLI
|
|
28
30
|
# Sets up paths for CHANGELOG.md and coverage.json
|
|
@@ -146,7 +148,7 @@ module Kettle
|
|
|
146
148
|
# Keep all content prior to the link-ref (older releases and interspersed refs)
|
|
147
149
|
preserved_body = after_lines[0...unreleased_ref_idx].join
|
|
148
150
|
# Then append the tail starting from the Unreleased link-ref line to preserve the footer refs
|
|
149
|
-
preserved_footer = after_lines[unreleased_ref_idx
|
|
151
|
+
preserved_footer = after_lines[unreleased_ref_idx..].join
|
|
150
152
|
updated << preserved_body << preserved_footer
|
|
151
153
|
else
|
|
152
154
|
# No Unreleased ref found; just append the remainder as-is
|
|
@@ -594,7 +596,7 @@ module Kettle
|
|
|
594
596
|
# Now next_i points to the next section heading or EOF
|
|
595
597
|
before = lines[0..(start_i - 1)].join
|
|
596
598
|
unreleased_body = lines[(start_i + 1)..(next_i - 1)] || []
|
|
597
|
-
after_lines = lines[next_i
|
|
599
|
+
after_lines = lines[next_i..] || []
|
|
598
600
|
|
|
599
601
|
# When this is the very first release there is no `## [X.Y.Z]` heading to act
|
|
600
602
|
# as a boundary, so the footer link-ref block ([Unreleased]: ...) sits at the
|
|
@@ -603,7 +605,7 @@ module Kettle
|
|
|
603
605
|
if next_i == lines.length
|
|
604
606
|
footer_i = unreleased_body.index { |l| l.start_with?(UNRELEASED_SECTION_HEADING) }
|
|
605
607
|
if footer_i
|
|
606
|
-
after_lines = unreleased_body[footer_i
|
|
608
|
+
after_lines = unreleased_body[footer_i..] + after_lines
|
|
607
609
|
unreleased_body = unreleased_body[0...footer_i]
|
|
608
610
|
end
|
|
609
611
|
end
|
|
@@ -630,12 +632,12 @@ module Kettle
|
|
|
630
632
|
|
|
631
633
|
prepared_version = release_heading[1]
|
|
632
634
|
release_and_tail = after.lines
|
|
633
|
-
next_release_index = release_and_tail[1
|
|
635
|
+
next_release_index = release_and_tail[1..].to_a.index { |line| line.start_with?("## [") }
|
|
634
636
|
release_line_count = next_release_index ? next_release_index + 1 : release_and_tail.length
|
|
635
637
|
release_lines = release_and_tail[0...release_line_count]
|
|
636
|
-
tail = release_and_tail[release_line_count
|
|
638
|
+
tail = release_and_tail[release_line_count..].to_a.join
|
|
637
639
|
|
|
638
|
-
release_body = release_lines[1
|
|
640
|
+
release_body = release_lines[1..].to_a.join
|
|
639
641
|
merged_body = merge_release_body_with_unreleased(release_body, unreleased_block)
|
|
640
642
|
|
|
641
643
|
release_section = +""
|
|
@@ -1103,7 +1105,7 @@ module Kettle
|
|
|
1103
1105
|
scan_start = lines.index { |l| l.start_with?(UNRELEASED_SECTION_HEADING) } || lines.length
|
|
1104
1106
|
t_versions = {}
|
|
1105
1107
|
non_t_tag_refs = {}
|
|
1106
|
-
lines[scan_start
|
|
1108
|
+
lines[scan_start..].to_a.each do |l|
|
|
1107
1109
|
# Case A: explicit tag ref key like [1.2.3t]: ...
|
|
1108
1110
|
if (m = l.match(/^\[(#{CHANGELOG_VERSION_PATTERN_SOURCE})t\]:\s+(\S+)/o))
|
|
1109
1111
|
t_versions[m[1]] = true
|
|
@@ -1237,6 +1239,8 @@ module Kettle
|
|
|
1237
1239
|
end
|
|
1238
1240
|
|
|
1239
1241
|
if owner && repo
|
|
1242
|
+
add_missing_tag_link_refs!(lines, owner, repo, except: new_version)
|
|
1243
|
+
|
|
1240
1244
|
# Add compare link for the new version
|
|
1241
1245
|
from = prev_version ? "v#{prev_version}" : detect_initial_compare_base(lines)
|
|
1242
1246
|
new_compare = "[#{new_version}]: https://github.com/#{owner}/#{repo}/compare/#{from}...v#{new_version}\n"
|
|
@@ -1251,7 +1255,7 @@ module Kettle
|
|
|
1251
1255
|
end
|
|
1252
1256
|
|
|
1253
1257
|
# Rebuild and sort the reference block so Unreleased is first, then newest to oldest versions, preserving everything above first_ref
|
|
1254
|
-
ref_lines = lines[first_ref
|
|
1258
|
+
ref_lines = lines[first_ref..].select { |l| /^\[[^\]]+\]:\s+http/.match?(l) }
|
|
1255
1259
|
# Deduplicate by key (text inside the square brackets)
|
|
1256
1260
|
by_key = {}
|
|
1257
1261
|
ref_lines.each do |l|
|
|
@@ -1291,6 +1295,35 @@ module Kettle
|
|
|
1291
1295
|
rebuilt.join
|
|
1292
1296
|
end
|
|
1293
1297
|
|
|
1298
|
+
# Historical sections can contain the canonical TAG row while lacking the
|
|
1299
|
+
# matching Markdown reference definition. Reconcile those records rather
|
|
1300
|
+
# than limiting reference generation to the release currently being
|
|
1301
|
+
# prepared.
|
|
1302
|
+
def add_missing_tag_link_refs!(lines, owner, repo, except: nil)
|
|
1303
|
+
tag_versions = lines.filter_map do |line|
|
|
1304
|
+
line.match(TAG_REFERENCE_USAGE_RE)&.[](1)
|
|
1305
|
+
end.uniq
|
|
1306
|
+
|
|
1307
|
+
tag_versions.each do |version|
|
|
1308
|
+
next if version == except
|
|
1309
|
+
next if lines.any? { |line| line.start_with?("[#{version}t]:") }
|
|
1310
|
+
unless local_release_tag?(version)
|
|
1311
|
+
warn("kettle-changelog: local git tag v#{version} is absent; leaving its TAG reference unresolved")
|
|
1312
|
+
next
|
|
1313
|
+
end
|
|
1314
|
+
|
|
1315
|
+
lines << "[#{version}t]: https://github.com/#{owner}/#{repo}/releases/tag/v#{version}\n"
|
|
1316
|
+
end
|
|
1317
|
+
end
|
|
1318
|
+
|
|
1319
|
+
def local_release_tag?(version)
|
|
1320
|
+
@local_release_tags ||= begin
|
|
1321
|
+
output, status = Open3.capture2e("git", "tag", "--list", "v*", chdir: @root)
|
|
1322
|
+
status.success? ? output.lines.map(&:strip) : []
|
|
1323
|
+
end
|
|
1324
|
+
@local_release_tags.include?("v#{version}")
|
|
1325
|
+
end
|
|
1326
|
+
|
|
1294
1327
|
# Ensure every Markdown atx-style heading line (e.g., "# ", "## ") has exactly one blank line
|
|
1295
1328
|
# before and after it, skipping content inside fenced code blocks.
|
|
1296
1329
|
def normalize_heading_spacing(text)
|
|
@@ -1335,7 +1368,7 @@ module Kettle
|
|
|
1335
1368
|
idx = lines.index { |l| l.start_with?(UNRELEASED_SECTION_HEADING) }
|
|
1336
1369
|
return text unless idx
|
|
1337
1370
|
head = lines[0...idx]
|
|
1338
|
-
tail = lines[idx
|
|
1371
|
+
tail = lines[idx..]
|
|
1339
1372
|
# Ensure exactly one blank line between body and refs
|
|
1340
1373
|
if head.any? && head.last.to_s.strip != ""
|
|
1341
1374
|
head << ""
|
|
@@ -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.
|
|
8
|
+
VERSION = "1.0.5"
|
|
9
9
|
end
|
|
10
10
|
# Current gem version exposed at the traditional constant location.
|
|
11
11
|
VERSION = Version::VERSION # Traditional Constant Location
|
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.
|
|
4
|
+
version: 1.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter H. Boling
|
|
@@ -63,7 +63,7 @@ dependencies:
|
|
|
63
63
|
requirements:
|
|
64
64
|
- - ">="
|
|
65
65
|
- !ruby/object:Gem::Version
|
|
66
|
-
version: 3.0.
|
|
66
|
+
version: 3.0.15
|
|
67
67
|
- - "<"
|
|
68
68
|
- !ruby/object:Gem::Version
|
|
69
69
|
version: 4.0.0
|
|
@@ -73,7 +73,7 @@ dependencies:
|
|
|
73
73
|
requirements:
|
|
74
74
|
- - ">="
|
|
75
75
|
- !ruby/object:Gem::Version
|
|
76
|
-
version: 3.0.
|
|
76
|
+
version: 3.0.15
|
|
77
77
|
- - "<"
|
|
78
78
|
- !ruby/object:Gem::Version
|
|
79
79
|
version: 4.0.0
|
|
@@ -304,10 +304,10 @@ licenses:
|
|
|
304
304
|
- AGPL-3.0-only
|
|
305
305
|
metadata:
|
|
306
306
|
homepage_uri: https://kettle-changelog.galtzo.com
|
|
307
|
-
source_code_uri: https://github.com/kettle-dev/kettle-changelog/tree/v1.0.
|
|
308
|
-
changelog_uri: https://github.com/kettle-dev/kettle-changelog/blob/v1.0.
|
|
307
|
+
source_code_uri: https://github.com/kettle-dev/kettle-changelog/tree/v1.0.5
|
|
308
|
+
changelog_uri: https://github.com/kettle-dev/kettle-changelog/blob/v1.0.5/CHANGELOG.md
|
|
309
309
|
bug_tracker_uri: https://github.com/kettle-dev/kettle-changelog/issues
|
|
310
|
-
documentation_uri: https://www.rubydoc.info/gems/kettle-changelog/1.0.
|
|
310
|
+
documentation_uri: https://www.rubydoc.info/gems/kettle-changelog/1.0.5
|
|
311
311
|
funding_uri: https://github.com/sponsors/pboling
|
|
312
312
|
wiki_uri: https://github.com/kettle-dev/kettle-changelog/wiki
|
|
313
313
|
news_uri: https://www.railsbling.com/tags/kettle-changelog
|
metadata.gz.sig
CHANGED
|
Binary file
|