kettle-dev 2.0.6 → 2.0.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 +58 -23
- data/CONTRIBUTING.md +2 -2
- data/README.md +2 -2
- data/SECURITY.md +1 -1
- data/exe/kettle-changelog +1 -1
- data/exe/kettle-commit-msg +3 -3
- data/exe/kettle-dvcs +1 -1
- data/exe/kettle-gh-release +1 -1
- data/exe/kettle-pre-release +2 -2
- data/exe/kettle-readme-backers +1 -1
- data/exe/kettle-release +1 -1
- data/lib/kettle/dev/changelog_cli.rb +14 -18
- data/lib/kettle/dev/ci_helpers.rb +5 -5
- data/lib/kettle/dev/ci_monitor.rb +8 -8
- data/lib/kettle/dev/commit_msg.rb +2 -2
- data/lib/kettle/dev/dvcs_cli.rb +8 -8
- data/lib/kettle/dev/gem_spec_reader.rb +8 -8
- data/lib/kettle/dev/git_adapter.rb +17 -17
- data/lib/kettle/dev/git_commit_footer.rb +3 -3
- data/lib/kettle/dev/open_collective_config.rb +1 -1
- data/lib/kettle/dev/pre_release_cli.rb +7 -7
- data/lib/kettle/dev/rakelib/appraisal.rake +9 -5
- data/lib/kettle/dev/readme_backers.rb +15 -16
- data/lib/kettle/dev/release_cli.rb +15 -15
- data/lib/kettle/dev/tasks/ci_task.rb +15 -14
- data/lib/kettle/dev/version.rb +1 -1
- data/lib/kettle/dev.rb +3 -3
- data/lib/kettle-dev.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +28 -8
- 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: 4cd7fe54eb870c3b29cd7f317c335f06dd69d4c3d924686b835bbba97f42bbed
|
|
4
|
+
data.tar.gz: 1ce512b94f7fbd3089ae283c51128e526c9b48d825204409795e1c60d9c689dd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: deb60bf014b1a739225b8478d9337a06c94ae40fa57edaa0a654603a3dd04eca76ad8bc88086bbde824de19477f82a8c6bd4537c6a59dd76d3b6a51304888005
|
|
7
|
+
data.tar.gz: 78e31f3c9ae1052e3009d8055d1ac17dcf93def82827c3fe3ca7d026115195802b9cebf91dd4b29d48990993bf174f5e11616e1e454107eaaa0a42f831730858
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,37 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [2.0.8] - 2026-06-02
|
|
34
|
+
|
|
35
|
+
- TAG: [v2.0.8][2.0.8t]
|
|
36
|
+
- COVERAGE: 92.83% -- 2953/3181 lines in 25 files
|
|
37
|
+
- BRANCH COVERAGE: 76.59% -- 1201/1568 branches in 25 files
|
|
38
|
+
- 75.93% documented
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- `appraisal:update` now installs the `Appraisal.root.gemfile` bundle before
|
|
43
|
+
running `bundle update --bundler`, fixing first-run release failures when the
|
|
44
|
+
Appraisal root lockfile does not exist yet.
|
|
45
|
+
|
|
46
|
+
## [2.0.7] - 2026-06-01
|
|
47
|
+
|
|
48
|
+
- TAG: [v2.0.7][2.0.7t]
|
|
49
|
+
- COVERAGE: 93.14% -- 2961/3179 lines in 25 files
|
|
50
|
+
- BRANCH COVERAGE: 76.88% -- 1204/1566 branches in 25 files
|
|
51
|
+
- 75.93% documented
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
|
|
55
|
+
- Runtime dependency `kettle-test` now requires 2.0.2 or newer.
|
|
56
|
+
- Generated style Gemfiles now use the current RuboCop-LTS Ruby 2.4 floor.
|
|
57
|
+
- Lint / style updates
|
|
58
|
+
|
|
59
|
+
### Fixed
|
|
60
|
+
|
|
61
|
+
- Avoided moving mocked CI task input reads into a background thread for
|
|
62
|
+
non-interactive runs, fixing TruffleRuby v23.0-v23.1 CI stability.
|
|
63
|
+
|
|
33
64
|
## [2.0.6] - 2026-05-31
|
|
34
65
|
|
|
35
66
|
- TAG: [v2.0.6][2.0.6t]
|
|
@@ -529,7 +560,7 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
529
560
|
|
|
530
561
|
- Template .yardopts now includes yard-yaml plugin (for CITATION.cff)
|
|
531
562
|
- Template now includes a default `.yardopts` file
|
|
532
|
-
- Excludes
|
|
563
|
+
- Excludes _.gem, pkg/_.gem and .yardoc from documentation generation
|
|
533
564
|
|
|
534
565
|
## [1.1.52] - 2025-11-08
|
|
535
566
|
|
|
@@ -1028,7 +1059,7 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
1028
1059
|
- improved documentation
|
|
1029
1060
|
- better organized readme
|
|
1030
1061
|
- badges are more clear & new badge for Ruby Friends Squad on Daily.dev
|
|
1031
|
-
|
|
1062
|
+
- https://app.daily.dev/squads/rubyfriends
|
|
1032
1063
|
|
|
1033
1064
|
### Changed
|
|
1034
1065
|
|
|
@@ -1514,7 +1545,7 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
1514
1545
|
|
|
1515
1546
|
### Fixed
|
|
1516
1547
|
|
|
1517
|
-
- kettle:dev:install remove "Works with MRI Ruby
|
|
1548
|
+
- kettle:dev:install remove "Works with MRI Ruby\*" lines with no badges left
|
|
1518
1549
|
- kettle:dev:install prefix badge cell replacement with a single space
|
|
1519
1550
|
|
|
1520
1551
|
## [1.0.17] - 2025-08-29
|
|
@@ -1561,7 +1592,7 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
1561
1592
|
|
|
1562
1593
|
### Fixed
|
|
1563
1594
|
|
|
1564
|
-
- include gemfiles/modular
|
|
1595
|
+
- include gemfiles/modular/\*gemfile.example with packaged gem
|
|
1565
1596
|
- CI workflow result polling logic revised:
|
|
1566
1597
|
- includes a delay
|
|
1567
1598
|
- scopes queries to specific commit SHA
|
|
@@ -1638,13 +1669,13 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
1638
1669
|
### Added
|
|
1639
1670
|
|
|
1640
1671
|
- Add more .example templates
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1672
|
+
- .github/workflows/coverage.yml.example
|
|
1673
|
+
- .gitlab-ci.yml.example
|
|
1674
|
+
- Appraisals.example
|
|
1644
1675
|
- Kettle::Dev::InputAdapter: Input indirection layer for safe interactive prompts in tests; provides gets and readline; documented with YARD and typed with RBS.
|
|
1645
1676
|
- install task README improvements
|
|
1646
|
-
|
|
1647
|
-
|
|
1677
|
+
- extracts emoji grapheme from H1 to apply to gemspec's summary and description
|
|
1678
|
+
- removes badges for unsupported rubies, and major version MRI row if all badges removed
|
|
1648
1679
|
- new exe script: kettle-changelog - transitions a changelog from unreleased to next release
|
|
1649
1680
|
|
|
1650
1681
|
### Changed
|
|
@@ -1656,17 +1687,17 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
1656
1687
|
### Removed
|
|
1657
1688
|
|
|
1658
1689
|
- dependency on git gem
|
|
1659
|
-
|
|
1660
|
-
|
|
1690
|
+
- git gem is still supported if present and not bypassed by new ENV variable `KETTLE_DEV_DISABLE_GIT_GEM`
|
|
1691
|
+
- no longer a direct dependency
|
|
1661
1692
|
|
|
1662
1693
|
### Fixed
|
|
1663
1694
|
|
|
1664
1695
|
- Upgrade stone_checksums for release compatibility with bundler v2.7+
|
|
1665
|
-
|
|
1696
|
+
- Retains compatibility with older bundler < v2.7
|
|
1666
1697
|
- Ship all example templates with gem
|
|
1667
1698
|
- install task README preservation
|
|
1668
|
-
|
|
1669
|
-
|
|
1699
|
+
- preserves H1 line, and specific H2 headed sections
|
|
1700
|
+
- preserve table alignment
|
|
1670
1701
|
|
|
1671
1702
|
## [1.0.10] - 2025-08-24
|
|
1672
1703
|
|
|
@@ -1689,7 +1720,7 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
1689
1720
|
|
|
1690
1721
|
### Removed
|
|
1691
1722
|
|
|
1692
|
-
- attempts to make exe
|
|
1723
|
+
- attempts to make exe/\* scripts work without bundler. Bundler is required.
|
|
1693
1724
|
|
|
1694
1725
|
### Fixed
|
|
1695
1726
|
|
|
@@ -1700,14 +1731,14 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
1700
1731
|
|
|
1701
1732
|
- TAG: [v1.0.9][1.0.9t]
|
|
1702
1733
|
- COVERAGE: 100.00% -- 130/130 lines in 7 files
|
|
1703
|
-
- BRANCH COVERAGE:
|
|
1734
|
+
- BRANCH COVERAGE: 96.00% -- 48/50 branches in 7 files
|
|
1704
1735
|
- 95.35% documented
|
|
1705
1736
|
|
|
1706
1737
|
### Added
|
|
1707
1738
|
|
|
1708
1739
|
- kettle-release: Add a sanity check for the latest released version of the gem being released, and display it during the confirmation with user that CHANGELOG.md and version.rb have been updated, so they can compare the value in version.rb with the value of the latest released version.
|
|
1709
|
-
|
|
1710
|
-
|
|
1740
|
+
- If the value in version.rb is less than the latest released version's major or minor, then check for the latest released version that matches the major + minor of what is in version.rb.
|
|
1741
|
+
- This way a stable branch intended to release patch updates to older versions is able to work use the script.
|
|
1711
1742
|
- kettle-release: optional pre-push local CI run using `act`, controlled by env var `K_RELEASE_LOCAL_CI` ("true" to run, "ask" to prompt) and `K_RELEASE_LOCAL_CI_WORKFLOW` to choose a workflow; defaults to `locked_deps.yml` when present; on failure, soft-resets the release prep commit and aborts.
|
|
1712
1743
|
- template task: now copies `certs/pboling.pem` into the host project when available.
|
|
1713
1744
|
|
|
@@ -1731,7 +1762,7 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
1731
1762
|
|
|
1732
1763
|
### Fixed
|
|
1733
1764
|
|
|
1734
|
-
- Reproducible builds, with consistent checksums, by
|
|
1765
|
+
- Reproducible builds, with consistent checksums, by _not_ using SOURCE_DATE_EPOCH.
|
|
1735
1766
|
- Since bundler v2.7.0 builds are reproducible by default.
|
|
1736
1767
|
|
|
1737
1768
|
## [1.0.6] - 2025-08-24
|
|
@@ -1813,9 +1844,9 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
1813
1844
|
|
|
1814
1845
|
- These were documented but not yet released:
|
|
1815
1846
|
- `kettle-release` ruby script for safely, securely, releasing a gem.
|
|
1816
|
-
|
|
1847
|
+
- This may move to its own gem in the future.
|
|
1817
1848
|
- `kettle-readme-backers` ruby script for integrating Open Source Collective backers into a README.md file.
|
|
1818
|
-
|
|
1849
|
+
- This may move to its own gem in the future.
|
|
1819
1850
|
|
|
1820
1851
|
## [1.0.0] - 2025-08-24
|
|
1821
1852
|
|
|
@@ -1833,7 +1864,7 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
1833
1864
|
- appraisal2
|
|
1834
1865
|
- gitmoji-regex (& git-hooks to enforce gitmoji commit-style)
|
|
1835
1866
|
- via kettle-test
|
|
1836
|
-
- Note: rake tasks for kettle-test are added in
|
|
1867
|
+
- Note: rake tasks for kettle-test are added in _this gem_ (kettle-dev) because test rake tasks are a development concern
|
|
1837
1868
|
- rspec
|
|
1838
1869
|
- although rspec is the focus, most tools work with minitest as well
|
|
1839
1870
|
- rspec-block_is_expected
|
|
@@ -1846,7 +1877,11 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
1846
1877
|
- Selecting will run the selected workflow via `act`
|
|
1847
1878
|
- This may move to its own gem in the future.
|
|
1848
1879
|
|
|
1849
|
-
[Unreleased]: https://github.com/kettle-rb/kettle-dev/compare/v2.0.
|
|
1880
|
+
[Unreleased]: https://github.com/kettle-rb/kettle-dev/compare/v2.0.8...HEAD
|
|
1881
|
+
[2.0.8]: https://github.com/kettle-rb/kettle-dev/compare/v2.0.7...v2.0.8
|
|
1882
|
+
[2.0.8t]: https://github.com/kettle-rb/kettle-dev/releases/tag/v2.0.8
|
|
1883
|
+
[2.0.7]: https://github.com/kettle-rb/kettle-dev/compare/v2.0.6...v2.0.7
|
|
1884
|
+
[2.0.7t]: https://github.com/kettle-rb/kettle-dev/releases/tag/v2.0.7
|
|
1850
1885
|
[2.0.6]: https://github.com/kettle-rb/kettle-dev/compare/v2.0.5...v2.0.6
|
|
1851
1886
|
[2.0.6t]: https://github.com/kettle-rb/kettle-dev/releases/tag/v2.0.6
|
|
1852
1887
|
[2.0.5]: https://github.com/kettle-rb/kettle-dev/compare/v2.0.4...v2.0.5
|
data/CONTRIBUTING.md
CHANGED
|
@@ -103,7 +103,7 @@ Git hooks and commit message helpers (exe/kettle-commit-msg)
|
|
|
103
103
|
- GIT_HOOK_FOOTER_APPEND_DEBUG: Extra debug output in the footer template (true/false)
|
|
104
104
|
|
|
105
105
|
Git diff driver setup
|
|
106
|
-
- Local setup writes repository `.gitattributes` entries so this checkout uses StructuredMerge semantic diffs.
|
|
106
|
+
- Local setup writes repository `.gitattributes` entries and local Git `diff.smorg-*` command config so this checkout uses StructuredMerge semantic diffs.
|
|
107
107
|
- Global setup registers `diff.smorg-*` commands once in the user Git config; use it when you work across several StructuredMerge-enabled repositories.
|
|
108
108
|
- Include-file setup writes `.git/smorg/config` and includes it from local Git config, keeping command registrations out of the repository files.
|
|
109
109
|
- Git hosting forges generally ignore external diff drivers, so pull request views may still show raw textual diffs even when local `git diff` uses semantic drivers.
|
|
@@ -115,7 +115,7 @@ K_JEM_TEMPLATING=true bundle exec kettle-jem install
|
|
|
115
115
|
Troubleshooting Git diffs
|
|
116
116
|
- Use `git diff --no-ext-diff` to compare against Git's built-in diff output.
|
|
117
117
|
- Use `git diff --no-textconv` when a textconv projection obscures the raw file bytes you need to inspect.
|
|
118
|
-
- If Git reports a missing `smorg-*` executable, rerun `bundle install` and the setup command above, then check `git config --get-regexp '^diff\.smorg-'`.
|
|
118
|
+
- If Git reports a missing `smorg-*` executable, rerun `bundle install` and the setup command above, then check `git config --local --get-regexp '^diff\.smorg-'`.
|
|
119
119
|
- To remove managed local entries, run `K_JEM_TEMPLATING=true bundle exec kettle-jem install --undo`; remove global command registrations with `git config --global --unset-all diff.smorg-ruby.command`.
|
|
120
120
|
|
|
121
121
|
For a quick starting point, this repository’s `mise.toml` defines the shared defaults, and `.env.local` can override them locally. Copy `.env.local.example` to `.env.local`, use `KEY=value` lines, and either activate `mise` in your shell or run commands through `mise exec -C /path/to/project -- ...`.
|
data/README.md
CHANGED
|
@@ -811,7 +811,7 @@ Thanks for RTFM. ☺️
|
|
|
811
811
|
[📌gitmoji]: https://gitmoji.dev
|
|
812
812
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
813
813
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
814
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-3.
|
|
814
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-3.181-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
815
815
|
[🔐security]: https://github.com/kettle-rb/kettle-dev/blob/main/SECURITY.md
|
|
816
816
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
817
817
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
|
@@ -839,7 +839,7 @@ Thanks for RTFM. ☺️
|
|
|
839
839
|
| Package | kettle-dev |
|
|
840
840
|
| Description | 🍲 Kettle::Dev is a meta tool from kettle-rb to streamline development and testing. Acts as a shim dependency, pulling in many other dependencies, to give you OOTB productivity with a RubyGem, or Ruby app project. Configures a complete set of Rake tasks, for all the libraries is brings in, so they arrive ready to go. Fund overlooked open source projects - bottom of stack, dev/test dependencies: floss-funding.dev |
|
|
841
841
|
| Homepage | https://github.com/kettle-rb/kettle-dev |
|
|
842
|
-
| Source | https://github.com/kettle-rb/kettle-dev/tree/v2.0.
|
|
842
|
+
| Source | https://github.com/kettle-rb/kettle-dev/tree/v2.0.8 |
|
|
843
843
|
| License | `AGPL-3.0-only` |
|
|
844
844
|
| Funding | https://github.com/sponsors/pboling, https://issuehunt.io/u/pboling, https://ko-fi.com/pboling, https://liberapay.com/pboling/donate, https://opencollective.com/kettle-rb, https://patreon.com/galtzo, https://polar.sh/pboling, https://thanks.dev/u/gh/pboling, https://tidelift.com/funding/github/rubygems/kettle-dev, https://www.buymeacoffee.com/pboling |
|
|
845
845
|
<!-- kettle-jem:metadata:end -->
|
data/SECURITY.md
CHANGED
data/exe/kettle-changelog
CHANGED
|
@@ -102,7 +102,7 @@ rescue SystemExit => e
|
|
|
102
102
|
# Preserve exit status, but ensure at least a newline so shells don't show an empty line only.
|
|
103
103
|
warn("#{script_basename}: exited (status=#{e.status}, msg=#{e.message})") if e.status != 0
|
|
104
104
|
raise
|
|
105
|
-
rescue
|
|
105
|
+
rescue => e
|
|
106
106
|
warn("#{script_basename}: unexpected error: #{e.class}: #{e.message}")
|
|
107
107
|
warn(e.backtrace.join("\n"))
|
|
108
108
|
exit(1)
|
data/exe/kettle-commit-msg
CHANGED
|
@@ -40,7 +40,7 @@ end
|
|
|
40
40
|
# BRANCH_RULE_TYPE = jira, or another type of branch rule validation, or false to disable
|
|
41
41
|
# FOOTER_APPEND = true/false append commit message footer
|
|
42
42
|
BRANCH_RULES = {
|
|
43
|
-
"jira" => /^(?<story_type>
|
|
43
|
+
"jira" => /^(?<story_type>hotfix|bug|feature|candy)\/(?<story_id>\d{8,})-.+\Z/
|
|
44
44
|
}
|
|
45
45
|
# Ruby 2.3 compatibility: String#casecmp? is not available; use casecmp.zero?
|
|
46
46
|
BRANCH_RULE_TYPE = (validate = ENV.fetch("GIT_HOOK_BRANCH_VALIDATE", "false")) && !(validate.respond_to?(:casecmp?) ? validate.casecmp?("false") : (validate.casecmp("false").zero?)) && validate
|
|
@@ -51,7 +51,7 @@ if (branch_rule = BRANCH_RULES[BRANCH_RULE_TYPE])
|
|
|
51
51
|
# <story_type>/<story_id>-explosion-in-the-fudge-factory-spec-suite-fix
|
|
52
52
|
# where story type is one of "hotfix", "bug", "feature", "candy"
|
|
53
53
|
#
|
|
54
|
-
branch =
|
|
54
|
+
branch = `git branch 2> /dev/null | grep -e ^* | awk '{print $2}'`
|
|
55
55
|
match_data = branch.match(branch_rule)
|
|
56
56
|
# NOTE: `match` will return nil if match fails, otherwise an instance of MatchData.
|
|
57
57
|
# If not nil then we are assured matches for both regex capture groups
|
|
@@ -84,7 +84,7 @@ rescue SystemExit => e
|
|
|
84
84
|
# Preserve exit status, but ensure at least a newline so shells don't show an empty line only.
|
|
85
85
|
warn("#{script_basename}: exited (status=#{e.status}, msg=#{e.message})") if e.status != 0
|
|
86
86
|
raise
|
|
87
|
-
rescue
|
|
87
|
+
rescue => e
|
|
88
88
|
warn("#{script_basename}: unexpected error: #{e.class}: #{e.message}")
|
|
89
89
|
warn(e.backtrace.join("\n"))
|
|
90
90
|
exit(1)
|
data/exe/kettle-dvcs
CHANGED
|
@@ -70,7 +70,7 @@ rescue LoadError => e
|
|
|
70
70
|
rescue SystemExit => e
|
|
71
71
|
warn("#{script_basename}: exited (status=#{e.status}, msg=#{e.message})") if e.status != 0
|
|
72
72
|
raise
|
|
73
|
-
rescue
|
|
73
|
+
rescue => e
|
|
74
74
|
warn("#{script_basename}: unexpected error: #{e.class}: #{e.message}")
|
|
75
75
|
warn(e.backtrace.join("\n"))
|
|
76
76
|
exit(1)
|
data/exe/kettle-gh-release
CHANGED
|
@@ -75,7 +75,7 @@ rescue SystemExit => e
|
|
|
75
75
|
# Preserve exit status, but ensure at least a newline so shells don't show an empty line only.
|
|
76
76
|
warn("#{script_basename}: exited (status=#{e.status}, msg=#{e.message})") if e.status != 0
|
|
77
77
|
raise
|
|
78
|
-
rescue
|
|
78
|
+
rescue => e
|
|
79
79
|
warn("#{script_basename}: unexpected error: #{e.class}: #{e.message}")
|
|
80
80
|
warn(Array(e.backtrace).join("\n"))
|
|
81
81
|
exit(1)
|
data/exe/kettle-pre-release
CHANGED
|
@@ -26,7 +26,7 @@ script_basename = File.basename(__FILE__)
|
|
|
26
26
|
begin
|
|
27
27
|
require "kettle/dev"
|
|
28
28
|
puts "== #{script_basename} v#{Kettle::Dev::Version::VERSION} =="
|
|
29
|
-
rescue
|
|
29
|
+
rescue => e
|
|
30
30
|
warn("#{script_basename}: could not load dependency: #{e.class}: #{e.message}")
|
|
31
31
|
warn("Hint: Ensure the host project has kettle-dev as a dependency and run bundle install.")
|
|
32
32
|
exit(1)
|
|
@@ -34,7 +34,7 @@ end
|
|
|
34
34
|
|
|
35
35
|
# Option parsing
|
|
36
36
|
options = {
|
|
37
|
-
check_num: 1
|
|
37
|
+
check_num: 1
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
parser = OptionParser.new do |opts|
|
data/exe/kettle-readme-backers
CHANGED
|
@@ -34,7 +34,7 @@ rescue SystemExit => e
|
|
|
34
34
|
# Preserve exit status, but ensure at least a newline so shells don't show an empty line only.
|
|
35
35
|
warn("#{script_basename}: exited (status=#{e.status}, msg=#{e.message})") if e.status != 0
|
|
36
36
|
raise
|
|
37
|
-
rescue
|
|
37
|
+
rescue => e
|
|
38
38
|
warn("#{script_basename}: unexpected error: #{e.class}: #{e.message}")
|
|
39
39
|
warn(e.backtrace.join("\n"))
|
|
40
40
|
exit(1)
|
data/exe/kettle-release
CHANGED
|
@@ -102,7 +102,7 @@ rescue SystemExit => e
|
|
|
102
102
|
# Preserve exit status, but ensure at least a newline so shells don't show an empty line only.
|
|
103
103
|
warn("#{script_basename}: exited (status=#{e.status}, msg=#{e.message})") if e.status != 0
|
|
104
104
|
raise
|
|
105
|
-
rescue
|
|
105
|
+
rescue => e
|
|
106
106
|
warn("#{script_basename}: unexpected error: #{e.class}: #{e.message}")
|
|
107
107
|
warn(Array(e.backtrace).join("\n"))
|
|
108
108
|
exit(1)
|
|
@@ -17,7 +17,7 @@ module Kettle
|
|
|
17
17
|
# Matches a Markdown link-reference definition line, e.g. `[key]: https://...`
|
|
18
18
|
LINK_REF_DEF_RE = /^\s*\[[^\]]+\]:\s+\S+/
|
|
19
19
|
# Matches an ATX heading at H4 or deeper (####, #####, ...)
|
|
20
|
-
DEEP_HEADING_RE =
|
|
20
|
+
DEEP_HEADING_RE = /^\#{4,}\s/
|
|
21
21
|
|
|
22
22
|
# Initialize the changelog CLI
|
|
23
23
|
# Sets up paths for CHANGELOG.md and coverage.json
|
|
@@ -148,7 +148,7 @@ module Kettle
|
|
|
148
148
|
begin
|
|
149
149
|
gem_name = detect_gem_name
|
|
150
150
|
latest_overall, latest_for_series = latest_released_versions(gem_name, version)
|
|
151
|
-
rescue
|
|
151
|
+
rescue => e
|
|
152
152
|
warn("[kettle-changelog] gem.coop release check failed: #{e.class}: #{e.message}")
|
|
153
153
|
warn("Proceeding without live release info.")
|
|
154
154
|
end
|
|
@@ -186,7 +186,7 @@ module Kettle
|
|
|
186
186
|
latest_overall: latest_overall,
|
|
187
187
|
latest_for_series: latest_for_series,
|
|
188
188
|
latest_target: latest_target,
|
|
189
|
-
latest_changelog_version: latest_changelog_version
|
|
189
|
+
latest_changelog_version: latest_changelog_version
|
|
190
190
|
}
|
|
191
191
|
end
|
|
192
192
|
|
|
@@ -203,7 +203,7 @@ module Kettle
|
|
|
203
203
|
latest_for_series: nil,
|
|
204
204
|
latest_target: nil,
|
|
205
205
|
latest_changelog_version: prepared_version,
|
|
206
|
-
explicit: true
|
|
206
|
+
explicit: true
|
|
207
207
|
}
|
|
208
208
|
end
|
|
209
209
|
|
|
@@ -273,7 +273,7 @@ module Kettle
|
|
|
273
273
|
series = cur.segments[0, 2]
|
|
274
274
|
latest_series = gversions.reverse.find { |gv| gv.segments[0, 2] == series }&.to_s
|
|
275
275
|
[latest_overall, latest_series]
|
|
276
|
-
rescue
|
|
276
|
+
rescue => e
|
|
277
277
|
Kettle::Dev.debug_error(e, __method__)
|
|
278
278
|
[nil, nil]
|
|
279
279
|
end
|
|
@@ -572,7 +572,7 @@ module Kettle
|
|
|
572
572
|
warn("Failed to parse coverage: #{e.class}: #{e.message}")
|
|
573
573
|
[nil, nil]
|
|
574
574
|
end
|
|
575
|
-
rescue
|
|
575
|
+
rescue => e
|
|
576
576
|
if @strict
|
|
577
577
|
raise "Failed to get coverage data: #{e.class}: #{e.message}"
|
|
578
578
|
else
|
|
@@ -587,7 +587,7 @@ module Kettle
|
|
|
587
587
|
"K_SOUP_COV_FORMATTERS" => "json",
|
|
588
588
|
"K_SOUP_COV_MIN_HARD" => @enforce_coverage_thresholds ? "true" : "false",
|
|
589
589
|
"K_SOUP_COV_MULTI_FORMATTERS" => "true",
|
|
590
|
-
"K_SOUP_COV_OPEN_BIN" => ""
|
|
590
|
+
"K_SOUP_COV_OPEN_BIN" => ""
|
|
591
591
|
}
|
|
592
592
|
end
|
|
593
593
|
|
|
@@ -601,7 +601,7 @@ module Kettle
|
|
|
601
601
|
[
|
|
602
602
|
"Coverage JSON not found at #{Kettle::Dev.display_path(@coverage_path)} after running bundle exec kettle-test.",
|
|
603
603
|
"kettle-test runs specs in parallel and is expected to collate parallel SimpleCov results into this canonical file.",
|
|
604
|
-
"If it is missing, coverage was not enabled in ENV config or the rake/task hooks did not load the coverage integration."
|
|
604
|
+
"If it is missing, coverage was not enabled in ENV config or the rake/task hooks did not load the coverage integration."
|
|
605
605
|
].join(" ")
|
|
606
606
|
end
|
|
607
607
|
|
|
@@ -633,7 +633,7 @@ module Kettle
|
|
|
633
633
|
warn("Could not find documented percentage in bin/rake yard output.")
|
|
634
634
|
nil
|
|
635
635
|
end
|
|
636
|
-
rescue
|
|
636
|
+
rescue => e
|
|
637
637
|
if @strict
|
|
638
638
|
raise "Failed to run bin/rake yard: #{e.class}: #{e.message}"
|
|
639
639
|
else
|
|
@@ -780,7 +780,7 @@ module Kettle
|
|
|
780
780
|
|
|
781
781
|
def update_link_refs(content, owner, repo, prev_version, new_version)
|
|
782
782
|
# Convert any GitLab links to GitHub
|
|
783
|
-
content = content.gsub(%r{https://gitlab\.com/([^/]+)/([^/]+)/-/compare/([
|
|
783
|
+
content = content.gsub(%r{https://gitlab\.com/([^/]+)/([^/]+)/-/compare/([^.]+)\.\.\.([^\s]+)}) do
|
|
784
784
|
o = owner || Regexp.last_match(1)
|
|
785
785
|
r = repo || Regexp.last_match(2)
|
|
786
786
|
from = Regexp.last_match(3)
|
|
@@ -801,12 +801,8 @@ module Kettle
|
|
|
801
801
|
# Do NOT assume the first link-ref after the Unreleased heading starts the footer, because
|
|
802
802
|
# some changelogs contain interspersed link-refs within section bodies.
|
|
803
803
|
unreleased_ref_idx = lines.index { |l| l.start_with?(UNRELEASED_SECTION_HEADING) }
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
else
|
|
807
|
-
# If no [Unreleased]: ref is present, consider the reference block to start at EOF
|
|
808
|
-
lines.length
|
|
809
|
-
end
|
|
804
|
+
# If no [Unreleased]: ref is present, consider the reference block to start at EOF
|
|
805
|
+
first_ref = unreleased_ref_idx || lines.length
|
|
810
806
|
|
|
811
807
|
# Ensure Unreleased points to GitHub compare from new tag to HEAD
|
|
812
808
|
if owner && repo
|
|
@@ -957,7 +953,7 @@ module Kettle
|
|
|
957
953
|
|
|
958
954
|
warn(
|
|
959
955
|
"Could not determine initial git root commit; using HEAD^ as compare base. " \
|
|
960
|
-
"Set KETTLE_CHANGELOG_INITIAL_SHA to override."
|
|
956
|
+
"Set KETTLE_CHANGELOG_INITIAL_SHA to override."
|
|
961
957
|
)
|
|
962
958
|
"HEAD^"
|
|
963
959
|
end
|
|
@@ -969,7 +965,7 @@ module Kettle
|
|
|
969
965
|
out, ok = adapter.capture(["rev-list", "--max-parents=0", "HEAD"])
|
|
970
966
|
sha = out.to_s.lines.last&.strip # take last line in case of multiple root commits
|
|
971
967
|
(ok && sha && !sha.empty?) ? sha : nil
|
|
972
|
-
rescue
|
|
968
|
+
rescue
|
|
973
969
|
nil
|
|
974
970
|
end
|
|
975
971
|
end
|
|
@@ -112,9 +112,9 @@ module Kettle
|
|
|
112
112
|
"status" => run["status"],
|
|
113
113
|
"conclusion" => run["conclusion"],
|
|
114
114
|
"html_url" => run["html_url"],
|
|
115
|
-
"id" => run["id"]
|
|
115
|
+
"id" => run["id"]
|
|
116
116
|
}
|
|
117
|
-
rescue
|
|
117
|
+
rescue => e
|
|
118
118
|
Kettle::Dev.debug_error(e, __method__)
|
|
119
119
|
nil
|
|
120
120
|
end
|
|
@@ -205,7 +205,7 @@ module Kettle
|
|
|
205
205
|
pipe["web_url"] = det["web_url"] if det["web_url"]
|
|
206
206
|
end
|
|
207
207
|
end
|
|
208
|
-
rescue
|
|
208
|
+
rescue => e
|
|
209
209
|
Kettle::Dev.debug_error(e, __method__)
|
|
210
210
|
# ignore enrichment errors; fall back to basic fields
|
|
211
211
|
end
|
|
@@ -213,9 +213,9 @@ module Kettle
|
|
|
213
213
|
"status" => pipe["status"],
|
|
214
214
|
"web_url" => pipe["web_url"],
|
|
215
215
|
"id" => pipe["id"],
|
|
216
|
-
"failure_reason" => pipe["failure_reason"]
|
|
216
|
+
"failure_reason" => pipe["failure_reason"]
|
|
217
217
|
}
|
|
218
|
-
rescue
|
|
218
|
+
rescue => e
|
|
219
219
|
Kettle::Dev.debug_error(e, __method__)
|
|
220
220
|
nil
|
|
221
221
|
end
|
|
@@ -78,13 +78,13 @@ module Kettle
|
|
|
78
78
|
begin
|
|
79
79
|
gh = collect_github
|
|
80
80
|
results[:github] = gh if gh
|
|
81
|
-
rescue
|
|
81
|
+
rescue => e
|
|
82
82
|
Kettle::Dev.debug_error(e, __method__)
|
|
83
83
|
end
|
|
84
84
|
begin
|
|
85
85
|
gl = collect_gitlab
|
|
86
86
|
results[:gitlab] = gl if gl
|
|
87
|
-
rescue
|
|
87
|
+
rescue => e
|
|
88
88
|
Kettle::Dev.debug_error(e, __method__)
|
|
89
89
|
end
|
|
90
90
|
results
|
|
@@ -99,12 +99,12 @@ module Kettle
|
|
|
99
99
|
gh_items = results[:github] || []
|
|
100
100
|
unless gh_items.empty?
|
|
101
101
|
puts "GitHub Actions:"
|
|
102
|
-
gh_items.each do |
|
|
103
|
-
emoji = status_emoji(
|
|
104
|
-
details = [
|
|
105
|
-
wf =
|
|
106
|
-
puts " - #{wf}: #{emoji} (#{details}) #{"-> #{
|
|
107
|
-
all_ok &&= (
|
|
102
|
+
gh_items.each do |item|
|
|
103
|
+
emoji = status_emoji(item[:status], item[:conclusion])
|
|
104
|
+
details = [item[:status], item[:conclusion]].compact.join("/")
|
|
105
|
+
wf = item[:workflow]
|
|
106
|
+
puts " - #{wf}: #{emoji} (#{details}) #{"-> #{item[:url]}" if item[:url]}"
|
|
107
|
+
all_ok &&= (item[:conclusion] == "success")
|
|
108
108
|
end
|
|
109
109
|
end
|
|
110
110
|
gl = results[:gitlab]
|
|
@@ -9,7 +9,7 @@ module Kettle
|
|
|
9
9
|
module_function
|
|
10
10
|
|
|
11
11
|
BRANCH_RULES = {
|
|
12
|
-
"jira" => /^(?<story_type>
|
|
12
|
+
"jira" => /^(?<story_type>hotfix|bug|feature|candy)\/(?<story_id>\d{8,})-.+\Z/
|
|
13
13
|
}.freeze
|
|
14
14
|
|
|
15
15
|
# Enforce branch rule by appending [type][id] to the commit message when missing.
|
|
@@ -22,7 +22,7 @@ module Kettle
|
|
|
22
22
|
branch_rule = BRANCH_RULES[branch_rule_type]
|
|
23
23
|
return unless branch_rule
|
|
24
24
|
|
|
25
|
-
branch =
|
|
25
|
+
branch = `git branch 2> /dev/null | grep -e ^* | awk '{print $2}'`
|
|
26
26
|
match_data = branch.match(branch_rule)
|
|
27
27
|
return unless match_data
|
|
28
28
|
|
data/lib/kettle/dev/dvcs_cli.rb
CHANGED
|
@@ -35,12 +35,12 @@ module Kettle
|
|
|
35
35
|
gl_name: "gl",
|
|
36
36
|
cb_name: "cb",
|
|
37
37
|
force: false,
|
|
38
|
-
status: false
|
|
38
|
+
status: false
|
|
39
39
|
}.freeze
|
|
40
40
|
FORGE_MIGRATION_TOOLS = {
|
|
41
41
|
github: "https://github.com/new/import",
|
|
42
42
|
gitlab: "https://gitlab.com/projects/new#import_project",
|
|
43
|
-
codeberg: "https://codeberg.org/repo/migrate"
|
|
43
|
+
codeberg: "https://codeberg.org/repo/migrate"
|
|
44
44
|
}.freeze
|
|
45
45
|
|
|
46
46
|
# Create the CLI with argv-like arguments
|
|
@@ -123,7 +123,7 @@ module Kettle
|
|
|
123
123
|
{
|
|
124
124
|
github: names[:github],
|
|
125
125
|
gitlab: names[:gitlab],
|
|
126
|
-
codeberg: names[:codeberg]
|
|
126
|
+
codeberg: names[:codeberg]
|
|
127
127
|
}.each do |forge, remote|
|
|
128
128
|
next unless remote
|
|
129
129
|
next if remote == names[:origin]
|
|
@@ -209,7 +209,7 @@ module Kettle
|
|
|
209
209
|
github: (@opts[:origin] == "github") ? "origin" : @opts[:gh_name],
|
|
210
210
|
gitlab: (@opts[:origin] == "gitlab") ? "origin" : @opts[:gl_name],
|
|
211
211
|
codeberg: (@opts[:origin] == "codeberg") ? "origin" : @opts[:cb_name],
|
|
212
|
-
all: "all"
|
|
212
|
+
all: "all"
|
|
213
213
|
}
|
|
214
214
|
end
|
|
215
215
|
|
|
@@ -219,13 +219,13 @@ module Kettle
|
|
|
219
219
|
{
|
|
220
220
|
github: "git@github.com:#{org}/#{repo}.git",
|
|
221
221
|
gitlab: "git@gitlab.com:#{org}/#{repo}.git",
|
|
222
|
-
codeberg: "git@codeberg.org:#{org}/#{repo}.git"
|
|
222
|
+
codeberg: "git@codeberg.org:#{org}/#{repo}.git"
|
|
223
223
|
}
|
|
224
224
|
else # https
|
|
225
225
|
{
|
|
226
226
|
github: "https://github.com/#{org}/#{repo}.git",
|
|
227
227
|
gitlab: "https://gitlab.com/#{org}/#{repo}.git",
|
|
228
|
-
codeberg: "https://codeberg.org/#{org}/#{repo}.git"
|
|
228
|
+
codeberg: "https://codeberg.org/#{org}/#{repo}.git"
|
|
229
229
|
}
|
|
230
230
|
end
|
|
231
231
|
end
|
|
@@ -344,7 +344,7 @@ module Kettle
|
|
|
344
344
|
{
|
|
345
345
|
github: names[:github],
|
|
346
346
|
gitlab: names[:gitlab],
|
|
347
|
-
codeberg: names[:codeberg]
|
|
347
|
+
codeberg: names[:codeberg]
|
|
348
348
|
}.each do |forge, remote_name|
|
|
349
349
|
next unless remote_name
|
|
350
350
|
|
|
@@ -388,7 +388,7 @@ module Kettle
|
|
|
388
388
|
say(" - #{forge.capitalize} import: #{FORGE_MIGRATION_TOOLS[forge]}")
|
|
389
389
|
end
|
|
390
390
|
end
|
|
391
|
-
rescue
|
|
391
|
+
rescue => e
|
|
392
392
|
warn("Failed to update README federation status: #{e.message}")
|
|
393
393
|
end
|
|
394
394
|
|