kettle-jem 7.1.13 → 7.1.14

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: a5727e30e966bc0b35df82298bf1ed8c7b9724641604e814d0ca3d655a3cd119
4
- data.tar.gz: a1bfadf03c584d245ad03f06466cc133a228f473092865593fe02d7bff5f5d9b
3
+ metadata.gz: e2de3a21e9a9d1fe0ca969b14a89f4345b7ed4fbc327e6f7564eec589876a627
4
+ data.tar.gz: 8347a7586bfe4c4639225f2d0a0e00b196248daa7a6545d9bb7121a5a59b8338
5
5
  SHA512:
6
- metadata.gz: 1abd520d313d7888500f58aa5f6bbf494e56c3e7c10629ba4f5206927bb111ce0b03096b43651caef812006d01134f7e20c8ffe40bb97fc7da0064ee2c897e05
7
- data.tar.gz: cdafb8779bc44d03077368e7db0554e0eb998d15d0960542cb77658c947abec959396f3a60ff16245bf2b6aeabb26b7fd448b1f53cf10616fa83afaddb87a03c
6
+ metadata.gz: dcb29f595007a3416794c42d1c446e5308178409c6ab44aada85c19b723df8aec0ffb9cb66d4836ebaad82f5af73715a525212aea853ffa01a23582da00e7a7d
7
+ data.tar.gz: 498ba447eec84b3a1138b7440ecfe9fa0c7c609553e86227ccd511a352d1d959fce678752cc1f8a4d196d4551065741537576775f72b9df75d53eba11dc5cfea
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,36 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [7.1.14] - 2026-09-01
34
+
35
+ - TAG: [v7.1.14][7.1.14t]
36
+ - COVERAGE: 93.61% -- 11130/11890 lines in 16 files
37
+ - BRANCH COVERAGE: 76.95% -- 4740/6160 branches in 16 files
38
+ - 17.95% documented
39
+
40
+ ### Changed
41
+
42
+ - [kc] kettle-jem-deps-floor: Update kettle-jem template dependency floors:
43
+ - kettle-dev (>= 3.0.24 -> >= 3.0.27)
44
+ - kettle-family (>= 1.2.74 -> >= 1.2.77)
45
+
46
+ - [kc] kettle-jem/template: updated 398 project files:
47
+ - code and tests (20)
48
+ - configuration (12)
49
+ - dependencies (147)
50
+ - documentation (9)
51
+ - other (123)
52
+ - workflows (87)
53
+
54
+ - [kc] kettle-jem-deps-floor: Update kettle-jem template dependency floors:
55
+ - kettle-family (>= 1.2.77 -> >= 1.2.79)
56
+
57
+ ### Fixed
58
+
59
+ - Preserve destination .gitignore rules while adding template ignore rules, retain SSH GitHub sources, and keep Bundler lockfile checksums during template normalization.
60
+
61
+ - Preserve class namespaces and matching RBS declarations when templating version_gem package wrappers.
62
+
33
63
  ## [7.1.13] - 2026-08-31
34
64
 
35
65
  - TAG: [v7.1.13][7.1.13t]
@@ -1746,7 +1776,9 @@ Please file a bug if you notice a violation of semantic versioning.
1746
1776
  - Released kettle-jem as part of the initial StructuredMerge Ruby 7.0.0 gem set.
1747
1777
  - Included packaged templates and parser-backed merge support for Ruby gem templating.
1748
1778
 
1749
- [Unreleased]: https://github.com/structuredmerge/structuredmerge-ruby/compare/v7.1.13...HEAD
1779
+ [Unreleased]: https://github.com/structuredmerge/structuredmerge-ruby/compare/v7.1.14...HEAD
1780
+ [7.1.14]: https://github.com/structuredmerge/structuredmerge-ruby/compare/v7.1.13...v7.1.14
1781
+ [7.1.14t]: https://github.com/structuredmerge/structuredmerge-ruby/releases/tag/v7.1.14
1750
1782
  [7.1.13]: https://github.com/structuredmerge/structuredmerge-ruby/compare/v7.1.12...v7.1.13
1751
1783
  [7.1.13t]: https://github.com/structuredmerge/structuredmerge-ruby/releases/tag/v7.1.13
1752
1784
  [7.1.12]: https://github.com/structuredmerge/structuredmerge-ruby/compare/v7.1.11...v7.1.12
data/README.md CHANGED
@@ -879,7 +879,7 @@ Thanks for RTFM. ☺️
879
879
  [📌gitmoji]: https://gitmoji.dev
880
880
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
881
881
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
882
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-11.860-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
882
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-11.890-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
883
883
  [🔐security]: https://github.com/structuredmerge/structuredmerge-ruby/blob/main/SECURITY.md
884
884
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
885
885
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
@@ -788,7 +788,7 @@ module Kettle
788
788
 
789
789
  def lockfile_normalization_command(project_root)
790
790
  platforms = lockfile_normalization_platforms(project_root)
791
- ["bundle", "lock", *platforms.map { |platform| "--add-platform=#{platform}" }, "--update"]
791
+ ["bundle", "lock", *platforms.map { |platform| "--add-platform=#{platform}" }, "--update", "--add-checksums"]
792
792
  end
793
793
 
794
794
  def lockfile_normalization_platforms(project_root)
@@ -8,6 +8,7 @@
8
8
 
9
9
  source "https://gem.coop"
10
10
 
11
+ git_source(:github) { |repo_name| "git@github.com:#{repo_name}.git" }
11
12
  git_source(:codeberg) { |repo_name| "https://codeberg.org/#{repo_name}" }
12
13
  git_source(:gitlab) { |repo_name| "https://gitlab.com/#{repo_name}" }
13
14
 
@@ -118,7 +118,7 @@ Gem::Specification.new do |spec|
118
118
  # and preferably a modular one (see gemfiles/modular/*.gemfile).
119
119
 
120
120
  # Dev, Test, & Release Tasks
121
- spec.add_development_dependency("kettle-dev", "~> 3.0", ">= 3.0.24") # ruby >= {KJ|MIN_TEST_RUBY}
121
+ spec.add_development_dependency("kettle-dev", "~> 3.0", ">= 3.0.27") # ruby >= {KJ|MIN_TEST_RUBY}
122
122
 
123
123
  # Security
124
124
  spec.add_development_dependency("bundler-audit", "~> 0.9.3") # ruby >= 2.0.0
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.add_dependency "{KJ|SHIMMED_GEM_NAME}"
31
31
 
32
32
  # Dev, Test, & Release Tasks
33
- spec.add_development_dependency("kettle-dev", "~> 3.0", ">= 3.0.24") # ruby >= {KJ|MIN_TEST_RUBY}
33
+ spec.add_development_dependency("kettle-dev", "~> 3.0", ">= 3.0.27") # ruby >= {KJ|MIN_TEST_RUBY}
34
34
 
35
35
  # Tasks
36
36
  spec.add_development_dependency "rake", "~> 13.0"
@@ -5,7 +5,7 @@ module Kettle
5
5
  # Version namespace for this gem.
6
6
  module Version
7
7
  # Current gem version.
8
- VERSION = "7.1.13"
8
+ VERSION = "7.1.14"
9
9
  end
10
10
  # Current gem version exposed at the traditional constant location.
11
11
  VERSION = Version::VERSION # Traditional Constant Location
data/lib/kettle/jem.rb CHANGED
@@ -5442,10 +5442,10 @@ module Kettle
5442
5442
  [
5443
5443
  {name: "appraisal2", source: %(gem "appraisal2", "~> 3.2", ">= 3.2.3"\n)},
5444
5444
  {name: "bundler-audit", source: %(gem "bundler-audit", "~> 0.9.3"\n)},
5445
- {name: "kettle-dev", source: %(gem "kettle-dev", "~> 3.0", ">= 3.0.24"\n)},
5445
+ {name: "kettle-dev", source: %(gem "kettle-dev", "~> 3.0", ">= 3.0.27"\n)},
5446
5446
  {name: "kettle-drift", source: %(gem "kettle-drift", "~> 1.0", ">= 1.0.13"\n)},
5447
- {name: "kettle-family", source: %(gem "kettle-family", "~> 1.2", ">= 1.2.74"\n)},
5448
- {name: "kettle-jem", source: %(gem "kettle-jem", "~> 7.1", ">= 7.1.12"\n)},
5447
+ {name: "kettle-family", source: %(gem "kettle-family", "~> 1.2", ">= 1.2.79"\n)},
5448
+ {name: "kettle-jem", source: %(gem "kettle-jem", "~> 7.1", ">= 7.1.13"\n)},
5449
5449
  {name: "kettle-test", source: %(gem "kettle-test", "~> 2.0", ">= 2.0.21"\n)},
5450
5450
  {name: "rake", source: %(gem "rake", "~> 13.0"\n)},
5451
5451
  {name: "rspec", source: %(gem "rspec", "~> 3.0"\n)},
@@ -5537,6 +5537,12 @@ module Kettle
5537
5537
  preferred_path: entrypoint_path
5538
5538
  )
5539
5539
  entrypoint_path = namespace_superclass_details[:path] if namespace_superclass_details[:path]
5540
+ namespace_kinds_override = existing_version_namespace_kinds(
5541
+ project_root,
5542
+ version_path,
5543
+ namespace,
5544
+ entrypoint_path: entrypoint_path
5545
+ )
5540
5546
  version_gem_bootstrap_step_for_paths(
5541
5547
  project_root,
5542
5548
  facts,
@@ -5547,7 +5553,8 @@ module Kettle
5547
5553
  # the generated version file must reopen as that same class.
5548
5554
  manage_version_file: !templated_paths.include?(version_path) ||
5549
5555
  version_namespace_outer_kind_for_template(project_root, facts, entrypoint_path, version_path, namespace) == :class,
5550
- manage_signature_file: !templated_paths.include?(signature_path)
5556
+ manage_signature_file: !templated_paths.include?(signature_path),
5557
+ namespace_kinds_override: namespace_kinds_override
5551
5558
  )
5552
5559
  end
5553
5560
 
@@ -7912,6 +7919,8 @@ module Kettle
7912
7919
  end
7913
7920
 
7914
7921
  case file_type
7922
+ when :gitignore
7923
+ return merge_gitignore_template_source(template_content, destination_content)
7915
7924
  when :gemspec
7916
7925
  return merge_gemspec_template_source(template_content, destination_content, facts: facts, env: env)
7917
7926
  when :ruby, :gemfile, :rakefile, :appraisals
@@ -12291,6 +12300,7 @@ module Kettle
12291
12300
  relative_path = recipe.fetch(:target_path).to_s
12292
12301
  basename = File.basename(relative_path)
12293
12302
  extension = File.extname(relative_path).downcase
12303
+ return :gitignore if basename == ".gitignore"
12294
12304
  return :gemfile if basename == "Gemfile" || basename.end_with?(".gemfile")
12295
12305
  return :appraisals if basename.start_with?("Appraisals") || basename == "Appraisal.root.gemfile"
12296
12306
  return :gemspec if basename.end_with?(".gemspec")
@@ -12311,6 +12321,40 @@ module Kettle
12311
12321
  :text
12312
12322
  end
12313
12323
 
12324
+ def merge_gitignore_template_source(template_content, destination_content)
12325
+ # Git ignore files have no parser-backed AST. Treat each non-comment line
12326
+ # as a rule node, retain destination order and comments, and append only
12327
+ # template rules that the destination does not already declare.
12328
+ destination_rules = destination_content.lines.map(&:strip).reject { |line| line.empty? || line.start_with?("#") }.to_set
12329
+ additions = []
12330
+ pending_comments = []
12331
+
12332
+ template_content.lines.each do |line|
12333
+ stripped = line.strip
12334
+ if stripped.empty?
12335
+ pending_comments << line unless pending_comments.empty?
12336
+ next
12337
+ end
12338
+ if stripped.start_with?("#")
12339
+ pending_comments << line
12340
+ next
12341
+ end
12342
+ next if destination_rules.include?(stripped)
12343
+
12344
+ additions.concat(pending_comments)
12345
+ additions << line
12346
+ destination_rules << stripped
12347
+ pending_comments = []
12348
+ end
12349
+
12350
+ return destination_content if additions.empty?
12351
+
12352
+ output = destination_content.dup
12353
+ output << "\n" unless output.empty? || output.end_with?("\n\n")
12354
+ output << additions.join
12355
+ ensure_trailing_newline(output)
12356
+ end
12357
+
12314
12358
  def apply_kettle_config_bootstrap(project_root, recipe, env: ENV, template_contents: nil)
12315
12359
  content = recipe_template_content(project_root, recipe, template_contents: template_contents)
12316
12360
  tokens = stringify_template_tokens(recipe.fetch(:template_tokens, {}))
@@ -14497,6 +14541,9 @@ module Kettle
14497
14541
  version = "0.0.1.pre" if version.empty?
14498
14542
  return {} if namespace.empty?
14499
14543
 
14544
+ namespace_kinds = version_namespace_kinds_from_facts(facts)
14545
+ outer_namespace_kind = namespace_kinds.fetch(namespace.split("::").length - 1, :module)
14546
+
14500
14547
  version_rb = if facts.dig(:shim, :version_strategy).to_s == "shim"
14501
14548
  shim_version_file_content(
14502
14549
  namespace: namespace,
@@ -14504,7 +14551,13 @@ module Kettle
14504
14551
  replacement_require: facts.dig(:shim, :replacement_require)
14505
14552
  )
14506
14553
  else
14507
- version_gem_version_file_content(existing_version: "", namespace: namespace, version: version)
14554
+ version_gem_version_file_content(
14555
+ existing_version: "",
14556
+ namespace: namespace,
14557
+ version: version,
14558
+ outer_namespace_kind: outer_namespace_kind,
14559
+ namespace_kinds: namespace_kinds
14560
+ )
14508
14561
  end
14509
14562
 
14510
14563
  {
@@ -14515,7 +14568,11 @@ module Kettle
14515
14568
  entrypoint_require: facts.dig(:rubygems, :entrypoint_require).to_s,
14516
14569
  dedicated: true
14517
14570
  ).chomp,
14518
- "KJ|VERSION_GEM:VERSION_RBS" => version_gem_signature_file_content(namespace: namespace).chomp
14571
+ "KJ|VERSION_GEM:VERSION_RBS" => version_gem_signature_file_content(
14572
+ namespace: namespace,
14573
+ outer_namespace_kind: outer_namespace_kind,
14574
+ namespace_kinds: namespace_kinds
14575
+ ).chomp
14519
14576
  }
14520
14577
  end
14521
14578
 
@@ -15333,7 +15390,7 @@ module Kettle
15333
15390
  def main_gemfile_kettle_family_gem(package_name)
15334
15391
  return "" if package_name.to_s == "kettle-family"
15335
15392
 
15336
- %(gem "kettle-family", "~> 1.2", ">= 1.2.74"\n)
15393
+ %(gem "kettle-family", "~> 1.2", ">= 1.2.79"\n)
15337
15394
  end
15338
15395
 
15339
15396
  def main_gemfile_nomono_bootstrap(package_name)
@@ -15417,12 +15474,13 @@ module Kettle
15417
15474
  end
15418
15475
 
15419
15476
  def version_gem_bootstrap_step_for_paths(project_root, facts, manage_version_file: true, manage_signature_file: true,
15420
- package_entrypoint_preexisting: true, preserve_version_module_include: nil)
15477
+ package_entrypoint_preexisting: true, preserve_version_module_include: nil, namespace_kinds_override: {})
15421
15478
  package_name = facts.dig(:package, :name).to_s
15422
15479
  return {name: "version_gem_bootstrap", status: "unavailable", reason: "missing_package_facts"} if package_name.empty?
15423
15480
 
15424
15481
  entrypoint_require = facts.dig(:rubygems, :entrypoint_require).to_s
15425
15482
  entrypoint_require = package_name.tr("-", "/") if entrypoint_require.empty?
15483
+ namespace = facts.dig(:rubygems, :namespace).to_s
15426
15484
  version_path = File.join("lib", entrypoint_require, "version.rb")
15427
15485
  entrypoint_path = version_gem_bootstrap_entrypoint_path(
15428
15486
  project_root,
@@ -15435,7 +15493,6 @@ module Kettle
15435
15493
  version_spec_path = File.join("spec", entrypoint_require, "version_spec.rb")
15436
15494
  signature_path = File.join("sig", "#{entrypoint_require}.rbs")
15437
15495
  legacy_signature_paths = legacy_rbs_signature_paths(project_root, entrypoint_require)
15438
- namespace = facts.dig(:rubygems, :namespace).to_s
15439
15496
  if namespace.empty?
15440
15497
  namespace = existing_entrypoint_version_namespace(
15441
15498
  project_root,
@@ -15475,14 +15532,17 @@ module Kettle
15475
15532
  version = "0.0.1.pre" if version.empty?
15476
15533
  changes = []
15477
15534
  current_entrypoint = read_project_file(project_root, entrypoint_path)
15478
- outer_namespace_kind = ruby_entrypoint_outer_namespace_kind(current_entrypoint, namespace)
15479
- namespace_kinds = version_namespace_kinds_from_facts(facts).merge(
15480
- existing_version_namespace_kinds(
15481
- project_root,
15482
- version_path,
15483
- namespace,
15484
- entrypoint_path: entrypoint_path
15485
- )
15535
+ discovered_namespace_kinds = existing_version_namespace_kinds(
15536
+ project_root,
15537
+ version_path,
15538
+ namespace,
15539
+ entrypoint_path: entrypoint_path
15540
+ )
15541
+ namespace_kinds = version_namespace_kinds_from_facts(facts).merge(discovered_namespace_kinds)
15542
+ namespace_kinds = namespace_kinds.merge(namespace_kinds_override)
15543
+ outer_namespace_kind = namespace_kinds.fetch(
15544
+ namespace.split("::").length - 1,
15545
+ ruby_entrypoint_outer_namespace_kind(current_entrypoint, namespace)
15486
15546
  )
15487
15547
  preserve_version_module_include = existing_version_file_includes_version_module?(project_root, version_path) if preserve_version_module_include.nil?
15488
15548
 
@@ -15550,7 +15610,9 @@ module Kettle
15550
15610
  project_root,
15551
15611
  signature_path,
15552
15612
  legacy_signature_paths,
15553
- namespace: namespace
15613
+ namespace: namespace,
15614
+ outer_namespace_kind: outer_namespace_kind,
15615
+ namespace_kinds: namespace_kinds
15554
15616
  )
15555
15617
  )
15556
15618
  end
@@ -15841,8 +15903,13 @@ module Kettle
15841
15903
  end
15842
15904
  end
15843
15905
 
15844
- def write_consolidated_version_signature(project_root, signature_path, legacy_signature_paths, namespace:)
15845
- template = version_gem_signature_file_content(namespace: namespace)
15906
+ def write_consolidated_version_signature(project_root, signature_path, legacy_signature_paths, namespace:,
15907
+ outer_namespace_kind: :module, namespace_kinds: {})
15908
+ template = version_gem_signature_file_content(
15909
+ namespace: namespace,
15910
+ outer_namespace_kind: outer_namespace_kind,
15911
+ namespace_kinds: namespace_kinds
15912
+ )
15846
15913
  current = read_project_file(project_root, signature_path)
15847
15914
  merged = current
15848
15915
  legacy_signature_paths.each do |legacy_signature_path|
@@ -15932,7 +15999,7 @@ module Kettle
15932
15999
  "#{sections.reject(&:empty?).join("\n\n")}\n"
15933
16000
  end
15934
16001
 
15935
- def version_gem_signature_file_content(namespace:)
16002
+ def version_gem_signature_file_content(namespace:, outer_namespace_kind: :module, namespace_kinds: {})
15936
16003
  body = [
15937
16004
  "module Version",
15938
16005
  " VERSION: String",
@@ -15940,7 +16007,7 @@ module Kettle
15940
16007
  "VERSION: String"
15941
16008
  ]
15942
16009
 
15943
- "#{wrap_ruby_namespace(namespace, body).join("\n")}\n"
16010
+ "#{wrap_ruby_namespace(namespace, body, outer_namespace_kind: outer_namespace_kind, namespace_kinds: namespace_kinds).join("\n")}\n"
15944
16011
  end
15945
16012
 
15946
16013
  def version_gem_bootstrap_entrypoint_content(content, namespace:, entrypoint_require:, namespace_superclasses: {}, version_require_path: nil)
@@ -18346,6 +18413,7 @@ module Kettle
18346
18413
  def default_template_strategy_config(template_root, target_path)
18347
18414
  return unless template_root.fetch(:kind) == "packaged"
18348
18415
  return {strategy: :merge, preference: :destination, add_template_only_nodes: true} if target_path.to_s == KETTLE_CONFIG_PATH
18416
+ return {strategy: :merge, preference: :destination, add_template_only_nodes: true} if target_path.to_s == ".gitignore"
18349
18417
  return {strategy: :accept_template} if target_path.to_s == "CITATION.cff"
18350
18418
  return {strategy: :merge, preference: :destination, add_template_only_nodes: true} if target_path.to_s == "Rakefile"
18351
18419
  return {strategy: :accept_template} if version_gem_template_target_path?(target_path)
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kettle-jem
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.13
4
+ version: 7.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -976,10 +976,10 @@ licenses:
976
976
  - PolyForm-Small-Business-1.0.0
977
977
  metadata:
978
978
  homepage_uri: https://structuredmerge.org
979
- source_code_uri: https://github.com/structuredmerge/structuredmerge-ruby/tree/v7.1.13
980
- changelog_uri: https://github.com/structuredmerge/structuredmerge-ruby/blob/v7.1.13/CHANGELOG.md
979
+ source_code_uri: https://github.com/structuredmerge/structuredmerge-ruby/tree/v7.1.14
980
+ changelog_uri: https://github.com/structuredmerge/structuredmerge-ruby/blob/v7.1.14/CHANGELOG.md
981
981
  bug_tracker_uri: https://github.com/structuredmerge/structuredmerge-ruby/issues
982
- documentation_uri: https://www.rubydoc.info/gems/kettle-jem/7.1.13
982
+ documentation_uri: https://www.rubydoc.info/gems/kettle-jem/7.1.14
983
983
  funding_uri: https://github.com/sponsors/pboling
984
984
  wiki_uri: https://github.com/structuredmerge/structuredmerge-ruby/wiki
985
985
  news_uri: https://www.railsbling.com/tags/kettle-jem
metadata.gz.sig CHANGED
Binary file