An Simple EventMachine based client for Google Cloud Messaging
EM.run do
client = EM::GCM::Client.new(server_api_key)
notification = {
:restricted_package_name => "package_name",
:registration_ids => ["registraction_id"],
:data => { 'alert' => 'test' },
#:dry_run => true
}
client.deliver(notification) do |response|
#Handle response or success
end
end
More test converage!
Once you've made your great commits: