kettle-family 1.2.8 → 1.2.9

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: 29d07c7927fc1e4369d1deaf88fe88855c533f1f2794f012a5452705df3c332c
4
- data.tar.gz: 24eece688e92ec4253be48cf041d6e97ae3457f3668215dbc1edb82c13160eb0
3
+ metadata.gz: 474dff47cad0747a8328ad14c08eda3c04ef0fc37d3f078f3c3b3c07a71be282
4
+ data.tar.gz: 98805c6965950435d49971dba56b44f7f03e0fbc29525fde74df8a6f958051e4
5
5
  SHA512:
6
- metadata.gz: d47c545b53878e0fa85111529a912263f829293ec111d7d929936d84dde80b9e9504fe123674c3b903bd360ab73d889cc88dbc65a5fd4f9ff07bed50a1f00637
7
- data.tar.gz: 7198da5864c986c0e5b8a94b07e67fa5153588fb179f87d073972baa5b51b97f6814d576cc20d1565acaf068a0310c695d3eec06c0264c706fb2802aae345a79
6
+ metadata.gz: 20db1e16211f9a9ef03facee953930043c19a4a2a5004f5ae0fcabec6bb2bc9bc779dff453ea33d6a4f498ad53c3fe0557ce36a94acec30d05a6ea20c61ab68a
7
+ data.tar.gz: b4519fa9ce27b70185f1bba643859257f2a639ef0640e4361e77d902c86a51a9194c4d570ef3ba059970b46a74528163d67ed5df4ade5ea83833e7f95bdc4e6a
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,19 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [1.2.9] - 2026-07-30
34
+
35
+ - TAG: [v1.2.9][1.2.9t]
36
+ - COVERAGE: 94.00% -- 3698/3934 lines in 27 files
37
+ - BRANCH COVERAGE: 76.24% -- 1409/1848 branches in 27 files
38
+ - 28.01% documented
39
+
40
+ ### Fixed
41
+
42
+ - Shared-root changelog release phases now run `kettle-changelog` inside the
43
+ member gem that owns the configured shared version file, while passing the
44
+ root changelog path explicitly.
45
+
33
46
  ## [1.2.8] - 2026-07-29
34
47
 
35
48
  - TAG: [v1.2.8][1.2.8t]
@@ -39,6 +52,13 @@ Please file a bug if you notice a violation of semantic versioning.
39
52
 
40
53
  ### Fixed
41
54
 
55
+ - Monorepo `kettle-family template` now runs local `kettle-jem` through its
56
+ checked-out `exe/kettle-jem` when `STRUCTUREDMERGE_DEV` points at a local
57
+ stack, avoiding transient RubyGems executable wrapper failures during highly
58
+ parallel templating.
59
+ - Deferred monorepo template commits now hold the same shared Git operation lock
60
+ passed to `kettle-jem`, preventing `.git/index.lock` races with member
61
+ templating Git preflight checks.
42
62
  - `kettle-family bup` and `bupb` now disable family local-path envs even when
43
63
  `release.env` already sets those keys to false, avoiding leaked monorepo roots
44
64
  such as `STRUCTUREDMERGE_DEV=/path/to/family/root` during bundle updates.
@@ -1306,7 +1326,9 @@ Please file a bug if you notice a violation of semantic versioning.
1306
1326
  - Fixed CI load failures on engines without compatible `pty` support by falling back to Open3 for interactive release commands.
1307
1327
  - Fixed Ruby 3.2 version-bump support by loading Prism lazily and wiring the Prism gem only for MRI versions that need it.
1308
1328
 
1309
- [Unreleased]: https://github.com/kettle-dev/kettle-family/compare/v1.2.8...HEAD
1329
+ [Unreleased]: https://github.com/kettle-dev/kettle-family/compare/v1.2.9...HEAD
1330
+ [1.2.9]: https://github.com/kettle-dev/kettle-family/compare/v1.2.8...v1.2.9
1331
+ [1.2.9t]: https://github.com/kettle-dev/kettle-family/releases/tag/v1.2.9
1310
1332
  [1.2.8]: https://github.com/kettle-dev/kettle-family/compare/v1.2.7...v1.2.8
1311
1333
  [1.2.8t]: https://github.com/kettle-dev/kettle-family/releases/tag/v1.2.8
1312
1334
  [1.2.7]: https://github.com/kettle-dev/kettle-family/compare/v1.2.6...v1.2.7
data/README.md CHANGED
@@ -814,7 +814,7 @@ Thanks for RTFM. ☺️
814
814
  [📌gitmoji]: https://gitmoji.dev
815
815
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
816
816
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
817
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-3.886-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
817
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-3.934-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
818
818
  [🔐security]: https://github.com/kettle-dev/kettle-family/blob/main/SECURITY.md
819
819
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
820
820
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
@@ -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.2.8"
8
+ VERSION = "1.2.9"
9
9
  end
10
10
  # Current gem version exposed at the traditional constant location.
11
11
  VERSION = Version::VERSION # Traditional Constant Location
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "io/console"
4
+ require "fileutils"
4
5
  require "json"
5
6
  require "net/http"
6
7
  require "etc"
@@ -983,14 +984,45 @@ module Kettle
983
984
  def append_family_changelog_result(runner:, memo:)
984
985
  return unless config.release_family_changelog?
985
986
 
987
+ member = family_changelog_member
986
988
  memo << runner.call(
987
- member: family_member,
989
+ member: member,
988
990
  phase: "family_changelog",
989
991
  command: family_changelog_command,
990
- env: release_env.merge(config.changelog_env)
992
+ env: family_changelog_env
991
993
  )
992
994
  end
993
995
 
996
+ def family_changelog_member
997
+ return family_member unless config.shared_changelog?
998
+
999
+ version_file = config.changelog_version_file.to_s
1000
+ raise Error, "shared root changelog release requires changelog.version_file" if version_file.empty?
1001
+
1002
+ version_path = File.expand_path(version_file, config.root)
1003
+ member = members.find { |candidate| path_inside?(version_path, candidate.root) }
1004
+ return member if member
1005
+
1006
+ raise Error, "shared root changelog version file #{version_file} is not inside any selected family member"
1007
+ end
1008
+
1009
+ def family_changelog_env
1010
+ env = release_env.merge(config.changelog_env)
1011
+ return env unless config.shared_changelog?
1012
+
1013
+ env.merge(
1014
+ "K_CHANGELOG_GEM_NAME" => config.family_name.to_s,
1015
+ "K_CHANGELOG_PATH" => File.expand_path(config.changelog_path, config.root),
1016
+ "K_CHANGELOG_VERSION_FILE" => File.expand_path(config.changelog_version_file, config.root)
1017
+ )
1018
+ end
1019
+
1020
+ def path_inside?(path, root)
1021
+ expanded_path = File.expand_path(path)
1022
+ expanded_root = File.expand_path(root)
1023
+ expanded_path == expanded_root || expanded_path.start_with?("#{expanded_root}#{File::SEPARATOR}")
1024
+ end
1025
+
994
1026
  def release_phase
995
1027
  publish ? "release_publish" : "release_build"
996
1028
  end
@@ -1327,12 +1359,14 @@ module Kettle
1327
1359
 
1328
1360
  def template_command(member)
1329
1361
  command_text = config.template_command || default_template_command(member)
1362
+ command_text = localize_kettle_jem_template_command(command_text)
1330
1363
  command_text = append_template_family_args(command_text) if kettle_jem_template_command?(command_text)
1331
1364
  append_template_skip_commit(command_text)
1332
1365
  end
1333
1366
 
1334
1367
  def template_prepare_command(member)
1335
1368
  command_text = template_prepare_command_from(config.template_command || default_template_command(member))
1369
+ command_text = localize_kettle_jem_template_command(command_text)
1336
1370
  command_text = append_template_family_args(command_text)
1337
1371
  append_template_skip_commit(command_text)
1338
1372
  end
@@ -1451,7 +1485,47 @@ module Kettle
1451
1485
  end
1452
1486
 
1453
1487
  def kettle_jem_template_command?(command_text)
1454
- command_text.is_a?(Array) ? command_text.map(&:to_s).include?("kettle-jem") : command_text.to_s.include?("kettle-jem")
1488
+ if command_text.is_a?(Array)
1489
+ command_text.map(&:to_s).any? { |token| token == "kettle-jem" || File.basename(token) == "kettle-jem" }
1490
+ else
1491
+ command_text.to_s.include?("kettle-jem")
1492
+ end
1493
+ end
1494
+
1495
+ def localize_kettle_jem_template_command(command_text)
1496
+ executable = local_kettle_jem_executable
1497
+ return command_text unless executable
1498
+
1499
+ if command_text.is_a?(Array)
1500
+ argv = command_text.map(&:to_s)
1501
+ index = argv.index("kettle-jem")
1502
+ return command_text unless index
1503
+
1504
+ argv[0...index] + [RbConfig.ruby, executable] + argv[(index + 1)..]
1505
+ else
1506
+ command_text.to_s.sub(/\bkettle-jem\b/, "#{Shellwords.escape(RbConfig.ruby)} #{Shellwords.escape(executable)}")
1507
+ end
1508
+ end
1509
+
1510
+ def local_kettle_jem_executable
1511
+ root = template_local_kettle_jem_root
1512
+ return nil unless root
1513
+
1514
+ candidate = File.join(root, "kettle-jem", "exe", "kettle-jem")
1515
+ File.file?(candidate) ? candidate : nil
1516
+ end
1517
+
1518
+ def template_local_kettle_jem_root
1519
+ values = [
1520
+ env_overrides["STRUCTUREDMERGE_DEV"],
1521
+ workflow_family_local_path_env["STRUCTUREDMERGE_DEV"],
1522
+ ENV["STRUCTUREDMERGE_DEV"]
1523
+ ].compact.map(&:to_s).map(&:strip)
1524
+ values.find do |value|
1525
+ !value.empty? &&
1526
+ !%w[false 0 no off].include?(value.downcase) &&
1527
+ File.directory?(File.join(value, "kettle-jem"))
1528
+ end
1455
1529
  end
1456
1530
 
1457
1531
  def append_template_family_args(command_text)
@@ -1903,7 +1977,20 @@ module Kettle
1903
1977
  end
1904
1978
 
1905
1979
  def synchronize_template_commit(&block)
1906
- @template_commit_mutex.synchronize(&block)
1980
+ @template_commit_mutex.synchronize do
1981
+ lock_path = monorepo_template? ? template_git_commit_lock_path : nil
1982
+ if lock_path
1983
+ FileUtils.mkdir_p(File.dirname(lock_path))
1984
+ File.open(lock_path, File::RDWR | File::CREAT, 0o644) do |lock|
1985
+ lock.flock(File::LOCK_EX)
1986
+ block.call
1987
+ ensure
1988
+ lock&.flock(File::LOCK_UN)
1989
+ end
1990
+ else
1991
+ block.call
1992
+ end
1993
+ end
1907
1994
  end
1908
1995
 
1909
1996
  def template_prepare_env
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.2.8
4
+ version: 1.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -74,7 +74,7 @@ dependencies:
74
74
  version: '2.3'
75
75
  - - ">="
76
76
  - !ruby/object:Gem::Version
77
- version: 2.3.10
77
+ version: 2.5.7
78
78
  type: :runtime
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
@@ -84,7 +84,7 @@ dependencies:
84
84
  version: '2.3'
85
85
  - - ">="
86
86
  - !ruby/object:Gem::Version
87
- version: 2.3.10
87
+ version: 2.5.7
88
88
  - !ruby/object:Gem::Dependency
89
89
  name: kettle-test
90
90
  requirement: !ruby/object:Gem::Requirement
@@ -341,10 +341,10 @@ licenses:
341
341
  - AGPL-3.0-only
342
342
  metadata:
343
343
  homepage_uri: https://kettle-family.galtzo.com
344
- source_code_uri: https://github.com/kettle-dev/kettle-family/tree/v1.2.8
345
- changelog_uri: https://github.com/kettle-dev/kettle-family/blob/v1.2.8/CHANGELOG.md
344
+ source_code_uri: https://github.com/kettle-dev/kettle-family/tree/v1.2.9
345
+ changelog_uri: https://github.com/kettle-dev/kettle-family/blob/v1.2.9/CHANGELOG.md
346
346
  bug_tracker_uri: https://github.com/kettle-dev/kettle-family/issues
347
- documentation_uri: https://www.rubydoc.info/gems/kettle-family/1.2.8
347
+ documentation_uri: https://www.rubydoc.info/gems/kettle-family/1.2.9
348
348
  funding_uri: https://github.com/sponsors/pboling
349
349
  wiki_uri: https://github.com/kettle-dev/kettle-family/wiki
350
350
  news_uri: https://www.railsbling.com/tags/kettle-family
metadata.gz.sig CHANGED
Binary file