mobilove 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,4 @@
1
1
  require 'rest_client'
2
- require 'iconv'
3
2
 
4
3
  require 'mobilove/text'
5
4
  require 'mobilove/exceptions'
@@ -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, CGI.escape(Iconv.conv('ISO-8859-1', 'utf-8', from))
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, CGI.escape(Iconv.conv('ISO-8859-1', 'utf-8', message)), debug_mode)
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)
@@ -1,3 +1,3 @@
1
1
  module Mobilove
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobilove
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Red Davis