kw_apn 0.4.beta.3 → 0.4.beta.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/connection.rb +3 -3
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.beta.3
1
+ 0.4.beta.4
data/lib/connection.rb CHANGED
@@ -5,10 +5,10 @@ module KwAPN
5
5
 
6
6
  class Connection
7
7
 
8
- def connect(host, port, opts)
8
+ def connect(host, port, app_id = nil)
9
9
  ctx = OpenSSL::SSL::SSLContext.new()
10
- ctx.cert = OpenSSL::X509::Certificate.new(File::read(opts[:cert_file]))
11
- ctx.key = OpenSSL::PKey::RSA.new(File::read(opts[:cert_file]))
10
+ ctx.cert = OpenSSL::X509::Certificate.new(File.read(KwAPN::Config.option(:cert_file, app_id)))
11
+ ctx.key = OpenSSL::PKey::RSA.new(File.read(KwAPN::Config.option(:cert_file, app_id)))
12
12
 
13
13
  s = TCPSocket.new(host, port)
14
14
  ssl = OpenSSL::SSL::SSLSocket.new(s, ctx)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kw_apn
3
3
  version: !ruby/object:Gem::Version
4
- hash: 62196341
4
+ hash: 62196347
5
5
  prerelease: true
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
9
  - beta
10
- - 3
11
- version: 0.4.beta.3
10
+ - 4
11
+ version: 0.4.beta.4
12
12
  platform: ruby
13
13
  authors:
14
14
  - Jonathan Cichon