For the average Rails Development project I have the following terminal windows setup:
- Spork for RSpec
- Spork for Cucumber
- Rails Server
- RStakeout task for automatically running Cuke Features
Automatic Workflow Setup
That's a lot of terminals to setup and task to execute! In comes Terminitor to automatically open those windows and run the required tasks. I have the following file in ~/.terminitor/rails-dev.yml:
# Rails Server, Rspec, Cucumber with Spork Setup --- - tab0: - tab1: - rvm use ruby-1.8.7-p302@default - spork rspec - tab2: - rvm use ruby-1.8.7-p302@default - spork cuc - tab3: - rvm use ruby-1.8.7-p302@default - script/server - tab4: - rvm use ruby-1.8.7-p302@default - autospec -f - tab5: - rvm use ruby-1.8.7-p302@default - autocuke
All I need to do is change into the directory of the project and execute:
terminitor start rails-dev
I keep a blank tab, tab0 so I have a terminal window to play with, otherwise the first "tab" uses that window.
There was a only a couple of issues I came across which were pretty straightforward to work around. First, it didn't respect my default setup for rvm. I added what Ruby and Gemset to use.
The other issue was that it appeared to screw with by $PATH a bit. It added a space to the last path entry which I think was causing havoc. I just added $HOME to my path, I don't care if it messes with that.
I was definitely getting a little tired opening all the terminal windows for each project. This is well worth checking out.