if ci_badges.map(&:color).detect { it != "green"} ☝️ let me know, as I may have missed the discord notification.
if ci_badges.map(&:color).all? { it == "green"} 👇️ send money so I can do more of this. FLOSS maintenance is now my full-time job.
👣 How will this project approach the September 2025 hostile takeover of RubyGems? 🚑️
I've summarized my thoughts in this blog post.
ast-crispr is the structured edit layer for StructuredMerge. It provides document contexts, owner selectors, replacement and deletion operations, structure profiles, and transport envelopes for making targeted edits through parser-backed owners instead of line-oriented string surgery.
- Selector-driven replacement and deletion operations.
- Structure profiles that describe owner scopes, selector families, and payload kinds.
- Shared request/result objects for structured-edit transport and reporting.
- Adapter interface for language-specific CRISPR packages.
- Review-friendly metadata for explaining what was selected and why.
| Tokens to Remember | |
|---|---|
| Works with MRI Ruby 4 | |
| Support & Community | |
| Source | |
| Documentation | |
| Compliance | |
| Style | |
| Maintainer 🎖️ | |
... 💖 |
Compatible with MRI Ruby 4.0.0+, and concordant releases of JRuby, and TruffleRuby.
CI workflows and Appraisals are generated for MRI Ruby 4.0.0+.
This test floor is configured by ruby.test_minimum in .kettle-jem.yml and
may be higher than the gem's runtime compatibility floor when legacy Rubies are
not practical for the current toolchain.
The amazing test matrix is powered by the kettle-dev stack.
How kettle-dev manages complexity in tests
| Gem | Source | Role | Daily download rank |
|---|---|---|---|
| appraisal2 | GitHub | multi-dependency Appraisal matrix generation | |
| appraisal2-rubocop | GitHub | RuboCop Appraisal generator integration | |
| kettle-dev | GitHub | development, release, and CI workflow tooling | |
| kettle-jem | GitHub | Appraisals & CI workflow templates | |
| kettle-soup-cover | GitHub | SimpleCov coverage policy and reporting | |
| kettle-test | GitHub | standard test runner and coverage harness | |
| rubocop-lts | GitHub | Ruby-version-aware linting | |
| turbo_tests2 | GitHub | parallel test execution |
Install the gem and add to the application's Gemfile by executing:
bundle add ast-crisprIf bundler is not being used to manage dependencies, install the gem by executing:
gem install ast-crisprast-crispr itself is adapter-neutral. Configure it by choosing an adapter package, building a document context, and passing an owner selector to an operation.
require "ast/crispr"
selector = Ast::Crispr::OwnerSelector.new(
id: "example",
locate: ->(context) { context.structural_owners(owner_scope: :shared_default) },
)Adapter packages such as ast-crispr-ruby-prism and ast-crispr-markdown-markly provide ready-made selectors for real syntax trees.
Use an adapter package for concrete documents. A typical operation builds a document context, locates one owner, and replaces that owner's source range.
require "ast/crispr"
require "ast/crispr/markdown/markly"
target = Ast::Crispr::Markdown::Markly::Selectors.heading_section(
heading_text: "Configuration",
level: 2,
limit: { exactly: 1 },
)
result = Ast::Crispr::Replace.call(
content: File.read("README.md"),
target: target,
replacement: "## Configuration
Updated text.
",
source_label: "README.md",
)
File.write("README.md", result.updated_content)See SECURITY.md.
If you need some ideas of where to help, you could work on adding more code coverage, or if it is already 💯 (see below) check issues or PRs, or use the gem and think about how it could be better.
We so if you make changes, remember to update it.
See CONTRIBUTING.md for more detailed instructions.
This library follows for its public API where practical.
For most applications, prefer the Pessimistic Version Constraint with two digits of precision.
For example:
spec.add_dependency("ast-crispr", "~> 7.0")📌 Is "Platform Support" part of the public API? More details inside.
Dropping support for a platform can be a breaking change for affected users. If a release changes supported platforms, it should be called out clearly in the changelog and versioned with that impact in mind.
To get a better understanding of how SemVer is intended to work over a project's lifetime, read this article from the creator of SemVer:
See CHANGELOG.md for a list of releases.
The gem is available under the following licenses: AGPL-3.0-only, PolyForm-Small-Business-1.0.0. See LICENSE.md for details.
If none of the available licenses suit your use case, please contact us to discuss a custom commercial license.