Suspenders is a Rails Engine containing generators for configuring Rails applications with these features.
It is used by thoughtbot to get a jump start on a new or existing app. Use Suspenders if you're in a rush to build something amazing; don't use it if you like missing deadlines.
~> 7.0
>= 3.1
>= 20.0.0
Suspenders can be used to create a new Rails application, or to enhance an existing Rails application.
This approach uses an application template to generate a new Rails application with Suspenders.
We skip the default test framework in favor of RSpec, and [prefer PostgreSQL][] as our database.
We skip RuboCop rules by default in favor of our holistic linting rules.
rails new app_name \
--skip-rubocop \
--skip-test \
-d=postgresql \
-m=https://raw.githubusercontent.com/thoughtbot/suspenders/main/lib/install/web.rb
main
branch of suspenders:rails new app_name \
--suspenders-main \
--skip-rubocop \
--skip-test \
-d=postgresql \
-m=https://raw.githubusercontent.com/thoughtbot/suspenders/main/lib/install/web.rb
Then run bin/setup
within the newly generated application.
Alternatively, if you're using our dotfiles, then you can just run rails new app_name
, or create your own railsrc file with the following configuration:
--skip-rubocop
--skip-test
--database=postgresql
-m=https://raw.githubusercontent.com/thoughtbot/suspenders/main/lib/install/web.rb
Suspenders can be used on an existing Rails application by adding it to the
:development
and :test
group.
group :development, :test do
gem "suspenders"
end
Once installed, you can invoke the web installation generator, which will invoke all generators.
bin/rails g suspenders:install:web
Or, you can invoke generators individually. To see a list of available generators run:
bin/rails g | grep suspenders
To learn more about a generator, run:
bin/rails g suspenders:[generator_name] --help
Suspenders ships with several custom Rake tasks.
bin/rails suspenders:rake
bin/rails suspenders:db:migrate
bin/rails suspenders:cleanup:organize_gemfile
See the CONTRIBUTING document. Thank you, contributors!
Suspenders is Copyright (c) thoughtbot, inc. It is free software, and may be redistributed under the terms specified in the LICENSE file.
This repo is maintained and funded by thoughtbot, inc. The names and logos for thoughtbot are trademarks of thoughtbot, inc.
We love open source software! See our other projects. We are available for hire.