lib/c2dm.rb in c2dm-0.1.0 vs lib/c2dm.rb in c2dm-0.1.2

- old
+ new

@@ -16,9 +16,12 @@ params = {:body => post_body, :headers => {'Content-type' => 'application/x-www-form-urlencoded', 'Content-length' => "#{post_body.length}"}} response = Push.post(AUTH_URL, params) + + raise response if response["Error="] + response_split = response.body.split("\n") @auth_token = response_split[2].gsub("Auth=", "") end def send_notification(registration_id, message) \ No newline at end of file