kettle-dev 1.0.10 → 1.0.12

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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/.envrc +1 -1
  4. data/.github/workflows/coverage.yml +2 -2
  5. data/.github/workflows/coverage.yml.example +127 -0
  6. data/.github/workflows/discord-notifier.yml +2 -1
  7. data/.github/workflows/truffle.yml +0 -8
  8. data/.junie/guidelines.md +1 -0
  9. data/Appraisals +4 -1
  10. data/Appraisals.example +104 -0
  11. data/CHANGELOG.md +88 -29
  12. data/CHANGELOG.md.example +4 -4
  13. data/CONTRIBUTING.md +37 -1
  14. data/Gemfile +3 -0
  15. data/Gemfile.example +35 -0
  16. data/README.md +48 -10
  17. data/README.md.example +515 -0
  18. data/{Rakefile → Rakefile.example} +13 -27
  19. data/exe/kettle-changelog +404 -0
  20. data/exe/kettle-commit-msg +2 -0
  21. data/exe/kettle-readme-backers +2 -0
  22. data/exe/kettle-release +10 -9
  23. data/gemfiles/modular/optional.gemfile +1 -0
  24. data/lib/kettle/dev/ci_helpers.rb +19 -0
  25. data/lib/kettle/dev/ci_monitor.rb +192 -0
  26. data/lib/kettle/dev/git_adapter.rb +98 -33
  27. data/lib/kettle/dev/git_commit_footer.rb +1 -1
  28. data/lib/kettle/dev/input_adapter.rb +44 -0
  29. data/lib/kettle/dev/release_cli.rb +154 -177
  30. data/lib/kettle/dev/tasks/ci_task.rb +22 -1
  31. data/lib/kettle/dev/tasks/install_task.rb +313 -95
  32. data/lib/kettle/dev/tasks/template_task.rb +176 -74
  33. data/lib/kettle/dev/template_helpers.rb +61 -8
  34. data/lib/kettle/dev/version.rb +1 -1
  35. data/lib/kettle/dev/versioning.rb +68 -0
  36. data/sig/kettle/dev/ci_helpers.rbs +1 -1
  37. data/sig/kettle/dev/ci_monitor.rbs +8 -0
  38. data/sig/kettle/dev/input_adapter.rbs +8 -0
  39. data/sig/kettle/dev/release_cli.rbs +1 -1
  40. data/sig/kettle/dev/template_helpers.rbs +3 -1
  41. data.tar.gz.sig +0 -0
  42. metadata +24 -22
  43. metadata.gz.sig +0 -0
  44. data/.gitlab-ci.yml +0 -45
data/README.md CHANGED
@@ -33,6 +33,12 @@ Then, add to your `Rakefile`:
33
33
  require "kettle/dev"
34
34
  ```
35
35
 
36
+ Then run:
37
+
38
+ ```console
39
+ bundle exec rake kettle:dev:install
40
+ ```
41
+
36
42
  Now you have many powerful development and testing tools at your disposal, all fully [documented](#-configuration) and tested.
37
43
 
38
44
  I expect the current release of this gem to be compatible with Ruby 2.3+,
@@ -49,12 +55,12 @@ and concordant releases of JRuby, and TruffleRuby.
49
55
  <details>
50
56
  <summary>Find this repo on other forges (Coming soon!)</summary>
51
57
 
52
- | Federated [DVCS][💎d-in-dvcs] Repository | Status | Issues | PRs | Wiki | CI | Discussions |
53
- |-------------------------------------------------------|-------------------------------------------------------------------|---------------------------|--------------------------|---------------------------|--------------------------|------------------------------|
58
+ | Federated [DVCS][💎d-in-dvcs] Repository | Status | Issues | PRs | Wiki | CI | Discussions |
59
+ |-------------------------------------------------|-------------------------------------------------------------------|---------------------------|--------------------------|---------------------------|--------------------------|------------------------------|
54
60
  | 🧪 [kettle-rb/kettle-dev on GitLab][📜src-gl] | The Truth | [💚][🤝gl-issues] | [💚][🤝gl-pulls] | [💚][📜wiki] | 🏀 Tiny Matrix | ➖ |
55
61
  | 🧊 [kettle-rb/kettle-dev on CodeBerg][📜src-cb] | An Ethical Mirror ([Donate][🤝cb-donate]) | [💚][🤝cb-issues] | [💚][🤝cb-pulls] | ➖ | ⭕️ No Matrix | ➖ |
56
- | 🐙 [kettle-rb/kettle-dev on GitHub][📜src-gh] | A Dirty Mirror | [💚][🤝gh-issues] | [💚][🤝gh-pulls] | ➖ | 💯 Full Matrix | [💚][gh-discussions] |
57
- | 🎮️ [Discord Server][✉️discord-invite] | [![Live Chat on Discord][✉️discord-invite-img]][✉️discord-invite] | [Let's][✉️discord-invite] | [talk][✉️discord-invite] | [about][✉️discord-invite] | [this][✉️discord-invite] | [library!][✉️discord-invite] |
62
+ | 🐙 [kettle-rb/kettle-dev on GitHub][📜src-gh] | Another Mirror | [💚][🤝gh-issues] | [💚][🤝gh-pulls] | ➖ | 💯 Full Matrix | [💚][gh-discussions] |
63
+ | 🎮️ [Discord Server][✉️discord-invite] | [![Live Chat on Discord][✉️discord-invite-img]][✉️discord-invite] | [Let's][✉️discord-invite] | [talk][✉️discord-invite] | [about][✉️discord-invite] | [this][✉️discord-invite] | [library!][✉️discord-invite] |
58
64
 
59
65
  </details>
60
66
 
@@ -81,8 +87,8 @@ Alternatively:
81
87
 
82
88
  | Tokens to Remember | [![Gem name][⛳️name-img]][⛳️gem-name] [![Gem namespace][⛳️namespace-img]][⛳️gem-namespace] |
83
89
  |-------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
84
- | Works with JRuby | ![JRuby 9.1 Compat][💎jruby-9.1i] ![JRuby 9.2 Compat][💎jruby-9.2i] ![JRuby 9.3 Compat][💎jruby-9.3i] <br/> [![JRuby 9.4 Compat][💎jruby-9.4i]][🚎10-j-wf] [![JRuby 10.0 Compat][💎jruby-c-i]][🚎11-c-wf] [![JRuby HEAD Compat][💎jruby-headi]][🚎3-hd-wf] |
85
- | Works with Truffle Ruby | ![Truffle Ruby 22.3 Compat][💎truby-22.3i] <br/> [![Truffle Ruby 23.0 Compat][💎truby-23.0i]][🚎9-t-wf] [![Truffle Ruby 23.1 Compat][💎truby-23.1i]][🚎9-t-wf] [![Truffle Ruby 24.1 Compat][💎truby-c-i]][🚎11-c-wf] |
90
+ | Works with JRuby | ![JRuby 9.1 Compat][💎jruby-9.1i] ![JRuby 9.2 Compat][💎jruby-9.2i] ![JRuby 9.3 Compat][💎jruby-9.3i] <br/> [![JRuby 9.4 Compat][💎jruby-9.4i]][🚎10-j-wf] [![JRuby 10.0 Compat][💎jruby-c-i]][🚎11-c-wf] [![JRuby HEAD Compat][💎jruby-headi]][🚎3-hd-wf] |
91
+ | Works with Truffle Ruby | ![Truffle Ruby 22.3 Compat][💎truby-22.3i] ![Truffle Ruby 23.0 Compat][💎truby-23.0i] <br/> [![Truffle Ruby 23.1 Compat][💎truby-23.1i]][🚎9-t-wf] [![Truffle Ruby 24.1 Compat][💎truby-c-i]][🚎11-c-wf] |
86
92
  | Works with MRI Ruby 3 | [![Ruby 3.0 Compat][💎ruby-3.0i]][🚎4-lg-wf] [![Ruby 3.1 Compat][💎ruby-3.1i]][🚎6-s-wf] [![Ruby 3.2 Compat][💎ruby-3.2i]][🚎6-s-wf] [![Ruby 3.3 Compat][💎ruby-3.3i]][🚎6-s-wf] [![Ruby 3.4 Compat][💎ruby-c-i]][🚎11-c-wf] [![Ruby HEAD Compat][💎ruby-headi]][🚎3-hd-wf] |
87
93
  | Works with MRI Ruby 2 | ![Ruby 2.0 Compat][💎ruby-2.0i] ![Ruby 2.1 Compat][💎ruby-2.1i] ![Ruby 2.2 Compat][💎ruby-2.2i] <br/> [![Ruby 2.3 Compat][💎ruby-2.3i]][🚎1-an-wf] [![Ruby 2.4 Compat][💎ruby-2.4i]][🚎1-an-wf] [![Ruby 2.5 Compat][💎ruby-2.5i]][🚎1-an-wf] [![Ruby 2.6 Compat][💎ruby-2.6i]][🚎7-us-wf] [![Ruby 2.7 Compat][💎ruby-2.7i]][🚎7-us-wf] |
88
94
  | Works with MRI Ruby 1 | ![Ruby 1.9 Compat][💎ruby-1.9i] |
@@ -157,14 +163,37 @@ Add to your `Rakefile`:
157
163
  require "kettle/dev"
158
164
  ```
159
165
 
160
- That’s it. When installed, kettle-dev:
166
+ Then run:
167
+
168
+ ```console
169
+ bundle exec rake kettle:dev:install
170
+ ```
171
+
172
+ If git status is not clean it will abort.
173
+ It may have some prompts, which can mostly be avoided by running with options:
174
+
175
+ ```console
176
+ # DANGER: options to reduce prompts will overwrite files without asking.
177
+ bundle exec rake kettle:dev:install allowed=true force=true
178
+ ```
179
+
180
+ Hopefully, all the files that get overwritten are tracked in git!
181
+ I wrote this for myself, and it fits my patterns of development.
182
+
183
+ The install task will write a report at the end with:
184
+ 1. A file list summary of the changes made.
185
+ 2. Next steps for using the tools.
186
+ 3. A warning about .env.local (DO NOT COMMIT IT, as it will likely have secrets added)
187
+
188
+ That’s it. Once installed, kettle-dev:
161
189
  - Registers RuboCop-LTS tasks and wires your default Rake task to run the gradual linter.
162
190
  - Locally: default task prefers `rubocop_gradual:autocorrect`.
163
191
  - On CI (`CI=true`): default task prefers `rubocop_gradual:check`.
164
192
  - Integrates optional coverage tasks via kettle-soup-cover (enabled locally when present).
165
193
  - Adds gem-shipped Rake tasks from `lib/kettle/dev/rakelib`, including:
166
194
  - `ci:act` — interactive selector for running GitHub Actions workflows via `act`.
167
- - `kettle:dev:install` — copies this repo’s .github automation and offers to install .git-hooks templates.
195
+ - `kettle:dev:install` — copies this repo’s .github automation, offers to install .git-hooks templates, and overwrites many files in your project.
196
+ - Grapheme syncing: detects the grapheme (e.g., emoji) immediately following the first `#` H1 in README.md and ensures the same grapheme, followed by a single space, prefixes both `spec.summary` and `spec.description` in your gemspec. If the H1 has none, you’ll be prompted to enter one; tests use an input adapter, so runs never hang in CI.
168
197
  - option: force: When truthy (1, true, y, yes), treat all y/N prompts as Yes. Useful for non-interactive runs or to accept defaults quickly. Example: `bundle exec rake kettle:dev:template force=true`
169
198
  - option: allowed: When truthy (1, true, y, yes), resume task after you have reviewed `.envrc`/`.env.local` and run `direnv allow`. If either file is created or updated, the task will abort with instructions unless `allowed=true` is present. Example: `bundle exec rake kettle:dev:install allowed=true`
170
199
  - `kettle:dev:template` — templates files from this gem into your project (e.g., .github workflows, .devcontainer, .qlty, modular Gemfiles, README/CONTRIBUTING stubs). You can run this independently to refresh templates without the extra install prompts.
@@ -261,6 +290,15 @@ Project automation bootstrap
261
290
  - `bundle binstubs kettle-dev --path bin`
262
291
  - Add to `.envrc`: `PATH_add bin` (so `bin/` tools run without the prefix)
263
292
 
293
+ ### Template .example files are preferred
294
+
295
+ - The templating step dynamically prefers any `*.example` file present in this gem’s templates. When a `*.example` exists alongside the non-example template, the `.example` content is used, and the destination file is written without the `.example` suffix.
296
+ - This applies across all templated files, including:
297
+ - Root files like `.gitlab-ci.yml` (copied from `.gitlab-ci.yml.example` when present).
298
+ - Nested files like `.github/workflows/coverage.yml` (copied from `.github/workflows/coverage.yml.example` when present).
299
+ - This behavior is automatic for any future `*.example` files added to the templates.
300
+ - Exception: `.env.local` is handled specially for safety. Regardless of whether the template provides `.env.local` or `.env.local.example`, the installer copies it to `.env.local.example` in your project, and will never create or overwrite `.env.local`.
301
+
264
302
  Releasing (maintainers)
265
303
  - `exe/kettle-release` — guided release helper that:
266
304
  - Runs sanity checks (`bin/setup`, `bin/rake`), confirms version/changelog, optionally updates Appraisals, commits “🔖 Prepare release vX.Y.Z”.
@@ -623,7 +661,7 @@ Thanks for RTFM. ☺️
623
661
  [💎ruby-c-i]: https://img.shields.io/badge/Ruby-current-CC342D?style=for-the-badge&logo=ruby&logoColor=green
624
662
  [💎ruby-headi]: https://img.shields.io/badge/Ruby-HEAD-CC342D?style=for-the-badge&logo=ruby&logoColor=blue
625
663
  [💎truby-22.3i]: https://img.shields.io/badge/Truffle_Ruby-22.3_(%F0%9F%9A%ABCI)-AABBCC?style=for-the-badge&logo=ruby&logoColor=pink
626
- [💎truby-23.0i]: https://img.shields.io/badge/Truffle_Ruby-23.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
664
+ [💎truby-23.0i]: https://img.shields.io/badge/Truffle_Ruby-23.0_(%F0%9F%9A%ABCI)-AABBCC?style=for-the-badge&logo=ruby&logoColor=pink
627
665
  [💎truby-23.1i]: https://img.shields.io/badge/Truffle_Ruby-23.1-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
628
666
  [💎truby-c-i]: https://img.shields.io/badge/Truffle_Ruby-current-34BCB1?style=for-the-badge&logo=ruby&logoColor=green
629
667
  [💎truby-headi]: https://img.shields.io/badge/Truffle_Ruby-HEAD-34BCB1?style=for-the-badge&logo=ruby&logoColor=blue
@@ -659,7 +697,7 @@ Thanks for RTFM. ☺️
659
697
  [📌gitmoji]:https://gitmoji.dev
660
698
  [📌gitmoji-img]:https://img.shields.io/badge/gitmoji_commits-%20😜%20😍-34495e.svg?style=flat-square
661
699
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
662
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-1.725-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
700
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-2.001-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
663
701
  [🔐security]: SECURITY.md
664
702
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
665
703
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year