pushmeup_tns 0.1.5 → 0.1.6
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/pushmeup/apns/core.rb +7 -2
- data/lib/pushmeup/version.rb +1 -1
- metadata +1 -1
data/lib/pushmeup/apns/core.rb
CHANGED
@@ -21,6 +21,11 @@ module APNS
|
|
21
21
|
|
22
22
|
def self.send_notifications(notifications)
|
23
23
|
sock, ssl = self.open_connection
|
24
|
+
|
25
|
+
if(sock.nil? or ssl.nil?)
|
26
|
+
puts "Failed to send notification as seems to be that the pem file doesn't exist"
|
27
|
+
return 0
|
28
|
+
end
|
24
29
|
|
25
30
|
notifications.each do |n|
|
26
31
|
ssl.write(n.packaged_notification)
|
@@ -51,12 +56,12 @@ module APNS
|
|
51
56
|
|
52
57
|
def self.open_connection
|
53
58
|
if(!self.pem)
|
54
|
-
puts "The path to your pem file is not set. (APNS.pem = /path/to/cert.pem)"
|
59
|
+
#puts "The path to your pem file is not set. (APNS.pem = /path/to/cert.pem)"
|
55
60
|
return nil, nil
|
56
61
|
end
|
57
62
|
|
58
63
|
if(!File.exist?(self.pem))
|
59
|
-
puts "The path to your pem file does not exist!"
|
64
|
+
#puts "The path to your pem file does not exist!"
|
60
65
|
return nil, nil
|
61
66
|
end
|
62
67
|
|
data/lib/pushmeup/version.rb
CHANGED