mameapns 0.0.3 → 0.0.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.
@@ -28,6 +28,13 @@ module Mameapns
28
28
  end
29
29
 
30
30
  def start
31
+ setup_session
32
+
33
+ @deliver_session.start
34
+ @feedback_session.start
35
+ end
36
+
37
+ def setup_session
31
38
  @deliver_session = Session::Deliver.new(
32
39
  ssl_cert: ssl_cert,
33
40
  ssl_cert_key: ssl_cert_key,
@@ -50,9 +57,6 @@ module Mameapns
50
57
 
51
58
  @feedback_session.on_error(&method(:handle_feedback))
52
59
  @feedback_session.on_exception(&method(:handle_exception))
53
-
54
- @deliver_session.start
55
- @feedback_session.start
56
60
  end
57
61
 
58
62
  def stop
@@ -97,6 +101,8 @@ module Mameapns
97
101
  # SSLError: Given invalid SSL Cert.
98
102
  #
99
103
  def attempt_to_connect?
104
+ setup_session
105
+
100
106
  @deliver_session.connect
101
107
  @deliver_session.close
102
108
  end
@@ -12,7 +12,7 @@ module Mameapns
12
12
  options :sound, default: "1.aiff"
13
13
  options :alert
14
14
  options :attributes_for_device
15
- options :related_infomation
15
+ options :related_information
16
16
 
17
17
  def device_token=(token)
18
18
  if !token.nil?
@@ -1,3 +1,3 @@
1
1
  module Mameapns
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mameapns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: