Casecommons/datafix — pull request #6 by dimroc (2014-12-12 04:30:31+00:00)
Title: Multiple datafix and status

Made a few changes to bring this gem more inline with ActiveRecord's `rake db:migrate` functionality.

1. Allow one to run all the datafixes that haven't been run with `rake db:datafix`.
2. Allow one to see the statuses of run datafixes with `rake db:datafix:status`.
3. Still respect the NAME env var and only run that one datafix: `rake db:datafix NAME=myDatafix`.
4. Fix rspec setup to run the specs for the generators by default.
5. Have default `rake` task for the datafix repo run the rspec tests.
6. Add `rails g migration datafix:upgrade` to allow existing datafix users to use the latest and greatest.

If I were to start this from scratch, I would have modeled it after ActiveRecord and stored the version (file's timestamp) of each datafix. Then we could reuse the ActiveRecord::Migrator class to do a lot of heavylifting. But alas, the original datafix table doesn't store the file timestamp (version).