diff options
Diffstat (limited to 'dev-ruby')
-rw-r--r-- | dev-ruby/test-unit/ChangeLog | 9 | ||||
-rw-r--r-- | dev-ruby/test-unit/files/test-unit-2.3.0-jruby-tests.patch | 21 | ||||
-rw-r--r-- | dev-ruby/test-unit/files/test-unit-2.3.0-ree18-tests.patch | 21 | ||||
-rw-r--r-- | dev-ruby/test-unit/test-unit-2.3.0.ebuild | 46 |
4 files changed, 96 insertions, 1 deletions
diff --git a/dev-ruby/test-unit/ChangeLog b/dev-ruby/test-unit/ChangeLog index ebbd6a270636..d3281dfe9dc7 100644 --- a/dev-ruby/test-unit/ChangeLog +++ b/dev-ruby/test-unit/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-ruby/test-unit # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/test-unit/ChangeLog,v 1.41 2011/07/15 17:35:01 mattst88 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/test-unit/ChangeLog,v 1.42 2011/07/22 07:36:16 graaff Exp $ + +*test-unit-2.3.0 (22 Jul 2011) + + 22 Jul 2011; Hans de Graaff <graaff@gentoo.org> +test-unit-2.3.0.ebuild, + +files/test-unit-2.3.0-jruby-tests.patch, + +files/test-unit-2.3.0-ree18-tests.patch: + Version bump. 15 Jul 2011; Matt Turner <mattst88@gentoo.org> test-unit-1.2.3.ebuild: Added ~mips, bug 332593 diff --git a/dev-ruby/test-unit/files/test-unit-2.3.0-jruby-tests.patch b/dev-ruby/test-unit/files/test-unit-2.3.0-jruby-tests.patch new file mode 100644 index 000000000000..f873f7a1307d --- /dev/null +++ b/dev-ruby/test-unit/files/test-unit-2.3.0-jruby-tests.patch @@ -0,0 +1,21 @@ +commit 1dc3030678f79764d7e16496da44f5bcf01899f1 +Author: Kouhei Sutou <kou@clear-code.com> +Date: Thu Jul 21 23:59:41 2011 +0900 + + support JRuby. fixes #29326 + + Reported by Hans de Graaff. Thanks!!! + +diff --git a/lib/test/unit/assertions.rb b/lib/test/unit/assertions.rb +index 762444b..df8c53b 100644 +--- a/lib/test/unit/assertions.rb ++++ b/lib/test/unit/assertions.rb +@@ -116,7 +116,7 @@ EOT + failure.inspected_expected = AssertionMessage.convert(expected) + failure.inspected_actual = AssertionMessage.convert(actual) + failure.user_message = message +- raise ++ raise failure # For JRuby. :< + end + end + diff --git a/dev-ruby/test-unit/files/test-unit-2.3.0-ree18-tests.patch b/dev-ruby/test-unit/files/test-unit-2.3.0-ree18-tests.patch new file mode 100644 index 000000000000..ba39a760f4cd --- /dev/null +++ b/dev-ruby/test-unit/files/test-unit-2.3.0-ree18-tests.patch @@ -0,0 +1,21 @@ +commit df3148f9cb843b68f4c65bb152c176eb201a99c8 +Author: Kouhei Sutou <kou@clear-code.com> +Date: Wed Jul 20 22:19:55 2011 +0900 + + support Ruby Enterprise Edition. fix #29325 + + Reported by Hans de Graaff. Thanks!!! + +diff --git a/lib/test/unit/attribute.rb b/lib/test/unit/attribute.rb +index c91fc32..13c794c 100644 +--- a/lib/test/unit/attribute.rb ++++ b/lib/test/unit/attribute.rb +@@ -36,7 +36,7 @@ module Test + return unless defined?(@current_attributes) + + attributes = {} +- kept_attributes = {} ++ kept_attributes = StringifyKeyHash.new + @current_attributes.each do |attribute_name, attribute| + attributes[attribute_name] = attribute[:value] + kept_attributes[attribute_name] = attribute if attribute[:keep] diff --git a/dev-ruby/test-unit/test-unit-2.3.0.ebuild b/dev-ruby/test-unit/test-unit-2.3.0.ebuild new file mode 100644 index 000000000000..34a815fa05e3 --- /dev/null +++ b/dev-ruby/test-unit/test-unit-2.3.0.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/test-unit/test-unit-2.3.0.ebuild,v 1.1 2011/07/22 07:36:16 graaff Exp $ + +EAPI=2 +USE_RUBY="ruby18 ruby19 ree18 jruby" + +RUBY_FAKEGEM_TASK_DOC="docs" +RUBY_FAKEGEM_DOCDIR="doc" +RUBY_FAKEGEM_EXTRADOC="TODO README.txt History.txt" + +# Disable default binwraps +RUBY_FAKEGEM_BINWRAP="" + +inherit ruby-fakegem + +ruby_add_bdepend "doc? ( dev-ruby/rdoc dev-ruby/hoe )" + +DESCRIPTION="An improved version of the Test::Unit framework from Ruby 1.8" +HOMEPAGE="http://test-unit.rubyforge.org/" + +LICENSE="MIT" +SLOT="2" +KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" +IUSE="" + +RUBY_PATCHES=( "${P}-ree18-tests.patch" "${P}-jruby-tests.patch" ) + +each_ruby_test() { + # the rake audit using dev-ruby/zentest currently fails, and we + # just need to call the testsuite directly. + # rake audit || die "rake audit failed" + local rubyflags + + [[ $(basename ${RUBY}) == jruby ]] && rubyflags="-X+O" + + ${RUBY} ${rubyflags} test/run-test.rb || die "testsuite failed" +} + +all_ruby_install() { + all_fakegem_install + + # Create a testrb2 wrapper similarly to the rdoc2 wrapper for + # rdoc-2* series. + ruby_fakegem_binwrapper testrb /usr/bin/testrb-2 +} |