summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2016-07-18 08:38:44 +0200
committerHans de Graaff <graaff@gentoo.org>2016-07-18 08:48:18 +0200
commit2dcc312f50c9e4283f9701b73822b3656d4d3175 (patch)
treec5bb704f7306962cc2a507bfee22ae6adedead8c /dev-ruby/rails-html-sanitizer
parentdev-ruby/sprockets-rails: add ruby23 revision (diff)
downloadgentoo-2dcc312f50c9e4283f9701b73822b3656d4d3175.tar.gz
gentoo-2dcc312f50c9e4283f9701b73822b3656d4d3175.tar.bz2
gentoo-2dcc312f50c9e4283f9701b73822b3656d4d3175.zip
dev-ruby/rails-html-sanitizer: add ruby23 revision
Package-Manager: portage-2.2.28
Diffstat (limited to 'dev-ruby/rails-html-sanitizer')
-rw-r--r--dev-ruby/rails-html-sanitizer/rails-html-sanitizer-1.0.3-r1.ebuild33
1 files changed, 33 insertions, 0 deletions
diff --git a/dev-ruby/rails-html-sanitizer/rails-html-sanitizer-1.0.3-r1.ebuild b/dev-ruby/rails-html-sanitizer/rails-html-sanitizer-1.0.3-r1.ebuild
new file mode 100644
index 000000000000..19b00e4a26a9
--- /dev/null
+++ b/dev-ruby/rails-html-sanitizer/rails-html-sanitizer-1.0.3-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+USE_RUBY="ruby20 ruby21 ruby22 ruby23"
+
+RUBY_FAKEGEM_RECIPE_DOC="rdoc"
+RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Sanitize HTML fragments in Rails applications"
+HOMEPAGE="https://github.com/rafaelfranca/rails-html-sanitizer"
+
+LICENSE="MIT"
+SLOT="1"
+KEYWORDS="~amd64 ~arm ~ppc64 ~amd64-linux"
+IUSE=""
+
+ruby_add_rdepend "dev-ruby/loofah:0"
+
+ruby_add_bdepend "test? ( dev-ruby/rails-dom-testing )"
+
+all_ruby_prepare() {
+ # Avoid tests failing with libxml2-2.9.3
+ # https://github.com/rails/rails-html-sanitizer/issues/49
+ sed -i -e '/test_\(strip_links_with_tags_in_tags\|strip_nested_tags\|should_sanitize_script_tag_with_multiple_open_brackets\|strip_tags_with_many_open_quotes\|strip_invalid_html\)/,/^ end/ s:^:#:' test/sanitizer_test.rb || die
+}
+
+each_ruby_test() {
+ ${RUBY} -Ilib:test:. -e 'Dir["test/*_test.rb"].each{|f| require f}' || die
+}