1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 # ruby22 support waiting on dev-ruby/action{pack,view}.
8 USE_RUBY="ruby20 ruby21"
10 # Avoid the complexity of the "rake" recipe and run the tests manually.
11 RUBY_FAKEGEM_RECIPE_TEST=none
13 RUBY_FAKEGEM_RECIPE_DOC="rdoc"
14 RUBY_FAKEGEM_EXTRADOC="README.md"
16 RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
20 DESCRIPTION="Ruby on Rails RBPDF plugin"
21 HOMEPAGE="https://github.com/naitoh/rbpdf"
25 KEYWORDS="~amd64 ~x86"
28 ruby_add_bdepend "test? ( >=dev-ruby/test-unit-3 )"
29 ruby_add_rdepend "dev-ruby/actionview:*
36 # This test is enabled automagically in the presence of rmagick, and
38 rm -f test/rbpdf_image_rmagick_test.rb \
39 || die "failed to remove rmagick tests"
41 # Loosen very restrictive htmlentities dependency
42 sed -i -e '/htmlentities/ s/=/>=/' ${RUBY_FAKEGEM_GEMSPEC} || die
46 local cmd='gem "test-unit", ">= 3.0"'
48 cmd+='require "test/unit"'
50 cmd+='Dir["test/rbpdf_*.rb"].each{|f| require("./" + f)}'
51 ${RUBY} -Ilib:.:test -e "${cmd}" || die "test suite failed"