kettle-dev 2.2.14 → 2.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec2b6c362bca706e061a15f28afde989862a24497273074e8b82a4c845c6b006
4
- data.tar.gz: 6750c11df44f32f1b92b93b77743e2e44d7173082279f6433fd37f3eccd1c0fb
3
+ metadata.gz: 8007b269190013fc1b4f177ef37da4ff9f983846594c9542a4012d5b63ac269b
4
+ data.tar.gz: cf06b1c5653e784f68ea846956e67b840465c5048b6d4c54760f2c06ac74c58e
5
5
  SHA512:
6
- metadata.gz: e23ea3391f369936bcec3d35e38428117b6d839f02df67f9fa4c275d034bd7bcb3caa94cd09d65348804434c710e35f52de96c5d306eecb92f8413a83c56e79d
7
- data.tar.gz: 8a5ad8e56efd578960cb996a22b48cb862630df96907c3cffb70283f5189545e7eb1634a6a1a6c2d0d6de4ceb6be641d0c8336bc73d62afc44eeaab19f77d170
6
+ metadata.gz: 73669d321000c4a0a172b19000821ca7b50efbf0673ed473e6d5fc491e39610c6446b3dde9dd64c2352a31fa04b0f8dcba6a3b3cd9a8231dd8560ea71b25b362
7
+ data.tar.gz: 56d5ce5f39fb93c43ff9a3cfc2c64837a89caab375d21eebe90ffe92c85bf065a91b5c720ebf17b438e5da748db7eb01849f8d1cc43839dd51ffa1eb00bc053a
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,18 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [2.2.15] - 2026-06-21
34
+
35
+ - TAG: [v2.2.15][2.2.15t]
36
+ - COVERAGE: 91.83% -- 4067/4429 lines in 33 files
37
+ - BRANCH COVERAGE: 72.57% -- 1595/2198 branches in 33 files
38
+ - 62.11% documented
39
+
40
+ ### Added
41
+
42
+ - `kettle-bump pre` now bumps prerelease versions by applying `String#next` to
43
+ the prerelease suffix.
44
+
33
45
  ## [2.2.14] - 2026-06-21
34
46
 
35
47
  - TAG: [v2.2.14][2.2.14t]
@@ -2221,7 +2233,9 @@ Please file a bug if you notice a violation of semantic versioning.
2221
2233
  - Selecting will run the selected workflow via `act`
2222
2234
  - This may move to its own gem in the future.
2223
2235
 
2224
- [Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.14...HEAD
2236
+ [Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.15...HEAD
2237
+ [2.2.15]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.14...v2.2.15
2238
+ [2.2.15t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.2.15
2225
2239
  [2.2.14]: https://github.com/kettle-dev/kettle-dev/compare/v2.2.13...v2.2.14
2226
2240
  [2.2.14t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v2.2.14
2227
2241
  [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.429-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
@@ -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
 
@@ -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.15"
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.15
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.15
343
+ changelog_uri: https://github.com/kettle-dev/kettle-dev/blob/v2.2.15/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.15
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