kettle-dev 2.2.14 → 2.2.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: ec2b6c362bca706e061a15f28afde989862a24497273074e8b82a4c845c6b006
4
- data.tar.gz: 6750c11df44f32f1b92b93b77743e2e44d7173082279f6433fd37f3eccd1c0fb
3
+ metadata.gz: 543c0feea2569c36fc0f92795c6da98708938c8a262eadde59b93cfcbf3cd2a2
4
+ data.tar.gz: '08e6fe52f9d7b7fcee3f834938b5cb1267baa6f1b64c2fec51ffe2bc26ac3228'
5
5
  SHA512:
6
- metadata.gz: e23ea3391f369936bcec3d35e38428117b6d839f02df67f9fa4c275d034bd7bcb3caa94cd09d65348804434c710e35f52de96c5d306eecb92f8413a83c56e79d
7
- data.tar.gz: 8a5ad8e56efd578960cb996a22b48cb862630df96907c3cffb70283f5189545e7eb1634a6a1a6c2d0d6de4ceb6be641d0c8336bc73d62afc44eeaab19f77d170
6
+ metadata.gz: efe57e55df3cbd6cf7b01b01d6ef28f6e96149a41957e0dc1157be27c6e53d036ecde76d6aba89d7e3eb6016c37b8f95c9973f8924e9f22539322e5a722c06e4
7
+ data.tar.gz: 4ca4f8be55e9cc0cd0262e5ec88d309cd0ca6feee559a244474688db9da047f359bac9c736facaf8b19c25fedf11f7778639188ac382c31125e4fd3791bb2cee
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,37 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [2.2.16] - 2026-06-24
34
+
35
+ - TAG: [v2.2.16][2.2.16t]
36
+ - COVERAGE: 92.23% -- 4093/4438 lines in 33 files
37
+ - BRANCH COVERAGE: 73.14% -- 1609/2200 branches in 33 files
38
+ - 62.11% documented
39
+
40
+ ### Changed
41
+
42
+ - `kettle-release` start step 0 now runs `kettle-changelog` after the
43
+ `kettle-pre-release` gates so release prep generates the versioned changelog
44
+ section before the numbered release steps.
45
+
46
+ ### Fixed
47
+
48
+ - `kettle-release` now invokes `bundle exec kettle-changelog` as an interactive
49
+ command, making the changelog plan banner and confirmation prompt visible
50
+ during release prep.
51
+
52
+ ## [2.2.15] - 2026-06-21
53
+
54
+ - TAG: [v2.2.15][2.2.15t]
55
+ - COVERAGE: 91.83% -- 4067/4429 lines in 33 files
56
+ - BRANCH COVERAGE: 72.57% -- 1595/2198 branches in 33 files
57
+ - 62.11% documented
58
+
59
+ ### Added
60
+
61
+ - `kettle-bump pre` now bumps prerelease versions by applying `String#next` to
62
+ the prerelease suffix.
63
+
33
64
  ## [2.2.14] - 2026-06-21
34
65
 
35
66
  - TAG: [v2.2.14][2.2.14t]
@@ -2221,7 +2252,11 @@ Please file a bug if you notice a violation of semantic versioning.
2221
2252
  - Selecting will run the selected workflow via `act`
2222
2253
  - This may move to its own gem in the future.
2223
2254
 
2224
- [Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.14...HEAD
2255
+ [Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.16...HEAD
2256
+ [2.2.16]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.15...v2.2.16
2257
+ [2.2.16t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.2.16
2258
+ [2.2.15]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.14...v2.2.15
2259
+ [2.2.15t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.2.15
2225
2260
  [2.2.14]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.13...v2.2.14
2226
2261
  [2.2.14t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.2.14
2227
2262
  [2.2.13]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.12...v2.2.13
data/README.md CHANGED
@@ -433,9 +433,11 @@ What it does:
433
433
 
434
434
  - Script: `exe/kettle-bump` (run as `kettle-bump`)
435
435
  - Purpose: Bumps the current single gem's `lib/**/version.rb` before changelog
436
- preparation. It accepts an exact version or `major`, `minor`, or `patch`.
436
+ preparation. It accepts an exact version or `major`, `minor`, `patch`, or
437
+ `pre`.
437
438
  - Usage:
438
439
  - `kettle-bump patch`
440
+ - `kettle-bump pre`
439
441
  - `kettle-bump 1.2.4 --from 1.2.3`
440
442
  - `kettle-bump minor --dry-run`
441
443
  - `kettle-bump patch --check`
@@ -872,7 +874,7 @@ Thanks for RTFM. ☺️
872
874
  [📌gitmoji]: https://gitmoji.dev
873
875
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
874
876
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
875
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-4.411-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
877
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-4.438-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
876
878
  [🔐security]: https://github.com/kettle-dev/kettle-dev/blob/main/SECURITY.md
877
879
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
878
880
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
data/exe/kettle-release CHANGED
@@ -47,12 +47,13 @@ if ARGV.include?("-h") || ARGV.include?("--help")
47
47
 
48
48
  Automates the release flow for a Ruby gem in the host project.
49
49
 
50
- Full releases start at step 0 and run `kettle-pre-release` before the
51
- numbered release steps. Any start_step greater than 0 skips pre-release
52
- checks and resumes directly at the requested numbered step.
50
+ Full releases start at step 0 and run `kettle-pre-release` plus
51
+ `kettle-changelog` before the numbered release steps. Any start_step
52
+ greater than 0 skips pre-release prep and resumes directly at the
53
+ requested numbered step.
53
54
 
54
55
  Start steps (use start_step=<n> to begin at that step):
55
- 0. Run kettle-pre-release gates
56
+ 0. Run kettle-pre-release gates and kettle-changelog
56
57
  1. Verify Bundler >= 2.7 (start at 1 to skip pre-release checks)
57
58
  2. Detect version; RubyGems sanity check; confirm CHANGELOG/version; sync copyright years; update badges/headers
58
59
  3. Run bin/setup
@@ -6,7 +6,7 @@ module Kettle
6
6
  module Dev
7
7
  # CLI for bumping the current project's gem version before changelog prep.
8
8
  class BumpCLI
9
- BUMP_TYPES = %w[major minor patch].freeze
9
+ BUMP_TYPES = %w[major minor patch pre].freeze
10
10
 
11
11
  def initialize(argv = [], out: $stdout, err: $stderr, root: Kettle::Dev::CIHelpers.project_root)
12
12
  @argv = argv.dup
@@ -39,7 +39,7 @@ module Kettle
39
39
  def parse_options
40
40
  options = {mode: :execute, help: false}
41
41
  parser = OptionParser.new do |opts|
42
- opts.banner = "Usage: kettle-bump VERSION|major|minor|patch [options]"
42
+ opts.banner = "Usage: kettle-bump VERSION|major|minor|patch|pre [options]"
43
43
  opts.on("--from VERSION", "Require the current version before bumping") { |value| options[:from] = validate_version(value) }
44
44
  opts.on("--check", "Exit non-zero when the bump would change files") { options[:mode] = :check }
45
45
  opts.on("--dry-run", "Print planned changes without writing files") { options[:mode] = :dry_run }
@@ -51,7 +51,7 @@ module Kettle
51
51
  end
52
52
  parser.parse!(argv)
53
53
  options[:target] = argv.shift
54
- raise Kettle::Dev::Error, "kettle-bump requires VERSION, major, minor, or patch" unless options[:target] || options[:help]
54
+ raise Kettle::Dev::Error, "kettle-bump requires VERSION, major, minor, patch, or pre" unless options[:target] || options[:help]
55
55
  raise Kettle::Dev::Error, "unexpected arguments: #{argv.join(" ")}" unless argv.empty?
56
56
 
57
57
  options
@@ -68,6 +68,8 @@ module Kettle
68
68
  end
69
69
 
70
70
  def bumped_version(type, current_version)
71
+ return bumped_prerelease_version(current_version) if type == "pre"
72
+
71
73
  version = Gem::Version.new(current_version)
72
74
  segments = version.segments
73
75
  unless segments.all? { |segment| segment.is_a?(Integer) }
@@ -85,6 +87,33 @@ module Kettle
85
87
  end
86
88
  end
87
89
 
90
+ def bumped_prerelease_version(current_version)
91
+ version = Gem::Version.new(current_version)
92
+ segments = version.segments
93
+ prerelease_index = segments.index { |segment| !segment.is_a?(Integer) }
94
+ unless prerelease_index
95
+ raise Kettle::Dev::Error, "cannot pre-bump version without prerelease segment #{current_version.inspect}"
96
+ end
97
+
98
+ release_core = segments[0...prerelease_index].join(".")
99
+ prerelease_suffix = prerelease_suffix_for(current_version, release_core)
100
+ "#{release_core}.#{prerelease_suffix.next}"
101
+ end
102
+
103
+ def prerelease_suffix_for(current_version, release_core)
104
+ prefix = "#{release_core}."
105
+ return string_tail(current_version, prefix.length) if current_version.start_with?(prefix)
106
+
107
+ canonical_version = Gem::Version.new(current_version).to_s
108
+ return string_tail(canonical_version, prefix.length) if canonical_version.start_with?(prefix)
109
+
110
+ raise Kettle::Dev::Error, "cannot find prerelease segment in version #{current_version.inspect}"
111
+ end
112
+
113
+ def string_tail(value, offset)
114
+ value[offset, value.length - offset]
115
+ end
116
+
88
117
  def validate_version(version)
89
118
  Gem::Version.new(version).to_s
90
119
  rescue ArgumentError => error
@@ -20,11 +20,11 @@ module Kettle
20
20
  # @return [String] absolute path to the project root
21
21
  def project_root
22
22
  # Too difficult to test every possible branch here, so ignoring
23
- # :nocov:
23
+ # simplecov:disable
24
24
  dir = if defined?(Rake) && Rake&.application&.respond_to?(:original_dir)
25
25
  Rake.application.original_dir
26
26
  end
27
- # :nocov:
27
+ # simplecov:enable
28
28
  dir || Dir.pwd
29
29
  end
30
30
 
@@ -31,7 +31,9 @@ module Kettle
31
31
  # Some commands are interactive (e.g., `bundle exec rake release` prompting for RubyGems MFA).
32
32
  # Using capture3 detaches STDIN, preventing prompts from working. For such commands, use system
33
33
  # so they inherit the current TTY and can read the user's input.
34
- interactive = /\Abundle(\s+exec)?\s+rake\s+release\b/.match?(cmd) || /\Agem\s+push\b/.match?(cmd)
34
+ interactive = /\Abundle(\s+exec)?\s+rake\s+release\b/.match?(cmd) ||
35
+ /\Agem\s+push\b/.match?(cmd) ||
36
+ /\A(bundle\s+exec\s+)?kettle-changelog\b/.match?(cmd)
35
37
  if interactive
36
38
  ok = system(env_hash, cmd)
37
39
  unless ok
@@ -327,6 +329,21 @@ module Kettle
327
329
  def run_pre_release_checks!
328
330
  puts "Running pre-release checks via kettle-pre-release..."
329
331
  Kettle::Dev::PreReleaseCLI.new(check_num: 1).run
332
+ run_changelog!
333
+ end
334
+
335
+ def run_changelog!
336
+ cmd = "bundle exec kettle-changelog"
337
+ cmd = "#{cmd} --version #{Shellwords.escape(@version_override)}" if @version_override
338
+ run_cmd!(cmd)
339
+ end
340
+
341
+ def changelog_strict?
342
+ ENV.fetch("K_CHANGELOG_STRICT", "true").downcase != "false"
343
+ end
344
+
345
+ def changelog_coverage_hard?
346
+ ENV.fetch("K_CHANGELOG_COVERAGE_HARD", "true").downcase != "false"
330
347
  end
331
348
 
332
349
  # Update the README KLOC badge number based on the denominator in the current version's COVERAGE line in CHANGELOG.md.
@@ -326,10 +326,10 @@ module Kettle
326
326
  end
327
327
  rescue Exception => e # rubocop:disable Lint/RescueException
328
328
  Kettle::Dev.debug_error(e, __method__)
329
- # :nocov:
329
+ # simplecov:disable
330
330
  # Catch all exceptions in the worker thread boundary, including SystemExit
331
331
  status_q << [c, f, "err"]
332
- # :nocov:
332
+ # simplecov:enable
333
333
  end
334
334
  end
335
335
  end
@@ -3,7 +3,7 @@
3
3
  module Kettle
4
4
  module Dev
5
5
  module Version
6
- VERSION = "2.2.14"
6
+ VERSION = "2.2.16"
7
7
  end
8
8
  VERSION = Version::VERSION # Traditional Constant Location
9
9
  end
data/lib/kettle/dev.rb CHANGED
@@ -19,9 +19,9 @@ end
19
19
  # External gems
20
20
 
21
21
  # It's not reasonable to test this ENV variable
22
- # :nocov:
22
+ # simplecov:disable
23
23
  require "require_bench" if ENV.fetch("REQUIRE_BENCH", "false").casecmp("true").zero?
24
- # :nocov:
24
+ # simplecov:enable
25
25
 
26
26
  # Autoload public CLI/APIs so requiring "kettle-dev" exposes them lazily
27
27
  # for tests and executables. Files will be loaded on first constant access.
@@ -203,9 +203,9 @@ module Kettle
203
203
  Kettle::Soup::Cover.install_tasks
204
204
  # NOTE: Coverage on CI is configured independent of this task.
205
205
  # This task is for local development, as it opens results in browser
206
- # :nocov:
206
+ # simplecov:disable
207
207
  Kettle::Dev.register_default("coverage") unless Kettle::Dev::IS_CI
208
- # :nocov:
208
+ # simplecov:enable
209
209
  rescue LoadError
210
210
  # OK, no soup for you.
211
211
  end
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.14
4
+ version: 2.2.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -339,10 +339,10 @@ licenses:
339
339
  - AGPL-3.0-only
340
340
  metadata:
341
341
  homepage_uri: https://kettle-dev.galtzo.com
342
- source_code_uri: https://github.com/kettle-dev/kettle-dev/tree/v2.2.14
343
- changelog_uri: https://github.com/kettle-dev/kettle-dev/blob/v2.2.14/CHANGELOG.md
342
+ source_code_uri: https://github.com/kettle-dev/kettle-dev/tree/v2.2.16
343
+ changelog_uri: https://github.com/kettle-dev/kettle-dev/blob/v2.2.16/CHANGELOG.md
344
344
  bug_tracker_uri: https://github.com/kettle-dev/kettle-dev/issues
345
- documentation_uri: https://www.rubydoc.info/gems/kettle-dev/2.2.14
345
+ documentation_uri: https://www.rubydoc.info/gems/kettle-dev/2.2.16
346
346
  funding_uri: https://github.com/sponsors/pboling
347
347
  wiki_uri: https://github.com/kettle-dev/kettle-dev/wiki
348
348
  news_uri: https://www.railsbling.com/tags/kettle-dev
metadata.gz.sig CHANGED
Binary file