pinnymz/migration_comments — pull request #8 by edennis (2013-07-02 08:36:09+00:00)
Title: Remove config/database.yml dependency in MysqlAdapter

My reasons for this change are two-fold:

1. My current project makes use of ERB in config/database.yml which isn't supported by the gem. If you take a look in the railties gem you'll see that this is supported:

https://github.com/rails/rails/blob/master/railties/lib/rails/application/configuration.rb#L105

2. Since it's conceivable to want to use your gem with only ActiveRecord outside of a Rails environment I wanted to get rid of the dependency to Rails.env in line 101 of the diff.

Selecting the current database from mysql and storing it in an instance variable gets rid of this dependency.

The tests are running (at least in the same state as they were before with the last two failing b/c of the rails 4 migration). I'd be happy to get your feedback on this. :)