Skip to content

About

πŸ› οΈ Development Tools for Contributors to RatatuiRuby πŸ’Ž πŸ‘¨β€πŸ³πŸ€.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

ratatui_ruby-devtools

 CI  License  Gem Version  Issues

Introduction

ratatui_ruby-devtools provides shared development tooling for the RatatuiRuby ecosystem. It includes Rake tasks, linters, license enforcement, and build tooling used across all RatatuiRuby gems.

This is a non-runtime gem. It provides build toolingβ€”not application features. Add it to your :development group only.


Quick Links

The Ecosystem

RatatuiRuby: Core engine β€’ Rooibos: MVU architecture β€’ Kit: Component architecture (Planned) β€’ DSL: Glimmer syntax (Planned) β€’ Framework: Omakase framework (Planned) β€’ UI: Polished widgets (Planned) β€’ UI Pro: More polished widgets (Planned)

For App Developers

Get Started: Quickstart β€’ Examples βΈΊ Stay Informed: Announcements β€’ FAQ βΈΊ Reach Out: Forum β€’ Bug Tracker

For Contributors

Get Started: Contributing Guide β€’ Code of Conduct βΈΊ Stay Informed: Announcements β€’ Project History βΈΊ Reach Out: Issues


Installation

Add this line to your application's Gemfile:

group :development do
  gem "ratatui_ruby-devtools"
end

And then execute:

bundle install

Usage

In your Rakefile:

require "bundler/gem_tasks"
require "ratatui_ruby/devtools"

RatatuiRuby::Devtools.install!

task default: %i[lint]

This imports all devtools rake tasks into your project.

Provided Rake Tasks

Linting

Task Description
rake lint Run all lint tasks
rake lint:fix Auto-fix all linting issues
rake rubocop Run RuboCop
rake rubycritic Run RubyCritic
rake lint:lockfile_ruby Check that every locked gem installs on the oldest supported Ruby
rake doc:suggest Suggest documentation improvements
rake doc:check_links Check for broken links in RDoc and Markdown files

License Enforcement

Task Description
rake license:all Run all license tasks
rake license:headers:all Ensure all files have SPDX headers
rake license:new Apply license headers to changed files only
rake reuse:lint Check REUSE/SPDX compliance
rake reuse:fix Add missing SPDX headers

Version Bumping

Task Description
rake bump:major Bump major version
rake bump:minor Bump minor version
rake bump:patch Bump patch version
rake 'bump:minor[rc]' Bump to a prerelease, such as 1.2.0-rc.1
rake bump:exact[0.1.0] Set exact version

Every bump commits the release for you and refuses to start on the wrong branch or with uncommitted changes.

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.

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.

Before 1.0, every release comes from trunk. Run any bump there.

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.

Executables

bin/agent_rake

An AI-friendly wrapper for bundle exec rake that captures all output and only shows failure summaries.

bin/agent_rake           # Run default task
bin/agent_rake test      # Run specific task

bin/consolidate_md

Merge multiple markdown files into one, adjusting heading levels.

bin/hbs

Handlebars templating utility.

Templates

Devtools includes templates for scaffolding new ecosystem gems:

Template Purpose
AGENTS.md.erb AI agent instructions
.pre-commit-config.yaml Pre-commit hooks
Rakefile.erb Standard Rakefile
gemspec.erb Standard gemspec
bin/setup.erb Setup script
mise.toml.erb Toolchain versions
REUSE.toml.erb License annotations
.gitignore.erb Git ignores
.rubocop.yml.erb RuboCop config

Access templates via:

RatatuiRuby::Devtools.templates_path
# => "/path/to/devtools/templates"

Configuration

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:

RatatuiRuby::Devtools.install_gem_tasks!(
  gem_name: "my_gem",
  version_file: "lib/my_gem/version.rb"
)

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:

RatatuiRuby::Devtools.install_gem_tasks!(
  snippet_paths: %w[examples/widget_ examples/verify_],
  non_runtime_license: "LicenseRef-Commercial"
)

Each header names the commit authors whose lines remain in the file, with the last year each touched them. Copyright protects only original expression, so a change too small to hold it, such as a corrected path, needs no notice. List its commit in .git-blame-ignore-revs, and the license tasks blame its lines on the commits before it, as GitHub's blame view does:

# Corrects the relative paths to examples/
0123456789abcdef0123456789abcdef01234567

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:

Variable Default
REUSE_COPYRIGHT Your git user.name and user.email
REUSE_CODE_LICENSE The license the license tasks would choose
REUSE_DOC_LICENSE CC-BY-SA-4.0

Contributing

Bug reports and pull requests are welcome on GitHub. This project is intended to be a safe, productive collaboration, and contributors are expected to adhere to the Code of Conduct.

Want to help develop ratatui_ruby-devtools? Check out the contribution guide on the wiki.

Copyright & License

ratatui_ruby-devtools is copyright 2026, Kerrick Long.

The gem is AGPL-3.0-or-later: you may use it freely, but you must share changes you make. Documentation is CC-BY-SA-4.0. Code snippets in documentation are MIT-0 (no attribution required).

This program was created with significant assistance from multiple LLMs. The process was human-controlled through creative prompts, with human contributions to each commit. See commit footers for model attribution. declare-ai.org

About

πŸ› οΈ Development Tools for Contributors to RatatuiRuby πŸ’Ž πŸ‘¨β€πŸ³πŸ€.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages