opscode/supermarket — pull request #580 by bcobb (2014-07-10 18:08:20+00:00)
Title: Reprocess imported archives

:fork_and_knife:

This ought to fix opscode/supermarket#579. The idea is that @cwebberOps will run `rake supermarket:rebuild_cookbook_version_dependencies` on a production node, which will queue jobs for the reprocessing.

The job itself pulls down a `CookbookVersion`'s tarball, identifies any dependencies with version constraints which don't match the metadata-specified constraint exactly, and updates those dependencies accordingly. The two major discrepancies this fixes are:

1. `OPERATOR MAJOR.MINOR` imported as `OPERATOR MAJOR.MINOR.0`
2. `MAJOR.MINOR.PATCH` imported as `= MAJOR.MINOR.PATCH`

The [worker's spec](https://github.com/opscode/supermarket/blob/reprocess-imported-archives/spec/workers/cookbook_version_dependencies_rebuilder_spec.rb#L19) has concrete examples.

I'd like to put together one revertible commit before merging, but will keep the smaller commits around until this has the :+1: