Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Test code

  • Loading branch information...
commit 571c1d5ce14fee56c6d55e486690c755291585cc 1 parent f29d8c7
Jiren authored
Showing with 19 additions and 55 deletions.
  1. +8 −4 config/vendors.yml
  2. +11 −7 test.rb
  3. +0 −44 test/test.rb
View
12 config/vendors.yml
@@ -6,13 +6,17 @@ vmobo:
keyword:
bulksmspune:
- provider_url: "http://www.bulksmspune.mobi/sendurlcomma.asp"
+ provider_url: 'http://www.bulksmspune.mobi/sendurlcomma.asp'
username:
password:
senderid:
clickatell:
- api_key:
- username:
- password:
+ provider_url: 'http://api.clickatell.com'
+ api_key: 3255022
+ username: 'jirenpatel'
+ password: 'jp12345'
+ #api_key: 3255051 # 3255022
+ #username: 'gautamrege' #'jirenpatel'
+ #password: 'grege123' #'jp12345'
View
18 test.rb
@@ -2,33 +2,37 @@
require 'rubygems'
require 'lib/splat'
-number = '+91 9960054954'
+number = '+91 9850888082'
gateways = {}
-gateways['bulksms'] = Splat::Base.new(:bulksmspune)
-gateways['vmobo'] = Splat::Base.new(:vmobo)
+#gateways['bulksms'] = Splat::Base.new(:bulksmspune)
+#gateways['vmobo'] = Splat::Base.new(:vmobo)
+gateways['clickatell'] = Splat::Base.new(:clickatell)
+=begin
+#number = '+1 5599726538'
+number = '+91 9881395656'
msg = "Testing for splat"
gateways.each do |provider, obj|
p "Sending SMS via #{provider}"
p obj.send_sms(msg, number)
p "SMS Sent successfully via #{provider}"
end
-
p "========================"
msg = "Testing for splat"
-numbers = ['+91 9960054954', '+91 9960054954']
+numbers = ['+91 9960054954', '+91 9850888082']
gateways.each do |provider, obj|
p obj.send_bulk_sms(msg, numbers)
p "Bulk Send successfully via #{provider}"
end
p "========================"
+=end
custom_msg = "Hi $1, hold on to your $2."
-options = {'+91 9970831117' => ['Sagar', 'coffee'],
- '+91 9860352988' => ['Gautam' , 'stocks']}
+options = {'+91 9960054954' => ['Sagar', 'coffee'],
+ '+91 9850888082' => ['Gautam' , 'stocks']}
#'+91 9880397111' => ['Jane' , 'skirt']}
gateways.each do |provider, obj|
View
44 test/test.rb
@@ -1,44 +0,0 @@
-
-require 'rubygems'
-require 'lib/splat'
-
-number = '+91 9850888082'
-
-gateways = {}
-#gateways['bulksms'] = Splat::Base.new(:bulksmspune)
-#gateways['vmobo'] = Splat::Base.new(:vmobo)
-gateways['clickatell'] = Splat::Base.new(:clickatell)
-
-
-=begin
-#number = '+1 5599726538'
-number = '+91 9881395656'
-msg = "Testing for splat"
-gateways.each do |provider, obj|
- p "Sending SMS via #{provider}"
- p obj.send_sms(msg, number)
- p "SMS Sent successfully via #{provider}"
-end
-p "========================"
-
-msg = "Testing for splat"
-numbers = ['+91 9960054954', '+91 9850888082']
-gateways.each do |provider, obj|
- p obj.send_bulk_sms(msg, numbers)
- p "Bulk Send successfully via #{provider}"
-end
-p "========================"
-
-=end
-custom_msg = "Hi $1, hold on to your $2."
-options = {'+91 9960054954' => ['Sagar', 'coffee'],
- '+91 9850888082' => ['Gautam' , 'stocks']}
- #'+91 9880397111' => ['Jane' , 'skirt']}
-
-gateways.each do |provider, obj|
- p obj.send_bulk_sms_with_insertion(custom_msg, options)
- p "Bulk Send successfully via #{provider}"
-end
-
-
-
Please sign in to comment.
Something went wrong with that request. Please try again.