pushmeup_tns 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module Pushmeup
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pushmeup_tns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: