ratatui_ruby-devtools 0.2.1 → 0.3.0
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
- data/.rubocop.yml +1 -1
- data/AGENTS.md +1 -1
- data/CHANGELOG.md +53 -7
- data/README.md +49 -21
- data/Rakefile +1 -1
- data/bin/setup +20 -6
- data/bin/setup.ps1 +74 -0
- data/doc/contributors/documentation_style.md +3 -4
- data/exe/scaffold +8 -342
- data/lib/ratatui_ruby/devtools/scaffold/scaffold_config.rb +67 -0
- data/lib/ratatui_ruby/devtools/scaffold/template_renderer.rb +282 -0
- data/lib/ratatui_ruby/devtools/task_scope.rb +24 -0
- data/lib/ratatui_ruby/devtools/tasks/autodoc_tasks.rb +31 -0
- data/lib/ratatui_ruby/devtools/tasks/bump/bump_workflow.rb +71 -0
- data/lib/ratatui_ruby/devtools/tasks/bump/changelog.rb +60 -3
- data/lib/ratatui_ruby/devtools/tasks/bump/github_project.rb +26 -0
- data/lib/ratatui_ruby/devtools/tasks/bump/history.rb +3 -3
- data/lib/ratatui_ruby/devtools/tasks/bump/links.rb +39 -24
- data/lib/ratatui_ruby/devtools/tasks/bump/manifest.rb +9 -17
- data/lib/ratatui_ruby/devtools/tasks/bump/no_crate.rb +19 -0
- data/lib/ratatui_ruby/devtools/tasks/bump/no_links.rb +22 -0
- data/lib/ratatui_ruby/devtools/tasks/bump/patch_release.rb +25 -0
- data/lib/ratatui_ruby/devtools/tasks/bump/release_branch.rb +17 -0
- data/lib/ratatui_ruby/devtools/tasks/bump/release_from_trunk.rb +48 -0
- data/lib/ratatui_ruby/devtools/tasks/bump/repository.rb +143 -0
- data/lib/ratatui_ruby/devtools/tasks/bump/ruby_gem.rb +65 -59
- data/lib/ratatui_ruby/devtools/tasks/bump/rust_crate.rb +42 -0
- data/lib/ratatui_ruby/devtools/tasks/bump/sem_ver.rb +127 -10
- data/lib/ratatui_ruby/devtools/tasks/bump/source_hut_project.rb +26 -0
- data/lib/ratatui_ruby/devtools/tasks/bump/unbranched_release.rb +20 -0
- data/lib/ratatui_ruby/devtools/tasks/bump/unreleased_section.rb +19 -1
- data/lib/ratatui_ruby/devtools/tasks/bump_tasks.rb +47 -0
- data/lib/ratatui_ruby/devtools/tasks/cargo_tasks.rb +57 -0
- data/lib/ratatui_ruby/devtools/tasks/doc/documentation.rb +59 -0
- data/lib/ratatui_ruby/devtools/tasks/doc/link/file_url.rb +30 -0
- data/lib/ratatui_ruby/devtools/tasks/doc/link/relative_path.rb +61 -0
- data/lib/ratatui_ruby/devtools/tasks/doc/link/web_url.rb +55 -0
- data/lib/ratatui_ruby/devtools/tasks/doc/link.rb +52 -0
- data/lib/ratatui_ruby/devtools/tasks/doc/link_audit.rb +116 -0
- data/lib/ratatui_ruby/devtools/tasks/doc/problem.rb +40 -0
- data/lib/ratatui_ruby/devtools/tasks/doc/source_file.rb +93 -0
- data/lib/ratatui_ruby/devtools/tasks/doc_tasks.rb +937 -0
- data/lib/ratatui_ruby/devtools/tasks/license/blame.rb +72 -0
- data/lib/ratatui_ruby/devtools/tasks/license/changed_files.rb +34 -0
- data/lib/ratatui_ruby/devtools/tasks/license/contribution.rb +12 -0
- data/lib/ratatui_ruby/devtools/tasks/license/copyright.rb +47 -0
- data/lib/ratatui_ruby/devtools/tasks/license/directory_licensing.rb +42 -0
- data/lib/ratatui_ruby/devtools/tasks/license/existing_header.rb +21 -0
- data/lib/ratatui_ruby/devtools/tasks/license/header_revision.rb +45 -0
- data/lib/ratatui_ruby/devtools/tasks/license/licensed_file.rb +39 -0
- data/lib/ratatui_ruby/devtools/tasks/license/licensing.rb +35 -0
- data/lib/ratatui_ruby/devtools/tasks/license/markdown_document.rb +23 -0
- data/lib/ratatui_ruby/devtools/tasks/license/markdown_files.rb +31 -0
- data/lib/ratatui_ruby/devtools/tasks/license/markdown_header_syntax.rb +104 -0
- data/lib/ratatui_ruby/devtools/tasks/license/markdown_snippet_syntax.rb +159 -0
- data/lib/ratatui_ruby/devtools/tasks/license/missing_header.rb +18 -0
- data/lib/ratatui_ruby/devtools/tasks/license/rbs_files.rb +27 -0
- data/lib/ratatui_ruby/devtools/tasks/license/rbs_header_syntax.rb +31 -0
- data/lib/ratatui_ruby/devtools/tasks/license/rdoc_comment.rb +51 -0
- data/lib/ratatui_ruby/devtools/tasks/license/rdoc_examples.rb +41 -0
- data/lib/ratatui_ruby/devtools/tasks/license/rdoc_snippet_syntax.rb +119 -0
- data/lib/ratatui_ruby/devtools/tasks/license/renewal.rb +17 -0
- data/lib/ratatui_ruby/devtools/tasks/license/reuse_annotated_file.rb +12 -0
- data/lib/ratatui_ruby/devtools/tasks/license/reuse_tool.rb +34 -0
- data/lib/ratatui_ruby/devtools/tasks/license/ruby_comment_header.rb +49 -0
- data/lib/ratatui_ruby/devtools/tasks/license/ruby_files.rb +36 -0
- data/lib/ratatui_ruby/devtools/tasks/license/ruby_header_syntax.rb +39 -0
- data/lib/ratatui_ruby/devtools/tasks/license/rust_files.rb +27 -0
- data/lib/ratatui_ruby/devtools/tasks/license/rust_header_syntax.rb +59 -0
- data/lib/ratatui_ruby/devtools/tasks/license/snippet.rb +44 -0
- data/lib/ratatui_ruby/devtools/tasks/license/snippet_file.rb +29 -0
- data/lib/ratatui_ruby/devtools/tasks/license/snippet_opening.rb +39 -0
- data/lib/ratatui_ruby/devtools/tasks/license/snippet_revision.rb +75 -0
- data/lib/ratatui_ruby/devtools/tasks/license/spdx_header.rb +42 -0
- data/lib/ratatui_ruby/devtools/tasks/license/unknown_file.rb +12 -0
- data/lib/ratatui_ruby/devtools/tasks/license/unlicensed_files.rb +69 -0
- data/lib/ratatui_ruby/devtools/tasks/license/wrapped_snippet.rb +30 -0
- data/lib/ratatui_ruby/devtools/tasks/license_tasks.rb +71 -0
- data/lib/ratatui_ruby/devtools/tasks/lint/gem_lockfile.rb +29 -0
- data/lib/ratatui_ruby/devtools/tasks/lint/supported_rubies.rb +18 -0
- data/lib/ratatui_ruby/devtools/tasks/lint_tasks.rb +100 -0
- data/lib/ratatui_ruby/devtools/tasks/release/platform_gem.rb +21 -12
- data/lib/ratatui_ruby/devtools/tasks/release/versioned_binary.rb +1 -1
- data/lib/ratatui_ruby/devtools/tasks/release_tasks.rb +80 -0
- data/lib/ratatui_ruby/devtools/tasks/reuse_tasks.rb +39 -0
- data/lib/ratatui_ruby/devtools/tasks/{test.rake → test_tasks.rb} +13 -4
- data/lib/ratatui_ruby/devtools/tasks/website/hosted_source_tree.rb +24 -0
- data/lib/ratatui_ruby/devtools/tasks/website/index_page.rb +1 -4
- data/lib/ratatui_ruby/devtools/tasks/website/source_tree.rb +63 -0
- data/lib/ratatui_ruby/devtools/tasks/website/versioned_documentation.rb +14 -13
- data/lib/ratatui_ruby/devtools/tasks/website_tasks.rb +49 -0
- data/lib/ratatui_ruby/devtools/templates/.github/workflows/build-gems.yml.erb +7 -1
- data/lib/ratatui_ruby/devtools/templates/.github/workflows/ci.yml.erb +2 -2
- data/lib/ratatui_ruby/devtools/templates/.gitignore.erb +2 -1
- data/lib/ratatui_ruby/devtools/templates/.rubocop.yml.erb +1 -1
- data/lib/ratatui_ruby/devtools/templates/AGENTS.md.erb +1 -1
- data/lib/ratatui_ruby/devtools/templates/CHANGELOG.md.erb +3 -1
- data/lib/ratatui_ruby/devtools/templates/CONTRIBUTING.md.erb +3 -3
- data/lib/ratatui_ruby/devtools/templates/Gemfile.erb +2 -3
- data/lib/ratatui_ruby/devtools/templates/README.md.erb +7 -7
- data/lib/ratatui_ruby/devtools/templates/REUSE.toml.erb +1 -1
- data/lib/ratatui_ruby/devtools/templates/bin/setup.erb +5 -1
- data/lib/ratatui_ruby/devtools/templates/bin/setup.ps1.erb +5 -1
- data/lib/ratatui_ruby/devtools/templates/doc/concepts/application_architecture.md.erb +2 -2
- data/lib/ratatui_ruby/devtools/templates/doc/concepts/application_testing.md.erb +3 -3
- data/lib/ratatui_ruby/devtools/templates/doc/getting_started/quickstart.md.erb +4 -4
- data/lib/ratatui_ruby/devtools/templates/ext/Cargo.toml.erb +1 -1
- data/lib/ratatui_ruby/devtools/templates/gemspec.erb +1 -1
- data/lib/ratatui_ruby/devtools/templates/mise.toml.erb +3 -3
- data/lib/ratatui_ruby/devtools/version.rb +1 -1
- data/lib/ratatui_ruby/devtools.rb +54 -71
- data/mise.toml +2 -2
- data/sig/ratatui_ruby/devtools.rbs +16 -1
- metadata +93 -34
- data/.builds/ruby-4.0.yml +0 -38
- data/lib/ratatui_ruby/devtools/tasks/autodoc.rake +0 -21
- data/lib/ratatui_ruby/devtools/tasks/bump.rake +0 -80
- data/lib/ratatui_ruby/devtools/tasks/cargo.rake +0 -47
- data/lib/ratatui_ruby/devtools/tasks/doc.rake +0 -887
- data/lib/ratatui_ruby/devtools/tasks/license/headers_md.rb +0 -276
- data/lib/ratatui_ruby/devtools/tasks/license/headers_rb.rb +0 -236
- data/lib/ratatui_ruby/devtools/tasks/license/license_utils.rb +0 -143
- data/lib/ratatui_ruby/devtools/tasks/license/snippets_md.rb +0 -353
- data/lib/ratatui_ruby/devtools/tasks/license/snippets_rdoc.rb +0 -186
- data/lib/ratatui_ruby/devtools/tasks/license.rake +0 -91
- data/lib/ratatui_ruby/devtools/tasks/lint.rake +0 -80
- data/lib/ratatui_ruby/devtools/tasks/release.rake +0 -87
- data/lib/ratatui_ruby/devtools/tasks/resources/rubies.yml +0 -7
- data/lib/ratatui_ruby/devtools/tasks/reuse.rake +0 -104
- data/lib/ratatui_ruby/devtools/tasks/website.rake +0 -37
- data/lib/ratatui_ruby/devtools/templates/.builds/ruby.yml.erb +0 -47
- data/lib/ratatui_ruby/devtools/templates/tasks/resources/index.html.erb +0 -45
- data/lib/ratatui_ruby/devtools/templates/tasks/resources/rubies.yml.erb +0 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5e42c1eb334a8258f81be914b98c98d561eb88cbbd994bafdf1c795dc6eea976
|
|
4
|
+
data.tar.gz: 89c0cc556e030abc3c218842afd01c1320f9ee43adec14b5c8eddb62ac4f9cad
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e6d0b98c938b05cec67b959334be558e3b134c3ebc18297bd286168c35ddf6d5a2482891855dae53da7809e923ba996bc416dfe444f088c6cc9d7e83d59dbb76
|
|
7
|
+
data.tar.gz: b09df8f84796a39206e541540d793a635bbec3c6553cb0efeb9032f59caa96179ebe36d3962c073a007de6c66c8543c7cdc2f0fd013d86da0bd068c5136ef0d4
|
data/.rubocop.yml
CHANGED
data/AGENTS.md
CHANGED
|
@@ -35,7 +35,7 @@ This gem provides Rake tasks, linters, license enforcement, version bumping, and
|
|
|
35
35
|
|
|
36
36
|
### Ruby Standards
|
|
37
37
|
|
|
38
|
-
- Use `Data.define` for all value objects (Ruby 3.
|
|
38
|
+
- Use `Data.define` for all value objects (Ruby 3.3+).
|
|
39
39
|
- Define types in `.rbs` files. Don't use `untyped` just because it's easy; be comprehensive and accurate.
|
|
40
40
|
- Every public Ruby class/method must be documented for humans in RDoc.
|
|
41
41
|
|
data/CHANGELOG.md
CHANGED
|
@@ -21,6 +21,51 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
21
21
|
|
|
22
22
|
### Removed
|
|
23
23
|
|
|
24
|
+
## [0.3.0] - 2026-10-22
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- **Rust SPDX headers**: Rust files in `ext/` had no license task, so you annotated them by hand and a wrong license slipped through easily. `rake license:headers:rs` now writes their SPDX headers, and `license:headers:all` and `license:new` run it too.
|
|
29
|
+
- **RBS SPDX headers**: The Ruby header task also wrote headers into `.rbs` files, opening them with a `# frozen_string_literal: true` comment that means nothing in RBS. `rake license:headers:rbs` now writes their headers without it, and `license:headers:all` and `license:new` run it too. A signature loses the comment the next time its header changes.
|
|
30
|
+
- **Lockfile Ruby check**: Bundler checks locked gems only against the Ruby that resolves them. A lockfile updated on your newest Ruby could hold gems your oldest supported Ruby can't install, and nothing failed until CI. `rake lint` now catches these gems and prints the `bundle lock` command that relocks them on the oldest Ruby.
|
|
31
|
+
- **Link check**: Broken links in your docs fail silently, so your readers find them before you do. `rake doc:check_links` scans your gem's RDoc and Markdown for relative links to files that don't exist and for `file://` URLs that only work on your machine. It asks whether to check web URLs too, and fails when it finds a broken link.
|
|
32
|
+
- **Prerelease versions**: Give a bump a label to release a candidate for the version it would release: `rake 'bump:minor[beta]'` takes `1.1.3` to `1.2.0-beta.1`, and again to `1.2.0-beta.2`. Another label starts again at `.1`, so `rake 'bump:minor[rc]'` then releases `1.2.0-rc.1`, and a label that would sort before the current one stops the bump. A bump without a label ships the candidate, so `rake bump:patch` takes `1.2.0-rc.1` to `1.2.0` instead of skipping to `1.2.1`. `rake bump:exact[1.0.0-rc.1]` still sets any prerelease by hand. A prerelease that isn't valid SemVer, such as `1.0.0-alpha.001`, stops the bump with an error that shows the right form.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- **Settings move to `install_gem_tasks!`**: `RatatuiRuby::Devtools.gem_name`, `gemspec_file`, and `version_file`, and their setters, read as settings of devtools rather than of your gem. Pass them to `install_gem_tasks!` instead, as in `RatatuiRuby::Devtools.install_gem_tasks!(gem_name: "my_gem")`, along with the new `non_runtime_license:` and `snippet_paths:`. Devtools now finds your gemspec when it installs the tasks, so a gem with more than one gemspec passes `gemspec_file:` before any task runs.
|
|
37
|
+
- **Each version's docs build with its own bundle**: `rake website:build` ran every version's doc tasks with the bundle you built from, so updating devtools or RDoc there changed the docs of every release on your site. Each version now builds with its own Ruby, bundle, and tasks, using RDoc 7.2.0 if it locked an older one. A version whose bundle no longer installs, such as one that locked a yanked gem or names a gem by a relative path, still builds with yours.
|
|
38
|
+
- **RDoc 8**: RDoc 8 changed how its HTML formatter starts, so the doc tasks now need RDoc 8.1 or later. Change the `rdoc` development dependency in your gemspec to `"~> 8.1"`, or run `scaffold --update`; until then, Bundler can't install this release beside your gem. RDoc 8 renders your README only as `index.html` but still links `README.md` to `README_md.html`, so `rake rdoc` now writes that page as a redirect to `index.html`.
|
|
39
|
+
- **Release branches from 1.0 on**: Minor and major releases happened on trunk, so a patch for an older series had no branch to land on. Once your gem reaches 1.0, a bump that releases a new minor or major version, one ending in `.0`, creates a `release/X.Y` branch from trunk, releases there, and imports the release into trunk. A bump that releases a patch runs on the release branch you have checked out and refuses to run on trunk. Finishing a prerelease such as `1.2.0-rc.1` releases `1.2.0`, so it runs on trunk whichever bump you use. Before 1.0, every bump releases on trunk. Every bump, `rake bump:exact` included, now follows these branch rules, commits for you instead of printing a suggested commit message, and stops if your working tree has uncommitted changes.
|
|
40
|
+
- **Snippet copyright notices**: REUSE 3.3 requires copyright notices inside a code snippet to use `SPDX-SnippetCopyrightText`, and recommends a contact address. The scaffolded documentation's snippets now use that tag with your name and email. `rake license:snippets:all` writes new snippets the same way, crediting each author of the snippet's lines, and converts the tag in the snippets your docs already have. Run `scaffold --update` and then `rake license:snippets:all` to pick it up.
|
|
41
|
+
- **License for each file**: The license tasks gave `lib/`, `ext/`, and `test/` the LGPL and everything else the AGPL, whatever your gem's license, and gave MIT-0 to examples whose names start with `widget_` or `verify_`. Code apps link, from your gemspec's `require_paths` and `extensions`, now takes the license in your gemspec. Everything else, including tests, `sig/`, and `exe/`, takes AGPL-3.0-or-later, or the `non_runtime_license:` you pass to `install_gem_tasks!`. Examples get MIT-0 only under the path prefixes you pass as `snippet_paths:`, so pass them in your Rakefile before running `rake license:headers:all`, or those examples become AGPL.
|
|
42
|
+
- **Minitest 6**: Devtools required minitest 5, so your gem couldn't move to minitest 6. It now works with minitest 5.16 or later, up to 6, and the scaffolded `Gemfile` asks for `~> 6.0`. Minitest 6 moved `Minitest::Mock` and `stub` into the `minitest-mock` gem, which scaffolded gems already list as a development dependency; add it if your tests use either. Run `scaffold --update` to pick up the `Gemfile`.
|
|
43
|
+
- **Scaffolded gems start at 0.0.0**: The scaffold started a new gem at `0.0.1.pre.1` and called it pre-release. A gem below 1.0 is in initial development, but its releases are normal versions that `gem install` and Bundler find. A prerelease is a candidate users install only with `--pre`. New gems now start at `0.0.0`, so your first `rake bump:patch` or `rake bump:minor` releases `0.0.1` or `0.1.0`, and their README and docs say "initial development". Run `scaffold --update` to pick up the wording.
|
|
44
|
+
- **Scaffolded `bin/setup`**: Installs the bundle in `vendor/bundle` instead of the shared per-user gem directory, so native gems always match the project's Ruby. Run `scaffold --update` to pick it up.
|
|
45
|
+
|
|
46
|
+
### Fixed
|
|
47
|
+
|
|
48
|
+
- **License and bump tasks on Windows**: Devtools ran git through the shell with Unix quoting and redirection, which the Windows shell doesn't understand. On Windows, the license tasks found no files to license, and bumps failed to commit. They now run git directly. The license tasks also wrote every file they changed with Windows line endings, which made `git blame` see each line as new and date snippets to the current year; they now keep each file's own line endings. `rake reuse:fix` read the REUSE Tool's Windows paths as unknown files and gave them the tool's own headers; it now gives them devtools' headers, as everywhere else.
|
|
49
|
+
- **License check in scaffolded CI on macOS and Windows**: The scaffolded `bin/setup` and `bin/setup.ps1` installed the REUSE Tool with no way to detect file encodings. On runners without libmagic, such as macOS and Windows, `reuse lint` stopped with `NoEncodingModuleError`. They now install its `charset-normalizer` extra. Run `scaffold --update` to pick it up.
|
|
50
|
+
- **Scaffolded CI on Ruby 4.0**: The scaffold pinned your CI's newest Ruby to one patch release, so CI never tested a later 4.0.x. It now names 4.0, which CI resolves to the newest 4.0 patch release, as it already did for 3.3 and 3.4. Run `scaffold --update` to pick it up.
|
|
51
|
+
- **Version links on GitHub**: `rake bump:*` only understood SourceHut's changelog links, so a gem on GitHub got no link for each new version, and nothing said so. On GitHub, the Unreleased link now browses `HEAD`, and the new version links to its release. A link into any other forge now gets a warning. The scaffolded `CHANGELOG.md` starts with an Unreleased link to your GitHub repository, so your first bump links your first release. Versions bumped before this have no link; add theirs by hand.
|
|
52
|
+
- **Scaffolded copyright notices**: The scaffold credited Kerrick Long, not you, in the SPDX headers of `CHANGELOG.md` and `.gitignore` and in the `REUSE.toml` annotation for `doc/images/`. It now credits you, as it does everywhere else. Run `scaffold --update` to fix `.gitignore` and `REUSE.toml`, and fix `CHANGELOG.md` by hand, since the update leaves it alone.
|
|
53
|
+
- **First bump of a scaffolded gem**: The scaffold's `CHANGELOG.md` has nothing released yet and no version links, so every `rake bump:*` stopped with `Could not parse CHANGELOG.md`. Bumps now release into a changelog without either. Every bump also dropped the changelog's final newline, and now keeps it.
|
|
54
|
+
- **First release of a scaffolded gem**: The scaffold creates a `stable` branch but doesn't push it. `rake release` then failed at its last step, pushing `stable` to origin, because git couldn't tell the name was meant as a new branch. The release now creates `stable` on origin when it isn't there yet.
|
|
55
|
+
- **Bumping a Rust gem with a dash in its name**: The scaffold puts a gem's crate in `ext/` under the gem's name with underscores, as Cargo wants, but `rake bump:*` looked under the name with its dash. For a gem like `my-gem`, the bump left the crate's `Cargo.toml` and `Cargo.lock` at the old version. It now finds the crate where the scaffold puts it and refreshes the package its `Cargo.toml` names.
|
|
56
|
+
- **`rake website:build` ignored `gemspec_file`**: The other tasks read the gemspec you named. The website build read the first `*.gemspec` in your gem's directory instead, so a gem with more than one could get a site titled after the wrong one. It now reads the gemspec you pass as `gemspec_file:`, like the other tasks.
|
|
57
|
+
- **Platform gems in your gem's CI**: The scaffolded `build-gems` workflow packaged precompiled gems with `ruby tasks/release/platform_gem.rb`, a script that only exists inside devtools, so the Package job failed. The job now installs your bundle and runs `rake release:platform_gem`, and the gem it builds for Apple Silicon installs on every macOS version. Run `scaffold --update` to pick it up.
|
|
58
|
+
- **License tasks in your gem**: The `license:headers:*` and `license:snippets:*` tasks ran their scripts from your gem's own `tasks/license/` directory, which only exists in the gem devtools came from, so they failed with `No such file or directory`. They now run the scripts devtools ships.
|
|
59
|
+
- **`rake reuse:fix` credited Kerrick Long**: It annotated every file it fixed with Kerrick Long's copyright, no matter who ran it. It now uses the identity git gives your commits, from `user.name` and `user.email` or the `GIT_AUTHOR_*` variables, and stops with instructions when git doesn't know who you are. `REUSE_COPYRIGHT` still overrides it.
|
|
60
|
+
- **`rake reuse:fix` wrote the wrong headers**: It gave every code file AGPL-3.0-or-later, even in `lib/` of an LGPL gem, in the REUSE Tool's header format rather than yours. It also quit at the first `.rbs` file, `Gemfile.lock`, or `.txt` file, which the REUSE Tool can't comment, leaving the files after it bare. On Windows it failed on every file, because the shell there ignores single quotes and split your name at its spaces. Ruby, RBS, Rust, and Markdown files now get the headers the license tasks write, and other code takes the license the license tasks would choose unless you set `REUSE_CODE_LICENSE`. `Gemfile.lock` and plain text get a `.license` file beside them, and the REUSE Tool gets your name without a shell in between.
|
|
61
|
+
- **Short and RubyGems-style versions**: A version like `1.2` crashed `rake bump:patch`. A RubyGems-style prerelease like `1.0.0.beta.1` was read as `1.0.0`, so the next bump skipped past the release. `1.2` now bumps as `1.2.0`, and `1.0.0.beta.1` stops the bump with an error asking for `1.0.0-beta.1`. `rake release` stops on either form before Bundler tags or publishes anything, and says how to write the version in full. A gem scaffolded by an earlier devtools starts at `0.0.1.pre.1`, which the bump now stops on too, so change its version to `0.0.0` before your first release.
|
|
62
|
+
|
|
63
|
+
### Removed
|
|
64
|
+
|
|
65
|
+
- **Ruby 3.2**: Ruby 3.2 reached end of life on 2026-03-31, so devtools now needs Ruby 3.3.11 or later. Scaffolded gems test on Ruby 3.3, 3.4, and 4.0, and RuboCop checks them as Ruby 3.3. On Ruby 3.2, keep using devtools 0.2.
|
|
66
|
+
- **Unused scaffolded files**: The scaffold wrote `tasks/resources/rubies.yml`, which only the old SourceHut build generator read, and `tasks/resources/index.html.erb`, which the website build never reads because it uses the copy inside devtools. New gems no longer get either; delete them from yours.
|
|
67
|
+
- **`rake reuse:normalize_ruby`**: It moved the bare SPDX lines the REUSE Tool wrote into Ruby files below the magic comment and between `#--` and `#++`. `rake reuse:fix` now writes Ruby headers that way itself, so there is nothing left to normalize.
|
|
68
|
+
|
|
24
69
|
## [0.2.1] - 2026-02-16
|
|
25
70
|
|
|
26
71
|
### Added
|
|
@@ -95,10 +140,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
95
140
|
|
|
96
141
|
### Removed
|
|
97
142
|
|
|
98
|
-
[Unreleased]: https://
|
|
99
|
-
[0.
|
|
100
|
-
[0.2.
|
|
101
|
-
[0.
|
|
102
|
-
[0.1.
|
|
103
|
-
[0.1.
|
|
104
|
-
[0.1.
|
|
143
|
+
[Unreleased]: https://github.com/setdef/ratatui_ruby-devtools/tree/HEAD
|
|
144
|
+
[0.3.0]: https://github.com/setdef/ratatui_ruby-devtools/releases/tag/v0.3.0
|
|
145
|
+
[0.2.1]: https://github.com/setdef/ratatui_ruby-devtools/releases/tag/v0.2.1
|
|
146
|
+
[0.2.0]: https://github.com/setdef/ratatui_ruby-devtools/releases/tag/v0.2.0
|
|
147
|
+
[0.1.3]: https://github.com/setdef/ratatui_ruby-devtools/releases/tag/v0.1.3
|
|
148
|
+
[0.1.2]: https://github.com/setdef/ratatui_ruby-devtools/releases/tag/v0.1.2
|
|
149
|
+
[0.1.1]: https://github.com/setdef/ratatui_ruby-devtools/releases/tag/v0.1.1
|
|
150
|
+
[0.1.0]: https://github.com/setdef/ratatui_ruby-devtools/releases/tag/v0.1.0
|
data/README.md
CHANGED
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
# ratatui_ruby-devtools
|
|
6
6
|
|
|
7
7
|
[](https://github.com/setdef/ratatui_ruby-devtools/actions/workflows/ci.yml) [](https://spdx.org/licenses/AGPL-3.0-or-later.html) [](https://rubygems.org/gems/ratatui_ruby-devtools) [](https://github.com/setdef/ratatui_ruby-devtools/issues)
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
## Introduction
|
|
15
15
|
|
|
16
|
-
**ratatui_ruby-devtools** provides shared development tooling for the [RatatuiRuby ecosystem](https://
|
|
16
|
+
**ratatui_ruby-devtools** provides shared development tooling for the [RatatuiRuby ecosystem](https://www.ratatui-ruby.dev). It includes Rake tasks, linters, license enforcement, and build tooling used across all RatatuiRuby gems.
|
|
17
17
|
|
|
18
18
|
This is a **non-runtime** gem. It provides build tooling—not application features. Add it to your `:development` group only.
|
|
19
19
|
|
|
@@ -23,15 +23,15 @@ This is a **non-runtime** gem. It provides build tooling—not application featu
|
|
|
23
23
|
|
|
24
24
|
### The Ecosystem
|
|
25
25
|
|
|
26
|
-
**RatatuiRuby:** [Core engine](https://
|
|
26
|
+
**RatatuiRuby:** [Core engine](https://github.com/setdef/RatatuiRuby) • **Rooibos:** [MVU architecture](https://www.rooibos.run) • **Kit:** [Component architecture](https://git.sr.ht/~kerrick/ratatui_ruby-kit) (Planned) • **DSL:** [Glimmer syntax](https://sr.ht/~kerrick/ratatui_ruby/#chapter-4-the-syntax) (Planned) • **Framework:** [Omakase framework](https://git.sr.ht/~kerrick/ratatui_ruby-framework) (Planned) • **UI:** [Polished widgets](https://git.sr.ht/~kerrick/ratatui_ruby-ui) (Planned) • **UI Pro:** [More polished widgets](https://sr.ht/~kerrick/ratatui_ruby#chapter-6-licensing) (Planned)
|
|
27
27
|
|
|
28
28
|
### For App Developers
|
|
29
29
|
|
|
30
|
-
**Get Started:** [Quickstart](https://
|
|
30
|
+
**Get Started:** [Quickstart](https://github.com/setdef/RatatuiRuby/blob/stable/doc/getting_started/quickstart.md) • [Examples](https://github.com/setdef/RatatuiRuby/blob/stable/examples/app_all_events/README.md) ⸺ **Stay Informed:** [Announcements](https://forum.setdef.com/tags/c/ratatui-ruby/6/announcement) • [FAQ](https://man.sr.ht/~kerrick/ratatui_ruby/troubleshooting.md) ⸺ **Reach Out:** [Forum](https://forum.setdef.com/c/ratatui-ruby/6) • [Bug Tracker](https://forum.setdef.com/tags/c/ratatui-ruby/6/bug)
|
|
31
31
|
|
|
32
32
|
### For Contributors
|
|
33
33
|
|
|
34
|
-
**Get Started:** [Contributing Guide](https://man.sr.ht/~kerrick/ratatui_ruby/contributing.md) • [Code of Conduct](https://man.sr.ht/~kerrick/ratatui_ruby/code_of_conduct.md) ⸺ **Stay Informed:** [
|
|
34
|
+
**Get Started:** [Contributing Guide](https://man.sr.ht/~kerrick/ratatui_ruby/contributing.md) • [Code of Conduct](https://man.sr.ht/~kerrick/ratatui_ruby/code_of_conduct.md) ⸺ **Stay Informed:** [Announcements](https://forum.setdef.com/tags/c/ratatui-ruby/6/announcement) • [Project History](https://man.sr.ht/~kerrick/ratatui_ruby/history/index.md) ⸺ **Reach Out:** [Issues](https://github.com/setdef/ratatui_ruby-devtools/issues)
|
|
35
35
|
|
|
36
36
|
---
|
|
37
37
|
|
|
@@ -41,7 +41,7 @@ Add this line to your application's Gemfile:
|
|
|
41
41
|
|
|
42
42
|
<!-- SPDX-SnippetBegin -->
|
|
43
43
|
<!--
|
|
44
|
-
SPDX-
|
|
44
|
+
SPDX-SnippetCopyrightText: 2026 Kerrick Long
|
|
45
45
|
SPDX-License-Identifier: MIT-0
|
|
46
46
|
-->
|
|
47
47
|
```ruby
|
|
@@ -55,7 +55,7 @@ And then execute:
|
|
|
55
55
|
|
|
56
56
|
<!-- SPDX-SnippetBegin -->
|
|
57
57
|
<!--
|
|
58
|
-
SPDX-
|
|
58
|
+
SPDX-SnippetCopyrightText: 2026 Kerrick Long
|
|
59
59
|
SPDX-License-Identifier: MIT-0
|
|
60
60
|
-->
|
|
61
61
|
```bash
|
|
@@ -70,7 +70,7 @@ In your `Rakefile`:
|
|
|
70
70
|
|
|
71
71
|
<!-- SPDX-SnippetBegin -->
|
|
72
72
|
<!--
|
|
73
|
-
SPDX-
|
|
73
|
+
SPDX-SnippetCopyrightText: 2026 Kerrick Long
|
|
74
74
|
SPDX-License-Identifier: MIT-0
|
|
75
75
|
-->
|
|
76
76
|
```ruby
|
|
@@ -96,7 +96,9 @@ This imports all devtools rake tasks into your project.
|
|
|
96
96
|
| `rake lint:fix` | Auto-fix all linting issues |
|
|
97
97
|
| `rake rubocop` | Run RuboCop |
|
|
98
98
|
| `rake rubycritic` | Run RubyCritic |
|
|
99
|
+
| `rake lint:lockfile_ruby` | Check that every locked gem installs on the oldest supported Ruby |
|
|
99
100
|
| `rake doc:suggest` | Suggest documentation improvements |
|
|
101
|
+
| `rake doc:check_links` | Check for broken links in RDoc and Markdown files |
|
|
100
102
|
|
|
101
103
|
### License Enforcement
|
|
102
104
|
|
|
@@ -115,8 +117,19 @@ This imports all devtools rake tasks into your project.
|
|
|
115
117
|
| `rake bump:major` | Bump major version |
|
|
116
118
|
| `rake bump:minor` | Bump minor version |
|
|
117
119
|
| `rake bump:patch` | Bump patch version |
|
|
120
|
+
| `rake 'bump:minor[rc]'` | Bump to a prerelease, such as `1.2.0-rc.1` |
|
|
118
121
|
| `rake bump:exact[0.1.0]` | Set exact version |
|
|
119
122
|
|
|
123
|
+
Every bump commits the release for you and refuses to start on the wrong branch or with uncommitted changes.
|
|
124
|
+
|
|
125
|
+
Before 1.0, your gem is in initial development, and its API can change in any release. Those releases are still normal versions, so `gem install` and Bundler find them. A new gem starts at `0.0.0`, so its first `bump:patch` or `bump:minor` releases `0.0.1` or `0.1.0`.
|
|
126
|
+
|
|
127
|
+
A prerelease is different. `1.2.0-beta.1` is a candidate for `1.2.0`, and users get it only with `gem install --pre` or a requirement that names a prerelease. A bump makes one only when you give it a label: `rake 'bump:minor[beta]'` takes `1.1.3` to `1.2.0-beta.1`, and again to `1.2.0-beta.2`. Another label starts again at `.1`, so `rake 'bump:minor[rc]'` then releases `1.2.0-rc.1`. A label has to sort after the one you're on, because SemVer compares labels as text: `rc` follows `beta`, but `beta` doesn't follow `dev`. A bump without a label ships the candidate, so `bump:minor` or `bump:patch` takes `1.2.0-rc.1` to `1.2.0`. Candidates release on trunk.
|
|
128
|
+
|
|
129
|
+
Before 1.0, every release comes from trunk. Run any bump there.
|
|
130
|
+
|
|
131
|
+
From 1.0 on, each minor version gets a release branch, so its users can take patch releases without the next minor's changes. A bump that releases a new minor or major version, one ending in `.0`, runs on trunk: it creates `release/X.Y`, commits the release there, imports the release into trunk, and commits that too. A bump that releases a patch runs on the release branch it fixes. The version decides, not the task: finishing `1.2.0-beta.1` releases `1.2.0`, so even `bump:patch` runs on trunk and creates `release/1.2`. The first release of 1.0 starts this workflow.
|
|
132
|
+
|
|
120
133
|
|
|
121
134
|
## Executables
|
|
122
135
|
|
|
@@ -126,7 +139,7 @@ An AI-friendly wrapper for `bundle exec rake` that captures all output and only
|
|
|
126
139
|
|
|
127
140
|
<!-- SPDX-SnippetBegin -->
|
|
128
141
|
<!--
|
|
129
|
-
SPDX-
|
|
142
|
+
SPDX-SnippetCopyrightText: 2026 Kerrick Long
|
|
130
143
|
SPDX-License-Identifier: MIT-0
|
|
131
144
|
-->
|
|
132
145
|
```bash
|
|
@@ -153,8 +166,6 @@ Devtools includes templates for scaffolding new ecosystem gems:
|
|
|
153
166
|
| `AGENTS.md.erb` | AI agent instructions |
|
|
154
167
|
| `.pre-commit-config.yaml` | Pre-commit hooks |
|
|
155
168
|
| `Rakefile.erb` | Standard Rakefile |
|
|
156
|
-
| `sourcehut.rake.erb` | SourceHut CI task |
|
|
157
|
-
| `build.yml.erb` | SourceHut build manifest |
|
|
158
169
|
| `gemspec.erb` | Standard gemspec |
|
|
159
170
|
| `bin/setup.erb` | Setup script |
|
|
160
171
|
| `mise.toml.erb` | Toolchain versions |
|
|
@@ -166,7 +177,7 @@ Access templates via:
|
|
|
166
177
|
|
|
167
178
|
<!-- SPDX-SnippetBegin -->
|
|
168
179
|
<!--
|
|
169
|
-
SPDX-
|
|
180
|
+
SPDX-SnippetCopyrightText: 2026 Kerrick Long
|
|
170
181
|
SPDX-License-Identifier: MIT-0
|
|
171
182
|
-->
|
|
172
183
|
```ruby
|
|
@@ -178,31 +189,48 @@ RatatuiRuby::Devtools.templates_path
|
|
|
178
189
|
|
|
179
190
|
## Configuration
|
|
180
191
|
|
|
181
|
-
Tasks
|
|
192
|
+
Tasks find your gemspec, your gem's name, and its version file from your gem's files. Pass any of them when you install the tasks, if your gem keeps them elsewhere:
|
|
193
|
+
|
|
194
|
+
<!-- SPDX-SnippetBegin -->
|
|
195
|
+
<!--
|
|
196
|
+
SPDX-SnippetCopyrightText: 2026 Kerrick Long
|
|
197
|
+
SPDX-License-Identifier: MIT-0
|
|
198
|
+
-->
|
|
199
|
+
```ruby
|
|
200
|
+
RatatuiRuby::Devtools.install_gem_tasks!(
|
|
201
|
+
gem_name: "my_gem",
|
|
202
|
+
version_file: "lib/my_gem/version.rb"
|
|
203
|
+
)
|
|
204
|
+
```
|
|
205
|
+
<!-- SPDX-SnippetEnd -->
|
|
206
|
+
|
|
207
|
+
The license tasks give the code apps link, from your gemspec's `require_paths` and `extensions`, the license in your gemspec. Everything else, such as tests, tasks, and type signatures, gets AGPL-3.0-or-later. Examples that app developers copy whole are snippets grown large, so you can give them MIT-0 like the snippets in your docs. A commercial gem can license its other code differently:
|
|
182
208
|
|
|
183
209
|
<!-- SPDX-SnippetBegin -->
|
|
184
210
|
<!--
|
|
185
|
-
SPDX-
|
|
211
|
+
SPDX-SnippetCopyrightText: 2026 Kerrick Long
|
|
186
212
|
SPDX-License-Identifier: MIT-0
|
|
187
213
|
-->
|
|
188
214
|
```ruby
|
|
189
|
-
RatatuiRuby::Devtools.
|
|
190
|
-
|
|
215
|
+
RatatuiRuby::Devtools.install_gem_tasks!(
|
|
216
|
+
snippet_paths: %w[examples/widget_ examples/verify_],
|
|
217
|
+
non_runtime_license: "LicenseRef-Commercial"
|
|
218
|
+
)
|
|
191
219
|
```
|
|
192
220
|
<!-- SPDX-SnippetEnd -->
|
|
193
221
|
|
|
194
|
-
Environment variables for
|
|
222
|
+
`rake reuse:fix` gives Ruby, RBS, Rust, and Markdown files the same headers the license tasks write. Environment variables set what it writes for other files:
|
|
195
223
|
|
|
196
224
|
| Variable | Default |
|
|
197
225
|
|----------|---------|
|
|
198
|
-
| `REUSE_COPYRIGHT` | `
|
|
199
|
-
| `REUSE_CODE_LICENSE` |
|
|
226
|
+
| `REUSE_COPYRIGHT` | Your git `user.name` and `user.email` |
|
|
227
|
+
| `REUSE_CODE_LICENSE` | The license the license tasks would choose |
|
|
200
228
|
| `REUSE_DOC_LICENSE` | `CC-BY-SA-4.0` |
|
|
201
229
|
|
|
202
230
|
|
|
203
231
|
## Contributing
|
|
204
232
|
|
|
205
|
-
Bug reports and pull requests are welcome on [
|
|
233
|
+
Bug reports and pull requests are welcome on [GitHub](https://github.com/setdef/ratatui_ruby-devtools/issues). This project is intended to be a safe, productive collaboration, and contributors are expected to adhere to the [Code of Conduct](https://man.sr.ht/~kerrick/ratatui_ruby/code_of_conduct.md).
|
|
206
234
|
|
|
207
235
|
Want to help develop **ratatui_ruby-devtools**? Check out the [contribution guide on the wiki](https://man.sr.ht/~kerrick/ratatui_ruby/contributing.md).
|
|
208
236
|
|
data/Rakefile
CHANGED
data/bin/setup
CHANGED
|
@@ -6,12 +6,26 @@ set -euo pipefail
|
|
|
6
6
|
IFS=$'\n\t'
|
|
7
7
|
set -vx
|
|
8
8
|
|
|
9
|
-
if command -v mise >/dev/null 2>&1; then
|
|
10
|
-
mise install
|
|
11
|
-
mise x -- pip install reuse
|
|
12
|
-
mise x -- bundle install
|
|
13
|
-
pre-commit install
|
|
14
|
-
else
|
|
9
|
+
if ! command -v mise >/dev/null 2>&1; then
|
|
15
10
|
echo "mise isn't installed. Please install it to continue." >&2
|
|
16
11
|
exit 1
|
|
17
12
|
fi
|
|
13
|
+
|
|
14
|
+
mise install
|
|
15
|
+
mise x -- pip install 'reuse[charset-normalizer]'
|
|
16
|
+
mise x -- gem install bundler:4.0.3
|
|
17
|
+
|
|
18
|
+
# A gem in the per-user gem directory may have been built for another Ruby,
|
|
19
|
+
# so install the bundle inside the repo instead.
|
|
20
|
+
mise x -- bundle config set --local path vendor/bundle
|
|
21
|
+
|
|
22
|
+
if [ "${CI:-}" = "true" ]; then
|
|
23
|
+
bundle config set --local frozen 'true'
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
mise x -- bundle install
|
|
27
|
+
|
|
28
|
+
if [ "${CI:-}" != "true" ]; then
|
|
29
|
+
pre-commit install
|
|
30
|
+
bundle exec rake rdoc
|
|
31
|
+
fi
|
data/bin/setup.ps1
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
|
|
2
|
+
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3
|
+
|
|
4
|
+
$ErrorActionPreference = "Stop"
|
|
5
|
+
Set-StrictMode -Version Latest
|
|
6
|
+
|
|
7
|
+
if (-not (Get-Command mise -ErrorAction SilentlyContinue)) {
|
|
8
|
+
Write-Error "mise isn't installed. Please install it to continue: https://mise.jdx.dev"
|
|
9
|
+
exit 1
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
# Read the Ruby version from mise.toml so we install the matching RubyInstaller.
|
|
13
|
+
$rubyVersion = (Select-String -Path mise.toml -Pattern 'ruby\s*=\s*"([^"]+)"').Matches.Groups[1].Value
|
|
14
|
+
$rubyMajorMinor = ($rubyVersion -split '\.')[0..1] -join '.'
|
|
15
|
+
|
|
16
|
+
# mise cannot compile Ruby from source on Windows (ruby-build produces broken
|
|
17
|
+
# native extension support). Install Ruby via RubyInstaller, which bundles the
|
|
18
|
+
# MSYS2 devkit for native gem compilation.
|
|
19
|
+
if (-not (Get-Command ruby -ErrorAction SilentlyContinue) -or -not ((ruby --version) -match $rubyMajorMinor)) {
|
|
20
|
+
Write-Host "Ruby $rubyMajorMinor is required but not installed."
|
|
21
|
+
if ($env:CI -ne "true") {
|
|
22
|
+
$answer = Read-Host "Install it now via RubyInstaller (winget)? This will require administrator privileges. [Y/n]"
|
|
23
|
+
if ($answer -and $answer -notmatch '^[Yy]') {
|
|
24
|
+
Write-Error "Cannot continue without Ruby."
|
|
25
|
+
exit 1
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
winget install --id "RubyInstallerTeam.RubyWithDevKit.$rubyMajorMinor" --accept-source-agreements --accept-package-agreements
|
|
29
|
+
# Refresh PATH so ruby is available
|
|
30
|
+
$env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
# Create .mise.local.toml (gitignored) with Windows-specific overrides:
|
|
34
|
+
# - disable_tools: prevents mise from installing its own (broken) Ruby
|
|
35
|
+
if (-not (Test-Path .mise.local.toml) -or -not (Select-String -Path .mise.local.toml -Pattern 'disable_tools' -Quiet)) {
|
|
36
|
+
$localToml = @"
|
|
37
|
+
|
|
38
|
+
[settings]
|
|
39
|
+
disable_tools = ["ruby"]
|
|
40
|
+
"@
|
|
41
|
+
Add-Content -Path .mise.local.toml -Value $localToml
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
# mise handles Python and pre-commit. Ruby is disabled above.
|
|
45
|
+
mise install
|
|
46
|
+
mise x -- python -m pip install 'reuse[charset-normalizer]'
|
|
47
|
+
|
|
48
|
+
# pip installs scripts (like reuse.exe) to Python's Scripts directory,
|
|
49
|
+
# which mise does not add to PATH.
|
|
50
|
+
if (-not (Select-String -Path .mise.local.toml -Pattern '\[env\]' -Quiet -ErrorAction SilentlyContinue)) {
|
|
51
|
+
$scriptsDir = (mise x -- python -c "import sysconfig; print(sysconfig.get_path('scripts'))").Trim()
|
|
52
|
+
$envToml = @"
|
|
53
|
+
|
|
54
|
+
[env]
|
|
55
|
+
_.path = ["$($scriptsDir -replace '\\', '/')"]
|
|
56
|
+
"@
|
|
57
|
+
Add-Content -Path .mise.local.toml -Value $envToml
|
|
58
|
+
}
|
|
59
|
+
gem install bundler:4.0.3
|
|
60
|
+
|
|
61
|
+
# A gem in the per-user gem directory may have been built for another Ruby,
|
|
62
|
+
# so install the bundle inside the repo instead.
|
|
63
|
+
bundle config set --local path vendor/bundle
|
|
64
|
+
|
|
65
|
+
if ($env:CI -eq "true") {
|
|
66
|
+
bundle config set --local frozen true
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
bundle install
|
|
70
|
+
|
|
71
|
+
if ($env:CI -ne "true") {
|
|
72
|
+
pre-commit install
|
|
73
|
+
bundle exec rake rdoc
|
|
74
|
+
}
|
|
@@ -34,7 +34,7 @@ Every public class must begin with a **Context-Problem-Solution** narrative.
|
|
|
34
34
|
**Bad (Generic/Descriptive):**
|
|
35
35
|
<!-- SPDX-SnippetBegin -->
|
|
36
36
|
<!--
|
|
37
|
-
SPDX-
|
|
37
|
+
SPDX-SnippetCopyrightText: 2025 Kerrick Long
|
|
38
38
|
SPDX-License-Identifier: MIT-0
|
|
39
39
|
-->
|
|
40
40
|
```ruby
|
|
@@ -47,7 +47,7 @@ Every public class must begin with a **Context-Problem-Solution** narrative.
|
|
|
47
47
|
**Good (Alexandrian/Zinsser/Plain Language):**
|
|
48
48
|
<!-- SPDX-SnippetBegin -->
|
|
49
49
|
<!--
|
|
50
|
-
SPDX-
|
|
50
|
+
SPDX-SnippetCopyrightText: 2025 Kerrick Long
|
|
51
51
|
SPDX-License-Identifier: MIT-0
|
|
52
52
|
-->
|
|
53
53
|
```ruby
|
|
@@ -87,7 +87,7 @@ Every public class must begin with a **Context-Problem-Solution** narrative.
|
|
|
87
87
|
|
|
88
88
|
<!-- SPDX-SnippetBegin -->
|
|
89
89
|
<!--
|
|
90
|
-
SPDX-
|
|
90
|
+
SPDX-SnippetCopyrightText: 2025 Kerrick Long
|
|
91
91
|
SPDX-License-Identifier: MIT-0
|
|
92
92
|
-->
|
|
93
93
|
```ruby
|
|
@@ -106,7 +106,6 @@ Every public class must begin with a **Context-Problem-Solution** narrative.
|
|
|
106
106
|
|
|
107
107
|
## 4. RDoc Specifics
|
|
108
108
|
|
|
109
|
-
* **No Endless Methods:** Do **not** use Ruby 3.0+ endless method definitions (`def foo = bar`). RDoc currently has a bug where it fails to correctly parse the end of the method, causing subsequent methods to be nested incorrectly in the documentation tree. Always use standard `def ... end` blocks.
|
|
110
109
|
* **No YARD:** Do not use `@param`, `@return`, or other YARD tags. Use standard RDoc formats.
|
|
111
110
|
* **Directives:** Use `:nodoc:` for private or internal methods that should not appear in the API docs.
|
|
112
111
|
* **Headings:** Use `===` for section headers like `=== Examples`.
|