pusher-push-notifications 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/Gemfile +2 -0
- data/Gemfile.lock +7 -1
- data/lib/pusher/push_notifications/client.rb +13 -2
- data/lib/pusher/push_notifications/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: f5f179801f663e3f2ef76bbad684fe37dfb003636ae39356f832565c351dccdc
|
|
4
|
+
data.tar.gz: 36b660566d424a15eeecf8d1c6d5731e3d7af4393b78318d677e7eec86eda2d6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d566ba46b0a2cbe7f784f1e3093aed15df19dabf68bad4a1e7df448e55e230b3136298595025429712ebe103998454d4504aaa82a2905223da52d8f25649c93a
|
|
7
|
+
data.tar.gz: ead9faa60b578fb70acc4ed8677e11c96a94bba9ed34994cfe0acee05d3e56b534f92a96cf1d492e5df24d231530ad15e3fec6d6d5b84ab86b3a3264712eec86
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
pusher-push-notifications (0.3.
|
|
4
|
+
pusher-push-notifications (0.3.1)
|
|
5
5
|
caze
|
|
6
6
|
rest-client
|
|
7
7
|
|
|
@@ -19,6 +19,10 @@ GEM
|
|
|
19
19
|
byebug (9.1.0)
|
|
20
20
|
caze (0.2.2)
|
|
21
21
|
activesupport (>= 3)
|
|
22
|
+
codecov (0.1.10)
|
|
23
|
+
json
|
|
24
|
+
simplecov
|
|
25
|
+
url
|
|
22
26
|
coderay (1.1.2)
|
|
23
27
|
concurrent-ruby (1.0.5)
|
|
24
28
|
coveralls (0.8.21)
|
|
@@ -101,6 +105,7 @@ GEM
|
|
|
101
105
|
unf_ext
|
|
102
106
|
unf_ext (0.0.7.5)
|
|
103
107
|
unicode-display_width (1.3.0)
|
|
108
|
+
url (0.3.2)
|
|
104
109
|
vcr (3.0.3)
|
|
105
110
|
webmock (3.1.1)
|
|
106
111
|
addressable (>= 2.3.6)
|
|
@@ -112,6 +117,7 @@ PLATFORMS
|
|
|
112
117
|
|
|
113
118
|
DEPENDENCIES
|
|
114
119
|
bundler (~> 1.16)
|
|
120
|
+
codecov
|
|
115
121
|
coveralls (~> 0.8.21)
|
|
116
122
|
dotenv (~> 2.2, >= 2.2.1)
|
|
117
123
|
pry-byebug
|
|
@@ -26,8 +26,12 @@ module Pusher
|
|
|
26
26
|
payload: body, headers: headers
|
|
27
27
|
) do |response|
|
|
28
28
|
status = response.code
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
if json?(response.body)
|
|
30
|
+
body = JSON.parse(response.body)
|
|
31
|
+
Response.new(status, body, status == 200)
|
|
32
|
+
else
|
|
33
|
+
Response.new(500, nil, false)
|
|
34
|
+
end
|
|
31
35
|
end
|
|
32
36
|
end
|
|
33
37
|
|
|
@@ -47,6 +51,13 @@ module Pusher
|
|
|
47
51
|
Authorization: "Bearer #{secret_key}"
|
|
48
52
|
}
|
|
49
53
|
end
|
|
54
|
+
|
|
55
|
+
def json?(response)
|
|
56
|
+
JSON.parse(response)
|
|
57
|
+
true
|
|
58
|
+
rescue JSON::ParserError
|
|
59
|
+
false
|
|
60
|
+
end
|
|
50
61
|
end
|
|
51
62
|
end
|
|
52
63
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pusher-push-notifications
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lucas Medeiros
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2018-
|
|
12
|
+
date: 2018-05-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: caze
|
|
@@ -230,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
230
230
|
version: '0'
|
|
231
231
|
requirements: []
|
|
232
232
|
rubyforge_project:
|
|
233
|
-
rubygems_version: 2.6
|
|
233
|
+
rubygems_version: 2.7.6
|
|
234
234
|
signing_key:
|
|
235
235
|
specification_version: 4
|
|
236
236
|
summary: Pusher Push Notifications Ruby server SDK
|