mygengo 1.13 → 1.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/mygengo-ruby/api_handler.rb +3 -7
  2. metadata +3 -3
@@ -1,4 +1,4 @@
1
- # Encoding: UTF-8
1
+ # encoding: UTF-8
2
2
 
3
3
  require 'rubygems'
4
4
  require 'net/http'
@@ -42,13 +42,9 @@ module MyGengo
42
42
  @client_info = {"VERSION" => MyGengo::Config::VERSION}
43
43
  end
44
44
 
45
- # This is... hilariously awkward, but Ruby escapes things very differently from PHP/etc. This causes
46
- # issues with de-escaping things on the backend over at Gengo; in the future this will become obsolete,
47
- # but for now we'll just leave this here...
45
+ # Use CGI escape to escape a string
48
46
  def urlencode(string)
49
- string.gsub(/([^ a-zA-Z0-9_.-]+)/n) do
50
- '%' + $1.unpack('H2' * $1.size).join('%').upcase
51
- end.tr(' ', '+')
47
+ CGI::escape(string)
52
48
  end
53
49
 
54
50
  # Creates an HMAC::SHA1 signature, signing the timestamp with the private key.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mygengo
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.13'
4
+ version: '1.14'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2012-08-30 00:00:00.000000000 Z
15
+ date: 2012-10-01 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: json
@@ -142,7 +142,7 @@ files:
142
142
  - Gemfile.lock
143
143
  - Rakefile
144
144
  - README.md
145
- homepage: http://gengo.com/services/api/dev-docs/
145
+ homepage: http://developers.gengo.com
146
146
  licenses: []
147
147
  post_install_message:
148
148
  rdoc_options: []