Skip to content

Commit

Permalink
bumping the gem to 0.2.0, updating the README to include notes about …
Browse files Browse the repository at this point in the history
…Rails 3, trout, and all the latest goodies
  • Loading branch information
Dan Croak committed Dec 14, 2010
1 parent 0ad2a1b commit 7b9bffc
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 278 deletions.
178 changes: 42 additions & 136 deletions README.md
@@ -1,161 +1,67 @@
Suspenders is a base Rails project that you can upgrade. It is used by
thoughtbot.
Suspenders is a base Rails application that you can upgrade.

![Suspenders](http://www.blogcdn.com/www.autoblog.com/media/2008/08/misuse-of-hydraulics.jpg)
![Suspenders boy](http://media.tumblr.com/1TEAMALpseh5xzf0Jt6bcwSMo1_400.png)

To create a new project first install suspenders:
Installation
------------

gem install suspenders
First install the suspenders gem:

Then run:

suspenders create 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
repo.

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 suspenders instead of your project. Note: If you don't
have commit access to suspenders, create a github ticket and we'll review your
suggestion.

Once that's committed, you can pull into your project to get all the changes
that have been made in suspenders since your last pull:

git pull suspenders master

About Suspenders
----------------

Suspenders was created for use at thoughtbot, inc. (http://thoughtbot.com) 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 a version of Rails from the 2.3 stable branch.
You can determine the changeset with the vendor/rails/REVISION_xxxxx file.

Gems (unpacked in vendor/gems, unless they are compiled gems):
--------------------------------------------------------------

For record pagination:

will_paginate (2.3.11)

For text formatting:

RedCloth (4.2.2, not unpacked, this is a compiled gem)

Form builder:

Formtastic (0.2.1)

File attachments:

Paperclip (2.3.0)
gem install suspenders

Basic user auth:

Clearance (0.7.0 engine)

For testing:

rspec
jferris-mocha (standard mocha plus test spies)
factory_girl (fixture replacement for test data)
shoulda (rails test helpers and context framework)
timecop (for time sensitive tests)
fakeweb (for blocking HTTP calls to third-party services)

Plugins (in vendor/plugins):
----------------------------

hoptoad_notifier
limerick_rake
validation_reflection (used by formtastic to find required fields)

Initializers (in config/initializers)
-------------------------------------

action_mailer_configs.rb
We use SMTP by default in all applications.

hoptoad.rb
Get your API key at http://hoptoadapp.com

requires.rb
Automatically requires everything in
lib/
lib/extensions
test/mocks/RAILS_ENV (Removed in Rails 2, we decided to keep it)
Add other things you need to require in here.
Then run:

time_formats.rb
Two time formats are available by default, :short_date and :long_date.
Add other time formats here.
suspenders create projectname

Rake Tasks
----------
This will create a Rails 3 app in `projectname'. This script creates a new
new git repository. It is not meant to be used against an existing repo.

Rake tasks are contained in the limerick_rake gem.
Suspenders uses [Trout](https://github.com/thoughtbot/trout) to make it
easier to maintain a base version of special files (like Gemfile) in
Suspenders.

bootstrap
Provides rake tasks for loading data into the database. These are used for
an initial application dataset needed for production.
Whenever you want to get the latest and greatest Suspenders' Gemfile, run:

capistrano
Standard capistrano deployment tasks
trout update Gemfile

Testing
Gemfile
-------

Testing is done utilizing RSpec, 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 used.

Shoulda matchers are used on top of RSpec.

Timecop is used to freeze the time for the entire test suite. It is frozen to
the value of Time.now; that is, the time that the tests suite starts running.

Deployment
----------

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 see the latest and greatest gems, look at Suspenders'
[template/trout/Gemfile](https://github.com/thoughtbot/suspenders/blob/master/template/trout/Gemfile),
which will be copied into your projectname/Gemfile.

To push the git staging branch to production branch run:
It includes application gems like:

rake git:push:production
* [Paperclip](https://github.com/thoughtbot/paperclip) for file uploads
* [Formtastic](https://github.com/justinfrench/formtastic) for better forms
* [Hoptoad Notifier](https://github.com/thoughtbot/hoptoad_notifier) for exception notification
* [Flutie](https://github.com/thoughtbot/flutie) for default CSS styles
* [Clearance](https://github.com/thoughtbot/clearance) for authentication

Setup your deployment environment by running:
And testing gems like:

cap ENVIRONMENT deploy:setup
(You'll be prompted for the environment's database password)
* [Cucumber, Capybara, and Akephalos](http://robots.thoughtbot.com/post/1658763359/thoughtbot-and-the-holy-grail) for integration testing, including Javascript behavior
* [RSpec](https://github.com/rspec/rspec) for awesome, readable isolation testing
* [Factory Girl](https://github.com/thoughtbot/factory_girl) for easier creation of test data
* [Shoulda](http://github.com/thoughtbot/shoulda) for frequently needed Rails and RSpec matchers
* [Timecop](https://github.com/jtrupiano/timecop) for dealing with time
* [Bourne](https://github.com/thoughtbot/bourne) and Mocha for stubbing and spying

Deploy to the desired environment by running:
Other goodies
-------------

cap ENVIRONMENT deploy
Suspenders also comes with:

The default environment for deploy is staging, to deploy to staging, just run:
* [jQuery](https://github.com/jquery/jquery) for Javascript pleasantry
* Rails' flashes set up and in application layout.
* A few nice time formats.

cap deploy
See [template/files](https://github.com/thoughtbot/suspenders/blob/master/template/files) to
see what is generated one-time.

Mascot
Issues
------

The official Suspenders mascot is Suspenders Boy:
If you have problems, please create a [Github issue](https://github.com/thoughtbot/suspenders/issues).

http://media.tumblr.com/1TEAMALpseh5xzf0Jt6bcwSMo1_400.png
2 changes: 1 addition & 1 deletion suspenders.gemspec
Expand Up @@ -4,7 +4,7 @@ Gem::Specification.new do |s|
s.rubygems_version = '1.3.5'

s.name = 'suspenders'
s.version = '0.1.0.beta.7'
s.version = '0.2.0'
s.date = '2010-11-29'

s.summary = "Generate a Rails app using thoughtbot's best practices."
Expand Down

0 comments on commit 7b9bffc

Please sign in to comment.