rails/rails — pull request #6761 by freelancing-god (2012-06-17 16:20:10+00:00)
Title: Get logic out of db rake tasks, and into classes and objects

Right now, this is a work in progress. I'm pushing it here for a few reasons:

* Feedback before I get too carried away is welcome.
* Everyone gets a little more visibility of how (I think) rake tasks should be approached.
* I'm short of time, so others may wish to contribute (and if so, get in touch).

But as to what's happening in these commits, essentially:

* I want to get every single rake task that has a db prefix down to a single line of code
* All the logic ends up in classes and objects.
* Easier to read, easier to maintain, easier to test, easier to reuse.
* Currently, I've done this for db:create, db:drop, db:create:all and db:drop:all.
* My plan is for adapter-specific tasks to end up in DatabaseTasks, but then there'll also be MigrationTasks, SchemaTasks, FixturesTasks, TestTasks, and maybe one or two others.

And finally, my questions for right now:

* Does anyone want to help?
* Core committers, would something like this get accepted, or am I wasting my time?