Skip to content

v0.5.0

Latest

Choose a tag to compare

@github-actions github-actions released this 04 Aug 12:02
· 1 commit to main since this release
b145dba

What’s new

rails-kit 0.5.0 adds five domain-aware readers for common Rails application layers. Each command
has a fast list mode, an AST-backed detail mode, --json output, and dynamic shell completion:

  • rails-kit controllers [name] — filters, rescue_from, helpers, layouts, strong params, and actions
  • rails-kit mailers [name] — defaults, layouts, concerns, attachments, and action methods
  • rails-kit jobs [name] — queues, retry_on/discard_on, concerns, and methods
  • rails-kit services [name] — class/module services, constants, concerns, and methods
  • rails-kit datagrids [name] — filters, columns, scopes, decorators, macros, and methods

These readers inspect one file at a time without booting Rails. They report parent_class where
applicable so inherited behavior remains explicit rather than being guessed.

Faster, more reliable Ruby inspection

The model, concerns, and routes --static readers now use the embedded Prism AST instead of
hand-written Ruby scanners. This fixes several edge cases involving endless methods, heredocs,
nested classes/modules, singleton-class bodies, and block structure while preserving established
output for valid inputs.

Prism parser pooling also makes large skeleton batches substantially faster. In project
benchmarks, a 444-file run improved from about 16.3 seconds to 0.35 seconds. Prism runs in-process
through pure-Go WASM, so static inspection does not require a Ruby installation.

Install or upgrade

brew upgrade --cask janstol/tap/rails-kit

Prebuilt archives are available below for macOS and Linux (amd64/arm64) and Windows
(amd64). You can also install with:

go install github.com/janstol/rails-kit@v0.5.0

Notes

  • Detail readers show declarations from the selected file only; they do not resolve superclass chains.
  • Default routes and about --runtime still require a bootable Rails application. Use
    routes --static and plain about for offline inspection.
  • routes --static is intentionally approximate for executable or gem-provided routing DSL.
  • The versioned --json envelope remains at schema_version: 1; the new commands are additive.

See the changelog and
command reference for full details.