kettle-jem 7.1.7 → 7.1.8
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +22 -1
- data/README.md +23 -1
- data/lib/kettle/jem/templates/.structuredmerge/kettle-jem.yml.example +25 -7
- data/lib/kettle/jem/version.rb +1 -1
- data/lib/kettle/jem.rb +107 -22
- data.tar.gz.sig +0 -0
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f6c5f5fc9bc53f2126159023d8c5648b14d48bf686a3db540d79468848fb3d30
|
|
4
|
+
data.tar.gz: f44a05f17df8cb139e53b1bae7be96c439eada3e4f958387175e161ba08bf93b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fdafbae49efd6f2858c718ee4b7df6a14502c561e8d98b9bf11c96d5b1795b4710f2eb0aeddb3951392d9ec164afb533aa7db4d56ea6ea7cb44da21bc9398efa
|
|
7
|
+
data.tar.gz: 186e8070d0d5aed6c18d6db8937e3d267ac38bef6703f2e5445b6bdfffc6cf2da9a097f63b580084c7eabce82fe7631eaa6da18c45ddfe09da1fe2133bb7a55f
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,25 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [7.1.8] - 2026-08-26
|
|
34
|
+
|
|
35
|
+
- TAG: [v7.1.8][7.1.8t]
|
|
36
|
+
- COVERAGE: 93.68% -- 10873/11606 lines in 16 files
|
|
37
|
+
- BRANCH COVERAGE: 77.22% -- 4640/6009 branches in 16 files
|
|
38
|
+
- 17.93% documented
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- Gemspec author metadata now expands existing authors with Git-derived copyright holders and consolidates configured author aliases, while applying the documented default machine-account filter.
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
|
|
46
|
+
- Copyright filtering now excludes bot-marker identities and the packaged template seeds shared author aliases and machine-account defaults.
|
|
47
|
+
|
|
48
|
+
- [kc] kettle-jem-deps-floor: Update kettle-jem template dependency floors:
|
|
49
|
+
- kettle-family (>= 1.2.61 -> >= 1.2.62)
|
|
50
|
+
- kettle-jem (>= 7.1.6 -> >= 7.1.7)
|
|
51
|
+
|
|
33
52
|
## [7.1.7] - 2026-08-26
|
|
34
53
|
|
|
35
54
|
- TAG: [v7.1.7][7.1.7t]
|
|
@@ -1602,7 +1621,9 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
1602
1621
|
- Released kettle-jem as part of the initial StructuredMerge Ruby 7.0.0 gem set.
|
|
1603
1622
|
- Included packaged templates and parser-backed merge support for Ruby gem templating.
|
|
1604
1623
|
|
|
1605
|
-
[Unreleased]: https://github.com/structuredmerge/structuredmerge-ruby/compare/v7.1.
|
|
1624
|
+
[Unreleased]: https://github.com/structuredmerge/structuredmerge-ruby/compare/v7.1.8...HEAD
|
|
1625
|
+
[7.1.8]: https://github.com/structuredmerge/structuredmerge-ruby/compare/v7.1.7...v7.1.8
|
|
1626
|
+
[7.1.8t]: https://github.com/structuredmerge/structuredmerge-ruby/releases/tag/v7.1.8
|
|
1606
1627
|
[7.1.7]: https://github.com/structuredmerge/structuredmerge-ruby/compare/v7.1.6...v7.1.7
|
|
1607
1628
|
[7.1.7t]: https://github.com/structuredmerge/structuredmerge-ruby/releases/tag/v7.1.7
|
|
1608
1629
|
[7.1.6]: https://github.com/structuredmerge/structuredmerge-ruby/compare/v7.1.5...v7.1.6
|
data/README.md
CHANGED
|
@@ -202,6 +202,15 @@ readme:
|
|
|
202
202
|
machine_users:
|
|
203
203
|
- dependabot
|
|
204
204
|
|
|
205
|
+
# Map alternate Git author names or email addresses to one canonical name.
|
|
206
|
+
# The canonical names are used in generated LICENSE.md and gemspec metadata.
|
|
207
|
+
author_aliases:
|
|
208
|
+
pboling: "Peter H. Boling"
|
|
209
|
+
"|7eter l-|. l3oling": "Peter H. Boling"
|
|
210
|
+
"Peter Boling": "Peter H. Boling"
|
|
211
|
+
galtzo: "Peter H. Boling"
|
|
212
|
+
Aboling0: "Annibelle Boling"
|
|
213
|
+
|
|
205
214
|
# Maximum allowed divergence (%) for selftest CI check
|
|
206
215
|
min_divergence_threshold: 5 # ENV override: KJ_MIN_DIVERGENCE_THRESHOLD
|
|
207
216
|
|
|
@@ -290,12 +299,25 @@ Common tokens:
|
|
|
290
299
|
| `{KJ\|GEM_NAME}` | Gem name from gemspec |
|
|
291
300
|
| `{KJ\|NAMESPACE}` | Ruby module namespace |
|
|
292
301
|
| `{KJ\|AUTHOR:NAME}` | Author full name |
|
|
302
|
+
| `{KJ\|AUTHOR:NAMES}` | Existing gemspec authors plus Git-derived copyright holders |
|
|
293
303
|
| `{KJ\|AUTHOR:EMAIL}` | Author email |
|
|
294
304
|
| `{KJ\|GH:USER}` | GitHub username |
|
|
295
305
|
| `{KJ\|PROJECT_EMOJI}` | Project emoji from config |
|
|
296
306
|
| `{KJ\|MIN_RUBY}` | Minimum Ruby version |
|
|
297
307
|
| `{KJ\|FREEZE_TOKEN}` | Freeze marker name |
|
|
298
308
|
|
|
309
|
+
`machine_users` excludes configured Git author names or email addresses from
|
|
310
|
+
Git-derived copyright output. Any identity containing `[bot]` is filtered
|
|
311
|
+
automatically. The built-in machine-account set includes `autobolt`,
|
|
312
|
+
`StepSecurity Bot`, `dependabot[bot]`, and `depfu[bot]`; configured entries
|
|
313
|
+
extend this set rather than replacing it.
|
|
314
|
+
|
|
315
|
+
`author_aliases` consolidates alternate Git author names or email addresses to
|
|
316
|
+
canonical display names. The mapping is case-insensitive and applies to Git
|
|
317
|
+
copyright facts and existing gemspec author names; it does not rewrite Git
|
|
318
|
+
history. `AUTHOR:NAMES` preserves existing gemspec authors and appends any
|
|
319
|
+
copyright holders not already present.
|
|
320
|
+
|
|
299
321
|
### Freeze Blocks
|
|
300
322
|
|
|
301
323
|
Protect sections in any file from template overwrites:
|
|
@@ -772,7 +794,7 @@ Thanks for RTFM. ☺️
|
|
|
772
794
|
[📌gitmoji]: https://gitmoji.dev
|
|
773
795
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
774
796
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
775
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-11.
|
|
797
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-11.606-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
776
798
|
[🔐security]: https://github.com/structuredmerge/structuredmerge-ruby/blob/main/SECURITY.md
|
|
777
799
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
778
800
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
|
@@ -63,7 +63,8 @@
|
|
|
63
63
|
#
|
|
64
64
|
# Safe automatic derivations currently implemented:
|
|
65
65
|
# AUTHOR:NAME <- first author from the gemspec
|
|
66
|
-
# AUTHOR:NAMES <-
|
|
66
|
+
# AUTHOR:NAMES <- existing gemspec authors plus Git-derived copyright holders
|
|
67
|
+
# (after author_aliases consolidation)
|
|
67
68
|
# AUTHOR:EMAIL <- first email from the gemspec
|
|
68
69
|
# AUTHOR:DOMAIN <- domain part of AUTHOR:EMAIL
|
|
69
70
|
# AUTHOR:GIVEN_NAMES <- AUTHOR:NAME minus the last word
|
|
@@ -71,6 +72,19 @@
|
|
|
71
72
|
#
|
|
72
73
|
# Everything else should be set explicitly here or via ENV.
|
|
73
74
|
|
|
75
|
+
# Author identity aliases used when rendering copyright notices and gemspec
|
|
76
|
+
# author metadata. Keys are matched case-insensitively against Git commit
|
|
77
|
+
# author names, Git commit author emails, and existing gemspec author names.
|
|
78
|
+
# Values are the canonical display names written to generated files. This is
|
|
79
|
+
# useful when one person has committed under multiple names or email addresses.
|
|
80
|
+
# These aliases do not rewrite Git history.
|
|
81
|
+
author_aliases:
|
|
82
|
+
pboling: "Peter H. Boling"
|
|
83
|
+
"|7eter l-|. l3oling": "Peter H. Boling"
|
|
84
|
+
"Peter Boling": "Peter H. Boling"
|
|
85
|
+
galtzo: "Peter H. Boling"
|
|
86
|
+
Aboling0: "Annibelle Boling"
|
|
87
|
+
|
|
74
88
|
# Direct dependency ownership decisions.
|
|
75
89
|
# On first templating, kettle-jem discovers dependencies declared directly by
|
|
76
90
|
# Gemfile/gemspec and also by modular Gemfiles, and writes them here for review.
|
|
@@ -360,16 +374,20 @@ license_eye:
|
|
|
360
374
|
# Machine / automation accounts to exclude from generated copyright output.
|
|
361
375
|
#
|
|
362
376
|
# When kettle-jem collects copyright information via `git blame`, it filters
|
|
363
|
-
# out
|
|
364
|
-
# exclude internal automation accounts that
|
|
365
|
-
# (i.e. they do not follow the "[bot]" naming convention).
|
|
377
|
+
# out identities containing "[bot]" automatically. Use this list to also
|
|
378
|
+
# exclude internal automation accounts that do not use that naming convention.
|
|
366
379
|
#
|
|
367
380
|
# Each entry is matched case-insensitively against the commit author name AND
|
|
368
|
-
# the commit author email, so you can list either form.
|
|
381
|
+
# the commit author email, so you can list either form. Project entries extend
|
|
382
|
+
# the built-in defaults below; they do not remove those defaults.
|
|
369
383
|
#
|
|
370
|
-
#
|
|
384
|
+
# Built-in defaults always include: ["autobolt", "StepSecurity Bot",
|
|
385
|
+
# "dependabot[bot]", "depfu[bot]"]
|
|
371
386
|
machine_users:
|
|
372
387
|
- autobolt
|
|
388
|
+
- StepSecurity Bot
|
|
389
|
+
- dependabot[bot]
|
|
390
|
+
- depfu[bot]
|
|
373
391
|
|
|
374
392
|
# Self-test / templating CI threshold.
|
|
375
393
|
# Set to a number from 0 to 100 to fail `rake kettle:jem:selftest` once
|
|
@@ -468,7 +486,7 @@ tokens:
|
|
|
468
486
|
sh_user: "galtzo" # SourceHut username only, no leading ~, no URL. Used as https://sr.ht/~<value>/. ENV: KJ_SH_USER
|
|
469
487
|
|
|
470
488
|
author:
|
|
471
|
-
name: "Peter H. Boling" # Full display name. Example: Ada Lovelace. ENV: KJ_AUTHOR_NAME. Auto-seeded from gemspec authors.first;
|
|
489
|
+
name: "Peter H. Boling" # Full display name. Example: Ada Lovelace. ENV: KJ_AUTHOR_NAME. Auto-seeded from gemspec authors.first; AUTHOR:NAMES preserves existing gemspec authors and appends Git-derived copyright holders.
|
|
472
490
|
given_names: "Peter H." # Given/personal names only. Example: Ada. ENV: KJ_AUTHOR_GIVEN_NAMES. Auto-seeded when AUTHOR:NAME can be split
|
|
473
491
|
family_names: "Boling" # Family/surname only. Example: Lovelace. ENV: KJ_AUTHOR_FAMILY_NAMES. Auto-seeded when AUTHOR:NAME can be split
|
|
474
492
|
email: "floss@galtzo.com" # Primary public email address. Example: floss@galtzo.com. ENV: KJ_AUTHOR_EMAIL. Auto-seeded from gemspec email.first
|
data/lib/kettle/jem/version.rb
CHANGED
|
@@ -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.
|
|
8
|
+
VERSION = "7.1.8"
|
|
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
|
@@ -474,8 +474,8 @@ module Kettle
|
|
|
474
474
|
KJ|SOCIAL:MASTODON
|
|
475
475
|
].freeze
|
|
476
476
|
COPYRIGHT_NAME_RE = /\ACopyright \(c\) [\d,\s-]+ (.+)\z/
|
|
477
|
-
|
|
478
|
-
|
|
477
|
+
BOT_IDENTITY_PATTERN = /\[bot\]/i
|
|
478
|
+
DEFAULT_MACHINE_USERS = ["autobolt", "StepSecurity Bot", "dependabot[bot]", "depfu[bot]"].freeze
|
|
479
479
|
NOT_COMMITTED_EMAIL = "not.committed.yet"
|
|
480
480
|
LOGOS_GALTZO_BASE_URL = "https://logos.galtzo.com/assets/images"
|
|
481
481
|
README_TOP_LOGO_DEFAULTS = %w[org project].freeze
|
|
@@ -5385,8 +5385,8 @@ module Kettle
|
|
|
5385
5385
|
{name: "bundler-audit", source: %(gem "bundler-audit", "~> 0.9.3"\n)},
|
|
5386
5386
|
{name: "kettle-dev", source: %(gem "kettle-dev", "~> 3.0", ">= 3.0.13"\n)},
|
|
5387
5387
|
{name: "kettle-drift", source: %(gem "kettle-drift", "~> 1.0", ">= 1.0.12"\n)},
|
|
5388
|
-
{name: "kettle-family", source: %(gem "kettle-family", "~> 1.2", ">= 1.2.
|
|
5389
|
-
{name: "kettle-jem", source: %(gem "kettle-jem", "~> 7.1", ">= 7.1.
|
|
5388
|
+
{name: "kettle-family", source: %(gem "kettle-family", "~> 1.2", ">= 1.2.62"\n)},
|
|
5389
|
+
{name: "kettle-jem", source: %(gem "kettle-jem", "~> 7.1", ">= 7.1.7"\n)},
|
|
5390
5390
|
{name: "kettle-test", source: %(gem "kettle-test", "~> 2.0", ">= 2.0.20"\n)},
|
|
5391
5391
|
{name: "rake", source: %(gem "rake", "~> 13.0"\n)},
|
|
5392
5392
|
{name: "rspec", source: %(gem "rspec", "~> 3.0"\n)},
|
|
@@ -12322,7 +12322,28 @@ module Kettle
|
|
|
12322
12322
|
def sync_kettle_config_documentation_comments(content)
|
|
12323
12323
|
synced = sync_readme_top_logos_documentation_comment(content)
|
|
12324
12324
|
synced = remove_duplicate_framework_matrix_documentation(synced)
|
|
12325
|
-
remove_duplicate_readme_preservation_documentation(synced)
|
|
12325
|
+
synced = remove_duplicate_readme_preservation_documentation(synced)
|
|
12326
|
+
sync_author_names_documentation_comment(synced)
|
|
12327
|
+
end
|
|
12328
|
+
|
|
12329
|
+
def sync_author_names_documentation_comment(content)
|
|
12330
|
+
legacy = "# AUTHOR:NAMES <- all authors from the gemspec, or copyright holders if no gemspec authors exist"
|
|
12331
|
+
current = [
|
|
12332
|
+
"# AUTHOR:NAMES <- existing gemspec authors plus Git-derived copyright holders\n",
|
|
12333
|
+
"# (after author_aliases consolidation)\n"
|
|
12334
|
+
]
|
|
12335
|
+
lines = content.to_s.lines
|
|
12336
|
+
index = lines.index { |line| line.chomp == legacy }
|
|
12337
|
+
updated = if index
|
|
12338
|
+
lines[index, 1] = current
|
|
12339
|
+
lines.join
|
|
12340
|
+
else
|
|
12341
|
+
content
|
|
12342
|
+
end
|
|
12343
|
+
|
|
12344
|
+
legacy_token_comment = "generated gemspec authors preserve the full existing authors array via AUTHOR:NAMES."
|
|
12345
|
+
current_token_comment = "AUTHOR:NAMES preserves existing gemspec authors and appends Git-derived copyright holders."
|
|
12346
|
+
updated.lines.map { |line| line.sub(legacy_token_comment, current_token_comment) }.join
|
|
12326
12347
|
end
|
|
12327
12348
|
|
|
12328
12349
|
# YAML parsers do not retain comments. These migrations therefore operate
|
|
@@ -14391,7 +14412,10 @@ module Kettle
|
|
|
14391
14412
|
def author_facts(config, env, gemspec_metadata: {}, copyright: {})
|
|
14392
14413
|
token_config = token_config_values(config)
|
|
14393
14414
|
author_config = token_config["author"].is_a?(Hash) ? token_config["author"] : {}
|
|
14394
|
-
|
|
14415
|
+
aliases = author_aliases(config)
|
|
14416
|
+
derived_name = Array(gemspec_metadata[:authors]).map { |value| canonical_author_name(value, aliases) }.find do |value|
|
|
14417
|
+
present_template_token_value?(value)
|
|
14418
|
+
end
|
|
14395
14419
|
derived_email = Array(gemspec_metadata[:email]).map(&:to_s).find { |value| present_template_token_value?(value) }
|
|
14396
14420
|
name = preferred_template_token_value(derived_name, author_config["name"], env, "KJ_AUTHOR_NAME").to_s
|
|
14397
14421
|
email = preferred_template_token_value(derived_email, author_config["email"], env, "KJ_AUTHOR_EMAIL").to_s
|
|
@@ -14401,7 +14425,7 @@ module Kettle
|
|
|
14401
14425
|
orcid = preferred_template_token_value(nil, author_config["orcid"], env, "KJ_AUTHOR_ORCID")
|
|
14402
14426
|
compact_hash(
|
|
14403
14427
|
name: name,
|
|
14404
|
-
names: author_names(gemspec_metadata, copyright, name),
|
|
14428
|
+
names: author_names(gemspec_metadata, copyright, name, author_aliases: aliases),
|
|
14405
14429
|
given_names: given_names.to_s,
|
|
14406
14430
|
family_names: family_names.to_s,
|
|
14407
14431
|
email: email,
|
|
@@ -14435,6 +14459,46 @@ module Kettle
|
|
|
14435
14459
|
value.to_s.strip.match?(%r{\A\{KJ\|[A-Z][A-Z0-9_:]*\}\z})
|
|
14436
14460
|
end
|
|
14437
14461
|
|
|
14462
|
+
def author_aliases(config)
|
|
14463
|
+
return {} unless config.is_a?(Hash)
|
|
14464
|
+
|
|
14465
|
+
configured = config["author_aliases"]
|
|
14466
|
+
configured = config.dig("copyright", "author_aliases") if configured.nil? && config["copyright"].is_a?(Hash)
|
|
14467
|
+
return {} unless configured.is_a?(Hash)
|
|
14468
|
+
|
|
14469
|
+
configured.each_with_object({}) do |(alias_name, canonical_name), aliases|
|
|
14470
|
+
alias_key = alias_name.to_s.strip.downcase
|
|
14471
|
+
canonical = canonical_name.to_s.strip
|
|
14472
|
+
next if alias_key.empty? || canonical.empty?
|
|
14473
|
+
|
|
14474
|
+
aliases[alias_key] = canonical
|
|
14475
|
+
end
|
|
14476
|
+
end
|
|
14477
|
+
|
|
14478
|
+
def canonical_author_name(value, aliases)
|
|
14479
|
+
current = value.to_s.strip
|
|
14480
|
+
seen = {}
|
|
14481
|
+
loop do
|
|
14482
|
+
key = current.downcase
|
|
14483
|
+
break if current.empty? || seen[key]
|
|
14484
|
+
|
|
14485
|
+
seen[key] = true
|
|
14486
|
+
replacement = aliases[key]
|
|
14487
|
+
break if replacement.nil? || replacement.to_s.strip.empty?
|
|
14488
|
+
|
|
14489
|
+
current = replacement.to_s.strip
|
|
14490
|
+
end
|
|
14491
|
+
current
|
|
14492
|
+
end
|
|
14493
|
+
|
|
14494
|
+
def canonical_author_name_for_entry(entry, aliases)
|
|
14495
|
+
name = entry[:name].to_s.strip
|
|
14496
|
+
email = entry[:email].to_s.strip
|
|
14497
|
+
configured_name = aliases[name.downcase]
|
|
14498
|
+
configured_email = aliases[email.downcase]
|
|
14499
|
+
canonical_author_name(configured_name || configured_email || name, aliases)
|
|
14500
|
+
end
|
|
14501
|
+
|
|
14438
14502
|
def author_template_tokens(author)
|
|
14439
14503
|
names = Array(author[:names]).map(&:to_s).reject(&:empty?)
|
|
14440
14504
|
names = [author[:name].to_s] if names.empty?
|
|
@@ -14449,11 +14513,13 @@ module Kettle
|
|
|
14449
14513
|
}
|
|
14450
14514
|
end
|
|
14451
14515
|
|
|
14452
|
-
def author_names(gemspec_metadata, copyright, primary_name)
|
|
14516
|
+
def author_names(gemspec_metadata, copyright, primary_name, author_aliases: {})
|
|
14453
14517
|
names = Array(gemspec_metadata[:authors]).map(&:to_s)
|
|
14454
|
-
names
|
|
14455
|
-
names =
|
|
14456
|
-
|
|
14518
|
+
names += copyright_author_names(copyright)
|
|
14519
|
+
names = names
|
|
14520
|
+
.map { |name| canonical_author_name(name, author_aliases) }
|
|
14521
|
+
.select { |name| present_template_token_value?(name) }
|
|
14522
|
+
names = [canonical_author_name(primary_name, author_aliases)] if names.empty?
|
|
14457
14523
|
names.map(&:strip).reject(&:empty?).uniq
|
|
14458
14524
|
end
|
|
14459
14525
|
|
|
@@ -14481,16 +14547,21 @@ module Kettle
|
|
|
14481
14547
|
end
|
|
14482
14548
|
|
|
14483
14549
|
def copyright_facts(project_root, config)
|
|
14484
|
-
lines = git_copyright_lines(
|
|
14550
|
+
lines = git_copyright_lines(
|
|
14551
|
+
project_root,
|
|
14552
|
+
copyright_machine_users(config),
|
|
14553
|
+
author_aliases: author_aliases(config)
|
|
14554
|
+
)
|
|
14485
14555
|
compact_hash(lines: lines)
|
|
14486
14556
|
end
|
|
14487
14557
|
|
|
14488
14558
|
def copyright_machine_users(config)
|
|
14489
14559
|
copyright = config["copyright"].is_a?(Hash) ? config["copyright"] : {}
|
|
14490
|
-
|
|
14560
|
+
configured = DEFAULT_MACHINE_USERS + Array(config["machine_users"]) + Array(copyright["machine_users"])
|
|
14561
|
+
configured.map { |user| user.to_s.downcase.strip }.reject(&:empty?).uniq
|
|
14491
14562
|
end
|
|
14492
14563
|
|
|
14493
|
-
def git_copyright_lines(project_root, machine_users)
|
|
14564
|
+
def git_copyright_lines(project_root, machine_users, author_aliases: {})
|
|
14494
14565
|
files = git_capture(project_root, "ls-files", "-z")
|
|
14495
14566
|
return [] if files.to_s.empty?
|
|
14496
14567
|
|
|
@@ -14503,10 +14574,20 @@ module Kettle
|
|
|
14503
14574
|
next
|
|
14504
14575
|
end
|
|
14505
14576
|
resolve_uncommitted_author!(project_root, author_map)
|
|
14506
|
-
author_map.values
|
|
14577
|
+
consolidated = author_map.values
|
|
14507
14578
|
.reject { |entry| copyright_bot_entry?(entry) }
|
|
14508
|
-
.reject { |entry| copyright_machine_user_entry?(entry, machine_users) }
|
|
14509
|
-
.
|
|
14579
|
+
.reject { |entry| copyright_machine_user_entry?(entry, machine_users, author_aliases: author_aliases) }
|
|
14580
|
+
.each_with_object({}) do |entry, authors|
|
|
14581
|
+
next if entry[:name].to_s.strip.empty? || entry[:years].empty?
|
|
14582
|
+
|
|
14583
|
+
name = canonical_author_name_for_entry(entry, author_aliases)
|
|
14584
|
+
next if name.empty?
|
|
14585
|
+
|
|
14586
|
+
author = authors[name.downcase] ||= {name: name, years: []}
|
|
14587
|
+
author[:years].concat(entry[:years])
|
|
14588
|
+
end
|
|
14589
|
+
.values
|
|
14590
|
+
consolidated
|
|
14510
14591
|
.sort_by { |entry| [entry[:years].map(&:to_i).min, entry[:name].to_s.downcase] }
|
|
14511
14592
|
.map { |entry| "Copyright (c) #{format_copyright_years(entry[:years])} #{entry[:name]}" }
|
|
14512
14593
|
rescue ArgumentError
|
|
@@ -14566,14 +14647,18 @@ module Kettle
|
|
|
14566
14647
|
end
|
|
14567
14648
|
|
|
14568
14649
|
def copyright_bot_entry?(entry)
|
|
14569
|
-
entry[:name].to_s.match?(
|
|
14650
|
+
entry[:name].to_s.match?(BOT_IDENTITY_PATTERN) || entry[:email].to_s.match?(BOT_IDENTITY_PATTERN)
|
|
14570
14651
|
end
|
|
14571
14652
|
|
|
14572
|
-
def copyright_machine_user_entry?(entry, machine_users)
|
|
14653
|
+
def copyright_machine_user_entry?(entry, machine_users, author_aliases: {})
|
|
14573
14654
|
return false if machine_users.empty?
|
|
14574
14655
|
|
|
14575
|
-
|
|
14576
|
-
|
|
14656
|
+
identities = [
|
|
14657
|
+
entry[:name],
|
|
14658
|
+
entry[:email],
|
|
14659
|
+
canonical_author_name_for_entry(entry, author_aliases)
|
|
14660
|
+
].map { |identity| identity.to_s.downcase.strip }
|
|
14661
|
+
identities.any? { |identity| machine_users.include?(identity) }
|
|
14577
14662
|
end
|
|
14578
14663
|
|
|
14579
14664
|
def format_copyright_years(years)
|
|
@@ -15037,7 +15122,7 @@ module Kettle
|
|
|
15037
15122
|
def main_gemfile_kettle_family_gem(package_name)
|
|
15038
15123
|
return "" if package_name.to_s == "kettle-family"
|
|
15039
15124
|
|
|
15040
|
-
%(gem "kettle-family", "~> 1.2", ">= 1.2.
|
|
15125
|
+
%(gem "kettle-family", "~> 1.2", ">= 1.2.62"\n)
|
|
15041
15126
|
end
|
|
15042
15127
|
|
|
15043
15128
|
def main_gemfile_nomono_bootstrap(package_name)
|
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.
|
|
4
|
+
version: 7.1.8
|
|
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.
|
|
980
|
-
changelog_uri: https://github.com/structuredmerge/structuredmerge-ruby/blob/v7.1.
|
|
979
|
+
source_code_uri: https://github.com/structuredmerge/structuredmerge-ruby/tree/v7.1.8
|
|
980
|
+
changelog_uri: https://github.com/structuredmerge/structuredmerge-ruby/blob/v7.1.8/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.
|
|
982
|
+
documentation_uri: https://www.rubydoc.info/gems/kettle-jem/7.1.8
|
|
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
|