aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-11-25 01:34:07 +0100
committerJakub Jirutka <jakub@jirutka.cz>2017-11-25 02:53:47 +0100
commit5240cde47a249e6d325d29f383c5ec3384808840 (patch)
treefab272b1b45f87aeb918127dded4eb14b2dba86a /testing
parent298fdba35e8ccba7a48d754b2578af8c02574c9c (diff)
downloadaports-5240cde47a249e6d325d29f383c5ec3384808840.tar.bz2
aports-5240cde47a249e6d325d29f383c5ec3384808840.tar.xz
testing/ruby-mustache: new aport
https://mustache.github.io/ Logic-less Ruby templates
Diffstat (limited to 'testing')
-rw-r--r--testing/ruby-mustache/APKBUILD48
-rw-r--r--testing/ruby-mustache/skip-simplecov.patch13
2 files changed, 61 insertions, 0 deletions
diff --git a/testing/ruby-mustache/APKBUILD b/testing/ruby-mustache/APKBUILD
new file mode 100644
index 0000000000..d312c31fcc
--- /dev/null
+++ b/testing/ruby-mustache/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=ruby-mustache
+_gemname=mustache
+pkgver=1.0.5
+pkgrel=0
+pkgdesc="Logic-less Ruby templates"
+url="https://mustache.github.io/"
+arch="noarch"
+license="MIT"
+depends="ruby"
+checkdepends="ruby-minitest ruby-rake ruby-rdoc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/mustache/mustache/archive/v$pkgver.tar.gz
+ skip-simplecov.patch"
+builddir="$srcdir/$_gemname-$pkgver"
+
+build() {
+ cd "$builddir"
+ gem build $_gemname.gemspec
+}
+
+check() {
+ cd "$builddir"
+ rake test
+}
+
+package() {
+ local gemdir="$pkgdir/$(ruby -rubygems -e 'puts Gem.default_dir')"
+ local geminstdir="$gemdir/gems/$_gemname-$pkgver"
+
+ cd "$builddir"
+
+ gem install --local \
+ --install-dir "$gemdir" \
+ --ignore-dependencies \
+ --no-document \
+ --verbose \
+ $_gemname
+
+ # Remove unnecessary files and rubbish...
+ cd "$gemdir"
+ rm -r cache build_info doc
+ cd "$geminstdir"
+ rm -r test man Rakefile *.md
+}
+
+sha512sums="2be926431c7c69d49968004ac08089fbd04e66ccfa53ff7d274e2eca5e7a2c257695d809cde8246c64e644983533799138b7ccac919f4ed8b5aacdc5f9113583 ruby-mustache-1.0.5.tar.gz
+1d457e4f059aabb76f2b84fbebb513a3872715b83508528f06c8de5ea98262a4e266c154fa8cf3f5cae0a9fff6e0b82e0c2278f7979ac27a60b202b825b41e5e skip-simplecov.patch"
diff --git a/testing/ruby-mustache/skip-simplecov.patch b/testing/ruby-mustache/skip-simplecov.patch
new file mode 100644
index 0000000000..99f0afdbeb
--- /dev/null
+++ b/testing/ruby-mustache/skip-simplecov.patch
@@ -0,0 +1,13 @@
+Don't run code coverage analyser to avoid additional dependency.
+
+--- a/test/helper.rb.orig
++++ b/test/helper.rb
+@@ -1,8 +1,3 @@
+-require 'simplecov'
+-SimpleCov.start do
+- add_filter '/test/'
+-end
+-
+ require 'minitest/autorun'
+
+ Dir[File.dirname(__FILE__) + '/fixtures/*.rb'].each do |f|