Diff rspec-expectations-2.99.2 with a rspec-expectations-3.9.4

/usr/portage/dev-ruby/rspec-expectations/rspec-expectations-3.9.4.ebuild 2021-04-12 21:09:00.000000000 +0300
1 1
# Copyright 1999-2021 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=8
5
USE_RUBY="ruby24 ruby25 ruby26 ruby27"
4
EAPI=7
5
USE_RUBY="ruby25 ruby26 ruby27"
6 6

  
7
RUBY_FAKEGEM_RECIPE_TEST="rspec"
7
RUBY_FAKEGEM_RECIPE_TEST="rspec3"
8 8

  
9
RUBY_FAKEGEM_TASK_DOC=""
9
RUBY_FAKEGEM_RECIPE_DOC="none"
10 10
RUBY_FAKEGEM_EXTRADOC="Changelog.md README.md"
11 11

  
12 12
RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
......
14 14
inherit ruby-fakegem
15 15

  
16 16
DESCRIPTION="A Behaviour Driven Development (BDD) framework for Ruby"
17
HOMEPAGE="http://rspec.rubyforge.org/"
17
HOMEPAGE="https://github.com/rspec/rspec-expectations"
18 18
SRC_URI="https://github.com/rspec/${PN}/archive/v${PV}.tar.gz -> ${P}-git.tgz"
19 19

  
20 20
LICENSE="MIT"
21
SLOT="2"
22
KEYWORDS="~alpha amd64 arm arm64 ~hppa ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
21
SLOT="3"
22
KEYWORDS="~alpha amd64 arm arm64 ~hppa ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
23 23
IUSE=""
24 24

  
25
ruby_add_rdepend ">=dev-ruby/diff-lcs-1.1.3"
25
SUBVERSION="$(ver_cut 1-2)"
26

  
27
ruby_add_rdepend ">=dev-ruby/diff-lcs-1.2.0 <dev-ruby/diff-lcs-2
28
	=dev-ruby/rspec-support-${SUBVERSION}*"
26 29

  
27 30
ruby_add_bdepend "test? (
28
		>=dev-ruby/rspec-core-2.99.0:2
29
		>=dev-ruby/rspec-mocks-2.14.0:2
31
		>=dev-ruby/rspec-mocks-3.2.0:3
32
		>=dev-ruby/rspec-support-3.5.0:3
30 33
	)"
31 34

  
32 35
all_ruby_prepare() {
......
34 37
	sed -i -e '/[Bb]undler/d' Rakefile || die
35 38

  
36 39
	# Remove the Gemfile to avoid running through 'bundle exec'
37
	rm Gemfile || die
38

  
39
	# Remove .rspec options to avoid dependency on newer rspec when
40
	# bootstrapping.
41
	rm .rspec || die
40
	rm -f Gemfile || die
42 41

  
43 42
	# fix up the gemspecs
44 43
	sed -i \
45 44
		-e '/git ls/d' \
46 45
		-e '/add_development_dependency/d' \
47 46
		"${RUBY_FAKEGEM_GEMSPEC}" || die
48

  
49
	# Avoid a weird, and failing, test testing already installed code.
50
	sed -e '/has an up-to-date caller_filter file/,/end/ s:^:#:' -i spec/rspec/expectations_spec.rb || die
51
}
52

  
53
each_ruby_prepare() {
54
	sed -i -e 's/of Fixnum/of Integer/' spec/rspec/expectations/expectation_target_spec.rb spec/rspec/matchers/be_instance_of_spec.rb || die
55 47
}
Thank you!