RailsApps/rails_apps_composer — pull request #63 by bryanstearns (2012-05-21 00:38:44+00:00)
Title: Configuration files for recipes and answers

I really like rails_apps_composer, because I like creating lots of one-off projects for exploration outside my main project. I find that I'm using the same recipes (with the same answers to questions) most of the time: I always want Sass with .sass syntax, rspec, etc.

So, here's a patch that adds a new ```--defaults=path``` option. With it, I can use a shell alias to ```rails_apps_composer --defaults=~/.rac```, where my defaults file contains the list of recipes I nearly always want, and the answers to the questions I nearly always give:

```
recipes:
- activerecord
- home_page
- html5
- sass
- rspec
- capybara
- guard
- extras
- git

activerecord:
database: sqlite3
auto_create: true

devise:
devise: standard
authorization: false

extras:
footnotes: false
ban_spiders: true
paginate: false
jsruntime: false

guard:
guard: standard

html5:
css_option: bootstrap_sass

rspec:
rspec: true
factory_girl: true
machinist: false

sass:
sass: true
```

The list of recipes at the top will be included in any project I use this file on; the remaining hashes will be used to satisfy any questions that those recipes pose: if a question isn't answered here, it'll be asked normally.

Since my alias doesn't specify any recipes on the command line, I get the _Which recipe would you like to add? (blank to finish)_ prompt, and usually just hit return. If I want _devise_ this time, I'll type it (it gets appended to the list from the settings file), and since I already answered its questions in the settings file, they don't get asked.

What do you think?

(Thanks again for a great tool!)