summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2012-06-21 12:43:34 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2012-06-21 12:43:34 +0000
commit9e5ad21668610e3d636fd431a8c7ad6edf22d1ee (patch)
tree4ce9ffdda1f89f66ed1c9debea153c163826fea5 /dev-ruby/origin
parentversion bump, support doc and examples (diff)
downloadgentoo-2-9e5ad21668610e3d636fd431a8c7ad6edf22d1ee.tar.gz
gentoo-2-9e5ad21668610e3d636fd431a8c7ad6edf22d1ee.tar.bz2
gentoo-2-9e5ad21668610e3d636fd431a8c7ad6edf22d1ee.zip
Initial import of origin (required by mongoid 3).
(Portage version: 2.2.0_alpha110/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby/origin')
-rw-r--r--dev-ruby/origin/ChangeLog10
-rw-r--r--dev-ruby/origin/metadata.xml5
-rw-r--r--dev-ruby/origin/origin-1.0.1.ebuild71
3 files changed, 86 insertions, 0 deletions
diff --git a/dev-ruby/origin/ChangeLog b/dev-ruby/origin/ChangeLog
new file mode 100644
index 000000000000..efe4440145ab
--- /dev/null
+++ b/dev-ruby/origin/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for dev-ruby/origin
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/origin/ChangeLog,v 1.1 2012/06/21 12:43:34 flameeyes Exp $
+
+*origin-1.0.1 (21 Jun 2012)
+
+ 21 Jun 2012; Diego E. Pettenò <flameeyes@gentoo.org> +metadata.xml,
+ +origin-1.0.1.ebuild:
+ Initial import of origin (required by mongoid 3).
+
diff --git a/dev-ruby/origin/metadata.xml b/dev-ruby/origin/metadata.xml
new file mode 100644
index 000000000000..852136183369
--- /dev/null
+++ b/dev-ruby/origin/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>ruby</herd>
+</pkgmetadata>
diff --git a/dev-ruby/origin/origin-1.0.1.ebuild b/dev-ruby/origin/origin-1.0.1.ebuild
new file mode 100644
index 000000000000..be4b5656a110
--- /dev/null
+++ b/dev-ruby/origin/origin-1.0.1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/origin/origin-1.0.1.ebuild,v 1.1 2012/06/21 12:43:34 flameeyes Exp $
+
+EAPI=4
+
+# does not support Ruby 1.8 syntax
+USE_RUBY="ruby19" #jruby
+
+#RUBY_FAKEGEM_TASK_DOC=""
+RUBY_FAKEGEM_TASK_TEST=""
+
+RUBY_FAKEGEM_EXTRADOC="README.md CHANGELOG.md"
+
+RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
+
+GITHUB_USER="mongoid"
+GITHUB_PROJECT="${PN}"
+RUBY_S="${GITHUB_USER}-${GITHUB_PROJECT}-*"
+
+MY_PV="${PV/_rc/.rc}"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Origin is a simple DSL for generating MongoDB selectors and options"
+HOMEPAGE="http://mongoid.org/"
+SRC_URI="https://github.com/${GITHUB_USER}/${GITHUB_PROJECT}/tarball/v${MY_PV} -> ${GITHUB_PROJECT}-${MY_PV}.tar.gz"
+LICENSE="MIT"
+
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+
+ruby_add_bdepend "
+ test? (
+ >=dev-ruby/activesupport-3.1
+ dev-ruby/rspec:2
+ >=dev-ruby/i18n-0.6
+ >=dev-ruby/tzinfo-0.3.22
+ )"
+
+DEPEND+=" test? ( dev-db/mongodb )"
+
+all_ruby_prepare() {
+ # remove references to bundler, as the gemfile does not add anything
+ # we need to care about.
+ sed -i -e '/[bB]undler/d' Rakefile || die
+ # remove the Gemfile as well or it'll try to load it during testing
+ rm Gemfile || die
+
+ #epatch "${FILESDIR}"/${PN}-2.4.5-gentoo.patch
+}
+
+each_ruby_test() {
+ mkdir "${T}/mongodb_$(basename $RUBY)"
+ mongod --port 27017 --dbpath "${T}/mongodb_$(basename $RUBY)" \
+ --noprealloc --noauth --nohttpinterface --nounixsocket --nojournal \
+ --bind_ip 127.255.255.254 &
+ mongod_pid=$!
+ failed=0
+
+ sleep 2
+
+ export MONGOID_SPEC_HOST="127.255.255.254"
+ export MONGOID_SPEC_PORT="27017"
+
+ ${RUBY} -S rake ${RUBY_FAKEGEM_TASK_TEST} || failed=1
+ kill "${mongod_pid}"
+
+ [[ "${failed}" == "1" ]] && die "tests failed"
+}