summaryrefslogtreecommitdiff
path: root/dev-ruby/wikicloth
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-ruby/wikicloth
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-ruby/wikicloth')
-rw-r--r--dev-ruby/wikicloth/Manifest6
-rw-r--r--dev-ruby/wikicloth/files/wikicloth-0.8.3-fix-tests.patch68
-rw-r--r--dev-ruby/wikicloth/metadata.xml11
-rw-r--r--dev-ruby/wikicloth/wikicloth-0.8.3.ebuild44
4 files changed, 129 insertions, 0 deletions
diff --git a/dev-ruby/wikicloth/Manifest b/dev-ruby/wikicloth/Manifest
new file mode 100644
index 000000000000..38f47f031835
--- /dev/null
+++ b/dev-ruby/wikicloth/Manifest
@@ -0,0 +1,6 @@
+AUX wikicloth-0.8.3-fix-tests.patch 4893 SHA256 ee0fcf63d6bb942449e1bf190915f43c2125596b9da67c0fc6f0c565a9bf4994 SHA512 277f43a063a6e3760c0fe83ce58c5a2cd07e578e2a023a94aa1b254f5ba0925bcec1ac354fc921033816b75e9465a54cd562f80a4c921bff87e182a28aab55cc WHIRLPOOL f45415ed08792cb51505904a877df0cf1241d32e7b66694271214acc8afb3bf51e7fb6bdd9bf0838467c4fedbf50f7c2f7f23ca43dc7ad80b5a70e54c1c107c9
+DIST wikicloth-0.8.3.tar.gz 120576 SHA256 ddc8f1896bb0f040834a0d0ecd5f5bb0abefba09f70d24a481e8636f76e08a06 SHA512 8b9e1fbfd58a965ad93d5963d6b9e22eaf6b6805a4946b47a8b5f88071e4321c72f5715619622b404807a4b2bfcd6e966812a80b1f9c5fdd767cc6b7ade79221 WHIRLPOOL b91ba452bde5da228b6c50ff3b519b5c2f68df8906852ecbcf36dd6f564bdefb511ad8a473be7d58440a2c29e1350a59699c59098b6bacfbb9b9a814901f0888
+EBUILD wikicloth-0.8.3.ebuild 998 SHA256 5651c4154d8d996d8f474edf3624e8fe2eec6ecb7ec8f8d1dbb8f77ea1e5096b SHA512 b8d41ad5308617ed801d94c2d7225c598f1135325e7e7da742ef9115aa4a4b39d7a8eec36dd74a63844d99b17f6674dc864c7293556ffc31ede9d4161a7804c8 WHIRLPOOL e2fbb290d32686374a7c05d2dede0d4b775d5df7e388f9c2a4ba97543d1ed74d689a424fc69e9c68365b06978e5b92f05ba4278e1c1454fd64d2c5433d2a6834
+MISC ChangeLog 3184 SHA256 7910601c5729418a5fec4eebd7c82d77876281730cb0ad2620f75a31077e7488 SHA512 0326b0b06cd63c33be6e6b447845a1d0b377825a65a2778bbce1102e0601d7f4ad3f562565c0fae3c63ed8ae934fa15a61ae00406e34c54d29660269ed3726d0 WHIRLPOOL fef19bc57cd9b4d6371a1c197c3198146bedb13d97e4e3861e24f718ffe06f9ca27eb7991fdb7f7a83aa12d4ad06863ec078d942bdc3ec72754687369bf0d0e0
+MISC ChangeLog-2015 592 SHA256 7eeb29fc87377071d74e5b1e4e313cb48fc46386f180055d8923251282f9ab09 SHA512 188c997942f55dad272b84dd47c0c3fda4fbe5f2abcca1a7594d09afeaa0e7bd555db548832d06dba726be4ee35967e144b7ddb33d0e3c17ad7f314e1523425c WHIRLPOOL 955c5a5b094f0eb9c94f9cd7ec186927ec5006467bea21182201660a920dba59fba5eb6b48ba8e86e259a78b1e52e09599eda0d0a87121e0363dee8363ea81fc
+MISC metadata.xml 344 SHA256 466bbb74ebd39336423d07aa28d2e19d824b1cdb09da985a67ce7eb335ab3f3a SHA512 bf28034d9e0db24002de4d13ca0f3bee138a854f83e62f4357b01a083f9e1e354982ecb148a9249d869460c397507c1e034acd05a0ea7a960ad08cdbdc97839a WHIRLPOOL 234c5c94fac6f0133dd9dfef0ca016482baa36a47205c27f9d3348ac1440653e21cfcfa1a4ba999173d6781c41f9f78a35a605a1d23d2d683b47b628dd3229f3
diff --git a/dev-ruby/wikicloth/files/wikicloth-0.8.3-fix-tests.patch b/dev-ruby/wikicloth/files/wikicloth-0.8.3-fix-tests.patch
new file mode 100644
index 000000000000..b50752a9ae9b
--- /dev/null
+++ b/dev-ruby/wikicloth/files/wikicloth-0.8.3-fix-tests.patch
@@ -0,0 +1,68 @@
+From 5c84028cadb36e7e2a220c7ab05398722c6d0e84 Mon Sep 17 00:00:00 2001
+From: Per Andersson <avtobiff@gmail.com>
+Date: Sat, 10 Oct 2015 22:33:58 +0200
+Subject: [PATCH 1/2] Update output assert in autolinking pre statement
+
+The <pre> tag doesn't keep html entities.
+---
+ test/wiki_cloth_test.rb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/wiki_cloth_test.rb b/test/wiki_cloth_test.rb
+index 2f0481a..483cecf 100644
+--- a/test/wiki_cloth_test.rb
++++ b/test/wiki_cloth_test.rb
+@@ -58,7 +58,7 @@ class WikiClothTest < Test::Unit::TestCase
+ test "autolinking keeps html entities intact" do
+ wiki = WikiCloth::Parser.new(:data => "<div>&amp; &gt;</div><pre>&amp; &lt;</pre> https://github.com/repo/README.md &gt; &amp;")
+ data = wiki.to_html
+- assert_equal "\n<p><div>&amp; &gt;</div><pre>&amp; &lt;</pre> <a href=\"https://github.com/repo/README.md\">https://github.com/repo/README.md</a> &gt; &amp;</p>", data
++ assert_equal "\n<p><div>&amp; &gt;</div><pre>&amp;amp&#59; &amp;lt&#59;</pre> <a href=\"https://github.com/repo/README.md\">https://github.com/repo/README.md</a> &gt; &amp;</p>", data
+ end
+
+ test "image url override" do
+
+From a7eccc2970b0f1b1973881fe139b1f2cb51af2eb Mon Sep 17 00:00:00 2001
+From: Per Andersson <avtobiff@gmail.com>
+Date: Sat, 10 Oct 2015 22:40:25 +0200
+Subject: [PATCH 2/2] Update output for table of content tests
+
+Newlines seems to have been removed from HTML output for TOC.
+
+* empty item in toc
+* toc declared as list
+* toc numbered
+---
+ test/wiki_cloth_test.rb | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/test/wiki_cloth_test.rb b/test/wiki_cloth_test.rb
+index 483cecf..198295c 100644
+--- a/test/wiki_cloth_test.rb
++++ b/test/wiki_cloth_test.rb
+@@ -446,7 +446,7 @@ class WikiClothTest < Test::Unit::TestCase
+ test "empty item in toc" do
+ wiki = WikiCloth::WikiCloth.new({:data => "__TOC__\n=A="})
+ data = wiki.render
+- assert data.include?("<table id=\"toc\" class=\"toc\" summary=\"Contents\"><tr><td>\n<div id=\"toctitle\"><h2>Table of Contents</h2></div>\n<ul><li><a href=\"#A\">A</a></li></ul>\n</td></tr></table>")
++ assert data.include?('<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Table of Contents</h2></div><ul></li><li><a href="#A">A</a></li></ul></td></tr></table>')
+ end
+
+ test "pre at beginning" do
+@@ -458,12 +458,14 @@ class WikiClothTest < Test::Unit::TestCase
+ test "toc declared as list" do
+ wiki = WikiCloth::WikiCloth.new({:data => "__TOC__\n=A=\n==B==\n===C==="})
+ data = wiki.render
+- assert data.include?("<table id=\"toc\" class=\"toc\" summary=\"Contents\"><tr><td>\n<div id=\"toctitle\"><h2>Table of Contents</h2></div>\n<ul><li>\n<a href=\"#A\">A</a><ul><li>\n<a href=\"#B\">B</a><ul><li><a href=\"#C\">C</a></li></ul>\n</li></ul>\n</li></ul>\n</td></tr></table>")
++ puts data
++ assert data.include?('<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Table of Contents</h2></div><ul></li><li><a href="#A">A</a><ul><li><a href="#B">B</a><ul><li><a href="#C">C</a></li></ul></ul></ul></td></tr></table>')
+ end
+
+ test "toc numbered" do
+ wiki = WikiCloth::WikiCloth.new({:data => "=A=\n=B=\n==C==\n==D==\n===E===\n===F===\n====G====\n====H====\n==I==\n=J=\n=K=\n===L===\n===M===\n====N====\n====O===="})
+ data = wiki.render(:noedit => true, :toc_numbered => true)
+- assert data.include?("<table id=\"toc\" class=\"toc\" summary=\"Contents\"><tr><td>\n<div id=\"toctitle\"><h2>Table of Contents</h2></div>\n<ul>\n<li><a href=\"#A\">1 A</a></li>\n<li>\n<a href=\"#B\">2 B</a><ul>\n<li><a href=\"#C\">2.1 C</a></li>\n<li>\n<a href=\"#D\">2.2 D</a><ul>\n<li><a href=\"#E\">2.2.1 E</a></li>\n<li>\n<a href=\"#F\">2.2.2 F</a><ul>\n<li><a href=\"#G\">2.2.2.1 G</a></li>\n<li><a href=\"#H\">2.2.2.2 H</a></li>\n</ul>\n</li>\n</ul>\n</li>\n<li><a href=\"#I\">2.3 I</a></li>\n</ul>\n</li>\n<li><a href=\"#J\">3 J</a></li>\n<li>\n<a href=\"#K\">4 K</a><ul><ul>\n<li><a href=\"#L\">4.1 L</a></li>\n<li>\n<a href=\"#M\">4.2 M</a><ul>\n<li><a href=\"#N\">4.2.1 N</a></li>\n<li><a href=\"#O\">4.2.2 O</a></li>\n</ul>\n</li>\n</ul></ul>\n</li>\n</ul>\n</td></tr></table>")
++ assert data.include?('<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Table of Contents</h2></div><ul></li><li><a href="#A">1 A</a></li><li><a href="#B">2 B</a><ul><li><a href="#C">2.1 C</a></li><li><a href="#D">2.2 D</a><ul><li><a href="#E">2.2.1 E</a></li><li><a href="#F">2.2.2 F</a><ul><li><a href="#G">2.2.2.1 G</a></li><li><a href="#H">2.2.2.2 H</a></li></ul></ul><li><a href="#I">2.3 I</a></li></ul><li><a href="#J">3 J</a></li><li><a href="#K">4 K</a><ul><ul><li><a href="#L">4.1 L</a></li><li><a href="#M">4.2 M</a><ul><li><a href="#N">4.2.1 N</a></li><li><a href="#O">4.2.2 O</a></li></ul></ul></ul></ul></td></tr></table>')
++
+ end
+ end
diff --git a/dev-ruby/wikicloth/metadata.xml b/dev-ruby/wikicloth/metadata.xml
new file mode 100644
index 000000000000..548849f88c99
--- /dev/null
+++ b/dev-ruby/wikicloth/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>ruby@gentoo.org</email>
+ <name>Gentoo Ruby Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">nricciar/wikicloth</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-ruby/wikicloth/wikicloth-0.8.3.ebuild b/dev-ruby/wikicloth/wikicloth-0.8.3.ebuild
new file mode 100644
index 000000000000..9ad0db532163
--- /dev/null
+++ b/dev-ruby/wikicloth/wikicloth-0.8.3.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+USE_RUBY="ruby21 ruby22 ruby23"
+
+RUBY_FAKEGEM_RECIPE_DOC="rdoc"
+RUBY_FAKEGEM_EXTRADOC="README README.textile"
+
+inherit ruby-fakegem
+
+DESCRIPTION="A mediawiki parser"
+HOMEPAGE="https://github.com/nricciar/wikicloth"
+SRC_URI="https://github.com/nricciar/wikicloth/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RUBY_PATCHES=( "${FILESDIR}"/${P}-fix-tests.patch )
+
+ruby_add_rdepend "dev-ruby/builder:*
+ dev-ruby/expression_parser
+ dev-ruby/htmlentities
+ dev-ruby/nokogiri
+ dev-ruby/rinku
+ dev-ruby/twitter-text"
+ruby_add_bdepend "test? (
+ dev-ruby/activesupport
+ dev-ruby/test-unit
+ dev-ruby/i18n )"
+
+all_ruby_prepare() {
+ sed -i \
+ -e '/[Bb]undler/d' \
+ -e "/require 'simplecov'/d" \
+ Rakefile || die "sed failed"
+ sed -i -e '1igem "test-unit"' test/test_helper.rb
+}
+
+each_ruby_test() {
+ ${RUBY} -Ilib:test test/wiki_cloth_test.rb || die
+}