dev-ruby/rack-test: fix tests with newer rack
authorHans de Graaff <graaff@gentoo.org>
Sun, 10 May 2020 08:14:41 +0000 (10:14 +0200)
committerHans de Graaff <graaff@gentoo.org>
Sun, 10 May 2020 08:14:53 +0000 (10:14 +0200)
Closes: https://bugs.gentoo.org/718386
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
dev-ruby/rack-test/rack-test-1.1.0.ebuild

index eb442b6dd86183491d32aa509c158377d92c37e1..9ddb9c014689dbad4ce37b226d7d486860947938 100644 (file)
@@ -25,10 +25,14 @@ IUSE=""
 
 ruby_add_rdepend ">=dev-ruby/rack-1.0:* <dev-ruby/rack-3:*"
 ruby_add_bdepend "
-       test? ( dev-ruby/sinatra:2 dev-ruby/rack:2.0 )"
+       test? ( dev-ruby/sinatra:2 || ( dev-ruby/rack:2.1 dev-ruby/rack:2.0 ) )"
 
 all_ruby_prepare() {
        rm Gemfile* || die
-       sed -i -e '/bundler/d' -e '/[Cc]ode[Cc]limate/d' -e '/simplecov/,/^end/ s:^:#:' spec/spec_helper.rb || die
+       sed -e '/bundler/d' \
+               -e '/[Cc]ode[Cc]limate/d' \
+               -e '/simplecov/,/^end/ s:^:#:' \
+               -e '1igem "rack", "<2.2"' \
+               -i spec/spec_helper.rb || die
        sed -i -e 's/git ls-files --/find/' ${RUBY_FAKEGEM_GEMSPEC} || die
 }