/[gentoo-x86]/dev-ruby/rspec-core/rspec-core-2.10.1.ebuild
Gentoo

Contents of /dev-ruby/rspec-core/rspec-core-2.10.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Sun Feb 24 08:10:06 2013 UTC (3 months, 3 weeks ago) by graaff
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Cleanup.

(Portage version: 2.1.11.50/cvs/Linux x86_64, signed Manifest commit with key 0x8883FA56A308A8D7!)

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.10.1.ebuild,v 1.5 2013/01/15 05:52:14 zerochaos Exp $
4
5 EAPI=4
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="Changelog.md README.md"
12
13 # Also install this custom path since internal paths depend on it.
14 RUBY_FAKEGEM_EXTRAINSTALL="exe"
15
16 RUBY_FAKEGEM_GEMSPEC="rspec-core.gemspec"
17
18 inherit ruby-fakegem
19
20 DESCRIPTION="A Behaviour Driven Development (BDD) framework for Ruby"
21 HOMEPAGE="http://rspec.rubyforge.org/"
22 SRC_URI="https://github.com/rspec/${PN}/tarball/v${PV} -> ${P}-git.tgz"
23 RUBY_S="rspec-${PN}-*"
24
25 LICENSE="MIT"
26 SLOT="2"
27 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"
28 IUSE=""
29
30 RDEPEND="${RDEPEND} !<dev-ruby/rspec-1.3.1-r1"
31
32 ruby_add_bdepend "test? (
33 dev-ruby/nokogiri
34 dev-ruby/syntax
35 >=dev-ruby/fakefs-0.4.0
36 >=dev-ruby/zentest-4.4.1
37 dev-ruby/rspec-expectations:2
38 dev-ruby/rspec-mocks:2
39 )"
40 ruby_add_bdepend "doc? ( dev-ruby/yard )"
41
42 # >=dev-ruby/cucumber-0.5.3
43 # >=dev-ruby/autotest-4.2.9 -> zentest-4.4.1
44 # dev-ruby/aruba"
45
46 all_ruby_prepare() {
47 # Don't set up bundler: it doesn't understand our setup.
48 sed -i -e '/[Bb]undler/d' Rakefile || die
49
50 # Remove the Gemfile to avoid running through 'bundle exec'
51 # rm Gemfile || die
52
53 # Also clean the /usr/lib/rubyee path (which is our own invention).
54 sed -i -e 's#lib\\d\*\\/ruby\\/#lib\\d*\\/ruby(ee|)\\/#' lib/rspec/core/configuration.rb || die
55
56 # Remove jruby-specific comparison documents since for us the normal
57 # version passes.
58 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
59
60 # Duplicate exe also in bin. We can't change it since internal stuff
61 # also depends on this and fixing that is going to be fragile. This
62 # way we can at least install proper bin scripts.
63 cp -R exe bin || die
64
65 # Avoid unneeded dependency on git.
66 sed -i -e '/git ls-files/ s:^:#:' rspec-core.gemspec || die
67 }
68
69 each_ruby_prepare() {
70 case ${RUBY} in
71 *jruby)
72 # We don't have aruba for jruby support yet.
73 sed -i -e '/aruba/ s:^:#:' -e '74,76 s:^:#:' spec/spec_helper.rb || die
74 rm spec/command_line/order_spec.rb || die
75 ;;
76 *)
77 ;;
78 esac
79 }
80
81 all_ruby_compile() {
82 if use doc ; then
83 yardoc || die
84 fi
85 }
86
87 each_ruby_test() {
88 case ${RUBY} in
89 *jruby)
90 # Run jruby's tests with the installed rspec script since
91 # otherwise files can't be found for some unknown reason.
92 RUBYLIB=${S}/lib ${RUBY} -S rspec --color spec || die "Tests failed."
93 ;;
94 *)
95 PATH="${S}/bin:${PATH}" RUBYLIB="${S}/lib" ${RUBY} -S rake spec || die "Tests failed."
96 ;;
97 esac
98
99 # There are features but it seems as if these only work against a
100 # fully installed version.
101 }

  ViewVC Help
Powered by ViewVC 1.1.20