Find file
Fetching contributors…
Cannot retrieve contributors at this time
133 lines (87 sloc) 3.38 KB
This is Suspenders, the thoughtbot rails template. To create a new project, checkout this
repository and run:
./script/create_project projectname
This will create a project in ../projectname. You should then follow the
instructions on Github to upload that project there. This script creates an
entirely new git repository, and is not meant to be used against an existing
When making a change to a project that was created via this template, consider
whether it's a change that should be made across all projects. If so, then
make the change in this template, and pull it into your project via:
git pull suspenders master
About Suspenders
Suspenders was created for use at thoughtbot, inc. ( as a
baseline application setup, with reasonable default plugins that the majority (if not all)
of our applications used, as well as best-practice configuration options.
Suspenders currently includes Rails 2.1.1
Gems (unpacked in vendor/gems):
will_paginate 2.3.4
RedCloth 3.0.4
For testing:
mocha 0.9.1
factory_girl 1.1.3
shoulda 2.0.2
quietbacktrace 1.1.4
Plugins (in vendor/plugins):
For testing:
Initializers (in config/initializers)
We use SMTP by default in all applications.
Get your API key at
Automatically requires everything in
test/mocks/RAILS_ENV (Removed in Rails 2, we decided to keep it)
Add other things you need to require in here.
Two time formats are available by default, :short_date and :long_date.
Add other time formats here.
Rake Tasks
Rake tasks are contained in the limerick_rake gem.
Provides rake tasks for loading data into the database. These are used for an initial application dataset needed for production.
Standard capistrano deployment tasks
Testing is done utilizing Test::Unit, Shoulda, factory_girl, and mocha.
factory_girl is a fixture replacement library, following the factory pattern. Place your
factories in test/factories.rb. The fixture directory has been removed, as fixtures are not
Shoulda is a pragmatic testing framework for TDD and BDD built on top of Test::Unit. A number of additional
testing macros are provided in test/shoulda_macros:
Deployment is done using capistrano, and deploys to a mongrel cluster, running under Apache.
Rake tasks are provided for managing git branches which the different environments pull from
for deploy.
To push the git master to git staging branch run:
rake git:push:staging
To push the git staging branch to production branch run:
rake git:push:production
Setup your deployment environment by running:
cap ENVIRONMENT deploy:setup
(You'll be prompted for the environment's database password)
Deploy to the desired environment by running:
cap ENVIRONMENT deploy
The default environment for deploy is staging, to deploy to staging, just run:
cap deploy
The official Suspenders mascot is Suspenders Boy: