summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2021-10-06 07:32:34 +0200
committerHans de Graaff <graaff@gentoo.org>2021-10-06 07:32:34 +0200
commitc3ff1d863b72995e9fbc35bb109cc0b3af421cb3 (patch)
tree1352c24d47a2a2727927a0e03cccf2fbe15c3330 /dev-ruby/slim
parentdev-ruby/sassc: cleanup (diff)
downloadgentoo-c3ff1d863b72995e9fbc35bb109cc0b3af421cb3.tar.gz
gentoo-c3ff1d863b72995e9fbc35bb109cc0b3af421cb3.tar.bz2
gentoo-c3ff1d863b72995e9fbc35bb109cc0b3af421cb3.zip
dev-ruby/slim: fix tests
The tests for slim 4.x depend on sassc, not on sass. Closes: https://bugs.gentoo.org/720400 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby/slim')
-rw-r--r--dev-ruby/slim/slim-4.1.0-r1.ebuild52
1 files changed, 52 insertions, 0 deletions
diff --git a/dev-ruby/slim/slim-4.1.0-r1.ebuild b/dev-ruby/slim/slim-4.1.0-r1.ebuild
new file mode 100644
index 000000000000..9677e6a80817
--- /dev/null
+++ b/dev-ruby/slim/slim-4.1.0-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+USE_RUBY="ruby25 ruby26 ruby27"
+
+RUBY_FAKEGEM_EXTRADOC="CHANGES README.md"
+
+RUBY_FAKEGEM_DOCDIR="doc"
+RUBY_FAKEGEM_RECIPE_DOC="rake"
+RUBY_FAKEGEM_TASK_DOC="yard"
+
+RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
+
+inherit ruby-fakegem
+
+DESCRIPTION="A template language aiming to reduce the syntax to the essential parts"
+HOMEPAGE="http://slim-lang.com/"
+LICENSE="MIT"
+
+KEYWORDS="~amd64 ~arm64"
+SLOT="$(ver_cut 1)"
+IUSE="doc"
+
+ruby_add_rdepend ">=dev-ruby/tilt-2.0.6:* =dev-ruby/tilt-2.0*:*
+ >=dev-ruby/temple-0.7.6:0.7
+ !!<dev-ruby/slim-3.0.9-r1"
+
+ruby_add_bdepend "doc? ( dev-ruby/yard dev-ruby/redcarpet )"
+
+ruby_add_bdepend "test? ( dev-ruby/redcarpet dev-ruby/sassc )"
+
+all_ruby_prepare() {
+ sed -i -e '/bundler/I s:^:#:' Rakefile || die
+
+ # This sinatra code expects tests to be installed but we strip those.
+ sed -i -e "s/require 'sinatra'/require 'bogussinatra'/" Rakefile || die
+
+ # Avoid tests for things we don't have. The builder test does not pass with tilt 2.x
+ sed -i -e '/test_wip_render_with_asciidoc/,/^ end/ s:^:#:' \
+ -e '/test_render_with_wiki/,/^ end/ s:^:#:' \
+ -e '/test_render_with_creole/,/^ end/ s:^:#:' \
+ -e '/test_render_with_builder/,/^ end/ s:^:#:' \
+ -e '/test_render_with_org/,/^ end/ s:^:#:' test/core/test_embedded_engines.rb || die
+
+ sed -i -e '/s\.files/ s/git ls-files/find . -type f -print/' \
+ -e '/s\.executables/ s:git ls-files -- bin/\*:find bin -type f -print:' ${RUBY_FAKEGEM_GEMSPEC} || die
+}
+
+each_ruby_prepare() {
+ sed -i -e '/Open3/ s:ruby:'${RUBY}':' test/core/test_commands.rb || die
+}