feat(ruby): add Ruby on Rails support (rspec, rubocop, rake, bundle) (#724)
* feat(ruby): add Ruby on Rails support (rspec, rubocop, rake, bundle)
Unifies 5 competing PRs (#198, #292, #379, #534, #643) into a single
coherent implementation.
New commands:
- rtk rspec: JSON parsing with text fallback (60%+ savings)
- rtk rubocop: JSON parsing, group by cop/severity (60%+ savings)
- rtk rake test: Minitest state machine parser (85-90% savings)
- rtk bundle install: TOML filter, strip Using lines (90%+ savings)
Shared infrastructure: ruby_exec(), fallback_tail(),
exit_code_from_output(), count_tokens() in utils.rs.
Discover/rewrite rules for rspec, rubocop, rake, rails, bundle
including bundle exec and bin/ variants.
E2E smoke tests (scripts/test-ruby.sh) covering all 4 commands.
56 new unit tests + 4 inline TOML tests. All 1035 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Navid EMAD <navid.emad@yespark.fr>
* fix(ruby): use TEST= env var for rake single-file test in smoke tests
Rails' rake test ignores positional file args; use TEST=path syntax.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Navid EMAD <navid.emad@yespark.fr>
* docs(ruby): add Ruby module architecture and update attribution
Integrate ARCHITECTURE.md Ruby Module Architecture section and CLAUDE.md
module table/fork-features from PR #643. Update PR description attribution.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Navid EMAD <navid.emad@yespark.fr>
* chore: remove PULL_REQUEST_DESCRIPTION.md from repo
PR description lives on GitHub, no need to track in the codebase.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Navid EMAD <navid.emad@yespark.fr>
---------
Signed-off-by: Navid EMAD <navid.emad@yespark.fr>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fix(install): reject archive with path traversal before extraction (#1250)
The installer previously ran tar -xzf on the downloaded archive with no
pre-extraction verification. A malicious mirror could ship a tarball with
../ components or absolute paths and write files anywhere on the user's
filesystem (CWE-22).
Add a pre-extraction check that lists archive contents with tar -tzf
and rejects any entry whose name starts with / or contains a .. path
component. The check is POSIX-compliant and adds negligible overhead for
the single-binary RTK release tarball.
Covered by scripts/test-install.sh, which exercises one safe archive
and four crafted malicious archives (leading .., absolute path,
mid-path .., trailing ..) plus a regression guard that ensures the
check remains in install.sh.
Co-Authored-By: Claude <noreply@anthropic.com>
feat(ruby): add Ruby on Rails support (rspec, rubocop, rake, bundle) (#724)
* feat(ruby): add Ruby on Rails support (rspec, rubocop, rake, bundle)
Unifies 5 competing PRs (#198, #292, #379, #534, #643) into a single
coherent implementation.
New commands:
- rtk rspec: JSON parsing with text fallback (60%+ savings)
- rtk rubocop: JSON parsing, group by cop/severity (60%+ savings)
- rtk rake test: Minitest state machine parser (85-90% savings)
- rtk bundle install: TOML filter, strip Using lines (90%+ savings)
Shared infrastructure: ruby_exec(), fallback_tail(),
exit_code_from_output(), count_tokens() in utils.rs.
Discover/rewrite rules for rspec, rubocop, rake, rails, bundle
including bundle exec and bin/ variants.
E2E smoke tests (scripts/test-ruby.sh) covering all 4 commands.
56 new unit tests + 4 inline TOML tests. All 1035 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Navid EMAD <navid.emad@yespark.fr>
* fix(ruby): use TEST= env var for rake single-file test in smoke tests
Rails' rake test ignores positional file args; use TEST=path syntax.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Navid EMAD <navid.emad@yespark.fr>
* docs(ruby): add Ruby module architecture and update attribution
Integrate ARCHITECTURE.md Ruby Module Architecture section and CLAUDE.md
module table/fork-features from PR #643. Update PR description attribution.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Navid EMAD <navid.emad@yespark.fr>
* chore: remove PULL_REQUEST_DESCRIPTION.md from repo
PR description lives on GitHub, no need to track in the codebase.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Navid EMAD <navid.emad@yespark.fr>
---------
Signed-off-by: Navid EMAD <navid.emad@yespark.fr>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>