kettle-dev 3.1.31 → 3.1.32

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: 6dc6dbbd0c403410098d97c9bf12d56073b241db96492a3d53272ea581cd1aa1
4
- data.tar.gz: 18cf1fc3df94d8948cc92813e1290a4d8ff7a0f6706b85e4f974695d9f9ea304
3
+ metadata.gz: 303fb467106510d7b721c570c3e37269a81ddd18c70d5208857f5e0b6dcb9e8d
4
+ data.tar.gz: 2e7f824acb72e33999dcb9a417b046d40231103f6bc0ff81a60a26b29a1a5bb6
5
5
  SHA512:
6
- metadata.gz: 93ad80b29218697907e1bf20f794a04d3ac3d3b090724514bc8dff3d7c23409a89ba4dd30585b9e12210b6e27f9081d9fe8627d3a4630d2d12eaa62581bf865c
7
- data.tar.gz: 84928f50793695a92073da7ecdce1eb18a83350c8b9e22695126e2ddebdbb7f11f346bf54e8f0c1e72c8f7a4600afc65e45bc009c493047ba3560fc58344a279
6
+ metadata.gz: 862bf474d7cbabae096a053da2fd561a3b5bbca3457774cede01855c07a4fcc6f7248dbe2de1dfa8b37cb534eee9058d9b1c84e71ee86244e057d8ac7cc64baf
7
+ data.tar.gz: 66ce63717d0cc434a95ce16bf547033cef186d66570344115e49ed2f0163a7edfd2f1d87a09c3717cab118e00317613c31c06f6418fc0eca3eeef1735443ba83
checksums.yaml.gz.sig CHANGED
Binary file
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
+ ## [3.1.32] - 2026-11-26
34
+
35
+ - TAG: [v3.1.32][3.1.32t]
36
+ - COVERAGE: 92.07% -- 6013/6531 lines in 50 files
37
+ - BRANCH COVERAGE: 76.16% -- 2300/3020 branches in 50 files
38
+ - 55.92% documented
39
+
40
+ ### Fixed
41
+
42
+ - release: a plain `gem push` that RubyGems rejects for an invalid OTP is retried up to three times, each time asking the secrets provider (and so the user) for a fresh code, instead of aborting after RubyGems' own single re-prompt; only the `bundle exec rake release` path had a kettle-level retry before
43
+
33
44
  ## [3.1.31] - 2026-11-20
34
45
 
35
46
  - TAG: [v3.1.31][3.1.31t]
@@ -4386,7 +4397,9 @@ Please file a bug if you notice a violation of semantic versioning.
4386
4397
  - Selecting will run the selected workflow via `act`
4387
4398
  - This may move to its own gem in the future.
4388
4399
 
4389
- [Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v3.1.31...HEAD
4400
+ [Unreleased]: https://github.com/kettle-dev/kettle-dev/compare/v3.1.32...HEAD
4401
+ [3.1.32]: https://github.com/kettle-dev/kettle-dev/compare/v3.1.31...v3.1.32
4402
+ [3.1.32t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v3.1.32
4390
4403
  [3.1.31]: https://github.com/kettle-dev/kettle-dev/compare/v3.1.30...v3.1.31
4391
4404
  [3.1.31t]: https://github.com/kettle-dev/kettle-dev/releases/tag/v3.1.31
4392
4405
  [3.1.30]: https://github.com/kettle-dev/kettle-dev/compare/v3.1.29...v3.1.30
data/README.md CHANGED
@@ -1034,7 +1034,7 @@ Thanks for RTFM. ☺️
1034
1034
  [📌gitmoji]: https://gitmoji.dev
1035
1035
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
1036
1036
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
1037
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-6.520-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
1037
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-6.531-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
1038
1038
  [🔐security]: https://github.com/kettle-dev/kettle-dev/blob/main/SECURITY.md
1039
1039
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
1040
1040
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
@@ -30,6 +30,9 @@ module Kettle
30
30
  class ReleaseCLI
31
31
  RUBYGEMS_INVALID_OTP = /Your OTP code is incorrect\. Please check it and retry\./.freeze
32
32
  OTP_RETRY_DELAY_SECONDS = 2
33
+ # Fresh-OTP retries for a plain `gem push` that RubyGems rejects (a mistyped code, a code
34
+ # from the wrong window). Each retry asks the secrets provider again, which re-prompts.
35
+ GEM_PUSH_OTP_RETRIES = 3
33
36
  GITHUB_RELEASE_ASSET_UPLOAD_ATTEMPTS = 3
34
37
  GITHUB_RELEASE_ASSET_UPLOAD_RETRY_DELAY_SECONDS = 1
35
38
  QUIET_ENV = {
@@ -1792,19 +1795,35 @@ module Kettle
1792
1795
  return self.class.run_cmd!(cmd) unless release_secret_command?(cmd) && release_secrets_configured?
1793
1796
 
1794
1797
  keep_release_secrets_alive!("prompt-bearing command")
1795
- puts "$ #{cmd}"
1796
- stdout_str, stderr_str, status = Kettle::Dev::InteractiveReleaseCommand.new(
1797
- secrets_provider: @secrets_provider,
1798
- secret_event_handler: ->(payload) { emit_secret_event(payload) }
1799
- ).call(
1800
- self.class.send(:command_env_for, cmd),
1801
- cmd
1802
- )
1803
- return if status.success?
1798
+ otp_retries = 0
1799
+ stdout_str = stderr_str = status = nil
1800
+ loop do
1801
+ puts "$ #{cmd}"
1802
+ stdout_str, stderr_str, status = Kettle::Dev::InteractiveReleaseCommand.new(
1803
+ secrets_provider: @secrets_provider,
1804
+ secret_event_handler: ->(payload) { emit_secret_event(payload) }
1805
+ ).call(
1806
+ self.class.send(:command_env_for, cmd),
1807
+ cmd
1808
+ )
1809
+ return if status.success?
1804
1810
 
1805
- if gem_release_command?(cmd) && rubygems_invalid_otp?(stdout_str, stderr_str)
1806
- retry_gem_push_after_invalid_otp!
1807
- return
1811
+ if gem_release_command?(cmd) && rubygems_invalid_otp?(stdout_str, stderr_str)
1812
+ retry_gem_push_after_invalid_otp!
1813
+ return
1814
+ end
1815
+ break unless gem_push_command?(cmd) && rubygems_invalid_otp?(stdout_str, stderr_str) &&
1816
+ otp_retries < GEM_PUSH_OTP_RETRIES
1817
+
1818
+ otp_retries += 1
1819
+ puts "RubyGems rejected the OTP; asking for a fresh one (attempt #{otp_retries}/#{GEM_PUSH_OTP_RETRIES})..."
1820
+ emit_secret_event(
1821
+ source: release_secrets_provider_label,
1822
+ action: "otp_retry",
1823
+ status: "started",
1824
+ reason: "RubyGems rejected the OTP for gem push (retry #{otp_retries}/#{GEM_PUSH_OTP_RETRIES})"
1825
+ )
1826
+ sleep(OTP_RETRY_DELAY_SECONDS)
1808
1827
  end
1809
1828
 
1810
1829
  exit_code = status.respond_to?(:exitstatus) ? status.exitstatus : 1
@@ -1826,6 +1845,10 @@ module Kettle
1826
1845
  effective_command_words(cmd).first(4) == ["bundle", "exec", "rake", "release"]
1827
1846
  end
1828
1847
 
1848
+ def gem_push_command?(cmd)
1849
+ effective_command_words(cmd).first(2) == ["gem", "push"]
1850
+ end
1851
+
1829
1852
  def rubygems_invalid_otp?(*output)
1830
1853
  output.any? { |chunk| chunk.to_s.match?(RUBYGEMS_INVALID_OTP) }
1831
1854
  end
@@ -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.1.31"
8
+ VERSION = "3.1.32"
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.1.31
4
+ version: 3.1.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -476,10 +476,10 @@ licenses:
476
476
  - AGPL-3.0-only
477
477
  metadata:
478
478
  homepage_uri: "https://kettle-dev.galtzo.com"
479
- source_code_uri: "https://github.com/kettle-dev/kettle-dev/tree/v3.1.31"
480
- changelog_uri: "https://github.com/kettle-dev/kettle-dev/blob/v3.1.31/CHANGELOG.md"
479
+ source_code_uri: "https://github.com/kettle-dev/kettle-dev/tree/v3.1.32"
480
+ changelog_uri: "https://github.com/kettle-dev/kettle-dev/blob/v3.1.32/CHANGELOG.md"
481
481
  bug_tracker_uri: "https://github.com/kettle-dev/kettle-dev/issues"
482
- documentation_uri: "https://www.rubydoc.info/gems/kettle-dev/3.1.31"
482
+ documentation_uri: "https://www.rubydoc.info/gems/kettle-dev/3.1.32"
483
483
  funding_uri: "https://github.com/sponsors/pboling"
484
484
  wiki_uri: "https://github.com/kettle-dev/kettle-dev/wiki"
485
485
  news_uri: "https://www.railsbling.com/tags/kettle-dev"
@@ -511,7 +511,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
511
511
  - !ruby/object:Gem::Version
512
512
  version: "0"
513
513
  requirements: []
514
- rubygems_version: 4.1.0
514
+ rubygems_version: 4.1.1
515
515
  specification_version: 4
516
516
  summary: 🍲 A kettle-dev meta tool to streamline development and testing
517
517
  test_files: []
metadata.gz.sig CHANGED
Binary file