gofullstack/chef-legacy — pull request #1 by bcobb (2014-04-08 23:31:10+00:00)
Title: Overhaul the import as we know it

:fork_and_knife:

This started out as a small change, and then ballooned into like four changes at once. @brettchalupa would frown on this commit.

Anyway, the four things:

1. Turn the code into a gem
1. Add a Railtie which loads the import task
1. Read data directly from the legacy database instead of from CSVs
1. Massage version constraint data to pass Supermarket's validation

The first three are all in service of making it easier to import data from a backup of the production database. Connecting to a MySQL database adds a bit of extra overhead, but avoids all of the pitfalls of slightly-mismatched CSV formats. If we can get read-only access to the production database, running imports for real should be a snap.

The fourth item troubles me a bit, given that some of the invalid items were preeeettty close. Stuff like `~> 5` or `>=0.0.0` won't pass, and the validation messages aren't very helpful. Just something to note.