mobilove 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/mobilove.rb +0 -1
- data/lib/mobilove/text.rb +3 -3
- data/lib/mobilove/version.rb +1 -1
- metadata +3 -3
data/lib/mobilove.rb
CHANGED
data/lib/mobilove/text.rb
CHANGED
@@ -4,11 +4,11 @@ module Mobilove
|
|
4
4
|
|
5
5
|
class Text
|
6
6
|
def initialize(key, route, from)
|
7
|
-
@key, @route, @from = key, route,
|
7
|
+
@key, @route, @from = key, route, from
|
8
8
|
end
|
9
9
|
|
10
10
|
def send(to, message, debug_mode = false)
|
11
|
-
url = send_url(to,
|
11
|
+
url = send_url(to, message, debug_mode)
|
12
12
|
response = RestClient.get(url)
|
13
13
|
respond(response)
|
14
14
|
end
|
@@ -16,7 +16,7 @@ module Mobilove
|
|
16
16
|
private
|
17
17
|
|
18
18
|
def send_url(to, message, debug_mode)
|
19
|
-
"http://gw.mobilant.net/?key=#{@key}&to=#{to}&message=#{message}&route=#{@route}&from=#{@from}&debug=#{debug_mode ? '1' : '0'}"
|
19
|
+
"http://gw.mobilant.net/?key=#{@key}&to=#{to}&message=#{URI.escape(message)}&route=#{@route}&from=#{URI.escape(@from)}&debug=#{debug_mode ? '1' : '0'}&charset=utf-8"
|
20
20
|
end
|
21
21
|
|
22
22
|
def respond(response)
|
data/lib/mobilove/version.rb
CHANGED
metadata
CHANGED