diff options
Diffstat (limited to 'dev-ruby/shorturl')
-rw-r--r-- | dev-ruby/shorturl/ChangeLog | 11 | ||||
-rw-r--r-- | dev-ruby/shorturl/files/shorturl-0.8.7+ruby-1.9.patch | 17 | ||||
-rw-r--r-- | dev-ruby/shorturl/shorturl-0.8.7-r1.ebuild | 38 |
3 files changed, 64 insertions, 2 deletions
diff --git a/dev-ruby/shorturl/ChangeLog b/dev-ruby/shorturl/ChangeLog index dc9d5eb522a5..9cedc8d1ca7e 100644 --- a/dev-ruby/shorturl/ChangeLog +++ b/dev-ruby/shorturl/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-ruby/shorturl -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/shorturl/ChangeLog,v 1.11 2009/12/24 17:33:37 graaff Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/shorturl/ChangeLog,v 1.12 2010/01/29 10:12:37 flameeyes Exp $ + +*shorturl-0.8.7-r1 (29 Jan 2010) + + 29 Jan 2010; Diego E. Pettenò <flameeyes@gentoo.org> + +shorturl-0.8.7-r1.ebuild, +files/shorturl-0.8.7+ruby-1.9.patch: + Bump to fakegem, add patch to work with Ruby 1.9 similar to the one in + overlay. 24 Dec 2009; Hans de Graaff <graaff@gentoo.org> shorturl-0.8.7.ebuild: Remove obsolete virtual/ruby dependency. 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) diff --git a/dev-ruby/shorturl/shorturl-0.8.7-r1.ebuild b/dev-ruby/shorturl/shorturl-0.8.7-r1.ebuild new file mode 100644 index 000000000000..0d356446a530 --- /dev/null +++ b/dev-ruby/shorturl/shorturl-0.8.7-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/shorturl/shorturl-0.8.7-r1.ebuild,v 1.1 2010/01/29 10:12:37 flameeyes Exp $ + +EAPI=2 + +USE_RUBY="ruby18 ruby19 jruby" + +RUBY_FAKEGEM_TASK_TEST="" +RUBY_FAKEGEM_TASK_DOC="" + +RUBY_FAKEGEM_EXTRADOC="ChangeLog README TODO" + +inherit ruby-fakegem eutils + +DESCRIPTION="A very simple library to use URL shortening services such as TinyURL or RubyURL." +HOMEPAGE="http://shorturl.rubyforge.org/" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-fbsd" +IUSE="" + +all_ruby_prepare() { + epatch "${FILESDIR}"/${P}+ruby-1.9.patch +} + +each_ruby_test() { + ${RUBY} -Ilib test/ts_all.rb || die "tests failed" +} + +all_ruby_install() { + all_fakegem_install + + pushd doc &>/dev/null + dohtml -r . || die + popd &>/dev/null +} |