From 1e186def9fad9023d19c6d2dd2625f03b538cb96 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 22 Jun 2015 11:17:19 -0400 Subject: [PATCH] Add rbpdf from gx86. --- dev-ruby/rbpdf/Manifest | 3 ++ dev-ruby/rbpdf/metadata.xml | 11 ++++++ dev-ruby/rbpdf/rbpdf-1.18.5.ebuild | 57 ++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 dev-ruby/rbpdf/Manifest create mode 100644 dev-ruby/rbpdf/metadata.xml create mode 100644 dev-ruby/rbpdf/rbpdf-1.18.5.ebuild diff --git a/dev-ruby/rbpdf/Manifest b/dev-ruby/rbpdf/Manifest new file mode 100644 index 0000000..6a0c6dc --- /dev/null +++ b/dev-ruby/rbpdf/Manifest @@ -0,0 +1,3 @@ +DIST rbpdf-1.18.5.gem 5734912 SHA256 ec2c8204a42081c3e22f48c4061c532ab87f28c41b601afa7d295ef8b5afbbc1 SHA512 ab3b58703523450cc12941d19e4af770a921b90f693621100fb81f164be1dc739aa0bccdfe806fc0f3dd9c174c1b6afa7d6834972d52df165ca064e20c5cdcbd WHIRLPOOL dd40db5ddcd1ed5deaa329b796442040fdceb76ed43f044ba88aaab60dc45eccfabc8e1df4674b4a56fd5e680584caad1fae867cf2edac5ae195821ea3191e58 +EBUILD rbpdf-1.18.5.ebuild 1846 SHA256 2e9bad2de44df7436b283a27c08454e2be711e4f67b41d039e596322a3e39f23 SHA512 a6d1ec38668f8a3910fa577c705fe4a652f76b28d6831c76a9662d94f4a8e38473ec60dda89d37f23ae5ee95f431baad55199d7da29d5def73dc8ba6a8506396 WHIRLPOOL b22ec15847e550c17373cd16ace5de671f707e608e5d64d09c90da739b65981dc972e7e7bb668dd158a39f3e1000de84386def0a185bd9c7c356a77ba52fbf88 +MISC metadata.xml 305 SHA256 97257a4f60223f45fcb5734f57b4deaf157969384298105cd32a4d6a711018b9 SHA512 25c88889e95fe4617b632684fd851642da7515491bf93b1d4946ca96341316f54293ef59f5c8432ec8060956700e5dfca0bfff9e15a38953f1a652bb5b5e7393 WHIRLPOOL a89d3d62059dd622b8c667fe526d9401e6f08a9f650b7d7985cefe000fead6f07490edecfd271d220cf50508672a54d3f7dbea8f745ca56c167e20ab7218569f diff --git a/dev-ruby/rbpdf/metadata.xml b/dev-ruby/rbpdf/metadata.xml new file mode 100644 index 0000000..eb4d920 --- /dev/null +++ b/dev-ruby/rbpdf/metadata.xml @@ -0,0 +1,11 @@ + + + + ruby + + mjo@gentoo.org + + + naitoh/rbpdf + + diff --git a/dev-ruby/rbpdf/rbpdf-1.18.5.ebuild b/dev-ruby/rbpdf/rbpdf-1.18.5.ebuild new file mode 100644 index 0000000..f6374e5 --- /dev/null +++ b/dev-ruby/rbpdf/rbpdf-1.18.5.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rbpdf/rbpdf-1.18.5.ebuild,v 1.1 2015/04/11 02:59:00 mjo Exp $ + +EAPI=5 + +# As long as we conditionally depend on dev-ruby/rails:3.2, we're +# helpless to add ruby21 or ruby22 support. It should be possible, it +# just hasn't happened yet. See https://github.com/naitoh/rbpdf/issues/9 +USE_RUBY="ruby19 ruby20" + +RUBY_FAKEGEM_RECIPE_DOC="rdoc" +RUBY_FAKEGEM_EXTRADOC="README.md" + +inherit ruby-fakegem + +DESCRIPTION="Ruby on Rails TCPDF plugin" +HOMEPAGE="https://github.com/naitoh/rbpdf" + +LICENSE="LGPL-2.1+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +# We need to set up a fake Rails environment to run the tests. +ruby_add_bdepend "test? ( dev-ruby/rails:3.2 )" + +src_test() { + # Create a fake Rails environment once, then do the default ruby-ng + # thing. Make sure we use the rails-3.x.y executable. + local rails="${ROOT}usr/bin/rails-3.2*" + + $rails new "${T}/dummy" \ + --skip-javascript \ + --skip-git \ + --skip-bundle \ + --skip-sprockets \ + --skip-active-record \ + || die "failed to create rails environment" + + ruby-ng_src_test +} + +each_ruby_test() { + # The test suite needs to run within a Rails environment, so in + # src_test(), we created an empty Rails instance in ${T}/dummy. Now + # we copy ourselves into the vendor/plugins directory of that Rails + # instance, and run the tests using Rails's Rakefile. Assuming the + # tests pass, we remove the plugin again so everything is nice and + # tidy for the next ruby implementation. + cp -r . "${T}/dummy/vendor/plugins/${PN}" || \ + die "failed to install plugin" + cd "${T}/dummy" || die + rake test TEST="vendor/plugins/${PN}/test/*_test.rb" || \ + die "test suite failed" + rm -r "vendor/plugins/${PN}" || die "failed to uninstall plugin" +} -- 2.44.2