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
commit8f410f28261ff14b0dd35f8e7c12fad92723ba19 (patch)
treec6d3b32b0f7c5a6c00b608e21fe0ca9ef9ac77b6 /dev-ruby/test-spec
parentApply patch from upstream for long command lines #301116 by Priit Laes. (diff)
downloadhistorical-8f410f28261ff14b0dd35f8e7c12fad92723ba19.tar.gz
historical-8f410f28261ff14b0dd35f8e7c12fad92723ba19.tar.bz2
historical-8f410f28261ff14b0dd35f8e7c12fad92723ba19.zip
Add a patch to fix use with JRuby, and enable it.
Package-Manager: portage-2.2_rc61/cvs/Linux x86_64
Diffstat (limited to 'dev-ruby/test-spec')
-rw-r--r--dev-ruby/test-spec/ChangeLog6
-rw-r--r--dev-ruby/test-spec/Manifest15
-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
4 files changed, 52 insertions, 11 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/Manifest b/dev-ruby/test-spec/Manifest
index 8c7f868a8563..54684514144a 100644
--- a/dev-ruby/test-spec/Manifest
+++ b/dev-ruby/test-spec/Manifest
@@ -1,4 +1,15 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX test-spec-0.10.0-jruby.patch 1049 RMD160 601b2713659f334bd01e68c1306c35e3bbcafd78 SHA1 c4068cd4d13d6b66119b553ae49b1cca83b43c1a SHA256 8f475cb3a853abf2201fd8f69f251984d9415e1aec0a5454c9c0e3b71364976d
DIST test-spec-0.10.0.gem 23040 RMD160 83ffab654c447d423ee7c6325eb09e779a88aa19 SHA1 ec7ea48707f247316a4556c3790d49e580c2e8c9 SHA256 73b9ec50f4dfdc4d730588466f1d3bf5b89cfb402176964d55a334f758514c99
-EBUILD test-spec-0.10.0-r2.ebuild 877 RMD160 95f850033464def056b2112dbf347326f80182e9 SHA1 8fc89dcec97a7d2fd0b4ff3583307f6063b01105 SHA256 122466c54c16469494d81b8a4708319e1733b892093817143296067dc85ce8a9
-MISC ChangeLog 2055 RMD160 3de112a2d6b6b3e275778ef3a1a91ed5e0f8f41c SHA1 4b3e27c96d87d70bcc5d74db0cc7fbf6a5d4ad29 SHA256 01fb4a18d6a77a1df92aa6fe17b7dd58a234636c7b5dd5b10a4ea8bd94906384
+EBUILD test-spec-0.10.0-r2.ebuild 853 RMD160 964c59f0c3d133951a7fb3523d219c64cceb9240 SHA1 e06516db843c7e71b724964687d09e9696509a8d SHA256 5d6c2414ed9516ebb9bf210e42feef8bf42f2b41abacf1a8bc6c5b7af6a8a68b
+MISC ChangeLog 2234 RMD160 fea69cf6021b22090654fb69c97ad16532a7df33 SHA1 29409b75e3b02915aebf727da5c5b5d8a7fc8e61 SHA256 227c4aea9e80b2d54151aafd7cb2331328fa8e015c4317f73951e21fb737d80d
MISC metadata.xml 157 RMD160 5d9e2c7ecba96ffebd936d38acedf859cdea84e1 SHA1 8ce15dcc608eeb5616aeec610dc695cbe6f93e02 SHA256 11fba03a217e2d996f5cd8895493a5692ece8ddac2c1a2dfc71d0e830555121c
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.14 (GNU/Linux)
+
+iEYEARECAAYFAktSYC4ACgkQAiZjviIA2XisQgCcDaW8G/Jm5Kkfa+uWHY8ZOkpe
+0msAnj3gQ7LfE3MN2Z9lCSnEXwcrsBgB
+=w/OC
+-----END PGP SIGNATURE-----
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
}