kettle-dev 3.0.5 → 3.0.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: 667298e18f32020c0774fe6499e6425de5ae71b44c40330ba9fc7e806620de66
4
- data.tar.gz: d992bc999468d8fe27608d0ea470747d0497f98ca9cfbc02c8d82b79a5e0c773
3
+ metadata.gz: 84cc3b69661ffe69649459f3433c0fff925cac38111da9a8b57c0c50360393ac
4
+ data.tar.gz: 16acb8f6caae5d385a135be080b5ceb498fb00a622757851457e42f2d6d8eadf
5
5
  SHA512:
6
- metadata.gz: a9690ba90e3745560e5fee1ab148dd541955fe9aec0a0c15126009da514d46ac1492f73943205a99efe5264dce1f8f07dcb9c87714f2868c23eee277354fc629
7
- data.tar.gz: 90760f66a27b7ac2d6e4524976f2e0756906b7ea4d96b4c98d29862006d06ac4931b04e724a419e3559a955f025d91a59e85b7d8ab1cf2ce95037d449fb760f7
6
+ metadata.gz: 37a33518f764205039e9d58ec5f5cac1f06e5c0bee57779380a809ff7c12b4ba28b2e3c7738f3e723d9a8f4c3a61913603cbaebe8a575e58ee449fe5d7019889
7
+ data.tar.gz: 5530180b41c5654ca106d4d8d92fa496436ef282b035d6d1db4beb0fcc2763248e67326a2ddd104b0a93ed808fc941469bd6509253b6855f5c4507e48df5900f
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,23 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [3.0.6] - 2026-08-11
34
+
35
+ - TAG: [v3.0.6][3.0.6t]
36
+ - COVERAGE: 91.47% -- 5670/6199 lines in 47 files
37
+ - BRANCH COVERAGE: 76.17% -- 2161/2837 branches in 47 files
38
+ - 50.62% documented
39
+
40
+ ### Added
41
+
42
+ - Add --skip-changelog to release without skipping pre-release gates or the default task.
43
+
44
+ ### Fixed
45
+
46
+ - Retry RubyGems publication outside the parent Bundler environment after an expired-edge OTP, with a short delay for TOTP refresh.
47
+
48
+ - Make --skip-changelog releases omit the unpublished standalone kettle-changelog dependency during lockfile normalization.
49
+
33
50
  ## [3.0.5] - 2026-08-10
34
51
 
35
52
  - TAG: [v3.0.5][3.0.5t]
@@ -3464,7 +3481,9 @@ Please file a bug if you notice a violation of semantic versioning.
3464
3481
  - Selecting will run the selected workflow via `act`
3465
3482
  - This may move to its own gem in the future.
3466
3483
 
3467
- [Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v3.0.5...HEAD
3484
+ [Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v3.0.6...HEAD
3485
+ [3.0.6]: https://github.com/kettle-dev/kettle-dev/compare/v3.0.5...v3.0.6
3486
+ [3.0.6t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v3.0.6
3468
3487
  [3.0.5]: https://github.com/kettle-dev/kettle-dev/compare/v3.0.4...v3.0.5
3469
3488
  [3.0.5t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v3.0.5
3470
3489
  [3.0.4]: https://github.com/kettle-dev/kettle-dev/compare/v3.0.3...v3.0.4
data/README.md CHANGED
@@ -107,7 +107,7 @@ out to `kettle-release` for each member that needs publishing.
107
107
 
108
108
  ### Compatibility
109
109
 
110
- Compatible with MRI Ruby 2.4.0+, and concordant releases of JRuby, and TruffleRuby.
110
+ Compatible with MRI Ruby 2.4.0+, JRuby, and TruffleRuby.
111
111
  CI workflows and Appraisals are generated for MRI Ruby 2.4+.
112
112
  This test floor is configured by `ruby.test_minimum` in `.kettle-jem.yml` and
113
113
  may be higher than the gem's runtime compatibility floor when legacy Rubies are
@@ -702,8 +702,7 @@ See [SECURITY.md][🔐security].
702
702
  ## 🤝 Contributing
703
703
 
704
704
  If you need some ideas of where to help, you could work on adding more code coverage,
705
- or if it is already 💯 (see [below](#code-coverage)) check [issues][🤝gh-issues] or [PRs][🤝gh-pulls],
706
- or use the gem and think about how it could be better.
705
+ check [issues][🤝gh-issues] or [PRs][🤝gh-pulls], or use the gem and think about how it could be better.
707
706
 
708
707
  We [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] so if you make changes, remember to update it.
709
708
 
@@ -739,19 +738,6 @@ Made with [contributors-img][🖐contrib-rocks].
739
738
 
740
739
  Also see GitLab Contributors: [https://gitlab.com/kettle-dev/kettle-dev/-/graphs/main][🚎contributors-gl]
741
740
 
742
- <details markdown="1">
743
- <summary>⭐️ Star History</summary>
744
-
745
- <a href="https://star-history.com/kettle-dev/kettle-dev&Date">
746
- <picture>
747
- <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=kettle-dev/kettle-dev&type=Date&theme=dark" />
748
- <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=kettle-dev/kettle-dev&type=Date" />
749
- <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=kettle-dev/kettle-dev&type=Date" />
750
- </picture>
751
- </a>
752
-
753
- </details>
754
-
755
741
  ## 📌 Versioning
756
742
 
757
743
  This library follows [![Semantic Versioning 2.0.0][📌semver-img]][📌semver] for its public API where practical.
@@ -760,7 +746,7 @@ For most applications, prefer the [Pessimistic Version Constraint][📌pvc] with
760
746
  For example:
761
747
 
762
748
  ```ruby
763
- spec.add_dependency("kettle-dev", "~> 2.0")
749
+ spec.add_dependency("kettle-dev", "~> 3.0")
764
750
  ```
765
751
 
766
752
  <details markdown="1">
@@ -1007,7 +993,7 @@ Thanks for RTFM. ☺️
1007
993
  [📌gitmoji]: https://gitmoji.dev
1008
994
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
1009
995
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
1010
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-6.179-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
996
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-6.199-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
1011
997
  [🔐security]: https://github.com/kettle-dev/kettle-dev/blob/main/SECURITY.md
1012
998
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
1013
999
  [📄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
@@ -49,7 +49,7 @@ end
49
49
  # Do not guard with __FILE__ == $PROGRAM_NAME because binstubs use Kernel.load.
50
50
  if ARGV.include?("-h") || ARGV.include?("--help")
51
51
  puts <<~USAGE
52
- Usage: kettle-release [--version VERSION] [--local-ci] [--yes] [--appraisal-update] [--skip-bundle-audit] [--skip-steps STEPS] [--ci-workflows WORKFLOWS] [--skip-remotes REMOTES] [--required-remotes REMOTES] [--secrets-provider NAME] [--json|--events[=TYPES]] [--report PATH] [start_step=<0-19>]
52
+ Usage: kettle-release [--version VERSION] [--local-ci] [--yes] [--appraisal-update] [--skip-changelog] [--skip-bundle-audit] [--skip-steps STEPS] [--ci-workflows WORKFLOWS] [--skip-remotes REMOTES] [--required-remotes REMOTES] [--secrets-provider NAME] [--json|--events[=TYPES]] [--report PATH] [start_step=<0-19>]
53
53
 
54
54
  Automates the release flow for a Ruby gem in the host project.
55
55
 
@@ -87,6 +87,7 @@ if ARGV.include?("-h") || ARGV.include?("--help")
87
87
  --version VERSION # Use this version instead of detecting VERSION from lib/**/version.rb
88
88
  --yes # Auto-approve release confirmation prompts
89
89
  --appraisal-update # Use slower appraisal:update instead of default appraisal:generate
90
+ --skip-changelog # Skip kettle-changelog but retain pre-release gates and the default task
90
91
  --skip-bundle-audit # Skip bundle:audit/update during release rake checks
91
92
  --ci-workflows WORKFLOWS # Comma-separated workflow files or stems to monitor at CI step 10
92
93
  --skip-remotes REMOTES # Comma-separated git remote names to exclude from release fetch/push parity
@@ -175,6 +176,19 @@ def extract_skip_steps_arg!(argv)
175
176
  skip_steps
176
177
  end
177
178
 
179
+ def extract_skip_changelog_arg!(argv)
180
+ skip_changelog = !!argv.delete("--skip-changelog")
181
+ argv.delete_if do |arg|
182
+ if arg.start_with?("skip_changelog=")
183
+ skip_changelog = arg.split("=", 2)[1].to_s.downcase != "false"
184
+ true
185
+ else
186
+ false
187
+ end
188
+ end
189
+ skip_changelog
190
+ end
191
+
178
192
  def extract_ci_workflows_arg!(argv)
179
193
  workflows = nil
180
194
  if (idx = argv.index("--ci-workflows"))
@@ -300,6 +314,7 @@ local_ci = ARGV.include?("--local-ci")
300
314
  yes = !!ARGV.delete("--yes")
301
315
  appraisal_task = ARGV.delete("--appraisal-update") ? "appraisal:update" : nil
302
316
  skip_bundle_audit = !!ARGV.delete("--skip-bundle-audit")
317
+ skip_changelog = extract_skip_changelog_arg!(ARGV)
303
318
  json_output = !!ARGV.delete("--json")
304
319
  events_output, event_types = extract_events_arg!(ARGV)
305
320
  Kettle::Dev::ExitAdapter.abort("--events cannot be combined with --json") if events_output && json_output
@@ -315,7 +330,7 @@ secrets_provider = extract_secrets_provider_arg!(ARGV)
315
330
 
316
331
  begin
317
332
  event_stream = events_output ? Kettle::Ndjson.event_stream($stdout, types: event_types) : nil
318
- Kettle::Dev::ReleaseCLI.new(start_step: start_step, local_ci: local_ci, version: version_override, appraisal_task: appraisal_task, skip_steps: skip_steps, skip_bundle_audit: skip_bundle_audit, ci_workflows: ci_workflows, skip_remotes: skip_remotes, required_remotes: required_remotes, secrets_provider_name: secrets_provider, yes: yes, event_stream: event_stream, json_output: json_output, json_io: $stdout, report_path: report_path).run
333
+ Kettle::Dev::ReleaseCLI.new(start_step: start_step, local_ci: local_ci, version: version_override, appraisal_task: appraisal_task, skip_steps: skip_steps, skip_changelog: skip_changelog, skip_bundle_audit: skip_bundle_audit, ci_workflows: ci_workflows, skip_remotes: skip_remotes, required_remotes: required_remotes, secrets_provider_name: secrets_provider, yes: yes, event_stream: event_stream, json_output: json_output, json_io: $stdout, report_path: report_path).run
319
334
  rescue LoadError => e
320
335
  warn("#{script_basename}: could not load dependency: #{e.class}: #{e.message}")
321
336
  warn(Array(e.backtrace).join("\n")) if ENV["DEBUG"]
@@ -26,6 +26,7 @@ module Kettle
26
26
  module Dev
27
27
  class ReleaseCLI
28
28
  RUBYGEMS_INVALID_OTP = /Your OTP code is incorrect\. Please check it and retry\./.freeze
29
+ OTP_RETRY_DELAY_SECONDS = 2
29
30
  QUIET_ENV = {
30
31
  "KETTLE_JEM_QUIET" => "true",
31
32
  "KETTLE_JEM_DEBUG" => "false",
@@ -125,6 +126,14 @@ module Kettle
125
126
 
126
127
  def command_env_for(cmd)
127
128
  env_hash = command_env
129
+ if gem_push_command?(cmd)
130
+ # RubyGems publication is an unbundled operation. In particular, an
131
+ # OTP retry can run after the parent release task has selected a
132
+ # different Gemfile; carrying that bundle into `gem push` can make
133
+ # RubyGems load stale local dependency state before it publishes.
134
+ return env_hash.merge(BundlerEnvGuard.unbundled_env)
135
+ end
136
+
128
137
  return env_hash unless project_bundle_command?(cmd)
129
138
 
130
139
  env_hash.merge(BundlerEnvGuard.unbundled_env).merge(
@@ -142,6 +151,12 @@ module Kettle
142
151
  false
143
152
  end
144
153
 
154
+ def gem_push_command?(cmd)
155
+ effective_command_words(cmd).first(2) == ["gem", "push"]
156
+ rescue ArgumentError
157
+ false
158
+ end
159
+
145
160
  def effective_command_words(cmd)
146
161
  words = Shellwords.split(cmd.to_s)
147
162
  words.shift while words.first&.match?(/\A[A-Za-z_][A-Za-z0-9_]*=/)
@@ -175,12 +190,13 @@ module Kettle
175
190
 
176
191
  public
177
192
 
178
- def initialize(start_step: 0, local_ci: false, version: nil, appraisal_task: nil, skip_steps: nil, skip_bundle_audit: nil, ci_workflows: nil, skip_remotes: nil, required_remotes: nil, secrets_provider_name: nil, yes: false, **options)
193
+ def initialize(start_step: 0, local_ci: false, version: nil, appraisal_task: nil, skip_steps: nil, skip_changelog: nil, skip_bundle_audit: nil, ci_workflows: nil, skip_remotes: nil, required_remotes: nil, secrets_provider_name: nil, yes: false, **options)
179
194
  @root = Kettle::Dev::CIHelpers.project_root
180
195
  @git = Kettle::Dev::GitAdapter.new(@root)
181
196
  @start_step = (start_step || 0).to_i
182
197
  @start_step = 0 if @start_step < 0
183
198
  @skip_steps = normalize_skip_steps(skip_steps)
199
+ @skip_changelog = truthy_value?(skip_changelog) || truthy_value?(ENV["KETTLE_DEV_SKIP_CHANGELOG"])
184
200
  @ci_workflows = normalize_ci_workflows(ci_workflows || ENV["K_RELEASE_CI_WORKFLOWS"])
185
201
  @skip_remotes = normalize_remote_names(skip_remotes || ENV["K_RELEASE_SKIP_REMOTES"], "skip remotes")
186
202
  @required_remotes = normalize_required_remotes(required_remotes)
@@ -209,8 +225,10 @@ module Kettle
209
225
  status = "ok"
210
226
  error = nil
211
227
  with_bundle_audit_skip_env do
212
- with_machine_stdout_redirect do
213
- run_with_release_environment
228
+ with_skip_changelog_env do
229
+ with_machine_stdout_redirect do
230
+ run_with_release_environment
231
+ end
214
232
  end
215
233
  end
216
234
  rescue SystemExit => e
@@ -637,7 +655,15 @@ module Kettle
637
655
  def run_pre_release_checks!
638
656
  puts "Running pre-release checks via kettle-pre-release..."
639
657
  Kettle::Dev::PreReleaseCLI.new(check_num: 1, event_recorder: @event_recorder).run
640
- run_changelog!
658
+ if skip_changelog?
659
+ puts "Skipping kettle-changelog because --skip-changelog was provided."
660
+ else
661
+ run_changelog!
662
+ end
663
+ end
664
+
665
+ def skip_changelog?
666
+ @skip_changelog
641
667
  end
642
668
 
643
669
  def prepare_release_lockfiles_for_commit!
@@ -1368,6 +1394,10 @@ module Kettle
1368
1394
  status: "started",
1369
1395
  reason: "RubyGems rejected the first OTP"
1370
1396
  )
1397
+ # A rejection at the TOTP boundary can leave the provider returning the
1398
+ # same code for a moment. Wait briefly before starting the retry so the
1399
+ # next prompt can obtain a refreshed code.
1400
+ sleep(OTP_RETRY_DELAY_SECONDS)
1371
1401
  run_cmd!("gem push #{Shellwords.escape(gem_path)}")
1372
1402
  emit_secret_event(
1373
1403
  source: release_secrets_provider_label,
@@ -1489,6 +1519,18 @@ module Kettle
1489
1519
  end
1490
1520
  end
1491
1521
 
1522
+ def with_skip_changelog_env
1523
+ return yield unless skip_changelog?
1524
+
1525
+ previous = ENV["KETTLE_DEV_SKIP_CHANGELOG"]
1526
+ ENV["KETTLE_DEV_SKIP_CHANGELOG"] = "true"
1527
+ yield
1528
+ ensure
1529
+ if skip_changelog?
1530
+ previous.nil? ? ENV.delete("KETTLE_DEV_SKIP_CHANGELOG") : ENV["KETTLE_DEV_SKIP_CHANGELOG"] = previous
1531
+ end
1532
+ end
1533
+
1492
1534
  def git_output(args)
1493
1535
  # Route all git interactions through the GitAdapter so tests can safely mock them
1494
1536
  out, ok = @git.capture(args)
@@ -5,7 +5,7 @@ module Kettle
5
5
  # Version namespace for this gem.
6
6
  module Version
7
7
  # Current gem version.
8
- VERSION = "3.0.5"
8
+ VERSION = "3.0.6"
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-dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5
4
+ version: 3.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -400,10 +400,10 @@ licenses:
400
400
  - AGPL-3.0-only
401
401
  metadata:
402
402
  homepage_uri: https://kettle-dev.galtzo.com
403
- source_code_uri: https://github.com/kettle-dev/kettle-dev/tree/v3.0.5
404
- changelog_uri: https://github.com/kettle-dev/kettle-dev/blob/v3.0.5/CHANGELOG.md
403
+ source_code_uri: https://github.com/kettle-dev/kettle-dev/tree/v3.0.6
404
+ changelog_uri: https://github.com/kettle-dev/kettle-dev/blob/v3.0.6/CHANGELOG.md
405
405
  bug_tracker_uri: https://github.com/kettle-dev/kettle-dev/issues
406
- documentation_uri: https://www.rubydoc.info/gems/kettle-dev/3.0.5
406
+ documentation_uri: https://www.rubydoc.info/gems/kettle-dev/3.0.6
407
407
  funding_uri: https://github.com/sponsors/pboling
408
408
  wiki_uri: https://github.com/kettle-dev/kettle-dev/wiki
409
409
  news_uri: https://www.railsbling.com/tags/kettle-dev
metadata.gz.sig CHANGED
Binary file