stella_gcm 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stella_gcm.rb +6 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 138f5929bf37e932a9f5336dcf9576f0c090513a
|
4
|
+
data.tar.gz: 8a9dc086441b642290c30cd3314a379e213b71a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53b32a3493d455ade18dda858c899cf91eddbe65c4a8c5945a1f433ca9320d8233622942c5abadaf84e3d50c457ba5940d44444d910c4689b83b78c5677f7da3
|
7
|
+
data.tar.gz: 9e943cabb695e2670e18c9e737e259bbcf164ea99b1747d30f5afc03b528eca88dc26834a3341c044c8d6841c814bcd2e009d54a016ef5c42423480abed00876
|
data/lib/stella_gcm.rb
CHANGED
@@ -21,20 +21,19 @@ class StellaGCM
|
|
21
21
|
response = @http.request gcm_server_uri, request
|
22
22
|
rescue
|
23
23
|
return {:code => 404,
|
24
|
-
:
|
25
|
-
:msg =>
|
24
|
+
:response => nil,
|
25
|
+
:msg => 'GCM Server Not Connected.'}
|
26
26
|
end
|
27
27
|
|
28
28
|
begin
|
29
29
|
body = ActiveSupport::JSON.decode(response.body).with_indifferent_access
|
30
30
|
rescue
|
31
31
|
return {:code => 500,
|
32
|
-
:
|
33
|
-
:msg =>
|
32
|
+
:response => response,
|
33
|
+
:msg => 'Json Parse failed Return Value.'}
|
34
34
|
end
|
35
|
-
|
36
|
-
|
37
|
-
:success => body[:success].to_i == 1}
|
35
|
+
{:code => 0,
|
36
|
+
:response => body}
|
38
37
|
end
|
39
38
|
|
40
39
|
def body(ids, option)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stella_gcm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Haru
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-http-persistent
|