Here is a side-by-side of Bort and Suspenders. Both are Rails starter applications.
September 10, 2009
|unit test||rspec, rspec_rails||shoulda|
|unit test "noise suppression"||
|Error notification||exception notifier||hoptoad_notifier|
|forms handler||Fudge Form||formtastic|
|file attachment||attachment fu OR Paperclip||paperclip|
|login||Restful Authentication (includes OpenID)||Clearance|
|Extra rake tasks||bort:install (installs optional add-ons)||Limerick Rake|
|roles|| Role Requirement *
|alternative to RHTML||HAML *
Note that in the above table, more opinions is neither good nor bad -- unless they match/don't-match your opinions.
* = optional via "rake bort:install"
For myself, I like the Thoughtbot (Suspenders) stack with the following exceptions:
- git - I'm using Subversion for other projects. This is easy enough to address. After I pull suspenders, I'll just "rm -rf .git".
- mongrel cluster - I'm not ready to make this commitment at the beginning of the project. Easy enough to ignore for now, because "script/server" still works.
- Redcloth - I don't need an alternative mark-up syntax, so I'll have to rm the gem.
- shoulda - I'm using rspec, so I'll have to rm this gem and install rspec and rspec-rails.
Bundling in Cucumber, Webrat, and Clearance is nice. They fit well together.
So here’s my current rails project start-up:
- cd ~/dev
- git clone git://github.com/thoughtbot/suspenders.git
- cd suspenders
- ./script/create_project projectname
- At this point, I get an error "config.gem: Unpacked gem thoughtbot-clearance-0.8.2 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this."
- Running refresh_specs all day isn't going to help, because the .gemspec file isn't there on github (with the Clearance that is part of Suspenders -- it IS there on the "real" Clearance).
- cd ../projectname/vendor/gems
- rm -rf thoughtbot-clearance-0.8.2
- git clone git://github.com/thoughtbot/clearance.git thoughtbot-clearance-0.8.2
- cd ~/dev/projectname
- rake gems:refresh_specs
- Comment-out the Redcloth entry in config/environment.rb
- Comment-out the shoulda entry in config/environments/test.rb
- Install rspec and rspec-rails:
- ruby script/plugin install git://github.com/dchelimsky/rspec.git -r 'refs/tags/1.2.7'
- ruby script/plugin install git://github.com/dchelimsky/rspec-rails.git -r 'refs/tags/126.96.36.199'
- ruby script/generate rspec
So I created the attached shell script to automate this.
UPDATE (9/16/2009): I’ve abandoned this approach. Too often I work from inside a restrictive firewall, and the gyrations necessary to pull-in all of the pieces are simply too idiosyncratic to automate reliably.