Glyptodont
Use this gem if you want to avoid deploying code to production without doing all of your to-dos.
Introduction
All of the glyptodonts have fossilised. This is a tool to ensure that your TODOs are eradicated before this can happen to them.
If you've ever been caught out because a TODO in production code has not been done, this gem is for you!
This was written after I was bitten by a TODO not being done at work. I expect to build it into our CI pipeline and see what it catches.
Dependabot is configured to open PRs for Bundler and GitHub Actions (weekly). A workflow enables auto-merge on those PRs so GitHub merges them when required status checks pass.
After checking out the project, install Mise (the only
external prerequisite). Then run script/setup: it installs everything in
.tool-versions (Ruby and CMake), the gem dependencies, and Git hooks that
enforce Conventional Commits and run
script/test (RuboCop + RSpec) before each commit. Run script/test manually
when needed; you can also run script/console for an interactive prompt.
To install this gem onto your local machine, run bundle exec rake install.
Releasing
This project uses Conventional Commits. Releases can be created in two ways.
Release bot (recommended)
Release Please runs on pushes to
main/master. It opens a Release PR that updates lib/glyptodont/version.rb and
CHANGELOG.md from conventional commits. Merge that PR to create the Git tag and
GitHub Release; the gem is then published to rubygems.org via
Trusted Publishing (no API key in CI).
Manual release
With git-cliff installed (e.g. mise install):
- Bump the version in
lib/glyptodont/version.rb(e.g.0.4.0). - Commit the version bump.
- Run
bundle exec rake releaseto create the tag, push it, and publish the gem. - Run
rake changelog(ormise exec -- rake changelog), then commit and push the updatedCHANGELOG.md.
Add this line to your application's Gemfile:
gem 'glyptodont'And then execute:
bundle installOr install it yourself as:
gem install glyptodontFor usage, command-line options, configuration (.glyptodont.yaml), and CI
examples (GitHub Actions, Buildkite, Docker), see the documentation.
To avoid TODO-style comments in documentation and changelogs causing noise, you
can list whole documentation files in the documentation_files key in
.glyptodont.yaml (e.g. CHANGELOG.md, docs/index.html). Those files will
be skipped entirely, while source files continue to be checked.
Requirements
-
Mise — install once;
script/setupuses it to install Ruby and CMake from.tool-versions. - Git — for development and for the rugged gem at runtime.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/johnsyweb/glyptodont. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the Glyptodont project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
See also
https://github.com/johnsyweb/glyptodont-docker to run this in a container, ideal for your CI pipeline.