| 1 |
# Copyright 1999-2013 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rspec-core/rspec-core-2.6.4-r1.ebuild,v 1.10 2012/11/06 17:17:10 jer Exp $
|
| 4 |
|
| 5 |
EAPI=2
|
| 6 |
USE_RUBY="ruby18 ree18 ruby19 jruby"
|
| 7 |
|
| 8 |
RUBY_FAKEGEM_TASK_TEST="none"
|
| 9 |
RUBY_FAKEGEM_TASK_DOC="none"
|
| 10 |
|
| 11 |
RUBY_FAKEGEM_EXTRADOC="README.md"
|
| 12 |
|
| 13 |
inherit ruby-fakegem
|
| 14 |
|
| 15 |
DESCRIPTION="A Behaviour Driven Development (BDD) framework for Ruby"
|
| 16 |
HOMEPAGE="http://rspec.rubyforge.org/"
|
| 17 |
|
| 18 |
LICENSE="MIT"
|
| 19 |
SLOT="2"
|
| 20 |
KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
| 21 |
IUSE=""
|
| 22 |
|
| 23 |
RDEPEND="${RDEPEND} !<dev-ruby/rspec-1.3.1-r1"
|
| 24 |
|
| 25 |
ruby_add_bdepend "test? (
|
| 26 |
dev-ruby/nokogiri
|
| 27 |
dev-ruby/syntax
|
| 28 |
>=dev-ruby/zentest-4.4.1
|
| 29 |
dev-ruby/rspec-expectations:2
|
| 30 |
dev-ruby/rspec-mocks:2
|
| 31 |
)"
|
| 32 |
|
| 33 |
# >=dev-ruby/cucumber-0.5.3
|
| 34 |
# >=dev-ruby/autotest-4.2.9 -> zentest-4.4.1
|
| 35 |
# dev-ruby/aruba"
|
| 36 |
|
| 37 |
all_ruby_prepare() {
|
| 38 |
# Don't set up bundler: it doesn't understand our setup.
|
| 39 |
sed -i -e '/[Bb]undler/d' Rakefile || die
|
| 40 |
|
| 41 |
# Remove the Gemfile to avoid running through 'bundle exec'
|
| 42 |
rm Gemfile || die
|
| 43 |
|
| 44 |
# Also clean the /usr/lib/rubyee path (which is our own invention).
|
| 45 |
sed -i -e 's#lib\\d\*\\/ruby\\/#lib\\d*\\/ruby(ee|)\\/#' lib/rspec/core/configuration.rb || die
|
| 46 |
|
| 47 |
# Remove jruby-specific comparison documents since for us the normal
|
| 48 |
# version passes.
|
| 49 |
cp spec/rspec/core/formatters/html_formatted-1.8.7.html spec/rspec/core/formatters/html_formatted-1.8.7-jruby.html|| die
|
| 50 |
cp spec/rspec/core/formatters/text_mate_formatted-1.8.7.html spec/rspec/core/formatters/text_mate_formatted-1.8.7-jruby.html|| die
|
| 51 |
}
|
| 52 |
|
| 53 |
all_ruby_compile() {
|
| 54 |
if use doc ; then
|
| 55 |
RUBYLIB="${S}/lib" rake rdoc || die "Unable to create documentation."
|
| 56 |
fi
|
| 57 |
}
|
| 58 |
|
| 59 |
each_ruby_test() {
|
| 60 |
case ${RUBY} in
|
| 61 |
*jruby)
|
| 62 |
# Run jruby's tests with the installed rspec script since
|
| 63 |
# otherwise files can't be found for some unknown reason.
|
| 64 |
RUBYLIB=${S}/lib ${RUBY} -S rspec --color spec || die "Tests failed."
|
| 65 |
;;
|
| 66 |
*)
|
| 67 |
PATH="${S}/bin:${PATH}" RUBYLIB="${S}/lib" ${RUBY} -S rake spec || die "Tests failed."
|
| 68 |
;;
|
| 69 |
esac
|
| 70 |
|
| 71 |
# There are features but it seems as if these only work against a
|
| 72 |
# fully installed version.
|
| 73 |
}
|