Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-ruby/shorturl/files: shorturl-0.8.7+ruby-1.9.patch
Date: Fri, 29 Jan 2010 10:12:41
Message-Id: E1NanqA-00047Y-CI@stork.gentoo.org
1 flameeyes 10/01/29 10:12:38
2
3 Added: shorturl-0.8.7+ruby-1.9.patch
4 Log:
5 Bump to fakegem, add patch to work with Ruby 1.9 similar to the one in overlay.
6 (Portage version: 2.2_rc61/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 dev-ruby/shorturl/files/shorturl-0.8.7+ruby-1.9.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/shorturl/files/shorturl-0.8.7+ruby-1.9.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/shorturl/files/shorturl-0.8.7+ruby-1.9.patch?rev=1.1&content-type=text/plain
13
14 Index: shorturl-0.8.7+ruby-1.9.patch
15 ===================================================================
16 Index: shorturl-0.8.7/lib/shorturl.rb
17 ===================================================================
18 --- shorturl-0.8.7.orig/lib/shorturl.rb
19 +++ shorturl-0.8.7/lib/shorturl.rb
20 @@ -39,8 +39,10 @@ class Service
21 def call(url)
22 Net::HTTP.start(@hostname, @port) { |http|
23 response = case @method
24 - when :post: http.post(@action, "#{@field}=#{CGI.escape(url)}")
25 - when :get: http.get("#{@action}?#{@field}=#{CGI.escape(url)}")
26 + when :post then
27 + http.post(@action, "#{@field}=#{CGI.escape(url)}")
28 + when :get then
29 + http.get("#{@action}?#{@field}=#{CGI.escape(url)}")
30 end
31 if response.code == @code.to_s
32 @response_block ? @response_block.call(response) : @block.call(response.read_body)