LockerProject/Locker — pull request #647 by smurthas (2012-01-29 19:31:42+00:00)
Title: Contacts Collection Cleanup

Refactor the contacts collection to use a single insert function with mappers and hooks per service.

To test this, a few quick steps are in order:

1. With an existing Me dir (on master), hit /Me/contacts/state and make note of the count
2. Switch to ccc, restart and run /Me/contacts/update
3. When it is done, check /Me/contacts/state and **assert that the count is nearly identical (±1%)**
4. Move your Me dir out of the way, and re-add all the services you had previously connected
5. When they are done, check /Me/contacts/state and **assert that the count is nearly identical (±1%)**

Doesn't require a migration and the code is entirely backwards compatible (functionally equivalent), so it can be merged right in, a new version can be published and get rolled right out.