Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ruby/rspec-core/
Date: Wed, 07 Oct 2015 05:39:20
Message-Id: 1444196327.e830412f7e62217d33814d2c4ebdf614cf61652e.graaff@gentoo
1 commit: e830412f7e62217d33814d2c4ebdf614cf61652e
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 7 05:37:54 2015 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 7 05:38:47 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e830412f
7
8 dev-ruby/rspec-core: fix gemspec and missing test dependency
9
10 Include proper 'files' and 'executables' fields in the gemspec.
11 Some other tools depend at least on executables being correct.
12
13 Add a missing test dependency on dev-ruby/tread_order. Drop
14 keywords due to this: bug 562452.
15
16 Package-Manager: portage-2.2.20.1
17
18 dev-ruby/rspec-core/rspec-core-3.2.3-r1.ebuild | 95 +++++++++++++++++++++++
19 dev-ruby/rspec-core/rspec-core-3.3.2-r1.ebuild | 100 +++++++++++++++++++++++++
20 2 files changed, 195 insertions(+)
21
22 diff --git a/dev-ruby/rspec-core/rspec-core-3.2.3-r1.ebuild b/dev-ruby/rspec-core/rspec-core-3.2.3-r1.ebuild
23 new file mode 100644
24 index 0000000..e8884f7
25 --- /dev/null
26 +++ b/dev-ruby/rspec-core/rspec-core-3.2.3-r1.ebuild
27 @@ -0,0 +1,95 @@
28 +# Copyright 1999-2015 Gentoo Foundation
29 +# Distributed under the terms of the GNU General Public License v2
30 +# $Id$
31 +
32 +EAPI=5
33 +USE_RUBY="ruby19 ruby20 ruby21 ruby22"
34 +
35 +RUBY_FAKEGEM_TASK_TEST="none"
36 +RUBY_FAKEGEM_TASK_DOC="none"
37 +
38 +RUBY_FAKEGEM_EXTRADOC="Changelog.md README.md"
39 +
40 +# Also install this custom path since internal paths depend on it.
41 +RUBY_FAKEGEM_EXTRAINSTALL="exe"
42 +
43 +RUBY_FAKEGEM_GEMSPEC="rspec-core.gemspec"
44 +
45 +inherit ruby-fakegem
46 +
47 +DESCRIPTION="A Behaviour Driven Development (BDD) framework for Ruby"
48 +HOMEPAGE="https://github.com/rspec/rspec-core"
49 +SRC_URI="https://github.com/rspec/${PN}/archive/v${PV}.tar.gz -> ${P}-git.tgz"
50 +
51 +LICENSE="MIT"
52 +SLOT="3"
53 +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"
54 +IUSE="highlight"
55 +
56 +SUBVERSION="$(get_version_component_range 1-2)"
57 +
58 +ruby_add_rdepend "
59 + =dev-ruby/rspec-support-${SUBVERSION}*
60 + !!<dev-ruby/rspec-core-2.14.8-r4
61 + highlight? ( >=dev-ruby/coderay-1.0.9 )
62 +"
63 +
64 +ruby_add_bdepend "test? (
65 + >=dev-ruby/nokogiri-1.5.2
66 + >=dev-ruby/coderay-1.0.9
67 + dev-ruby/syntax
68 + >=dev-ruby/zentest-4.6.2
69 + >=dev-ruby/rspec-expectations-3.0.0:3
70 + >=dev-ruby/rspec-mocks-2.99.0:3
71 + )"
72 +
73 +# Skip yard for ruby21 for now since we don't support ruby21 eselected
74 +# yet and we can't bootstrap otherwise.
75 +USE_RUBY=${USE_RUBY/ruby21 ruby22/} ruby_add_bdepend "doc? ( dev-ruby/yard )"
76 +
77 +all_ruby_prepare() {
78 + # Don't set up bundler: it doesn't understand our setup.
79 + sed -i -e '/[Bb]undler/d' Rakefile || die
80 +
81 + # Avoid dependency on cucumber since we can't run the features anyway.
82 + sed -i -e '/[Cc]ucumber/ s:^:#:' Rakefile || die
83 +
84 + # Duplicate exe also in bin. We can't change it since internal stuff
85 + # also depends on this and fixing that is going to be fragile. This
86 + # way we can at least install proper bin scripts.
87 + cp -R exe bin || die
88 +
89 + # Avoid unneeded dependency on git.
90 + sed -i -e 's/git ls-files --/find/' rspec-core.gemspec || die
91 +
92 + # Avoid aruba dependency so that we don't end up in dependency hell.
93 + sed -i -e '/ArubaLoader/,/^end/ s:^:#:' -e '/Aruba/ s:^:#:' spec/spec_helper.rb || die
94 + rm spec/integration/{filtering,order}_spec.rb spec/support/aruba_support.rb || die
95 +}
96 +
97 +each_ruby_prepare() {
98 + sed -i -e 's:ruby -e:'${RUBY}' -e:' spec/rspec/core_spec.rb || die
99 +
100 + case ${RUBY} in
101 + *ruby22)
102 + # The rubygems version bundled with ruby 2.2 causes warnings.
103 + sed -i -e '/a library that issues no warnings when loaded/,/^ end/ s:^:#:' spec/rspec/core_spec.rb || die
104 + ;;
105 + esac
106 +}
107 +
108 +all_ruby_compile() {
109 + if use doc ; then
110 + yardoc || die
111 + fi
112 +}
113 +
114 +each_ruby_test() {
115 + PATH="${S}/bin:${PATH}" RUBYLIB="${S}/lib" ${RUBY} -Ilib bin/rspec spec || die "Tests failed."
116 +}
117 +
118 +all_ruby_install() {
119 + all_fakegem_install
120 +
121 + ruby_fakegem_binwrapper rspec /usr/bin/rspec-3 'gem "rspec", "~>3.0"'
122 +}
123
124 diff --git a/dev-ruby/rspec-core/rspec-core-3.3.2-r1.ebuild b/dev-ruby/rspec-core/rspec-core-3.3.2-r1.ebuild
125 new file mode 100644
126 index 0000000..37da4c9
127 --- /dev/null
128 +++ b/dev-ruby/rspec-core/rspec-core-3.3.2-r1.ebuild
129 @@ -0,0 +1,100 @@
130 +# Copyright 1999-2015 Gentoo Foundation
131 +# Distributed under the terms of the GNU General Public License v2
132 +# $Id$
133 +
134 +EAPI=5
135 +USE_RUBY="ruby19 ruby20 ruby21 ruby22"
136 +
137 +RUBY_FAKEGEM_TASK_TEST="none"
138 +RUBY_FAKEGEM_TASK_DOC="none"
139 +
140 +RUBY_FAKEGEM_EXTRADOC="Changelog.md README.md"
141 +
142 +# Also install this custom path since internal paths depend on it.
143 +RUBY_FAKEGEM_EXTRAINSTALL="exe"
144 +
145 +RUBY_FAKEGEM_GEMSPEC="rspec-core.gemspec"
146 +
147 +inherit ruby-fakegem
148 +
149 +DESCRIPTION="A Behaviour Driven Development (BDD) framework for Ruby"
150 +HOMEPAGE="https://github.com/rspec/rspec-core"
151 +SRC_URI="https://github.com/rspec/${PN}/archive/v${PV}.tar.gz -> ${P}-git.tgz"
152 +
153 +LICENSE="MIT"
154 +SLOT="3"
155 +KEYWORDS="~amd64"
156 +IUSE="highlight"
157 +
158 +SUBVERSION="$(get_version_component_range 1-2)"
159 +
160 +ruby_add_rdepend "
161 + =dev-ruby/rspec-support-${SUBVERSION}*
162 + !!<dev-ruby/rspec-core-2.14.8-r4
163 + highlight? ( >=dev-ruby/coderay-1.0.9 )
164 +"
165 +
166 +ruby_add_bdepend "test? (
167 + >=dev-ruby/nokogiri-1.5.2
168 + >=dev-ruby/coderay-1.0.9
169 + dev-ruby/syntax
170 + >=dev-ruby/thread_order-1.1.0
171 + >=dev-ruby/zentest-4.6.2
172 + >=dev-ruby/rspec-expectations-3.3.0:3
173 + >=dev-ruby/rspec-mocks-2.99.0:3
174 + )"
175 +
176 +# Skip yard for ruby22 for now since we don't support ruby22 eselected
177 +# yet and we can't bootstrap otherwise.
178 +USE_RUBY=${USE_RUBY/ruby22/} ruby_add_bdepend "doc? ( dev-ruby/yard )"
179 +
180 +all_ruby_prepare() {
181 + # Don't set up bundler: it doesn't understand our setup.
182 + sed -i -e '/[Bb]undler/d' Rakefile || die
183 +
184 + # Avoid dependency on cucumber since we can't run the features anyway.
185 + sed -i -e '/[Cc]ucumber/ s:^:#:' Rakefile || die
186 +
187 + # Duplicate exe also in bin. We can't change it since internal stuff
188 + # also depends on this and fixing that is going to be fragile. This
189 + # way we can at least install proper bin scripts.
190 + cp -R exe bin || die
191 +
192 + # Avoid unneeded dependency on git.
193 + sed -i -e 's/git ls-files --/find/' rspec-core.gemspec || die
194 +
195 + # Avoid aruba dependency so that we don't end up in dependency hell.
196 + sed -i -e '/ArubaLoader/,/^end/ s:^:#:' -e '/Aruba/ s:^:#:' spec/spec_helper.rb || die
197 + rm spec/integration/{filtering,order,persistence_failures}_spec.rb spec/support/aruba_support.rb || die
198 +
199 + # Avoid a spec failing due to path issues
200 + sed -i -e '/does not load files in the default path when run by ruby/,/end/ s:^:#:' \
201 + spec/rspec/core/configuration_spec.rb || die
202 +}
203 +
204 +each_ruby_prepare() {
205 + sed -i -e 's:ruby -e:'${RUBY}' -e:' spec/rspec/core_spec.rb || die
206 +
207 + # case ${RUBY} in
208 + # *ruby22)
209 + # # The rubygems version bundled with ruby 2.2 causes warnings.
210 + # sed -i -e '/a library that issues no warnings when loaded/,/^ end/ s:^:#:' spec/rspec/core_spec.rb || die
211 + # ;;
212 + # esac
213 +}
214 +
215 +all_ruby_compile() {
216 + if use doc ; then
217 + yardoc || die
218 + fi
219 +}
220 +
221 +each_ruby_test() {
222 + PATH="${S}/bin:${PATH}" RUBYLIB="${S}/lib" ${RUBY} -Ilib bin/rspec spec || die "Tests failed."
223 +}
224 +
225 +all_ruby_install() {
226 + all_fakegem_install
227 +
228 + ruby_fakegem_binwrapper rspec /usr/bin/rspec-3 'gem "rspec", "~>3.0"'
229 +}