pushmeup 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -0
- data/lib/pushmeup/gcm/core.rb +6 -6
- data/lib/pushmeup/version.rb +1 -1
- metadata +3 -3
data/README.md
CHANGED
data/lib/pushmeup/gcm/core.rb
CHANGED
@@ -47,7 +47,7 @@ class GCM
|
|
47
47
|
private
|
48
48
|
|
49
49
|
def self.build_post_body(registration_ids, options={})
|
50
|
-
body = {registration_ids
|
50
|
+
body = {:registration_ids => registration_ids}.merge(options)
|
51
51
|
#p body
|
52
52
|
#raise exception if options[:time_to_live] && !options[:collapse_key]
|
53
53
|
end
|
@@ -55,15 +55,15 @@ class GCM
|
|
55
55
|
def self.build_response(response)
|
56
56
|
case response.code
|
57
57
|
when 200
|
58
|
-
{response
|
58
|
+
{:response => 'success', :body => response.body, :headers => response.headers, :status_code => response.code}
|
59
59
|
when 400
|
60
|
-
{response
|
60
|
+
{:response => 'Only applies for JSON requests. Indicates that the request could not be parsed as JSON, or it contained invalid fields.', :status_code => response.code}
|
61
61
|
when 401
|
62
|
-
{response
|
62
|
+
{:response => 'There was an error authenticating the sender account.', :status_code => response.code}
|
63
63
|
when 500
|
64
|
-
{response
|
64
|
+
{:response => 'There was an internal error in the GCM server while trying to process the request.', :status_code => response.code}
|
65
65
|
when 503
|
66
|
-
{response
|
66
|
+
{:response => 'Server is temporarily unavailable.', :status_code => response.code}
|
67
67
|
end
|
68
68
|
end
|
69
69
|
end
|
data/lib/pushmeup/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pushmeup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -118,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
118
118
|
version: '0'
|
119
119
|
segments:
|
120
120
|
- 0
|
121
|
-
hash: -
|
121
|
+
hash: -3467176487939634331
|
122
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
123
|
none: false
|
124
124
|
requirements:
|
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
127
|
version: '0'
|
128
128
|
segments:
|
129
129
|
- 0
|
130
|
-
hash: -
|
130
|
+
hash: -3467176487939634331
|
131
131
|
requirements: []
|
132
132
|
rubyforge_project: pushmeup
|
133
133
|
rubygems_version: 1.8.24
|