apnotic 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5cb5a06e46cf7b22e0c960e30007dcd7dcd2fe33
4
- data.tar.gz: f97f34e8538fd271cb0a169780136575a85d49b5
3
+ metadata.gz: 96a81fa7043cdf525821559c6f17f25ac3ed68e5
4
+ data.tar.gz: ce96f01178be6446a377c432e75dc084ec09eaab
5
5
  SHA512:
6
- metadata.gz: 3036c76078e4d49bc86f314237ef7c731497028f899e39285a99178f3f1357196eb55f9f3e680e5cd2070e08ce9234fe486449394c889ee1a040caec4edf5218
7
- data.tar.gz: a396a147c7667c004e483895719a7b6ab8f89291c45d423636bf3568c40a9e2513506dbe3134149bdaab4016ae5c848b8be25113b7c5387666c5c1b4f017624e
6
+ metadata.gz: 2dfd67c994bc476f175425cae6c49c1588b594e874677c13b9ef559711d61dca6d4978aeda4c7c86830c04d70a2220ae568eae8d3f8fb07249b0e022800036e3
7
+ data.tar.gz: 150029805a257482683b5ce5338baf2e8e75bd24978530ed004e5f28c957d7038029ab9799fed3e1a32e8e558716f01c72285dd1e982d48554db0ede222d6fda
@@ -3,6 +3,7 @@ rvm:
3
3
  - 2.1
4
4
  - 2.2
5
5
  - 2.3.0
6
+ - 2.3.1
6
7
 
7
8
  branches:
8
9
  only:
data/README.md CHANGED
@@ -34,7 +34,7 @@ require 'apnotic'
34
34
  # create a persistent connection
35
35
  connection = Apnotic::Connection.new(cert_path: "apns_certificate.pem", cert_pass: "pass")
36
36
 
37
- # create a notification for a specific device token
37
+ # create a notification for a specific device token
38
38
  token = "6c267f26b173cd9595ae2f6702b1ab560371a60e7c8a9e27419bd0fa4a42e58f"
39
39
 
40
40
  notification = Apnotic::Notification.new(token)
@@ -58,7 +58,7 @@ A practical usage of a Sidekiq / Rescue worker probably has to:
58
58
 
59
59
  * Use a pool of persistent connections.
60
60
  * Send a push notification.
61
- * Remove a device with an invalid token.
61
+ * Remove a device with an invalid token.
62
62
 
63
63
  An example of a Sidekiq worker with such features follows. This presumes a Rails environment, and a model `Device`.
64
64
 
@@ -116,20 +116,20 @@ It is also possible to create a connection that points to the Apple Development
116
116
  Apnotic::Connection.development(options)
117
117
  ```
118
118
 
119
- > The concepts of PRODUCTION and DEVELOPMENT are different from what they used to be in previous specifications. Anything built directly from XCode and loaded on your phone will have the app generate DEVELOPMENT tokens, while everything else (TestFlight, Apple Store, HockeyApp, ...) will be considered as PRODUCTION environment.
119
+ > The concepts of PRODUCTION and DEVELOPMENT are different from what they used to be in previous specifications. Anything built directly from XCode and loaded on your phone will have the app generate DEVELOPMENT tokens, while everything else (TestFlight, Apple Store, HockeyApp, ...) will be considered as PRODUCTION environment.
120
120
 
121
121
  #### Methods
122
122
 
123
123
  * **uri** → **`URI`**
124
-
124
+
125
125
  Returns the URI of the APNS endpoint.
126
126
 
127
127
  * **cert_path** → **`string`**
128
-
128
+
129
129
  Returns the path to the certificate
130
-
130
+
131
131
  * **push(notification, timeout=30)** → **`Apnotic::Response` or `nil`**
132
-
132
+
133
133
  Sends a notification. Returns `nil` in case a timeout occurs.
134
134
 
135
135
 
@@ -200,21 +200,21 @@ The response to a call to `connection.push`.
200
200
 
201
201
  #### Methods
202
202
 
203
+ * **ok?** → **`boolean`**
204
+
205
+ Returns if the push was successful.
206
+
203
207
  * **headers** → **`hash`**
204
-
208
+
205
209
  Returns a Hash containing the Headers of the response.
206
210
 
207
211
  * **status** → **`string`**
208
-
212
+
209
213
  Returns the status code.
210
214
 
211
215
  * **body** → **`hash` or `string`**
212
-
213
- Returns the body of the response in Hash format if a valid JSON was returned, otherwise just the RAW body.
214
216
 
215
- * **headers** **`boolean`**
216
-
217
- Returns if the push was successful.
217
+ Returns the body of the response in Hash format if a valid JSON was returned, otherwise just the RAW body.
218
218
 
219
219
 
220
220
  ## Getting Your APNs Certificate
@@ -223,8 +223,8 @@ The response to a call to `connection.push`.
223
223
 
224
224
  Once you have the certificate from Apple for your application, export your key and the apple certificate as p12 files. Here is a quick walkthrough on how to do this:
225
225
 
226
- 1. Click the disclosure arrow next to your certificate in Keychain Access and select the certificate and the key.
227
- 2. Right click and choose `Export 2 items…`.
226
+ 1. Click the disclosure arrow next to your certificate in Keychain Access and select the certificate and the key.
227
+ 2. Right click and choose `Export 2 items…`.
228
228
  3. Choose the p12 format from the drop down and name it `cert.p12`.
229
229
 
230
230
  Optionally, you may covert the p12 file to a pem file (this step is optional because Apnotic natively supports p12 files):
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "net-http2", "~> 0.9.2"
21
+ spec.add_dependency "net-http2", "~> 0.10.0"
22
22
  spec.add_dependency "connection_pool", "~> 2.0"
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 1.3"
@@ -1,3 +1,3 @@
1
1
  module Apnotic
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apnotic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Ostinelli
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-01 00:00:00.000000000 Z
11
+ date: 2016-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-http2
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.9.2
19
+ version: 0.10.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.9.2
26
+ version: 0.10.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: connection_pool
29
29
  requirement: !ruby/object:Gem::Requirement