spacialdb/gcm — pull request #8 by nevalla (2014-01-09 21:47:54+00:00)
Title: Add canonical registration IDs to response hash

GCM provides a facility called "canonical registration IDs" to easily recover from multiple registrations for the same device. It will include the canonical registration ID in the registration_id field of the response, for example

{"canonical_ids":1,"results":[{"registration_id":"43","message_id":"0:1385025861956342%572c22801bb3"}]}

For more details: http://developer.android.com/google/gcm/adv.html#canonical

In this pull request those registration_ids are added to canonical_ids array from the body of the response.
```ruby
:headers => {},
:canonical_ids => [{:old => "42", :new => "43"}],
:status_code => 200,
:response => 'success',
:body => "{\"canonical_ids\":1,\"results\":[{\"registration_id\":\"43\",\"message_id\":\"0:1385025861956342%572c22801bb3\"}]}"
```