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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stella_gcm.rb +6 -7
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 346c78764c3e91a83c2c7154fb333f466e3ae673
4
- data.tar.gz: 4d5e7637fb3394e0896154d12cba209ac1b0594d
3
+ metadata.gz: 138f5929bf37e932a9f5336dcf9576f0c090513a
4
+ data.tar.gz: 8a9dc086441b642290c30cd3314a379e213b71a7
5
5
  SHA512:
6
- metadata.gz: a425b83648cbab212f1e6ac4ce32c4c91a68989f099d61ef447bf2c532ca189e53606cc8eeaedabbba65dadd37803674243ea46bacb1479b129fbf0d094c5047
7
- data.tar.gz: c2430c299675421de839c34728f671800cc2ea2a3a4ab4674572708184bf1c8602b531848f894bbf68759936d233ebefd2db2093292e0eaac972ee2d73d4a92c
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
- :success => false,
25
- :msg => "GCM Server Not Connected."}
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
- :success => false,
33
- :msg => "Json Parse failed Return Value."}
32
+ :response => response,
33
+ :msg => 'Json Parse failed Return Value.'}
34
34
  end
35
-
36
- {:code => response.code.to_i,
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.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: 2014-06-07 00:00:00.000000000 Z
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