kettle-dev 1.2.4 → 2.0.1
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 +232 -3
- data/CITATION.cff +6 -6
- data/CONTRIBUTING.md +64 -46
- data/FUNDING.md +1 -1
- data/LICENSE.md +12 -0
- data/README.md +448 -457
- data/certs/pboling.pem +27 -0
- data/exe/kettle-changelog +24 -13
- data/exe/kettle-check-eof +7 -0
- data/exe/kettle-check-eof.sh +118 -0
- data/exe/kettle-dev-setup +12 -63
- data/exe/kettle-gh-release +82 -0
- data/lib/kettle/dev/changelog_cli.rb +373 -62
- data/lib/kettle/dev/ci_monitor.rb +2 -2
- data/lib/kettle/dev/dvcs_cli.rb +1 -1
- data/lib/kettle/dev/gem_spec_reader.rb +100 -10
- data/lib/kettle/dev/git_adapter.rb +37 -1
- data/lib/kettle/dev/open_collective_config.rb +15 -3
- data/lib/kettle/dev/pre_release_cli.rb +4 -4
- data/lib/kettle/dev/rakelib/reek.rake +9 -6
- data/lib/kettle/dev/rakelib/spec_test.rake +25 -25
- data/lib/kettle/dev/rakelib/yard.rake +17 -17
- data/lib/kettle/dev/readme_backers.rb +4 -4
- data/lib/kettle/dev/release_cli.rb +27 -24
- data/lib/kettle/dev/tasks/ci_task.rb +4 -4
- data/lib/kettle/dev/version.rb +2 -87
- data/lib/kettle/dev.rb +31 -17
- data/sig/kettle/dev/source_merger.rbs +40 -56
- data/sig/kettle/dev/version.rbs +8 -0
- data.tar.gz.sig +0 -0
- metadata +63 -165
- metadata.gz.sig +0 -0
- data/.aiignore.example +0 -19
- data/.devcontainer/apt-install/devcontainer-feature.json +0 -9
- data/.devcontainer/apt-install/install.sh +0 -11
- data/.devcontainer/devcontainer.json +0 -28
- data/.env.local.example +0 -31
- data/.envrc +0 -47
- data/.envrc.example +0 -51
- data/.envrc.no-osc.example +0 -51
- data/.git-hooks/commit-msg +0 -54
- data/.git-hooks/commit-subjects-goalie.txt +0 -8
- data/.git-hooks/footer-template.erb.txt +0 -16
- data/.git-hooks/prepare-commit-msg +0 -8
- data/.github/.codecov.yml.example +0 -14
- data/.github/FUNDING.yml +0 -13
- data/.github/FUNDING.yml.no-osc.example +0 -13
- data/.github/dependabot.yml +0 -13
- data/.github/workflows/ancient.yml +0 -83
- data/.github/workflows/ancient.yml.example +0 -81
- data/.github/workflows/auto-assign.yml +0 -21
- data/.github/workflows/codeql-analysis.yml +0 -70
- data/.github/workflows/coverage.yml +0 -127
- data/.github/workflows/coverage.yml.example +0 -127
- data/.github/workflows/current.yml +0 -116
- data/.github/workflows/current.yml.example +0 -115
- data/.github/workflows/dep-heads.yml +0 -117
- data/.github/workflows/dependency-review.yml +0 -20
- data/.github/workflows/discord-notifier.yml.example +0 -39
- data/.github/workflows/heads.yml +0 -117
- data/.github/workflows/heads.yml.example +0 -116
- data/.github/workflows/jruby.yml +0 -82
- data/.github/workflows/jruby.yml.example +0 -72
- data/.github/workflows/legacy.yml +0 -76
- data/.github/workflows/license-eye.yml +0 -40
- data/.github/workflows/locked_deps.yml +0 -85
- data/.github/workflows/opencollective.yml +0 -40
- data/.github/workflows/style.yml +0 -67
- data/.github/workflows/supported.yml +0 -75
- data/.github/workflows/truffle.yml +0 -99
- data/.github/workflows/unlocked_deps.yml +0 -84
- data/.github/workflows/unsupported.yml +0 -76
- data/.gitignore +0 -50
- data/.gitlab-ci.yml.example +0 -134
- data/.idea/.gitignore +0 -45
- data/.junie/guidelines-rbs.md +0 -49
- data/.junie/guidelines.md +0 -141
- data/.junie/guidelines.md.example +0 -140
- data/.licenserc.yaml +0 -7
- data/.opencollective.yml +0 -3
- data/.opencollective.yml.example +0 -3
- data/.qlty/qlty.toml +0 -79
- data/.rspec +0 -9
- data/.rubocop.yml +0 -13
- data/.rubocop_rspec.yml +0 -33
- data/.simplecov +0 -16
- data/.simplecov.example +0 -11
- data/.tool-versions +0 -1
- data/.yardignore +0 -13
- data/.yardopts +0 -14
- data/Appraisal.root.gemfile +0 -10
- data/Appraisals +0 -151
- data/Appraisals.example +0 -102
- data/CHANGELOG.md.example +0 -47
- data/CONTRIBUTING.md.example +0 -227
- data/FUNDING.md.no-osc.example +0 -63
- data/Gemfile +0 -40
- data/Gemfile.example +0 -34
- data/LICENSE.txt +0 -21
- data/README.md.example +0 -570
- data/README.md.no-osc.example +0 -536
- data/REEK +0 -0
- data/Rakefile.example +0 -68
- data/bin/setup +0 -8
- data/gemfiles/modular/coverage.gemfile +0 -6
- data/gemfiles/modular/debug.gemfile +0 -13
- data/gemfiles/modular/documentation.gemfile +0 -14
- data/gemfiles/modular/erb/r2/v3.0.gemfile +0 -1
- data/gemfiles/modular/erb/r2.3/default.gemfile +0 -6
- data/gemfiles/modular/erb/r2.6/v2.2.gemfile +0 -3
- data/gemfiles/modular/erb/r3/v5.0.gemfile +0 -1
- data/gemfiles/modular/erb/r3.1/v4.0.gemfile +0 -2
- data/gemfiles/modular/erb/vHEAD.gemfile +0 -2
- data/gemfiles/modular/injected.gemfile +0 -60
- data/gemfiles/modular/mutex_m/r2/v0.3.gemfile +0 -2
- data/gemfiles/modular/mutex_m/r2.4/v0.1.gemfile +0 -3
- data/gemfiles/modular/mutex_m/r3/v0.3.gemfile +0 -2
- data/gemfiles/modular/mutex_m/vHEAD.gemfile +0 -2
- data/gemfiles/modular/optional.gemfile +0 -8
- data/gemfiles/modular/optional.gemfile.example +0 -5
- data/gemfiles/modular/runtime_heads.gemfile +0 -10
- data/gemfiles/modular/runtime_heads.gemfile.example +0 -8
- data/gemfiles/modular/stringio/r2/v3.0.gemfile +0 -5
- data/gemfiles/modular/stringio/r2.4/v0.0.2.gemfile +0 -4
- data/gemfiles/modular/stringio/r3/v3.0.gemfile +0 -5
- data/gemfiles/modular/stringio/vHEAD.gemfile +0 -2
- data/gemfiles/modular/style.gemfile +0 -25
- data/gemfiles/modular/style.gemfile.example +0 -25
- data/gemfiles/modular/templating.gemfile +0 -3
- data/gemfiles/modular/x_std_libs/r2/libs.gemfile +0 -3
- data/gemfiles/modular/x_std_libs/r2.3/libs.gemfile +0 -3
- data/gemfiles/modular/x_std_libs/r2.4/libs.gemfile +0 -3
- data/gemfiles/modular/x_std_libs/r2.6/libs.gemfile +0 -3
- data/gemfiles/modular/x_std_libs/r3/libs.gemfile +0 -3
- data/gemfiles/modular/x_std_libs/r3.1/libs.gemfile +0 -3
- data/gemfiles/modular/x_std_libs/vHEAD.gemfile +0 -3
- data/gemfiles/modular/x_std_libs.gemfile +0 -2
- data/kettle-dev.gemspec.example +0 -154
- data/lib/kettle/dev/modular_gemfiles.rb +0 -119
- data/lib/kettle/dev/prism_appraisals.rb +0 -351
- data/lib/kettle/dev/prism_gemfile.rb +0 -177
- data/lib/kettle/dev/prism_gemspec.rb +0 -284
- data/lib/kettle/dev/prism_utils.rb +0 -201
- data/lib/kettle/dev/rakelib/install.rake +0 -10
- data/lib/kettle/dev/rakelib/template.rake +0 -10
- data/lib/kettle/dev/setup_cli.rb +0 -403
- data/lib/kettle/dev/source_merger.rb +0 -655
- data/lib/kettle/dev/tasks/install_task.rb +0 -553
- data/lib/kettle/dev/tasks/template_task.rb +0 -975
- data/lib/kettle/dev/template_helpers.rb +0 -685
data/certs/pboling.pem
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
|
2
|
+
MIIEgDCCAuigAwIBAgIBATANBgkqhkiG9w0BAQsFADBDMRUwEwYDVQQDDAxwZXRl
|
|
3
|
+
ci5ib2xpbmcxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkW
|
|
4
|
+
A2NvbTAeFw0yNTA1MDQxNTMzMDlaFw00NTA0MjkxNTMzMDlaMEMxFTATBgNVBAMM
|
|
5
|
+
DHBldGVyLmJvbGluZzEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPy
|
|
6
|
+
LGQBGRYDY29tMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAruUoo0WA
|
|
7
|
+
uoNuq6puKWYeRYiZekz/nsDeK5x/0IEirzcCEvaHr3Bmz7rjo1I6On3gGKmiZs61
|
|
8
|
+
LRmQ3oxy77ydmkGTXBjruJB+pQEn7UfLSgQ0xa1/X3kdBZt6RmabFlBxnHkoaGY5
|
|
9
|
+
mZuZ5+Z7walmv6sFD9ajhzj+oIgwWfnEHkXYTR8I6VLN7MRRKGMPoZ/yvOmxb2DN
|
|
10
|
+
coEEHWKO9CvgYpW7asIihl/9GMpKiRkcYPm9dGQzZc6uTwom1COfW0+ZOFrDVBuV
|
|
11
|
+
FMQRPswZcY4Wlq0uEBLPU7hxnCL9nKK6Y9IhdDcz1mY6HZ91WImNslOSI0S8hRpj
|
|
12
|
+
yGOWxQIhBT3fqCBlRIqFQBudrnD9jSNpSGsFvbEijd5ns7Z9ZMehXkXDycpGAUj1
|
|
13
|
+
to/5cuTWWw1JqUWrKJYoifnVhtE1o1DZ+LkPtWxHtz5kjDG/zR3MG0Ula0UOavlD
|
|
14
|
+
qbnbcXPBnwXtTFeZ3C+yrWpE4pGnl3yGkZj9SMTlo9qnTMiPmuWKQDatAgMBAAGj
|
|
15
|
+
fzB9MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQE8uWvNbPVNRXZ
|
|
16
|
+
HlgPbc2PCzC4bjAhBgNVHREEGjAYgRZwZXRlci5ib2xpbmdAZ21haWwuY29tMCEG
|
|
17
|
+
A1UdEgQaMBiBFnBldGVyLmJvbGluZ0BnbWFpbC5jb20wDQYJKoZIhvcNAQELBQAD
|
|
18
|
+
ggGBAJbnUwfJQFPkBgH9cL7hoBfRtmWiCvdqdjeTmi04u8zVNCUox0A4gT982DE9
|
|
19
|
+
wmuN12LpdajxZONqbXuzZvc+nb0StFwmFYZG6iDwaf4BPywm2e/Vmq0YG45vZXGR
|
|
20
|
+
L8yMDSK1cQXjmA+ZBKOHKWavxP6Vp7lWvjAhz8RFwqF9GuNIdhv9NpnCAWcMZtpm
|
|
21
|
+
GUPyIWw/Cw/2wZp74QzZj6Npx+LdXoLTF1HMSJXZ7/pkxLCsB8m4EFVdb/IrW/0k
|
|
22
|
+
kNSfjtAfBHO8nLGuqQZVH9IBD1i9K6aSs7pT6TW8itXUIlkIUI2tg5YzW6OFfPzq
|
|
23
|
+
QekSkX3lZfY+HTSp/o+YvKkqWLUV7PQ7xh1ZYDtocpaHwgxe/j3bBqHE+CUPH2vA
|
|
24
|
+
0V/FwdTRWcwsjVoOJTrYcff8pBZ8r2MvtAc54xfnnhGFzeRHfcltobgFxkAXdE6p
|
|
25
|
+
DVjBtqT23eugOqQ73umLcYDZkc36vnqGxUBSsXrzY9pzV5gGr2I8YUxMqf6ATrZt
|
|
26
|
+
L9nRqA==
|
|
27
|
+
-----END CERTIFICATE-----
|
data/exe/kettle-changelog
CHANGED
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
# - TAG
|
|
11
11
|
# - COVERAGE (line coverage)
|
|
12
12
|
# - BRANCH COVERAGE (branch coverage)
|
|
13
|
-
# - percent documented (parsed from `bin/yard` output)
|
|
13
|
+
# - percent documented (parsed from `bin/rake yard` output)
|
|
14
14
|
# - Updates bottom link references to GitHub style, converts any existing
|
|
15
15
|
# GitLab links to GitHub links, and appends the new [X.Y.Z] and [X.Y.Zt] links.
|
|
16
16
|
#
|
|
17
17
|
# Notes:
|
|
18
|
-
# - Expects a JSON coverage report at coverage/coverage.json.
|
|
19
|
-
# it will
|
|
20
|
-
# - Expects bin/yard to be available
|
|
18
|
+
# - Expects a JSON coverage report at coverage/coverage.json. In strict mode,
|
|
19
|
+
# it will generate one with bundle exec kettle-test.
|
|
20
|
+
# - Expects `bin/rake yard` to be available.
|
|
21
21
|
|
|
22
22
|
$stdout.sync = true
|
|
23
23
|
|
|
@@ -50,27 +50,35 @@ end
|
|
|
50
50
|
begin
|
|
51
51
|
if ARGV.include?("-h") || ARGV.include?("--help")
|
|
52
52
|
puts <<~USAGE
|
|
53
|
-
Usage: kettle-changelog [--no-strict]
|
|
53
|
+
Usage: kettle-changelog [--update-prep] [--no-strict] [--no-coverage-threshold]
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
Detects the current version from lib/**/version.rb, the latest live release, and
|
|
56
|
+
the most recent CHANGELOG.md release section, then prompts to confirm the selected plan:
|
|
57
|
+
create a new release section, update the prepared release section in place, or reformat only.
|
|
58
|
+
|
|
59
|
+
Release plans add coverage and documentation stats, move entries from [Unreleased],
|
|
60
|
+
and update bottom link references to GitHub style.
|
|
58
61
|
|
|
59
62
|
Options:
|
|
63
|
+
--update-prep Force updating the most recent prepared release section in place
|
|
60
64
|
--no-strict Allow missing coverage and yard data (warnings only, no errors)
|
|
65
|
+
--no-coverage-threshold Generate coverage without hard-failing below configured thresholds
|
|
61
66
|
|
|
62
67
|
Environment:
|
|
63
|
-
K_CHANGELOG_STRICT=false
|
|
68
|
+
K_CHANGELOG_STRICT=false Disable strict mode (equivalent to --no-strict flag)
|
|
69
|
+
K_CHANGELOG_COVERAGE_HARD=false Disable coverage threshold hard-failure
|
|
64
70
|
|
|
65
71
|
Prerequisites:
|
|
66
|
-
- coverage/coverage.json present (run:
|
|
67
|
-
- yard
|
|
72
|
+
- coverage/coverage.json present (run: bundle exec kettle-test with K_SOUP_COV_FORMATTERS=json to generate)
|
|
73
|
+
- yard task available via bin/rake yard
|
|
68
74
|
|
|
69
75
|
By default (strict mode), if coverage.json or yard stats are missing, the script will:
|
|
70
|
-
1. Attempt to generate them by running
|
|
76
|
+
1. Attempt to generate them by running bundle exec kettle-test and bin/rake yard
|
|
71
77
|
2. Fail with an error if generation fails or data is still unavailable
|
|
78
|
+
3. Fail if coverage is below the configured project thresholds
|
|
72
79
|
|
|
73
80
|
Use --no-strict or K_CHANGELOG_STRICT=false to allow missing data (backward compatible behavior).
|
|
81
|
+
Use --no-coverage-threshold or K_CHANGELOG_COVERAGE_HARD=false to bypass coverage threshold failures.
|
|
74
82
|
USAGE
|
|
75
83
|
exit(0)
|
|
76
84
|
end
|
|
@@ -79,8 +87,11 @@ end
|
|
|
79
87
|
begin
|
|
80
88
|
# Determine if strict mode is enabled (default: true)
|
|
81
89
|
strict_mode = !ARGV.include?("--no-strict") && ENV.fetch("K_CHANGELOG_STRICT", "true").downcase != "false"
|
|
90
|
+
update_prep = ARGV.include?("--update-prep")
|
|
91
|
+
coverage_threshold_disabled = ARGV.include?("--no-coverage-threshold") || ARGV.include?("--no-coverage-thresholds")
|
|
92
|
+
coverage_hard = !coverage_threshold_disabled && ENV.fetch("K_CHANGELOG_COVERAGE_HARD", "true").downcase != "false"
|
|
82
93
|
|
|
83
|
-
Kettle::Dev::ChangelogCLI.new(strict: strict_mode).run
|
|
94
|
+
Kettle::Dev::ChangelogCLI.new(strict: strict_mode, enforce_coverage_thresholds: coverage_hard, update_prep: update_prep).run
|
|
84
95
|
rescue LoadError => e
|
|
85
96
|
warn("#{script_basename}: could not load dependency: #{e.class}: #{e.message}")
|
|
86
97
|
warn(e.backtrace.join("\n")) if ENV["DEBUG"]
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
# Finds files without exactly one trailing newline
|
|
4
|
+
# Pass "-f" to also fix those files
|
|
5
|
+
#
|
|
6
|
+
# Always have exactly one newline at the end of every file comprised of text.
|
|
7
|
+
# In a POSIX system a file missing a final newline is technically not a text file.
|
|
8
|
+
# Some tools will not parse them, or parse them in unexpected ways.
|
|
9
|
+
# NOTE: We'll forgive external files, in node_modules, and vendor.
|
|
10
|
+
# See:
|
|
11
|
+
# Official POSIX Standard: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
|
|
12
|
+
# Discussion of "why newline at EOF?": https://stackoverflow.com/q/729692/213191
|
|
13
|
+
# Theory behind `-not \( -path ... \)`: https://stackoverflow.com/a/69830768/213191
|
|
14
|
+
# Thanks: Gabriel Staples, https://stackoverflow.com/users/4561887/gabriel-staples
|
|
15
|
+
#
|
|
16
|
+
# Author: Peter H Boling
|
|
17
|
+
# Copyright (c) 2026 Peter H Boling. All rights reserved.
|
|
18
|
+
# License MIT (see LICENSE file in repository root for details)
|
|
19
|
+
|
|
20
|
+
set -euo pipefail
|
|
21
|
+
|
|
22
|
+
FIX_MODE=false
|
|
23
|
+
if [[ "${1:-}" == "-f" ]]; then
|
|
24
|
+
FIX_MODE=true
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
# Function to check if file has exactly one trailing newline
|
|
28
|
+
check_eof() {
|
|
29
|
+
local file="$1"
|
|
30
|
+
# Empty files are OK (nothing to fix)
|
|
31
|
+
[[ ! -s "$file" ]] && return 0
|
|
32
|
+
|
|
33
|
+
# Check last two bytes to detect:
|
|
34
|
+
# - Missing newline (last byte != newline)
|
|
35
|
+
# - Multiple trailing newlines (last two bytes == newline newline)
|
|
36
|
+
local last_bytes
|
|
37
|
+
last_bytes=$(tail -c 2 "$file" | od -An -tx1 | tr -d ' \n')
|
|
38
|
+
|
|
39
|
+
# 0a = newline in hex
|
|
40
|
+
case "$last_bytes" in
|
|
41
|
+
*0a0a) return 1 ;; # Multiple trailing newlines
|
|
42
|
+
*0a) return 0 ;; # Exactly one trailing newline
|
|
43
|
+
*) return 1 ;; # Missing trailing newline
|
|
44
|
+
esac
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
# Function to fix file to have exactly one trailing newline
|
|
48
|
+
fix_eof() {
|
|
49
|
+
local file="$1"
|
|
50
|
+
# Remove all trailing newlines, then add exactly one
|
|
51
|
+
# Using perl for portability (sed -i behaves differently on macOS vs Linux)
|
|
52
|
+
perl -pi -e 'chomp if eof' "$file"
|
|
53
|
+
echo >> "$file"
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
# Find all text files, excluding specified patterns
|
|
57
|
+
invalid_files=()
|
|
58
|
+
|
|
59
|
+
while IFS= read -r -d '' file; do
|
|
60
|
+
# Skip if not a text file
|
|
61
|
+
if ! file -b "$file" | grep -q text; then
|
|
62
|
+
continue
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
if ! check_eof "$file"; then
|
|
66
|
+
invalid_files+=("$file")
|
|
67
|
+
if $FIX_MODE; then
|
|
68
|
+
fix_eof "$file"
|
|
69
|
+
echo "Fixed: $file"
|
|
70
|
+
else
|
|
71
|
+
echo "$file"
|
|
72
|
+
fi
|
|
73
|
+
fi
|
|
74
|
+
done < <(find . \
|
|
75
|
+
-type f \
|
|
76
|
+
-not \( -name "*.csv" \) \
|
|
77
|
+
-not \( -name "*.dio" \) \
|
|
78
|
+
-not \( -name "*.gem" \) \
|
|
79
|
+
-not \( -name "*.json" \) \
|
|
80
|
+
-not \( -name "*.pem" \) \
|
|
81
|
+
-not \( -name "*.tpl" \) \
|
|
82
|
+
-not \( -name "VERSION*" \) \
|
|
83
|
+
-not \( -path "*/.bundle/*" -prune \) \
|
|
84
|
+
-not \( -path "*/.git/*" -prune \) \
|
|
85
|
+
-not \( -path "*/.idea/*" -prune \) \
|
|
86
|
+
-not \( -path "*/.vscode/*" -prune \) \
|
|
87
|
+
-not \( -path "*/.yardoc/*" -prune \) \
|
|
88
|
+
-not \( -path "*/angular/*" -prune \) \
|
|
89
|
+
-not \( -path "*/certs/*" -prune \) \
|
|
90
|
+
-not \( -path "*/checksums/*" -prune \) \
|
|
91
|
+
-not \( -path "*/coverage/*" -prune \) \
|
|
92
|
+
-not \( -path "*/doc/*" -prune \) \
|
|
93
|
+
-not \( -path "*/docs/*" -prune \) \
|
|
94
|
+
-not \( -path "*/log/*" -prune \) \
|
|
95
|
+
-not \( -path "*/node_modules/*" -prune \) \
|
|
96
|
+
-not \( -path "*/pkg/*" -prune \) \
|
|
97
|
+
-not \( -path "*/public/*" -prune \) \
|
|
98
|
+
-not \( -path "*/results/*" -prune \) \
|
|
99
|
+
-not \( -path "*/test-results/*" -prune \) \
|
|
100
|
+
-not \( -path "*/tmp/*" -prune \) \
|
|
101
|
+
-not \( -path "*/vendor/*" -prune \) \
|
|
102
|
+
-print0)
|
|
103
|
+
|
|
104
|
+
# Exit with appropriate status
|
|
105
|
+
if [[ ${#invalid_files[@]} -eq 0 ]]; then
|
|
106
|
+
exit 0
|
|
107
|
+
else
|
|
108
|
+
if $FIX_MODE; then
|
|
109
|
+
echo ""
|
|
110
|
+
echo "Fixed ${#invalid_files[@]} file(s)"
|
|
111
|
+
exit 0
|
|
112
|
+
else
|
|
113
|
+
echo ""
|
|
114
|
+
echo "Found ${#invalid_files[@]} file(s) with invalid EOF"
|
|
115
|
+
echo "Run with -f to fix"
|
|
116
|
+
exit 1
|
|
117
|
+
fi
|
|
118
|
+
fi
|
data/exe/kettle-dev-setup
CHANGED
|
@@ -3,66 +3,15 @@
|
|
|
3
3
|
|
|
4
4
|
# vim: set syntax=ruby
|
|
5
5
|
|
|
6
|
-
# kettle-dev-setup
|
|
7
|
-
#
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
$stdout.sync = true
|
|
19
|
-
$stderr.sync = true
|
|
20
|
-
|
|
21
|
-
script_basename = File.basename(__FILE__)
|
|
22
|
-
File.basename($PROGRAM_NAME)
|
|
23
|
-
|
|
24
|
-
begin
|
|
25
|
-
require "kettle/dev"
|
|
26
|
-
puts "== #{script_basename} v#{Kettle::Dev::Version::VERSION} begin =="
|
|
27
|
-
rescue StandardError => e
|
|
28
|
-
# Requiring kettle/dev should generally work since this script ships with the gem.
|
|
29
|
-
# But if autoloads try to pull optional deps, we should still proceed as most
|
|
30
|
-
# of this script does not rely on those parts.
|
|
31
|
-
warn("[kettle-dev-setup] Warning: could not fully load kettle/dev (#{e.class}: #{e.message}). Proceeding with limited features.")
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
# Always execute when this file is loaded (e.g., via a Bundler binstub).
|
|
35
|
-
# Do not guard with __FILE__ == $PROGRAM_NAME because binstubs use Kernel.load.
|
|
36
|
-
if ARGV.include?("-h") || ARGV.include?("--help")
|
|
37
|
-
puts <<~USAGE
|
|
38
|
-
Usage: kettle-dev-setup [options]
|
|
39
|
-
|
|
40
|
-
Bootstraps a host gem repository to use kettle-dev tooling.
|
|
41
|
-
|
|
42
|
-
Options (passed through to rake kettle:dev:install):
|
|
43
|
-
--allowed=VAL
|
|
44
|
-
--force
|
|
45
|
-
--hook_templates=VAL
|
|
46
|
-
--only=VAL
|
|
47
|
-
--include=VAL
|
|
48
|
-
|
|
49
|
-
Environment:
|
|
50
|
-
DEBUG=true # print backtraces on errors
|
|
51
|
-
USAGE
|
|
52
|
-
exit 0
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
begin
|
|
56
|
-
Kettle::Dev::SetupCLI.new(ARGV).run!
|
|
57
|
-
rescue LoadError => e
|
|
58
|
-
warn("#{script_basename}: could not load dependency: #{e.class}: #{e.message}")
|
|
59
|
-
warn(e.backtrace.join("\n")) if ENV["DEBUG"]
|
|
60
|
-
exit(1)
|
|
61
|
-
rescue SystemExit => e
|
|
62
|
-
warn("#{script_basename}: exited (status=#{e.status}, msg=#{e.message})") if e.status != 0
|
|
63
|
-
raise
|
|
64
|
-
rescue StandardError => e
|
|
65
|
-
warn("#{script_basename}: unexpected error: #{e.class}: #{e.message}")
|
|
66
|
-
warn(e.backtrace.join("\n")) if ENV["DEBUG"]
|
|
67
|
-
exit(1)
|
|
68
|
-
end
|
|
6
|
+
# kettle-dev-setup has been replaced by kettle-jem-setup.
|
|
7
|
+
# All setup and templating functionality has moved to the kettle-jem gem.
|
|
8
|
+
|
|
9
|
+
$stderr.puts <<~MSG
|
|
10
|
+
kettle-dev-setup has been removed.
|
|
11
|
+
Setup and templating functionality has moved to the kettle-jem gem.
|
|
12
|
+
|
|
13
|
+
Please install kettle-jem and use kettle-jem-setup instead:
|
|
14
|
+
gem install kettle-jem
|
|
15
|
+
kettle-jem-setup
|
|
16
|
+
MSG
|
|
17
|
+
exit 1
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# vim: set syntax=ruby
|
|
5
|
+
|
|
6
|
+
# kettle-gh-release: Create a GitHub release for a gem version
|
|
7
|
+
# - Extracted from kettle-release step 18
|
|
8
|
+
# - Useful when the main release succeeded but GitHub release creation failed
|
|
9
|
+
# - Requires GITHUB_TOKEN with repo:public_repo (classic) or contents:write scope
|
|
10
|
+
|
|
11
|
+
# Immediate, unbuffered output
|
|
12
|
+
$stdout.sync = true
|
|
13
|
+
$stderr.sync = true
|
|
14
|
+
|
|
15
|
+
# Do not rely on Bundler; allow running in repos that do not depend on kettle-dev
|
|
16
|
+
# Ensure RubyGems is available for 'require' lookups
|
|
17
|
+
begin
|
|
18
|
+
require "rubygems"
|
|
19
|
+
rescue LoadError
|
|
20
|
+
# Older Rubies always have rubygems; continue anyway
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
script_basename = File.basename(__FILE__)
|
|
24
|
+
|
|
25
|
+
begin
|
|
26
|
+
require "kettle/dev"
|
|
27
|
+
puts "== #{script_basename} v#{Kettle::Dev::Version::VERSION} =="
|
|
28
|
+
rescue LoadError => e
|
|
29
|
+
warn("#{script_basename}: could not load dependency: #{e.class}: #{e.message}")
|
|
30
|
+
warn("Hint: Ensure the host project has kettle-dev as a dependency and run bundle install.")
|
|
31
|
+
exit(1)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Always execute when this file is loaded (e.g., via a Bundler binstub).
|
|
35
|
+
# Do not guard with __FILE__ == $PROGRAM_NAME because binstubs use Kernel.load.
|
|
36
|
+
if ARGV.include?("-h") || ARGV.include?("--help")
|
|
37
|
+
puts <<~USAGE
|
|
38
|
+
Usage: #{script_basename} [version=<VERSION>]
|
|
39
|
+
|
|
40
|
+
Creates a GitHub release for a gem version.
|
|
41
|
+
|
|
42
|
+
This is step 18 of the kettle-release flow, extracted as a standalone script.
|
|
43
|
+
Useful when the main release to RubyGems succeeded but GitHub release creation
|
|
44
|
+
failed (e.g., due to token issues or network problems).
|
|
45
|
+
|
|
46
|
+
Arguments:
|
|
47
|
+
version=<VERSION> # Explicit version (e.g., version=1.2.3)
|
|
48
|
+
# If omitted, auto-detects from lib/**/version.rb
|
|
49
|
+
|
|
50
|
+
Environment:
|
|
51
|
+
GITHUB_TOKEN / GH_TOKEN # Required; needs repo:public_repo (classic) or contents:write scope
|
|
52
|
+
DEBUG=true # Print backtraces on errors
|
|
53
|
+
|
|
54
|
+
Examples:
|
|
55
|
+
#{script_basename} # auto-detect version, create release
|
|
56
|
+
#{script_basename} version=2.0.0 # create release for specific version
|
|
57
|
+
GITHUB_TOKEN=ghp_xxx #{script_basename} # explicit token
|
|
58
|
+
USAGE
|
|
59
|
+
exit 0
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Parse version=<v> from ARGV
|
|
63
|
+
version_arg = ARGV.find { |a| a.start_with?("version=") }
|
|
64
|
+
explicit_version = version_arg ? version_arg.split("=", 2)[1].strip : nil
|
|
65
|
+
|
|
66
|
+
begin
|
|
67
|
+
cli = Kettle::Dev::ReleaseCLI.new(start_step: 18)
|
|
68
|
+
version = explicit_version || cli.send(:detect_version)
|
|
69
|
+
cli.send(:maybe_create_github_release!, version)
|
|
70
|
+
rescue LoadError => e
|
|
71
|
+
warn("#{script_basename}: could not load dependency: #{e.class}: #{e.message}")
|
|
72
|
+
warn(Array(e.backtrace).join("\n")) if ENV["DEBUG"]
|
|
73
|
+
exit(1)
|
|
74
|
+
rescue SystemExit => e
|
|
75
|
+
# Preserve exit status, but ensure at least a newline so shells don't show an empty line only.
|
|
76
|
+
warn("#{script_basename}: exited (status=#{e.status}, msg=#{e.message})") if e.status != 0
|
|
77
|
+
raise
|
|
78
|
+
rescue StandardError => e
|
|
79
|
+
warn("#{script_basename}: unexpected error: #{e.class}: #{e.message}")
|
|
80
|
+
warn(Array(e.backtrace).join("\n"))
|
|
81
|
+
exit(1)
|
|
82
|
+
end
|