jnunemaker/plucky — pull request #36 by cheald (2013-07-07 20:29:28+00:00)
Title: Fix issues with OptionsKeyNormalizer acting on sort fields

Previously, the OptionsKey normalizer was passed to SortValue, which then normalized its keys based on the OptionsKey keys. This meant that trying to do something like `sort(:order.asc)` would end up changing the "order" field (not command) to "sort", which makes the sort fail.

This commit generalizes the OptionsKeyHash normalizer into a HashNormalizer that accepts an initialization hash, and sets the appropriate conversion hashes for each type of value to normalize. Specs fixed up to reflect the bug and cover its fix. Will close #35.