routo 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/routo/message.rb +3 -3
- metadata +1 -1
data/lib/routo/message.rb
CHANGED
@@ -11,7 +11,7 @@ module Routo
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def send_sms *numbers
|
14
|
-
options = numbers.last.is_a?(Hash) ? numbers.
|
14
|
+
options = numbers.last.is_a?(Hash) ? numbers.pop : {}
|
15
15
|
@recipients = numbers.map{|n| Number.new(n)}
|
16
16
|
begin
|
17
17
|
parse_response(Net::HTTP.post_form(URI.parse(Routo.http_api_url), params(options)))
|
@@ -29,10 +29,10 @@ module Routo
|
|
29
29
|
|
30
30
|
def params options
|
31
31
|
{:user => Routo.username,
|
32
|
-
:pass =>
|
32
|
+
:pass => Routo.password,
|
33
33
|
:number => @recipients.map(&:number).join(','),
|
34
34
|
:ownnum => Routo.ownnum,
|
35
|
-
:message =>
|
35
|
+
:message => @text,
|
36
36
|
:type => Routo.type,
|
37
37
|
:delivery => Routo.delivery,
|
38
38
|
:mess_id => @mess_id}.merge(options)
|