thuss/standalone-migrations — pull request #61 by ricardovaleriano (2012-09-30 16:18:44+00:00)
Title: Getting rid of that "stubbing" we do on rails/activerecord api.

Hey Guys.
I've put it together but I know this is a very agressive change in the codebase, so I'm making this a pull request. This way we can discuss it before incorporate (or decide to not, if it's is the case).

Today we have to fake the existence of a Rails application to put the "db:" tasks to work. But we can do this in a more official way using the railties api. In my view this is better because we can benefit from any updates which the rails team release within either the migrations and the railties.

With theses changes, we can even use the original Rails (railties) generators to augment the standalone-migrations capabilities as in: https://github.com/ricardovaleriano/standalone-migrations/blob/3c0e802b0902fc7059cf180ee619faeb3d15b51d/lib/standalone_migrations/generator.rb. In this pull request this is the method been called by the db:new_migration task. So, if a user of standalone_migrations is using a more recent version of activerecord, all the goodies that normal Rails apps have, our user have as well.

And I think this free us to think on features that are specific for people who want to use this gem in non-rails projects, test this with JRuby and so.

So, what do you think guys?