kettle-family 1.3.49 → 1.3.51

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: 4a1e4f4b6baca951c01b749c7c9bfb63c2a77341cb658007dfbccf92eef3c864
4
- data.tar.gz: 2d6ff3898c0ab9d21a9eca28f2c8f7544edb05f4ce9c610290b8ac0d18d52474
3
+ metadata.gz: cca9f3c9bbf384bb2986b3ca786c9310258c19ee6cba6481a6a2f025661964c3
4
+ data.tar.gz: a7e805bebfe396a081fd05a338e65d5bf6aaf06a604ee30c1696a68a759e096e
5
5
  SHA512:
6
- metadata.gz: d57ba98a7fbd78e1425b67a0ae4864cf87b642ba4f3e70c86f8fd1eade261b4135e1680cb595f06d9450c9d41535aaf848a8941305f13cb62e66abab74cd68d4
7
- data.tar.gz: cd2f3eef3b470e54b914d83d893bdcbe95567d498dcff74b68d55c2d1a8f02808e05951f47b40dd96d7ad303070d4104add285829dc96a3642a95ef3634c24fd
6
+ metadata.gz: a94ff6b07e58503f1a49a20c6d231b20bdaeb8ced42b53df42c73f2d507b34832f2d12ecdde52b4b491b00b2e196bde48fb674f2957ba170f747f68edaa57ab4
7
+ data.tar.gz: a16ed9599f89a5f43cbb1c42836dee26bf1f3b79159fbcaf543a49ec5a8a7fccd2dd08453b1b633b7982b340829c7d0522d25365737a3e021576528d93ac5b6b
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,28 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [1.3.51] - 2026-11-26
34
+
35
+ - TAG: [v1.3.51][1.3.51t]
36
+ - COVERAGE: 94.25% -- 8742/9275 lines in 49 files
37
+ - BRANCH COVERAGE: 79.39% -- 3670/4623 branches in 49 files
38
+ - 41.69% documented
39
+
40
+ ### Fixed
41
+
42
+ - release `family_changelog`: commit the updated root `CHANGELOG.md` and any files regenerated by `kettle-changelog` (such as YARD docs) immediately after `family_changelog` succeeds, before member publish worktrees and shared tags run, so releases never leave dirty files behind
43
+
44
+ ## [1.3.50] - 2026-11-26
45
+
46
+ - TAG: [v1.3.50][1.3.50t]
47
+ - COVERAGE: 94.24% -- 8722/9255 lines in 49 files
48
+ - BRANCH COVERAGE: 79.44% -- 3660/4607 branches in 49 files
49
+ - 41.69% documented
50
+
51
+ ### Fixed
52
+
53
+ - manual RubyGems MFA prompt: a typed code is validated (exactly six digits; spaces ignored). The same code pasted more than once (for example 12 characters from a keyboard whose first Enter only woke it) is reduced to its first six digits; anything else is rejected and the prompt asks again, without ever echoing the code, instead of being sent to RubyGems and failing the release
54
+
33
55
  ## [1.3.49] - 2026-11-25
34
56
 
35
57
  - TAG: [v1.3.49][1.3.49t]
@@ -3556,7 +3578,11 @@ Please file a bug if you notice a violation of semantic versioning.
3556
3578
  - Fixed CI load failures on engines without compatible `pty` support by falling back to Open3 for interactive release commands.
3557
3579
  - Fixed Ruby 3.2 version-bump support by loading Prism lazily and wiring the Prism gem only for MRI versions that need it.
3558
3580
 
3559
- [Unreleased]: https://github.com/kettle-dev/kettle-family/compare/v1.3.49...HEAD
3581
+ [Unreleased]: https://github.com/kettle-dev/kettle-family/compare/v1.3.51...HEAD
3582
+ [1.3.51]: https://github.com/kettle-dev/kettle-family/compare/v1.3.50...v1.3.51
3583
+ [1.3.51t]: https://github.com/kettle-dev/kettle-family/releases/tag/v1.3.51
3584
+ [1.3.50]: https://github.com/kettle-dev/kettle-family/compare/v1.3.49...v1.3.50
3585
+ [1.3.50t]: https://github.com/kettle-dev/kettle-family/releases/tag/v1.3.50
3560
3586
  [1.3.49]: https://github.com/kettle-dev/kettle-family/compare/v1.3.48...v1.3.49
3561
3587
  [1.3.49t]: https://github.com/kettle-dev/kettle-family/releases/tag/v1.3.49
3562
3588
  [1.3.48]: https://github.com/kettle-dev/kettle-family/compare/v1.3.47...v1.3.48
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.238-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
1146
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-9.275-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
@@ -70,6 +70,7 @@ module Kettle
70
70
  }.freeze
71
71
 
72
72
  REMIND_EVERY_SECONDS = 60
73
+ OTP_LENGTH = 6
73
74
 
74
75
  def initialize(input: $stdin, output: $stderr, remind_every: REMIND_EVERY_SECONDS)
75
76
  @input = input
@@ -95,19 +96,48 @@ module Kettle
95
96
  @output.print("\a#{label}: ")
96
97
  @output.flush
97
98
  reminder = start_reminder(label, instructions)
98
- value = if @input.respond_to?(:noecho)
99
- @input.noecho(&:gets)
100
- else
101
- @input.gets
99
+ loop do
100
+ value = read_line
101
+ @output.puts
102
+ return value.to_s.chomp unless operation == "rubygems_otp"
103
+
104
+ code, problem = sanitize_otp(value.to_s)
105
+ return code if problem.nil?
106
+
107
+ @output.puts("#{problem} Paste the #{label} again (or press Enter on an empty line to ask the vault again).")
108
+ @output.print("\a#{label}: ")
109
+ @output.flush
102
110
  end
103
- @output.puts
104
- value.to_s.chomp
105
111
  ensure
106
112
  reminder&.kill
107
113
  end
108
114
 
109
115
  private
110
116
 
117
+ def read_line
118
+ @input.respond_to?(:noecho) ? @input.noecho(&:gets) : @input.gets
119
+ end
120
+
121
+ # RubyGems one-time codes are exactly six digits. Pasting into a terminal that is still
122
+ # waking up, or pasting twice, produced twelve characters and a rejected release. Accept
123
+ # a six digit code (spaces and newlines ignored) or the same code pasted several times;
124
+ # reject anything else instead of guessing. Returns [code, nil] or [nil, problem]; an
125
+ # empty answer is kept (it means "ask the vault again"). Never echoes the digits.
126
+ def sanitize_otp(raw)
127
+ cleaned = raw.gsub(/\s+/, "")
128
+ return [cleaned, nil] if cleaned.empty?
129
+ return [nil, "A RubyGems code is six digits, but this has #{cleaned.length} characters, not all digits."] unless cleaned.match?(/\A\d+\z/)
130
+ return [cleaned, nil] if cleaned.length == OTP_LENGTH
131
+
132
+ repeats, remainder = cleaned.length.divmod(OTP_LENGTH)
133
+ if remainder.zero? && repeats > 1 && cleaned == cleaned[0, OTP_LENGTH] * repeats
134
+ @output.puts("Took the first #{OTP_LENGTH} digits: the same code was pasted #{repeats} times.")
135
+ return [cleaned[0, OTP_LENGTH], nil]
136
+ end
137
+
138
+ [nil, "A RubyGems code is #{OTP_LENGTH} digits, but this has #{cleaned.length}."]
139
+ end
140
+
111
141
  def start_reminder(label, instructions)
112
142
  return nil unless @remind_every&.positive?
113
143
 
@@ -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.49"
8
+ VERSION = "1.3.51"
9
9
  end
10
10
  # Current gem version exposed at the traditional constant location.
11
11
  VERSION = Version::VERSION # Traditional Constant Location
@@ -4177,12 +4177,47 @@ module Kettle
4177
4177
  return unless family_changelog_applies_to_selected_members?
4178
4178
 
4179
4179
  member = family_changelog_member
4180
- memo << runner.call(
4180
+ before_dirty = (execute && commit) ? family_root_dirty_paths : []
4181
+ result = runner.call(
4181
4182
  member: member,
4182
4183
  phase: "family_changelog",
4183
4184
  command: family_changelog_command,
4184
4185
  env: family_changelog_env
4185
4186
  )
4187
+ memo << result
4188
+ commit_family_changelog(member: member, runner: runner, memo: memo, before_dirty: before_dirty) if execute && commit && result.ok?
4189
+ end
4190
+
4191
+ def commit_family_changelog(member:, runner:, memo:, before_dirty: [])
4192
+ changelog_rel = config.changelog_path.to_s
4193
+ changelog_rel = "CHANGELOG.md" if changelog_rel.empty?
4194
+ after_dirty = family_root_dirty_paths
4195
+ paths = (after_dirty - before_dirty)
4196
+ paths << changelog_rel if after_dirty.include?(changelog_rel)
4197
+ paths = paths.uniq.sort
4198
+ return if paths.empty?
4199
+
4200
+ version = member&.version.to_s
4201
+ message = version.empty? ? "docs(changelog): 📝 update #{changelog_rel}" : "docs(changelog): 📝 update #{changelog_rel} for v#{version}"
4202
+ quoted_paths = paths.map { |path| Shellwords.escape(path) }.join(" ")
4203
+ quoted_message = Shellwords.escape(message)
4204
+
4205
+ memo << runner.call(
4206
+ member: family_member,
4207
+ phase: "commit_family_changelog",
4208
+ command: [
4209
+ "sh",
4210
+ "-lc",
4211
+ "git add -- #{quoted_paths} && git commit --only -m #{quoted_message} -- #{quoted_paths}"
4212
+ ]
4213
+ )
4214
+ end
4215
+
4216
+ def family_root_dirty_paths
4217
+ out, status = Open3.capture2e("git", "-C", config.root.to_s, "ls-files", "--modified", "--others", "--exclude-standard")
4218
+ return [] unless status.success?
4219
+
4220
+ out.lines.map(&:strip).reject(&:empty?)
4186
4221
  end
4187
4222
 
4188
4223
  def family_changelog_applies_to_selected_members?
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.49
4
+ version: 1.3.51
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -200,7 +200,7 @@ dependencies:
200
200
  -
201
201
  - ">="
202
202
  - !ruby/object:Gem::Version
203
- version: 3.1.31
203
+ version: 3.1.32
204
204
  type: :runtime
205
205
  prerelease: false
206
206
  version_requirements: !ruby/object:Gem::Requirement
@@ -212,7 +212,7 @@ dependencies:
212
212
  -
213
213
  - ">="
214
214
  - !ruby/object:Gem::Version
215
- version: 3.1.31
215
+ version: 3.1.32
216
216
  - !ruby/object:Gem::Dependency
217
217
  name: kettle-gha-pins
218
218
  requirement: !ruby/object:Gem::Requirement
@@ -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.49"
733
- changelog_uri: "https://github.com/kettle-dev/kettle-family/blob/v1.3.49/CHANGELOG.md"
732
+ source_code_uri: "https://github.com/kettle-dev/kettle-family/tree/v1.3.51"
733
+ changelog_uri: "https://github.com/kettle-dev/kettle-family/blob/v1.3.51/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.49"
735
+ documentation_uri: "https://www.rubydoc.info/gems/kettle-family/1.3.51"
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