diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-01-29 10:12:37 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-01-29 10:12:37 +0000 |
commit | 312827e3d739966e1fadf9f643e59913de927b96 (patch) | |
tree | fec2432cae737a72b5b2b7daf93882429f9bdbc2 /dev-ruby/shorturl/files | |
parent | Version bump, add new dependency (diff) | |
download | gentoo-2-312827e3d739966e1fadf9f643e59913de927b96.tar.gz gentoo-2-312827e3d739966e1fadf9f643e59913de927b96.tar.bz2 gentoo-2-312827e3d739966e1fadf9f643e59913de927b96.zip |
Bump to fakegem, add patch to work with Ruby 1.9 similar to the one in overlay.
(Portage version: 2.2_rc61/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby/shorturl/files')
-rw-r--r-- | dev-ruby/shorturl/files/shorturl-0.8.7+ruby-1.9.patch | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/dev-ruby/shorturl/files/shorturl-0.8.7+ruby-1.9.patch b/dev-ruby/shorturl/files/shorturl-0.8.7+ruby-1.9.patch new file mode 100644 index 000000000000..b8919b77a1a4 --- /dev/null +++ b/dev-ruby/shorturl/files/shorturl-0.8.7+ruby-1.9.patch @@ -0,0 +1,17 @@ +Index: shorturl-0.8.7/lib/shorturl.rb +=================================================================== +--- shorturl-0.8.7.orig/lib/shorturl.rb ++++ shorturl-0.8.7/lib/shorturl.rb +@@ -39,8 +39,10 @@ class Service + def call(url) + Net::HTTP.start(@hostname, @port) { |http| + response = case @method +- when :post: http.post(@action, "#{@field}=#{CGI.escape(url)}") +- when :get: http.get("#{@action}?#{@field}=#{CGI.escape(url)}") ++ when :post then ++ http.post(@action, "#{@field}=#{CGI.escape(url)}") ++ when :get then ++ http.get("#{@action}?#{@field}=#{CGI.escape(url)}") + end + if response.code == @code.to_s + @response_block ? @response_block.call(response) : @block.call(response.read_body) |