diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-12-05 19:34:01 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-12-05 19:34:35 +0100 |
commit | 0aa7e3a680ae4d0ebae2c649da66bbad178cc188 (patch) | |
tree | d6caed300415dc6d12b8b85d6efa37d8053bc53c /testing/ruby-escape_utils | |
parent | 5c0ed8085b3e22e34775fc304fed265121de4838 (diff) | |
download | aports-0aa7e3a680ae4d0ebae2c649da66bbad178cc188.tar.bz2 aports-0aa7e3a680ae4d0ebae2c649da66bbad178cc188.tar.xz |
testing/ruby-escape_utils: new aport
Faster string escaping routines for your Ruby apps
https://github.com/brianmario/escape_utils
Diffstat (limited to 'testing/ruby-escape_utils')
-rw-r--r-- | testing/ruby-escape_utils/APKBUILD | 47 | ||||
-rw-r--r-- | testing/ruby-escape_utils/gemspec.patch | 30 |
2 files changed, 77 insertions, 0 deletions
diff --git a/testing/ruby-escape_utils/APKBUILD b/testing/ruby-escape_utils/APKBUILD new file mode 100644 index 0000000000..fcd8411265 --- /dev/null +++ b/testing/ruby-escape_utils/APKBUILD @@ -0,0 +1,47 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +# TODO: Fix to not compile .so lib twice (in build and test). +pkgname=ruby-escape_utils +_gemname=${pkgname#ruby-} +pkgver=1.2.1 +pkgrel=0 +pkgdesc="Faster string escaping routines for your Ruby apps" +url="https://github.com/brianmario/escape_utils" +arch="all" +license="MIT" +checkdepends="ruby ruby-bundler ruby-minitest ruby-rake-compiler" +makedepends="ruby-dev" +source="$pkgname-$pkgver.tar.gz::https://github.com/brianmario/escape_utils/archive/$pkgver.tar.gz + gemspec.patch" +builddir="$srcdir/$_gemname-$pkgver" + +build() { + cd "$builddir" + + gem build $_gemname.gemspec + gem install --local \ + --install-dir dist \ + --ignore-dependencies \ + --no-document \ + --verbose \ + $_gemname +} + +check() { + cd "$builddir" + rake test +} + +package() { + local gemdir="$pkgdir/$(ruby -rubygems -e 'puts Gem.default_dir')" + cd "$builddir"/dist + + mkdir -p "$gemdir" + cp -r extensions gems specifications "$gemdir"/ + + # Remove unnecessary files. + rm -r "$gemdir"/gems/$_gemname-$pkgver/ext +} + +sha512sums="c2af40a2a3c0cc083a55771e2ed813992391c833b6d64cb9255ec5741c2da6980ddf34331256b73f18617cf8df6b745e81bdd6c1632d63936ccd3a655758b083 ruby-escape_utils-1.2.1.tar.gz +8cb3c26b46304899b2d200208c18650ab28da81ea42d8479a89b06802d252757df537c997fe5f640122a4521016f0676c267c691bc6be33ce066fe4be0c504d5 gemspec.patch" diff --git a/testing/ruby-escape_utils/gemspec.patch b/testing/ruby-escape_utils/gemspec.patch new file mode 100644 index 0000000000..a9be5a90eb --- /dev/null +++ b/testing/ruby-escape_utils/gemspec.patch @@ -0,0 +1,30 @@ +--- a/escape_utils.gemspec ++++ b/escape_utils.gemspec +@@ -6,7 +6,7 @@ + s.authors = ["Brian Lopez"] + s.email = %q{seniorlopez@gmail.com} + s.extensions = ["ext/escape_utils/extconf.rb"] +- s.files = `git ls-files`.split("\n") ++ s.files = Dir["lib/**/*", "ext/**/*"] + s.homepage = %q{https://github.com/brianmario/escape_utils} + s.license = %q{MIT} + s.rdoc_options = ["--charset=UTF-8"] +@@ -14,18 +14,10 @@ + s.rubygems_version = %q{1.4.2} + s.summary = %q{Faster string escaping routines for your web apps} + s.description = %q{Quickly perform HTML, URL, URI and Javascript escaping/unescaping} +- s.test_files = `git ls-files test`.split("\n") + + s.required_ruby_version = ">= 1.9.3" + + # tests + s.add_development_dependency 'rake-compiler', ">= 0.7.5" + s.add_development_dependency 'minitest', ">= 5.0.0" +- # benchmarks +- s.add_development_dependency 'benchmark-ips' +- s.add_development_dependency 'rack' +- s.add_development_dependency 'haml' +- s.add_development_dependency 'fast_xs' +- s.add_development_dependency 'actionpack' +- s.add_development_dependency 'url_escape' + end |