kettle-dev 2.2.4 → 2.2.6

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: e1c6a0d6e39d7d8fe607a9b19f147ef63a32a24bae13abfe0fe29e1d63d5850b
4
- data.tar.gz: 6fbe922eb16885678ce44cbb55c6caef1c71cc3053a6e7d7624fa0b6c3ecd72a
3
+ metadata.gz: b8c22a00d9dde1e8574e1b8018fcf356b683c5a0c558b304bfac6d4b307d2de1
4
+ data.tar.gz: 69b132d5faa7e4d07f52344491295fb349e1453b2aa43b2de2ae25fbff21a9a2
5
5
  SHA512:
6
- metadata.gz: 31f868d8ea6bf2b83cc8aab8b56f52726dd96cea08ddf49d38aacab0ac6e7712e69a7d3f9944946ed575a9246c3e0c4b00756ed512dd5d124a0abfdff342f4de
7
- data.tar.gz: a7a5d8b99c80b173e97f014029f1972ee74190d7fa4ae97a8bc468606e80d0e87625838312b62fa8a69f2d16ff373c11bb4bc10e73a5cf0872da3287bba69ad7
6
+ metadata.gz: 0f0c9b87d7bc0cf30712c3e6cbbedabd66d6af631ed39586fe7853f78970b3b8ea80e18c78130394c323f3d09d61cf7b5c39d9c1927ed71fe9fb30a3e1c7453d
7
+ data.tar.gz: 7eb506783c68f81ac54ae37b54d4b415d996f1a2f50ce112c2733cd0726ca55088b3875c281743aa8eed389243d4049ca01f07f2a0211cc99b4f462ff17a4c5e
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,39 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [2.2.6] - 2026-06-13
34
+
35
+ - TAG: [v2.2.6][2.2.6t]
36
+ - COVERAGE: 92.27% -- 3833/4154 lines in 28 files
37
+ - BRANCH COVERAGE: 73.51% -- 1518/2065 branches in 28 files
38
+ - 66.67% documented
39
+
40
+ ### Added
41
+
42
+ #### Changelog
43
+
44
+ - Added `kettle-changelog --pending-release`, a non-mutating query that exits
45
+ successfully when `CHANGELOG.md` has unreleased entries or its most recent
46
+ release section has not been published yet.
47
+
48
+ ## [2.2.5] - 2026-06-13
49
+
50
+ - TAG: [v2.2.5][2.2.5t]
51
+ - COVERAGE: 92.29% -- 3818/4137 lines in 28 files
52
+ - BRANCH COVERAGE: 73.49% -- 1516/2063 branches in 28 files
53
+ - 67.00% documented
54
+
55
+ ### Changed
56
+
57
+ - `kettle-gha-sha-pins --upgrade major` now supports major-line action tags
58
+ such as `v2`, while patch and minor upgrade targeting remain limited to full
59
+ `x.y.z` SemVer tags.
60
+
61
+ ### Fixed
62
+
63
+ - `kettle-gha-sha-pins` persistent cache writes no longer crash for actions
64
+ whose releases and tags only include major-line versions such as `v2`.
65
+
33
66
  ## [2.2.4] - 2026-06-12
34
67
 
35
68
  - TAG: [v2.2.4][2.2.4t]
@@ -2042,7 +2075,11 @@ Please file a bug if you notice a violation of semantic versioning.
2042
2075
  - Selecting will run the selected workflow via `act`
2043
2076
  - This may move to its own gem in the future.
2044
2077
 
2045
- [Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.4...HEAD
2078
+ [Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.6...HEAD
2079
+ [2.2.6]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.5...v2.2.6
2080
+ [2.2.6t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.2.6
2081
+ [2.2.5]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.4...v2.2.5
2082
+ [2.2.5t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.2.5
2046
2083
  [2.2.4]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.3...v2.2.4
2047
2084
  [2.2.4t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.2.4
2048
2085
  [2.2.3]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.2...v2.2.3
data/README.md CHANGED
@@ -854,7 +854,7 @@ Thanks for RTFM. ☺️
854
854
  [📌gitmoji]: https://gitmoji.dev
855
855
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
856
856
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
857
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-4.129-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
857
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-4.154-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
858
858
  [🔐security]: https://github.com/kettle-dev/kettle-dev/blob/main/SECURITY.md
859
859
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
860
860
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
@@ -882,7 +882,7 @@ Thanks for RTFM. ☺️
882
882
  | Package | kettle-dev |
883
883
  | Description | 🍲 Kettle::Dev is a meta tool from kettle-rb to streamline development and testing. Acts as a shim dependency, pulling in many other dependencies, to give you OOTB productivity with a RubyGem, or Ruby app project. Configures a complete set of Rake tasks, for all the libraries is brings in, so they arrive ready to go. Fund overlooked open source projects - bottom of stack, dev/test dependencies: floss-funding.dev |
884
884
  | Homepage | https://github.com/kettle-dev/kettle-dev |
885
- | Source | https://github.com/kettle-dev/kettle-dev/tree/v2.2.3 |
885
+ | Source | https://github.com/kettle-dev/kettle-dev/tree/v2.2.4 |
886
886
  | License | `AGPL-3.0-only` |
887
887
  | Funding | https://github.com/sponsors/pboling, https://issuehunt.io/u/pboling, https://ko-fi.com/pboling, https://liberapay.com/pboling/donate, https://opencollective.com/kettle-dev, https://opencollective.com/kettle-rb, https://patreon.com/galtzo, https://polar.sh/pboling, https://thanks.dev/u/gh/pboling, https://tidelift.com/funding/github/rubygems/kettle-dev, https://www.buymeacoffee.com/pboling |
888
888
  <!-- kettle-jem:metadata:end -->
data/exe/kettle-changelog CHANGED
@@ -51,7 +51,7 @@ end
51
51
  begin
52
52
  if ARGV.include?("-h") || ARGV.include?("--help")
53
53
  puts <<~USAGE
54
- Usage: kettle-changelog [--update-prep] [--no-strict] [--no-coverage-threshold]
54
+ Usage: kettle-changelog [--update-prep] [--pending-release] [--no-strict] [--no-coverage-threshold]
55
55
 
56
56
  Detects the current version from lib/**/version.rb, the latest live release, and
57
57
  the most recent CHANGELOG.md release section, then prompts to confirm the selected plan:
@@ -62,6 +62,7 @@ begin
62
62
 
63
63
  Options:
64
64
  --update-prep Force updating the most recent prepared release section in place
65
+ --pending-release Query whether the changelog has release work pending; exits 0 for yes, 1 for no
65
66
  --no-strict Allow missing coverage and yard data (warnings only, no errors)
66
67
  --no-coverage-threshold Generate coverage without hard-failing below configured thresholds
67
68
 
@@ -89,11 +90,19 @@ end
89
90
  begin
90
91
  # Determine if strict mode is enabled (default: true)
91
92
  strict_mode = !ARGV.include?("--no-strict") && ENV.fetch("K_CHANGELOG_STRICT", "true").downcase != "false"
92
- update_prep = ARGV.include?("--update-prep")
93
+ update_prep = ARGV.delete("--update-prep")
94
+ pending_release_query = ARGV.delete("--pending-release")
93
95
  coverage_threshold_disabled = ARGV.include?("--no-coverage-threshold") || ARGV.include?("--no-coverage-thresholds")
94
96
  coverage_hard = !coverage_threshold_disabled && ENV.fetch("K_CHANGELOG_COVERAGE_HARD", "true").downcase != "false"
95
97
 
96
- Kettle::Dev::ChangelogCLI.new(strict: strict_mode, enforce_coverage_thresholds: coverage_hard, update_prep: update_prep).run
98
+ cli = Kettle::Dev::ChangelogCLI.new(strict: strict_mode, enforce_coverage_thresholds: coverage_hard, update_prep: update_prep)
99
+ if pending_release_query
100
+ status = cli.pending_release_status
101
+ puts status.fetch(:pending) ? "true" : "false"
102
+ exit(status.fetch(:pending) ? 0 : 1)
103
+ end
104
+
105
+ cli.run
97
106
  rescue LoadError => e
98
107
  warn("#{script_basename}: could not load dependency: #{e.class}: #{e.message}")
99
108
  warn(e.backtrace.join("\n")) if ENV["DEBUG"]
@@ -135,6 +135,41 @@ module Kettle
135
135
  puts "CHANGELOG.md updated with v#{version} section."
136
136
  end
137
137
 
138
+ def pending_release_status
139
+ changelog = File.read(@changelog_path)
140
+ unreleased_block, _before, after = extract_unreleased(changelog)
141
+ unreleased_entries = unreleased_block_has_entries?(unreleased_block)
142
+ latest_changelog_version = detect_previous_version(after.to_s)
143
+ gem_name = nil
144
+ latest_overall = nil
145
+ latest_for_series = nil
146
+ latest_target = nil
147
+
148
+ if latest_changelog_version && !unreleased_entries
149
+ begin
150
+ gem_name = detect_gem_name
151
+ latest_overall, latest_for_series = latest_released_versions(gem_name, latest_changelog_version)
152
+ latest_target = latest_release_target(latest_changelog_version, latest_overall, latest_for_series)
153
+ rescue => e
154
+ warn("[kettle-changelog] gem.coop release check failed: #{e.class}: #{e.message}")
155
+ warn("Treating the most recent CHANGELOG.md release section as pending because live release info is unavailable.")
156
+ end
157
+ end
158
+
159
+ prepared_release_pending = !unreleased_entries && !!latest_changelog_version && latest_target != latest_changelog_version
160
+
161
+ {
162
+ pending: unreleased_entries || prepared_release_pending,
163
+ unreleased_entries: unreleased_entries,
164
+ prepared_release_pending: prepared_release_pending,
165
+ latest_changelog_version: latest_changelog_version,
166
+ latest_released: latest_overall,
167
+ latest_released_for_current_series: latest_for_series,
168
+ latest_release_target: latest_target,
169
+ gem_name: gem_name
170
+ }
171
+ end
172
+
138
173
  private
139
174
 
140
175
  def abort(msg)
@@ -478,7 +478,7 @@ module Kettle
478
478
 
479
479
  def parse_release_version(value)
480
480
  normalized = value.to_s.sub(/\A[vV]/, "")
481
- return nil unless normalized.match?(/\A\d+\.\d+\.\d+(?:[-.]?[0-9A-Za-z.-]+)?\z/)
481
+ return nil unless normalized.match?(/\A(?:\d+|\d+\.\d+\.\d+(?:[-.]?[0-9A-Za-z.-]+)?)\z/)
482
482
 
483
483
  Gem::Version.new(normalized)
484
484
  rescue ArgumentError
@@ -504,11 +504,13 @@ module Kettle
504
504
  def choose_upgrade_target(current_version, versions, level)
505
505
  current = parse_release_version(current_version)
506
506
  return nil if current.nil?
507
+ return nil if level != "major" && major_line_version?(current_version)
507
508
 
508
509
  candidates = versions.select do |entry|
509
510
  next false unless entry[:version_obj].is_a?(Gem::Version)
510
511
  next false unless entry[:version_obj] > current
511
512
  next false if entry[:version_obj].prerelease? && !current.prerelease?
513
+ next false if level != "major" && major_line_version?(entry[:version])
512
514
 
513
515
  case level
514
516
  when "patch"
@@ -523,6 +525,10 @@ module Kettle
523
525
  candidates.max_by { |entry| entry[:version_obj] }
524
526
  end
525
527
 
528
+ def major_line_version?(value)
529
+ value.to_s.match?(/\A\d+\z/)
530
+ end
531
+
526
532
  def latest_outdated_target(current_version, versions)
527
533
  current = parse_release_version(current_version)
528
534
  return nil if current.nil?
@@ -1051,11 +1057,13 @@ module Kettle
1051
1057
 
1052
1058
  deserialized.merge(cached_at: entry["cached_at"].to_s)
1053
1059
  end
1060
+ return {} if entries.empty?
1054
1061
 
1062
+ full_semver_entries = entries.reject { |entry| major_line_version?(entry[:version]) }
1055
1063
  {
1056
- "patch" => entries.group_by { |entry| entry[:version_obj].segments[0, 2].join(".") }
1064
+ "patch" => full_semver_entries.group_by { |entry| entry[:version_obj].segments[0, 2].join(".") }
1057
1065
  .transform_values { |group| serialize_target(group.max_by { |entry| entry[:version_obj] }) },
1058
- "minor" => entries.group_by { |entry| entry[:version_obj].segments[0].to_s }
1066
+ "minor" => full_semver_entries.group_by { |entry| entry[:version_obj].segments[0].to_s }
1059
1067
  .transform_values { |group| serialize_target(group.max_by { |entry| entry[:version_obj] }) },
1060
1068
  "major" => {"*" => serialize_target(entries.max_by { |entry| entry[:version_obj] })}
1061
1069
  }
@@ -1076,6 +1084,10 @@ module Kettle
1076
1084
  nil
1077
1085
  end
1078
1086
 
1087
+ def major_line_version?(value)
1088
+ value.to_s.match?(/\A\d+\z/)
1089
+ end
1090
+
1079
1091
  def fresh_entry?(entry)
1080
1092
  cached_at = Time.iso8601(entry["cached_at"].to_s)
1081
1093
  cached_at >= @clock.call - @ttl_seconds
@@ -1191,7 +1203,7 @@ module Kettle
1191
1203
 
1192
1204
  def parse_release_version_text(value)
1193
1205
  normalized = value.to_s.sub(/\A[vV]/, "")
1194
- return nil unless normalized.match?(/\A\d+\.\d+\.\d+(?:[-.]?[0-9A-Za-z.-]+)?\z/)
1206
+ return nil unless normalized.match?(/\A(?:\d+|\d+\.\d+\.\d+(?:[-.]?[0-9A-Za-z.-]+)?)\z/)
1195
1207
 
1196
1208
  Gem::Version.new(normalized)
1197
1209
  rescue ArgumentError
@@ -3,7 +3,7 @@
3
3
  module Kettle
4
4
  module Dev
5
5
  module Version
6
- VERSION = "2.2.4"
6
+ VERSION = "2.2.6"
7
7
  end
8
8
  VERSION = Version::VERSION # Traditional Constant Location
9
9
  end
@@ -15,6 +15,8 @@ module Kettle
15
15
  # Main entry point that updates CHANGELOG.md
16
16
  def run: () -> void
17
17
 
18
+ def pending_release_status: () -> Hash[Symbol, untyped]
19
+
18
20
  private
19
21
 
20
22
  # Abort with error message
@@ -61,4 +63,3 @@ module Kettle
61
63
  end
62
64
  end
63
65
  end
64
-
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kettle-dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.4
4
+ version: 2.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -338,10 +338,10 @@ licenses:
338
338
  - AGPL-3.0-only
339
339
  metadata:
340
340
  homepage_uri: https://kettle-dev.galtzo.com
341
- source_code_uri: https://github.com/kettle-dev/kettle-dev/tree/v2.2.4
342
- changelog_uri: https://github.com/kettle-dev/kettle-dev/blob/v2.2.4/CHANGELOG.md
341
+ source_code_uri: https://github.com/kettle-dev/kettle-dev/tree/v2.2.6
342
+ changelog_uri: https://github.com/kettle-dev/kettle-dev/blob/v2.2.6/CHANGELOG.md
343
343
  bug_tracker_uri: https://github.com/kettle-dev/kettle-dev/issues
344
- documentation_uri: https://www.rubydoc.info/gems/kettle-dev/2.2.4
344
+ documentation_uri: https://www.rubydoc.info/gems/kettle-dev/2.2.6
345
345
  funding_uri: https://github.com/sponsors/pboling
346
346
  wiki_uri: https://github.com/kettle-dev/kettle-dev/wiki
347
347
  news_uri: https://www.railsbling.com/tags/kettle-dev
metadata.gz.sig CHANGED
Binary file