kettle-family 1.3.46 → 1.3.47

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: 422fba51f5f3bfb1295aea45a2b41fdd9602274145333e2cce230325479b5e9b
4
- data.tar.gz: a42ddba776d64ac4c641a9139321dcc6b1ec0d3d613ac95527eef20b29e4fdb7
3
+ metadata.gz: 468eefe57ed512cbc6f9df1d2ee29267871f7a4d16bab7997773129c40fdc3d4
4
+ data.tar.gz: 2cc82232efa4e7b2562d143629bd2659f3a1e09d22e6ef6ea54ffc1998e3fd9f
5
5
  SHA512:
6
- metadata.gz: 270849b3df73808ae5d9d7b058d7edddc55c82eaea4754da9c57fa75bb7aaa1c7a68e3e11ce00832d85591d8c57660db1c0c5a59685c405cdbbd4bea82010088
7
- data.tar.gz: ad1287d9b0aed6f6d0b82815c162e425c1e9b897628069e1910f63b515849329d9e7309d3947e25a1a560609f0dbe6f40dd956538dd1b1c5f79798ccfbcbfc4f
6
+ metadata.gz: b61f267789518e3585dddda443b304eaef47ae8aba5a2eebdb11ff0e2006a0b26760fcc22199b57efdcac364c1dfa1bfcee7d5194f7ed9059024b2f2df41f519
7
+ data.tar.gz: 3535d56359464a1379c2f5af36943ddaa1011cd98e30ddd67cf95c5f6f614b799795e993a94f2c88897f695110197ed163e65e0bb3ed46f3b1d97b188e0a403c
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
+ ## [1.3.47] - 2026-11-23
34
+
35
+ - TAG: [v1.3.47][1.3.47t]
36
+ - COVERAGE: 94.21% -- 8686/9220 lines in 49 files
37
+ - BRANCH COVERAGE: 79.25% -- 3637/4589 branches in 49 files
38
+ - 41.76% documented
39
+
40
+ ### Changed
41
+
42
+ - release secrets broker: an empty Enter at the manual MFA/passphrase prompt now asks the vault again (up to 3 attempts) instead of failing every queued member; the prompt states exactly what to paste, and repeats a reminder every minute while waiting
43
+
33
44
  ## [1.3.46] - 2026-11-20
34
45
 
35
46
  - TAG: [v1.3.46][1.3.46t]
@@ -3517,7 +3528,9 @@ Please file a bug if you notice a violation of semantic versioning.
3517
3528
  - Fixed CI load failures on engines without compatible `pty` support by falling back to Open3 for interactive release commands.
3518
3529
  - Fixed Ruby 3.2 version-bump support by loading Prism lazily and wiring the Prism gem only for MRI versions that need it.
3519
3530
 
3520
- [Unreleased]: https://github.com/kettle-dev/kettle-family/compare/v1.3.46...HEAD
3531
+ [Unreleased]: https://github.com/kettle-dev/kettle-family/compare/v1.3.47...HEAD
3532
+ [1.3.47]: https://github.com/kettle-dev/kettle-family/compare/v1.3.46...v1.3.47
3533
+ [1.3.47t]: https://github.com/kettle-dev/kettle-family/releases/tag/v1.3.47
3521
3534
  [1.3.46]: https://github.com/kettle-dev/kettle-family/compare/v1.3.45...v1.3.46
3522
3535
  [1.3.46t]: https://github.com/kettle-dev/kettle-family/releases/tag/v1.3.46
3523
3536
  [1.3.45]: https://github.com/kettle-dev/kettle-family/compare/v1.3.44...v1.3.45
data/README.md CHANGED
@@ -1143,7 +1143,7 @@ If none of the available licenses suit your use case, please [contact us](mailto
1143
1143
  [📌gitmoji]: https://gitmoji.dev
1144
1144
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
1145
1145
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
1146
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-9.197-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
1146
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-9.220-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
1147
1147
  [🔐security]: https://github.com/kettle-dev/kettle-family/blob/main/SECURITY.md
1148
1148
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
1149
1149
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
@@ -69,19 +69,32 @@ module Kettle
69
69
  "rubygems_otp" => "RubyGems MFA code"
70
70
  }.freeze
71
71
 
72
- def initialize(input: $stdin, output: $stderr)
72
+ REMIND_EVERY_SECONDS = 60
73
+
74
+ def initialize(input: $stdin, output: $stderr, remind_every: REMIND_EVERY_SECONDS)
73
75
  @input = input
74
76
  @output = output
77
+ @remind_every = remind_every
75
78
  end
76
79
 
77
80
  def self.for_terminal(input: $stdin, output: $stderr)
78
81
  new(input: input, output: output) if input.respond_to?(:tty?) && input.tty?
79
82
  end
80
83
 
84
+ # Blocks until the user presses Enter. An empty answer means "ask the
85
+ # vault again" (the broker retries the adapter), so the instructions
86
+ # say so, and a reminder repeats once a minute so a long-running release
87
+ # never looks like a silent hang.
81
88
  def ask(operation:, reason: nil)
82
- @output.puts("#{reason}; enter it manually.") if reason
83
- @output.print("#{LABELS.fetch(operation, operation)}: ")
89
+ label = LABELS.fetch(operation, operation)
90
+ instructions = "paste the #{label} and press Enter (nothing is shown while you type or paste), " \
91
+ "or press Enter on an empty line to ask the vault again"
92
+ @output.puts
93
+ @output.puts("🔑 #{label} needed#{": #{reason}" if reason}")
94
+ @output.puts(" Action required: #{instructions}.")
95
+ @output.print("\a#{label}: ")
84
96
  @output.flush
97
+ reminder = start_reminder(label, instructions)
85
98
  value = if @input.respond_to?(:noecho)
86
99
  @input.noecho(&:gets)
87
100
  else
@@ -89,6 +102,25 @@ module Kettle
89
102
  end
90
103
  @output.puts
91
104
  value.to_s.chomp
105
+ ensure
106
+ reminder&.kill
107
+ end
108
+
109
+ private
110
+
111
+ def start_reminder(label, instructions)
112
+ return nil unless @remind_every&.positive?
113
+
114
+ Thread.new do # rubocop:disable ThreadSafety/NewThread -- the reminder must tick while the main thread blocks on terminal input
115
+ waited = 0
116
+ loop do
117
+ sleep(@remind_every)
118
+ waited += @remind_every
119
+ @output.puts("\n⏳ Still waiting for the #{label} (#{waited / 60} min): #{instructions}.")
120
+ @output.print("#{label}: ")
121
+ @output.flush
122
+ end
123
+ end
92
124
  end
93
125
  end
94
126
 
@@ -15,6 +15,8 @@ module Kettle
15
15
  # one release session is shared across sequential and parallel waves.
16
16
  class Broker
17
17
  OPERATIONS = %w[gem_signing_passphrase rubygems_otp].freeze
18
+ # Approval attempts per request: the first plus retries after the user presses Enter on an empty line.
19
+ MAX_APPROVAL_ATTEMPTS = 3
18
20
  UNIX_SOCKET_PATH_MAX = RbConfig::CONFIG["host_os"].include?("darwin") ? 103 : 107
19
21
 
20
22
  attr_reader :path
@@ -118,14 +120,22 @@ module Kettle
118
120
  +""
119
121
  end
120
122
 
121
- provider.public_send(operation)
122
- rescue AuthorizationError => error
123
- message = "#{error.message} (approve the access prompt, then resume the release)"
124
- typed = prompt_user(operation, error.message)
125
- return typed if typed
126
-
127
- @authorization_failure = {at: Process.clock_gettime(Process::CLOCK_MONOTONIC), message: message}
128
- raise Error, message
123
+ attempts = 0
124
+ begin
125
+ attempts += 1
126
+ provider.public_send(operation)
127
+ rescue AuthorizationError => error
128
+ # An empty answer from the user means "ask the vault again", so a
129
+ # blank Enter retries the adapter (re-raising the approval prompt)
130
+ # instead of failing the whole release.
131
+ typed = prompt_user(operation, error.message)
132
+ return typed if typed
133
+ retry if attempts < MAX_APPROVAL_ATTEMPTS && @prompter
134
+
135
+ message = "#{error.message} (approve the access prompt, then resume the release)"
136
+ @authorization_failure = {at: Process.clock_gettime(Process::CLOCK_MONOTONIC), message: message}
137
+ raise Error, message
138
+ end
129
139
  end
130
140
 
131
141
  def prompt_user(operation, reason)
@@ -5,7 +5,7 @@ module Kettle
5
5
  # Version namespace for this gem.
6
6
  module Version
7
7
  # Current gem version.
8
- VERSION = "1.3.46"
8
+ VERSION = "1.3.47"
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-family
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.46
4
+ version: 1.3.47
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -729,10 +729,10 @@ licenses:
729
729
  - AGPL-3.0-only
730
730
  metadata:
731
731
  homepage_uri: "https://structuredmerge.org"
732
- source_code_uri: "https://github.com/kettle-dev/kettle-family/tree/v1.3.46"
733
- changelog_uri: "https://github.com/kettle-dev/kettle-family/blob/v1.3.46/CHANGELOG.md"
732
+ source_code_uri: "https://github.com/kettle-dev/kettle-family/tree/v1.3.47"
733
+ changelog_uri: "https://github.com/kettle-dev/kettle-family/blob/v1.3.47/CHANGELOG.md"
734
734
  bug_tracker_uri: "https://github.com/kettle-dev/kettle-family/issues"
735
- documentation_uri: "https://www.rubydoc.info/gems/kettle-family/1.3.46"
735
+ documentation_uri: "https://www.rubydoc.info/gems/kettle-family/1.3.47"
736
736
  funding_uri: "https://github.com/sponsors/pboling"
737
737
  wiki_uri: "https://github.com/kettle-dev/kettle-family/wiki"
738
738
  news_uri: "https://www.railsbling.com/tags/kettle-family"
metadata.gz.sig CHANGED
Binary file