18F/answers — pull request #250 by jgrevich (2014-09-14 23:05:36+00:00)
Title: Copy DB migrations to host app and correctly set order.

This fixes #249 by monkey patching `Engine` to copy the `answers-core` migration files to the host app during initialization. It also modifies the installer template to include any gem dependencies after answers so as to include libs (and migrations) after `answers`/`answers-*`

Background info here: http://pivotallabs.com/leave-your-migrations-in-your-rails-engines/

#### To test

run `./bin/answers MyAnswers`. The `answers-core` migration file (`core/db/migrate/20140911060606_answers_up.rb`) will now be copied to the `MyAnswers` instance and executed during the engine initialization (e.g. after `generate answers:cms --fresh-installation`). Also check to make sure that the AATO migrations execute after answers:
```
rake railties:install:migrations
Copied migration 20140914230012_answers_up.answers.rb from answers
Copied migration 20140914230013_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb from acts_as_taggable_on_engine
Copied migration 20140914230014_add_missing_unique_indices.acts_as_taggable_on_engine.rb from acts_as_taggable_on_engine
Copied migration 20140914230015_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb from acts_as_taggable_on_engine
Copied migration 20140914230016_add_missing_taggable_index.acts_as_taggable_on_engine.rb from acts_as_taggable_on_engine
rake db:create db:migrate
```