summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2010-01-17 00:56:54 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2010-01-17 00:56:54 +0000
commitae36b5cf3cf0cc2f4b3f8daf69f3344f9badcb62 (patch)
tree4d152321657026ea7a42dd63bd07ccd7fa395a3b /dev-ruby
parentApply patch from upstream for long command lines #301116 by Priit Laes. (diff)
downloadgentoo-2-ae36b5cf3cf0cc2f4b3f8daf69f3344f9badcb62.tar.gz
gentoo-2-ae36b5cf3cf0cc2f4b3f8daf69f3344f9badcb62.tar.bz2
gentoo-2-ae36b5cf3cf0cc2f4b3f8daf69f3344f9badcb62.zip
Add a patch to fix use with JRuby, and enable it.
(Portage version: 2.2_rc61/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby')
-rw-r--r--dev-ruby/test-spec/ChangeLog6
-rw-r--r--dev-ruby/test-spec/files/test-spec-0.10.0-jruby.patch26
-rw-r--r--dev-ruby/test-spec/test-spec-0.10.0-r2.ebuild16
3 files changed, 39 insertions, 9 deletions
diff --git a/dev-ruby/test-spec/ChangeLog b/dev-ruby/test-spec/ChangeLog
index f57b83e6f743..44c993467af6 100644
--- a/dev-ruby/test-spec/ChangeLog
+++ b/dev-ruby/test-spec/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-ruby/test-spec
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/test-spec/ChangeLog,v 1.12 2010/01/14 15:40:52 ranger Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/test-spec/ChangeLog,v 1.13 2010/01/17 00:56:53 flameeyes Exp $
+
+ 17 Jan 2010; Diego E. Pettenò <flameeyes@gentoo.org>
+ test-spec-0.10.0-r2.ebuild, +files/test-spec-0.10.0-jruby.patch:
+ Add a patch to fix use with JRuby, and enable it.
14 Jan 2010; Brent Baude <ranger@gentoo.org> test-spec-0.10.0-r2.ebuild:
Marking test-spec-0.10.0-r2 ~ppc for bug 297711
diff --git a/dev-ruby/test-spec/files/test-spec-0.10.0-jruby.patch b/dev-ruby/test-spec/files/test-spec-0.10.0-jruby.patch
new file mode 100644
index 000000000000..33147997a88c
--- /dev/null
+++ b/dev-ruby/test-spec/files/test-spec-0.10.0-jruby.patch
@@ -0,0 +1,26 @@
+diff -rN -u old-testspec/lib/test/spec/should-output.rb new-testspec/lib/test/spec/should-output.rb
+--- old-testspec/lib/test/spec/should-output.rb 2010-01-17 01:44:15.172753274 +0100
++++ new-testspec/lib/test/spec/should-output.rb 2010-01-17 01:44:15.174753161 +0100
+@@ -11,8 +11,13 @@
+ # Store the old stream
+ old_to = to.dup
+
++ # Instead of using out.path, save here the path we're going to
++ # write to. This is needed because JRuby does not change the class
++ # from IO to File, and thus will lack a path method).
++ out_filename = File.join(Dir.tmpdir, "should_output_#{$$}")
++
+ # Obtain a filehandle to replace (works with Readline)
+- to.reopen File.open(File.join(Dir.tmpdir, "should_output_#{$$}"), "w+")
++ to.reopen File.open(out_filename, "w+")
+
+ # Execute
+ @object.call
+@@ -44,6 +49,6 @@
+ rescue Errno::EPIPE
+ end
+
+- FileUtils.rm_f out.path
++ FileUtils.rm_f out_filename
+ end # output
+ end # Test::Spec::Should
diff --git a/dev-ruby/test-spec/test-spec-0.10.0-r2.ebuild b/dev-ruby/test-spec/test-spec-0.10.0-r2.ebuild
index d10985648faa..ce63ac6e902e 100644
--- a/dev-ruby/test-spec/test-spec-0.10.0-r2.ebuild
+++ b/dev-ruby/test-spec/test-spec-0.10.0-r2.ebuild
@@ -1,12 +1,11 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/test-spec/test-spec-0.10.0-r2.ebuild,v 1.6 2010/01/14 15:40:52 ranger Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/test-spec/test-spec-0.10.0-r2.ebuild,v 1.7 2010/01/17 00:56:53 flameeyes Exp $
EAPI="2"
# ruby19 → incompatible with test-unit so fails badly
-# jruby → fails tests because IO.path method is missing
-USE_RUBY="ruby18"
+USE_RUBY="ruby18 jruby"
RUBY_FAKEGEM_EXTRADOC="README SPECS ROADMAP TODO"
RUBY_FAKEGEM_DOCDIR="doc"
@@ -24,12 +23,13 @@ IUSE=""
ruby_add_rdepend virtual/ruby-test-unit
ruby_add_bdepend test dev-ruby/mocha
+all_ruby_prepare() {
+ epatch "${FILESDIR}"/${P}-jruby.patch
+}
+
all_ruby_install() {
all_fakegem_install
- ruby_fakegem_binwrapper specrb
-
- if use doc; then
- dodoc examples/* || die
- fi
+ docinto examples
+ dodoc examples/* || die
}