mameapns 0.0.2 → 0.0.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/lib/mameapns/application.rb +7 -11
- data/lib/mameapns/connection.rb +1 -1
- data/lib/mameapns/version.rb +1 -1
- metadata +1 -1
data/lib/mameapns/application.rb
CHANGED
|
@@ -91,18 +91,14 @@ module Mameapns
|
|
|
91
91
|
|
|
92
92
|
# To attempt to connect to apns server and close actually
|
|
93
93
|
# it used to check ssl cert files and ohter configurations.
|
|
94
|
+
#
|
|
95
|
+
# raises:
|
|
96
|
+
# ConnectionError: Unable to connect to apns. generaly socket error.
|
|
97
|
+
# SSLError: Given invalid SSL Cert.
|
|
98
|
+
#
|
|
94
99
|
def attempt_to_connect?
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
begin
|
|
98
|
-
@deliver_session.connect?
|
|
99
|
-
rescue ConnectionError => e
|
|
100
|
-
can_connect = false
|
|
101
|
-
ensure
|
|
102
|
-
@deliver_session.close
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
can_connect
|
|
100
|
+
@deliver_session.connect
|
|
101
|
+
@deliver_session.close
|
|
106
102
|
end
|
|
107
103
|
|
|
108
104
|
[:feedback, :sent, :delivery_error, :exception].each do |event|
|
data/lib/mameapns/connection.rb
CHANGED
data/lib/mameapns/version.rb
CHANGED