summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2012-05-12 04:12:27 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2012-05-12 04:12:27 +0000
commite174dbce4591ec092ae7489847c55d1b00315204 (patch)
tree6d0f987d3013e664b51fb90ac8dc6031862d87fd /dev-ruby
parentkeyword ~amd64-fbsd (diff)
downloadgentoo-2-e174dbce4591ec092ae7489847c55d1b00315204.tar.gz
gentoo-2-e174dbce4591ec092ae7489847c55d1b00315204.tar.bz2
gentoo-2-e174dbce4591ec092ae7489847c55d1b00315204.zip
Add a patch that actually gets test-spec to work, and for prawn-security to work.
(Portage version: 2.2.0_alpha104/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby')
-rw-r--r--dev-ruby/test-spec/ChangeLog10
-rw-r--r--dev-ruby/test-spec/files/test-spec-0.10.0+ruby-19.patch45
-rw-r--r--dev-ruby/test-spec/test-spec-0.10.0-r3.ebuild10
-rw-r--r--dev-ruby/test-spec/test-spec-0.10.0-r4.ebuild46
4 files changed, 102 insertions, 9 deletions
diff --git a/dev-ruby/test-spec/ChangeLog b/dev-ruby/test-spec/ChangeLog
index 0fa081810366..be40e86efd15 100644
--- a/dev-ruby/test-spec/ChangeLog
+++ b/dev-ruby/test-spec/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-ruby/test-spec
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/test-spec/ChangeLog,v 1.23 2012/05/01 18:24:05 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/test-spec/ChangeLog,v 1.24 2012/05/12 04:12:27 flameeyes Exp $
+
+*test-spec-0.10.0-r4 (12 May 2012)
+
+ 12 May 2012; Diego E. Pettenò <flameeyes@gentoo.org>
+ +files/test-spec-0.10.0+ruby-19.patch, +test-spec-0.10.0-r4.ebuild,
+ test-spec-0.10.0-r3.ebuild:
+ Add a patch that actually gets test-spec to work, and for prawn-security to
+ work.
01 May 2012; Raúl Porcel <armin76@gentoo.org> test-spec-0.10.0-r2.ebuild,
test-spec-0.10.0-r3.ebuild:
diff --git a/dev-ruby/test-spec/files/test-spec-0.10.0+ruby-19.patch b/dev-ruby/test-spec/files/test-spec-0.10.0+ruby-19.patch
new file mode 100644
index 000000000000..63031672befc
--- /dev/null
+++ b/dev-ruby/test-spec/files/test-spec-0.10.0+ruby-19.patch
@@ -0,0 +1,45 @@
+Index: test-spec-0.10.0/lib/test/spec.rb
+===================================================================
+--- a/test-spec-0.10.0/lib/test/spec.rb
++++ b/test-spec-0.10.0/lib/test/spec.rb
+@@ -6,6 +6,8 @@
+ # This work is licensed under the same terms as Ruby itself.
+ #
+
++gem 'test-unit' if RUBY_VERSION =~ /1\.9/
++
+ require 'test/unit'
+
+ class Test::Unit::AutoRunner # :nodoc:
+@@ -354,7 +356,7 @@ class Test::Spec::TestCase
+
+ # Don't let the default_test clutter up the results and don't
+ # flunk if no tests given, either.
+- throw :invalid_test if name.to_s == "default_test"
++ #throw :invalid_test if name.to_s == "default_test"
+ end
+
+ def position
+Index: metadata
+===================================================================
+--- a/metadata
++++ b/metadata
+@@ -11,7 +11,17 @@ cert_chain: []
+
+ date: 2009-02-01 00:00:00 +01:00
+ default_executable:
+-dependencies: []
++dependencies:
++- !ruby/object:Gem::Dependency
++ name: test-unit
++ type: :runtime
++ version_requirement:
++ version_requirements: !ruby/object:Gem::Requirement
++ requirements:
++ - - ">="
++ - !ruby/object:Gem::Version
++ version: 2.0.6
++ version:
+
+ description: test/spec layers an RSpec-inspired interface on top of Test::Unit, so you can mix TDD and BDD (Behavior-Driven Development). test/spec is a clean-room implementation that maps most kinds of Test::Unit assertions to a `should'-like syntax.
+ email: chneukirchen@gmail.com
diff --git a/dev-ruby/test-spec/test-spec-0.10.0-r3.ebuild b/dev-ruby/test-spec/test-spec-0.10.0-r3.ebuild
index 5ca32b2dce50..1fde2f1fd82e 100644
--- a/dev-ruby/test-spec/test-spec-0.10.0-r3.ebuild
+++ b/dev-ruby/test-spec/test-spec-0.10.0-r3.ebuild
@@ -1,11 +1,11 @@
# Copyright 1999-2012 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-r3.ebuild,v 1.3 2012/05/01 18:24:05 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/test-spec/test-spec-0.10.0-r3.ebuild,v 1.4 2012/05/12 04:12:27 flameeyes Exp $
EAPI="2"
# ruby19 → incompatible with test-unit so fails badly
-USE_RUBY="ruby18 ree18 ruby19 jruby"
+USE_RUBY="ruby18 ree18 jruby"
RUBY_FAKEGEM_EXTRADOC="README SPECS ROADMAP TODO"
RUBY_FAKEGEM_DOCDIR="doc"
@@ -23,12 +23,6 @@ IUSE=""
ruby_add_rdepend virtual/ruby-test-unit
ruby_add_bdepend test dev-ruby/mocha
-# On Ruby 1.9, the tests only work with test-unit-2, but generally
-# speaking, test-spec should work fine with test-unit-1.2.3, and
-# indeed some testsuites only work with that.
-USE_RUBY=ruby19 \
- ruby_add_bdepend "ruby_targets_ruby19 test" '>=dev-ruby/test-unit-2.0.6'
-
all_ruby_prepare() {
epatch "${FILESDIR}"/${P}-jruby.patch
}
diff --git a/dev-ruby/test-spec/test-spec-0.10.0-r4.ebuild b/dev-ruby/test-spec/test-spec-0.10.0-r4.ebuild
new file mode 100644
index 000000000000..87fb155e7ba2
--- /dev/null
+++ b/dev-ruby/test-spec/test-spec-0.10.0-r4.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 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-r4.ebuild,v 1.1 2012/05/12 04:12:27 flameeyes Exp $
+
+EAPI="4"
+
+USE_RUBY="ruby18 ree18 ruby19 jruby"
+
+RUBY_FAKEGEM_EXTRADOC="README SPECS ROADMAP TODO"
+RUBY_FAKEGEM_DOCDIR="doc"
+
+inherit ruby-fakegem eutils
+
+DESCRIPTION="A library to do Behavior Driven Development with Test::Unit"
+HOMEPAGE="http://chneukirchen.org/blog/"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
+IUSE=""
+
+ruby_add_rdepend virtual/ruby-test-unit
+ruby_add_bdepend test dev-ruby/mocha
+
+# On Ruby 1.9, the tests require test-unit as minitest is not enough
+USE_RUBY=ruby19 \
+ ruby_add_rdepend '>=dev-ruby/test-unit-2.0.6'
+
+all_ruby_prepare() {
+ epatch "${FILESDIR}"/${P}-jruby.patch
+}
+
+each_ruby_prepare() {
+ if [[ ${RUBY} == */ruby19 ]]; then
+ pushd .. >/dev/null
+ epatch "${FILESDIR}"/${P}+ruby-19.patch
+ popd >/dev/null
+ fi
+}
+
+all_ruby_install() {
+ all_fakegem_install
+
+ docinto examples
+ dodoc examples/* || die
+}