easy_translate 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -93,9 +93,9 @@ module EasyTranslate
93
93
  raise ArgumentError.new('no string given') if text.empty?
94
94
  key = options[:key] || @api_key || nil
95
95
  params = "v=#{API_VERSION}"
96
- params << '&userip=' << options[:user_ip] if options.has_key?(:user_ip)
97
- params << '&hl=' << get_language(options[:host_language]) if options.has_key?(:host_language)
98
- params << '&key=' << key if key
96
+ params << '&userip=' << URI.escape(options[:user_ip]) if options.has_key?(:user_ip)
97
+ params << '&hl=' << URI.escape(get_language(options[:host_language])) if options.has_key?(:host_language)
98
+ params << '&key=' << URI.escape(key) if key
99
99
  # key is standard - but left to individual methods
100
100
  params
101
101
  end
@@ -1,5 +1,5 @@
1
1
  module EasyTranslate
2
2
 
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
4
4
 
5
5
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - John Crepezzi