Skip to content

Fix compat issues, add tests & CI matrix (v0.14.0)#18

Merged
ryudoawaru merged 12 commits intomasterfrom
fix/remaining-compat-issues
Feb 23, 2026
Merged

Fix compat issues, add tests & CI matrix (v0.14.0)#18
ryudoawaru merged 12 commits intomasterfrom
fix/remaining-compat-issues

Conversation

@ryudoawaru
Copy link
Member

@ryudoawaru ryudoawaru commented Feb 23, 2026

Summary

  • Fix Rails 7.1-8.1 compatibility issues: DATABASES constant, skip_sprockets, GitLab CI template, trilogy support
  • Add comprehensive test suite: unit tests (Helper, Version) + integration test (generator end-to-end)
  • Add GitHub Actions CI with Ruby x Rails 4x4 matrix (3.2/3.3/3.4/4.0 x 7.0/7.1/7.2/8.1)
  • Bump version to 0.14.0

Test plan

  • RAILS_VERSION=7.0 bundle exec rspec -- 36 examples, 0 failures
  • RAILS_VERSION=8.1 bundle exec rspec -- 36 examples, 0 failures
  • CI matrix: 16 jobs (Ruby 3.2/3.3/3.4/4.0 x Rails 7.0/7.1/7.2/8.1)

Closes #9 #10 #14

Generated with Claude Code

ryudoawaru and others added 12 commits February 23, 2026 10:16
- #9: Remove Bankai::RUBY_VERSION constant that shadowed Ruby built-in,
  templates now correctly use the actual Ruby version
- #10: Modernize GitLab CI template — remove Node.js/Yarn setup,
  remove yarn-audit job, update Postgres to 16, MySQL to 8.0,
  remove hardcoded BUNDLER_VERSION, use bundled brakeman/bundler-audit
- #14: Detect trilogy adapter in mysql? helper

Closes #9 #10 #14

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move version test from spec/bankai_spec.rb to spec/bankai/version_spec.rb
- Add helper_spec.rb testing pg?, mysql?, capistrano? methods
- Add CI workflow running RSpec across Ruby 3.2/3.3/3.4/4.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Runs exe/bankai in a subprocess to generate a full Rails project,
verifying Gemfile contents, static files, config injection, and
directory structure. Tagged :slow for easy filtering.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On CI with bundler-cache, gems live in vendor/bundle. Clearing the
bundler env made rails unloadable in the subprocess. Let the subprocess
inherit the bundle exec context instead; the generator's internal
Bundler.with_original_env handles isolation for bundle install.

Also capture subprocess output for better error diagnostics.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ed_env

Bundler.with_unbundled_env clears GEM_HOME/GEM_PATH, which on
Bundler 4.0 (Ruby 4.0) makes gems unfindable when sub-generators
call bin/rails. Rails itself uses Bundler.with_original_env in
bundle_command (see railties bundle_helper.rb), so we follow the
same pattern for generate_default and rails_command.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Show full generator output on failure and bundler env info
to diagnose why sub-generators can't find gems on CI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bundler 4.0's `strict_rm_rf` refuses to reinstall default gems
(like erb-6.0.1) when the parent directory is world-writable without
the sticky bit. GitHub Actions runners may have permissive permissions
on the Ruby gem directory, causing `bundle install` to fail with
InsecureInstallPathError during project generation.

Fix by setting the sticky bit on the default gems directory in CI.
Also keep diagnostic output in test error messages for easier debugging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Test Ruby (3.2, 3.3, 3.4, 4.0) × Rails (7.0, 7.1, 7.2, 8.1) = 16 jobs.
RAILS_VERSION env var in Gemfile pins Rails via ~> constraint; unset
keeps current behavior. Separate bundle caches per Rails version.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ryudoawaru ryudoawaru changed the title Fix remaining compat issues: RUBY_VERSION, GitLab CI, trilogy Fix compat issues, add tests & CI matrix (v0.14.0) Feb 23, 2026
@ryudoawaru ryudoawaru merged commit 87c3940 into master Feb 23, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RUBY_VERSION constant hardcodes 2.6.7 in generated Gemfile

1 participant