em-apns 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +17 -3
- data/em-apns.gemspec +1 -1
- data/lib/em-apns.rb +1 -1
- data/lib/em-apns/server_runner.rb +4 -0
- data/lib/em-apns/version.rb +1 -1
- metadata +3 -4
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# EM::APNS
|
2
2
|
|
3
|
-
|
3
|
+
Persistent connections pool to APN service
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -17,8 +17,22 @@ Or install it yourself as:
|
|
17
17
|
$ gem install em-apns
|
18
18
|
|
19
19
|
## Usage
|
20
|
+
1. Create config file `config/em-apns.yml`
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
cert: path/to/cert.pem
|
24
|
+
key: path/to/key.pem
|
25
|
+
pool: 4
|
26
|
+
```
|
27
|
+
|
28
|
+
2. Start the daemon `em-apns start -d` from the root folder of your app (`tmp/sockets` and `tmp/pids` are required, also `daemons` gem required for running process in background)
|
29
|
+
3. Send notification from your app (for non rails apps path to sock file is required: `EM::APNS.sock = path/to/sock/file` )
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
EM::APNS.send_notification(token, alert: alert, custom: data)
|
33
|
+
```
|
34
|
+
|
20
35
|
|
21
|
-
TODO: Write usage instructions here
|
22
36
|
|
23
37
|
## Contributing
|
24
38
|
|
data/em-apns.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
|
|
6
6
|
gem.email = ["lolcoltd@gmail.com"]
|
7
7
|
gem.description = %q{EventMachine-driven Apple Push Notifications Sender daemon}
|
8
8
|
gem.summary = %q{EventMachine-driven Apple Push Notifications Sender daemon}
|
9
|
-
gem.homepage = ""
|
9
|
+
gem.homepage = "https://github.com/playa/em-apns"
|
10
10
|
|
11
11
|
gem.files = `git ls-files`.split($\)
|
12
12
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
data/lib/em-apns.rb
CHANGED
data/lib/em-apns/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: em-apns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|
@@ -90,7 +90,7 @@ files:
|
|
90
90
|
- spec/support/certs/key.pem
|
91
91
|
- spec/support/helper_methods.rb
|
92
92
|
- spec/support/mock_server.rb
|
93
|
-
homepage:
|
93
|
+
homepage: https://github.com/playa/em-apns
|
94
94
|
licenses: []
|
95
95
|
post_install_message:
|
96
96
|
rdoc_options: []
|
@@ -122,4 +122,3 @@ test_files:
|
|
122
122
|
- spec/support/certs/key.pem
|
123
123
|
- spec/support/helper_methods.rb
|
124
124
|
- spec/support/mock_server.rb
|
125
|
-
has_rdoc:
|