kw_apn 0.5.2 → 0.5.3
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.
- data/VERSION +1 -1
- data/lib/connection.rb +6 -2
- metadata +22 -42
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.5.
|
|
1
|
+
0.5.3
|
data/lib/connection.rb
CHANGED
|
@@ -8,8 +8,8 @@ module KwAPN
|
|
|
8
8
|
def connect(host, port, app_id = nil)
|
|
9
9
|
ctx = OpenSSL::SSL::SSLContext.new()
|
|
10
10
|
|
|
11
|
-
ctx.cert = OpenSSL::X509::Certificate.new(
|
|
12
|
-
ctx.key = OpenSSL::PKey::RSA.new(
|
|
11
|
+
ctx.cert = OpenSSL::X509::Certificate.new(cert_file(app_id))
|
|
12
|
+
ctx.key = OpenSSL::PKey::RSA.new(cert_file(app_id))
|
|
13
13
|
|
|
14
14
|
s = TCPSocket.new(host, port)
|
|
15
15
|
ssl = OpenSSL::SSL::SSLSocket.new(s, ctx)
|
|
@@ -18,6 +18,10 @@ module KwAPN
|
|
|
18
18
|
ssl
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
+
def cert_file(app_id = nil)
|
|
22
|
+
File.read(KwAPN::Config.option(:cert_file, app_id))
|
|
23
|
+
end
|
|
24
|
+
|
|
21
25
|
class << self
|
|
22
26
|
def log(s)
|
|
23
27
|
File.open(KwAPN::Config.option(:root).join("log", "kw_apn.log"), File::WRONLY|File::APPEND|File::CREAT, 0666) do |f|
|
metadata
CHANGED
|
@@ -1,35 +1,26 @@
|
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kw_apn
|
|
3
|
-
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
5
|
-
prerelease:
|
|
6
|
-
segments:
|
|
7
|
-
- 0
|
|
8
|
-
- 5
|
|
9
|
-
- 2
|
|
10
|
-
version: 0.5.2
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.5.3
|
|
5
|
+
prerelease:
|
|
11
6
|
platform: ruby
|
|
12
|
-
authors:
|
|
7
|
+
authors:
|
|
13
8
|
- Jonathan Cichon
|
|
14
9
|
- Andreas Gerauer
|
|
15
10
|
- Kupferwerk GmbH
|
|
16
11
|
autorequire:
|
|
17
12
|
bindir: bin
|
|
18
13
|
cert_chain: []
|
|
19
|
-
|
|
20
|
-
date: 2011-05-13 00:00:00 +02:00
|
|
21
|
-
default_executable:
|
|
14
|
+
date: 2012-04-02 00:00:00.000000000Z
|
|
22
15
|
dependencies: []
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
description: Apple Push Notification Library by Kupferwerk. Supports extended format
|
|
17
|
+
with feedback.
|
|
25
18
|
email: cichon@kupferwerk.com
|
|
26
19
|
executables: []
|
|
27
|
-
|
|
28
20
|
extensions: []
|
|
29
|
-
|
|
30
|
-
extra_rdoc_files:
|
|
21
|
+
extra_rdoc_files:
|
|
31
22
|
- README.rdoc
|
|
32
|
-
files:
|
|
23
|
+
files:
|
|
33
24
|
- lib/config.rb
|
|
34
25
|
- lib/connection.rb
|
|
35
26
|
- lib/core.rb
|
|
@@ -45,39 +36,28 @@ files:
|
|
|
45
36
|
- Rakefile
|
|
46
37
|
- README.rdoc
|
|
47
38
|
- VERSION
|
|
48
|
-
has_rdoc: true
|
|
49
39
|
homepage: http://github.com/kupferwerk/kw_apn
|
|
50
40
|
licenses: []
|
|
51
|
-
|
|
52
41
|
post_install_message:
|
|
53
42
|
rdoc_options: []
|
|
54
|
-
|
|
55
|
-
require_paths:
|
|
43
|
+
require_paths:
|
|
56
44
|
- lib
|
|
57
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
|
45
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
58
46
|
none: false
|
|
59
|
-
requirements:
|
|
60
|
-
- -
|
|
61
|
-
- !ruby/object:Gem::Version
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
- 0
|
|
65
|
-
version: "0"
|
|
66
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
47
|
+
requirements:
|
|
48
|
+
- - ! '>='
|
|
49
|
+
- !ruby/object:Gem::Version
|
|
50
|
+
version: '0'
|
|
51
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
52
|
none: false
|
|
68
|
-
requirements:
|
|
69
|
-
- -
|
|
70
|
-
- !ruby/object:Gem::Version
|
|
71
|
-
|
|
72
|
-
segments:
|
|
73
|
-
- 0
|
|
74
|
-
version: "0"
|
|
53
|
+
requirements:
|
|
54
|
+
- - ! '>='
|
|
55
|
+
- !ruby/object:Gem::Version
|
|
56
|
+
version: '0'
|
|
75
57
|
requirements: []
|
|
76
|
-
|
|
77
58
|
rubyforge_project:
|
|
78
|
-
rubygems_version: 1.
|
|
59
|
+
rubygems_version: 1.8.6
|
|
79
60
|
signing_key:
|
|
80
61
|
specification_version: 3
|
|
81
62
|
summary: APN Lib by Kupferwerk
|
|
82
63
|
test_files: []
|
|
83
|
-
|