pushmeup_tns 0.1.4.hf1 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/lib/pushmeup-tns.rb CHANGED
@@ -0,0 +1,3 @@
1
+ require "pushmeup/version"
2
+ require "pushmeup/apple"
3
+ require "pushmeup/android"
@@ -50,8 +50,18 @@ module APNS
50
50
  protected
51
51
 
52
52
  def self.open_connection
53
- raise "The path to your pem file is not set. (APNS.pem = /path/to/cert.pem)" unless self.pem
54
- raise "The path to your pem file does not exist!" unless File.exist?(self.pem)
53
+ if(!self.pem)
54
+ puts "The path to your pem file is not set. (APNS.pem = /path/to/cert.pem)"
55
+ return nil, nil
56
+ end
57
+
58
+ if(!File.exist?(self.pem))
59
+ puts "The path to your pem file does not exist!"
60
+ return nil, nil
61
+ end
62
+
63
+ #puts "The path to your pem file is not set. (APNS.pem = /path/to/cert.pem)" unless self.pem
64
+ #puts "The path to your pem file does not exist!" unless File.exist?(self.pem)
55
65
 
56
66
  context = OpenSSL::SSL::SSLContext.new
57
67
  context.cert = OpenSSL::X509::Certificate.new(File.read(self.pem))
@@ -67,6 +77,16 @@ module APNS
67
77
  def self.feedback_connection
68
78
  raise "The path to your pem file is not set. (APNS.pem = /path/to/cert.pem)" unless self.pem
69
79
  raise "The path to your pem file does not exist!" unless File.exist?(self.pem)
80
+
81
+ if(!self.pem)
82
+ puts "The path to your pem file is not set. (APNS.pem = /path/to/cert.pem)"
83
+ return nil, nil
84
+ end
85
+
86
+ if(!File.exist?(self.pem))
87
+ puts "The path to your pem file does not exist!"
88
+ return nil, nil
89
+ end
70
90
 
71
91
  context = OpenSSL::SSL::SSLContext.new
72
92
  context.cert = OpenSSL::X509::Certificate.new(File.read(self.pem))
@@ -1,3 +1,3 @@
1
1
  module Pushmeup
2
- VERSION = "0.1.4.hf1"
2
+ VERSION = "0.1.5"
3
3
  end
data/pushmeup-tns.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.homepage = "https://github.com/thetnswe/pushmeup-tns"
12
12
  s.summary = %q{Send push notifications to Apple devices through ANPS and Android devices through GCM}
13
13
  s.description = <<-DESC
14
- This gem is a wrapper to send push notifications to devices.
14
+ Wrapper gem which is modifed and added some features according to what I need in pushmeup gem.
15
15
  Currently it only sends to Android or iOS devices, but more platforms will be added soon.
16
16
 
17
17
  With APNS (Apple Push Notifications Service) you can send push notifications to Apple devices.
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pushmeup_tns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4.hf1
5
- prerelease: 6
4
+ version: 0.1.5
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Thet Naing Swe
@@ -75,12 +75,12 @@ dependencies:
75
75
  - - ! '>='
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
- description: ! " This gem is a wrapper to send push notifications
79
- to devices.\n Currently it only sends to Android or iOS devices,
80
- but more platforms will be added soon.\n\n With APNS (Apple
81
- Push Notifications Service) you can send push notifications to Apple devices.\n
82
- \ With GCM (Google Cloud Messaging) you can send push notifications
83
- to Android devices.\n"
78
+ description: ! " Wrapper gem which is modifed and added some
79
+ features according to what I need in pushmeup gem.\n Currently
80
+ it only sends to Android or iOS devices, but more platforms will be added soon.\n\n
81
+ \ With APNS (Apple Push Notifications Service) you can send
82
+ push notifications to Apple devices.\n With GCM (Google Cloud
83
+ Messaging) you can send push notifications to Android devices.\n"
84
84
  email:
85
85
  - thetnswe@gmail.com
86
86
  executables: []
@@ -127,9 +127,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
127
127
  required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  none: false
129
129
  requirements:
130
- - - ! '>'
130
+ - - ! '>='
131
131
  - !ruby/object:Gem::Version
132
- version: 1.3.1
132
+ version: '0'
133
133
  requirements: []
134
134
  rubyforge_project: pushmeup
135
135
  rubygems_version: 1.8.24