🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

suspenders

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

suspenders

bundlerRubygems
Version
20250317.0
Version published
Maintainers
1
Created
Source

Suspenders

CI

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.

Suspenders boy

Requirements

  • Rails ~> 8.0
  • Ruby >= 3.1
  • Node >= 20.0.0

Usage

Suspenders can be used to create a new Rails application, or to enhance an existing Rails application.

With New Rails Applications

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.

Use the latest suspenders release:

rails new app_name \
 --skip-rubocop \
 --skip-test \
 -d=postgresql \
 -m=https://raw.githubusercontent.com/thoughtbot/suspenders/main/lib/install/web.rb

OR use the current (possibly unreleased) 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

With Existing Rails Applications

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

Available Tasks

Suspenders ships with several custom Rake tasks.

bin/rails suspenders:rake
bin/rails suspenders:db:migrate
bin/rails suspenders:cleanup:organize_gemfile

Contributing

See the CONTRIBUTING document. Thank you, contributors!

License

Suspenders is Copyright (c) thoughtbot, inc. It is free software, and may be redistributed under the terms specified in the LICENSE file.

About thoughtbot

thoughtbot

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.

FAQs

Package last updated on 17 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts