em_apn_manager 0.1.3 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 46c31285c09779e4c69814961cebc85cccf93bad
4
- data.tar.gz: f13fc8e62de642c855c926c97e496499000d6962
3
+ metadata.gz: b8f217f2b3bf59e177774a969b44ea0be246200a
4
+ data.tar.gz: 5b00c33b1c2ef03bb00ed59f02adf30401b96eef
5
5
  SHA512:
6
- metadata.gz: 152e8171fb3a3b686cea23db6e570655aa806ab72a06c68283011f87ef815fe5004a9e5af503cc8dedb607b18c8623823751d610117bd0b9038cf15740daac59
7
- data.tar.gz: e941714c35469480b303670fc2bf1227e6225c865800606798d7049002d969631701b963478419a20f643cd116d9d1cc195bd5efdd6a9dafbaaae0dbd29b4c3b
6
+ metadata.gz: 7122330e3bbf01c8099e653be545a3dbda6bd9925ef116017ecaeb355332121c3c737d46cd8e11907b1f00a2f580c72164b9dea9819cf096bc203a5bc8512b8c
7
+ data.tar.gz: 6257993ed048113299a73715ff44ba4fe9aef074396c1de70d18a8d6e84f259aba185847139e7ceb3a4dd141c4c780543186da905341c07820aa2a8cf1b6ac33
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "em_apn_manager"
8
- s.version = "0.1.3"
8
+ s.version = "0.1.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael He"]
12
- s.date = "2013-07-18"
12
+ s.date = "2013-07-24"
13
13
  s.description = "EventMachine multiple APNs connections Management Solution. You can use multiple cert and connection to apple's APNs server."
14
14
  s.email = "m.he@skillupjapan.co.jp"
15
15
  s.executables = ["em_apn_manager"]
@@ -57,7 +57,7 @@ module EventMachine
57
57
  write_pid_file(options[:pid_file]) if options[:pid_file]
58
58
 
59
59
  EM::ApnManager.logger.info("Starting APN Manager")
60
- EM.run { EM::ApnManager::Manager.run }
60
+ EM.run { EM::ApnManager::Manager.run options }
61
61
  end
62
62
 
63
63
  ### For Testing ##################################################
@@ -20,7 +20,7 @@ module EventMachine
20
20
 
21
21
  # options = {gateway, port}
22
22
  def run options = {}
23
- @redis = EM::Hiredis.connect
23
+ @redis = EM::Hiredis.connect options[:redis]
24
24
 
25
25
  ### launch a new connect to apple when detected any pushs.
26
26
  @redis.pubsub.subscribe('push-notification') do |msg|
@@ -34,7 +34,7 @@ module EventMachine
34
34
 
35
35
  ### Create client connection if doesn't exist in pool.
36
36
  if client.nil?
37
- client = EM::ApnManager::Client.new(options.merge!({env: msg_hash["env"], cert: cert_filename}))
37
+ client = EM::ApnManager::Client.new({env: msg_hash["env"], cert: cert_filename}.merge! options)
38
38
  # Store the connection to pool
39
39
  $connection_pool[cert_filename] = client
40
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: em_apn_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael He
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-18 00:00:00.000000000 Z
11
+ date: 2013-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine