6341d064d9c0eb31b0bc2f21c8cbf481f5875801
[gentoo.git] / dev-ruby / rspec-support / rspec-support-3.8.2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 USE_RUBY="ruby24 ruby25 ruby26"
6
7 RUBY_FAKEGEM_RECIPE_TEST="rspec3"
8 RUBY_FAKEGEM_RECIPE_DOC="rdoc"
9
10 RUBY_FAKEGEM_EXTRADOC="Changelog.md README.md"
11
12 RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
13
14 inherit ruby-fakegem
15
16 DESCRIPTION="A Behaviour Driven Development (BDD) framework for Ruby"
17 HOMEPAGE="https://github.com/rspec/rspec-support"
18 SRC_URI="https://github.com/rspec/${PN}/archive/v${PV}.tar.gz -> ${P}-git.tgz"
19
20 LICENSE="MIT"
21 SLOT="3"
22 KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
23 IUSE=""
24
25 ruby_add_bdepend "test? ( >=dev-ruby/rspec-3.8.0:3 >=dev-ruby/thread_order-1.1.0 )"
26
27 all_ruby_prepare() {
28         sed -i -e '/git ls-files/d' ${RUBY_FAKEGEM_GEMSPEC} || die
29
30         # Remove spec that, by following symlinks, tries to scan pretty much
31         # the whole filesystem.
32         rm spec/rspec/support/caller_filter_spec.rb || die
33
34         # Avoid spec that requires a dependency on git
35         sed -i -e '/library wide checks/,/]/ s:^:#:' spec/rspec/support_spec.rb || die
36
37         # Avoid a spec requiring a specific locale
38         sed -i -e '/copes with encoded strings/ s/RSpec::Support::OS.windows?/true/' spec/rspec/support/differ_spec.rb || die
39
40         # Avoid a brittle spec depending on ruby implementation details
41         # should be fixed upstream in next version
42         sed -i -e '/returns a hash containing nodes for each line number/askip "ruby26"' spec/rspec/support/source_spec.rb || die
43 }