This gem is inspired by Suspenders for 5xRuby to bootstrap a rails project.
First, install bankai
gem install bankai
The bootstrap your rails project
bankai projectname
- Ruby >= 3.2.0
>= 1.0requiresrails >= 8.0(tested against Rails 8.0 and 8.1)~> 0.13requiredrails >= 7.0<= 0.12requiredrails >= 5.2
See CHANGELOG.md for what changed in 1.0.
- Brakeman
- Bundler Audit
- Rubocop - inherits rubocop-rails-omakase
- Rack Mini Profiler - Enable with
RACK_MINI_PROFILER=1 - AnnotateRb
- Bullet
- Dotenv
- Letter Opener
- Overcommit
- Pry Rails
- Minitest - Rails' built-in test framework
- Capybara
- Factory Bot
- Faker
- Shoulda Context
- Shoulda Matchers
- Database Rewinder
- Simplecov - Enable with
COVERAGE=1
- Configured
.gitlab-ci.yml - Auto filled capistrano configure
After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.
To try your local changes, run exe/bankai straight out of the checkout and
point --path at that same checkout:
cd /somewhere/else
ruby /path/to/bankai/exe/bankai projectname --path=/path/to/bankai
Both parts matter, and they do different things:
- which
exe/bankaiyou run decides whoselib/andtemplates/generate the app --pathdecides which bankai the generated app bundles, and therefore which version runs thebankai:*sub-generators (testing, ci, lint, ...)
Without --path the generated Gemfile asks for the released
gem 'bankai', '~> <major>.<minor>', so an unreleased version fails at
bundle install rather than silently running an older gem's sub-generators.
Do not run this from inside the bankai repo, and do not set BUNDLE_GEMFILE —
the generated app's bundle install would then resolve against bankai's own
Gemfile.
Bug reports and pull requests are welcome on GitHub at https://github.com/5xRuby/bankai. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
Everyone interacting in the Bankai project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.