Kabisa LaunchBase :rocket:
Installation
In an existing Rails application
Add this line to your application's Gemfile:
gem 'launch_base'
And then execute:
bundle
Or install it yourself as:
gem install launch_base
Globally, to generate a new application:
sudo gem install launch_base
Usage
launch_base help [COMMAND] # Describe available commands or one specific command
launch_base new # Create a new LaunchBase project (Rails 5.1 or higher is required)
launch_base update # update LaunchBase
launch_base lint install # install lint configuration files
launch_base lint update # update gem and reinstall lint configuration files
Requirements
Database transactions
An app generated by Launch Base assumes database transactions work within Capybara tests, which requires Rails 5.1 or
higher. Alternatively, you should add DatabaseCleaner:
- Add
DatabaseCleanerto your gem within thetestgroup (be sure to also runbundle install):
group :test do
gem 'database_cleaner'
end
- Add a
spec/support/database_cleaner.rbfile:
require 'database_cleaner'
RSpec.configure do |config|
config.before :suite do
DatabaseCleaner.clean_with :truncation
end
config.around :each do |example|
DatabaseCleaner.strategy = if example.[:type].in? [:feature, :request]
:truncation
else
:transaction
end
DatabaseCleaner.start
example.run
DatabaseCleaner.clean
end
end
Contents
For info about the contents of an app generated by LaunchBase, please refer to the
README.md template
Development
After checking out the repo, run bin/setup to install dependencies.
Then, run rake test 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.
Contributing
Bug reports and pull requests are welcome on GitHub at Launch Base.
License
The gem is available as open source under the terms of the MIT License.