apns-persistent 0.1.0 → 0.1.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: b67a066d44af6faeb712b35fa21802a5d2c5b461
4
- data.tar.gz: 9b61acc873a314477318c59a85cc71f0868b8ae2
3
+ metadata.gz: 310b550d473dfbc4ff4934db76056982aad9018c
4
+ data.tar.gz: d66a82de29214e157e0b279f1de5582e9b0bf07e
5
5
  SHA512:
6
- metadata.gz: 8f3c23c9d6229286ff775d89969bf21f518a22b0c10892a4baf4d8b4908c0e37351f3fc06b67bf8373a0911bc12067c2ede55ef78e9d039d84f76695cd8ff7f1
7
- data.tar.gz: bed275d750dabc3d6afbec8440752308dca125ebbc815b5cb0df899a8fd0f33d8d4c41b8dab846b8e017c72a7357bf491a8a133d0c0dc27475042b16f982a8f4
6
+ metadata.gz: ec9089779c870da4f223fd06c9c3a1a1b7f5392d81987564211f376435e7ff9f4fdb68c7fa4e9eca9d705594d4da5c49188aae547c8179abcfcd9cf6756e20c5
7
+ data.tar.gz: c951454d0a67230f0f7237bb1c9a6b9b39a29e58d1662d8d186fa53b62a17571942ef5c71887125404b70d87b5f62b14f3f3d8c2bb0482e1fe7e2cfa08ad72a9
data/README.md CHANGED
@@ -19,12 +19,14 @@ Or install it yourself as:
19
19
  $ gem install apns-persistent
20
20
 
21
21
  ## Push Usage
22
+ [Examples](https://github.com/malt03/apns-persistent/tree/master/exe)
23
+
22
24
  ### Recommend
23
25
  ```ruby
24
26
  c = Apns::Persistent::PushClient.new(certificate: '/path/to/apple_push_notification.pem', sandbox: true)
25
27
  c.open
26
28
 
27
- thread = c.regist_error_handle do |command, status, id|
29
+ thread = c.register_error_handle do |command, status, id|
28
30
  #error handle
29
31
  puts "Send Error! command:#{command} status:#{status} id:#{id}"
30
32
  end
@@ -19,6 +19,8 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
+ spec.required_ruby_version = '>= 2.1.0'
23
+
22
24
  spec.add_development_dependency "bundler", "~> 1.10"
23
25
  spec.add_development_dependency "rake", "~> 10.0"
24
26
  spec.add_development_dependency "rspec"
data/exe/push_daemon CHANGED
@@ -31,7 +31,7 @@ port = params[:port] || 20000
31
31
 
32
32
  client = Apns::Persistent::PushClient.new(certificate: params[:pemfile], passphrase: params[:passphrase], sandbox: params[:sandbox])
33
33
  client.open
34
- thread = client.regist_error_handle do |command, status, id|
34
+ thread = client.register_error_handle do |command, status, id|
35
35
  puts "\e[31mSend Error! command:#{command} status:#{status} id:#{id}\e[0m"
36
36
  ready(port)
37
37
  end
@@ -64,7 +64,7 @@ module Apns
64
64
  end
65
65
  end
66
66
 
67
- def regist_error_handle
67
+ def register_error_handle
68
68
  Thread.new do
69
69
  while error = @connection.read(6)
70
70
  command, status, id = error.unpack('ccN')
@@ -1,5 +1,5 @@
1
1
  module Apns
2
2
  module Persistent
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apns-persistent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - malt03
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-10 00:00:00.000000000 Z
11
+ date: 2015-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,7 +94,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - ">="
96
96
  - !ruby/object:Gem::Version
97
- version: '0'
97
+ version: 2.1.0
98
98
  required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - ">="
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  version: '0'
103
103
  requirements: []
104
104
  rubyforge_project:
105
- rubygems_version: 2.2.0
105
+ rubygems_version: 2.4.5
106
106
  signing_key:
107
107
  specification_version: 4
108
108
  summary: Send Apple Push Notifications