summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2009-04-29 18:09:15 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2009-04-29 18:09:15 +0000
commit8129a48dcd31339e6d914cfe203f2a6616e6a9fc (patch)
tree13750aa7bbf6a775868c8ac1d05ee2a4ff767a5d /dev-ruby/flexmock
parentFix HOMEPAGE and SRC_URI wrt #266702. (diff)
downloadgentoo-2-8129a48dcd31339e6d914cfe203f2a6616e6a9fc.tar.gz
gentoo-2-8129a48dcd31339e6d914cfe203f2a6616e6a9fc.tar.bz2
gentoo-2-8129a48dcd31339e6d914cfe203f2a6616e6a9fc.zip
Version bump, move to use tarball and fake gem spec (with a new, nice function to fake it!), and enable use with Ruby 1.9.
(Portage version: 2.2_rc31/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby/flexmock')
-rw-r--r--dev-ruby/flexmock/ChangeLog11
-rw-r--r--dev-ruby/flexmock/flexmock-0.8.6.ebuild60
2 files changed, 69 insertions, 2 deletions
diff --git a/dev-ruby/flexmock/ChangeLog b/dev-ruby/flexmock/ChangeLog
index f77cb0030a72..d0fbb9213f8c 100644
--- a/dev-ruby/flexmock/ChangeLog
+++ b/dev-ruby/flexmock/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-ruby/flexmock
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/flexmock/ChangeLog,v 1.2 2008/12/20 13:13:17 graaff Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/flexmock/ChangeLog,v 1.3 2009/04/29 18:09:15 flameeyes Exp $
+
+*flexmock-0.8.6 (29 Apr 2009)
+
+ 29 Apr 2009; Diego E. Pettenò <flameeyes@gentoo.org>
+ +flexmock-0.8.6.ebuild:
+ Version bump, move to use tarball and fake gem spec (with a new, nice
+ function to fake it!), and enable use with Ruby 1.9.
*flexmock-0.8.3 (20 Dec 2008)
diff --git a/dev-ruby/flexmock/flexmock-0.8.6.ebuild b/dev-ruby/flexmock/flexmock-0.8.6.ebuild
new file mode 100644
index 000000000000..008af912cce7
--- /dev/null
+++ b/dev-ruby/flexmock/flexmock-0.8.6.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/flexmock/flexmock-0.8.6.ebuild,v 1.1 2009/04/29 18:09:15 flameeyes Exp $
+
+inherit ruby
+
+DESCRIPTION="Simple mock object library for Ruby unit testing"
+HOMEPAGE="http://${PN}.rubyforge.org/"
+SRC_URI="mirror://rubyforge/${PN}/${P}.tgz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~amd64 ~x86-fbsd"
+IUSE="doc test"
+
+RDEPEND=""
+DEPEND="doc? ( dev-ruby/rake )
+ test? ( dev-ruby/rake )"
+
+USE_RUBY="ruby18 ruby19"
+
+dofakegemspec() {
+ cat - > "${T}"/${P}.gemspec <<EOF
+Gem::Specification.new do |s|
+ s.name = "${PN}"
+ s.version = "${PV}"
+ s.summary = "${DESCRIPTION}"
+ s.homepage = "${HOMEPAGE}"
+end
+EOF
+
+ insinto $(${RUBY} -r rbconfig -e 'print Config::CONFIG["vendorlibdir"]' | sed -e 's:vendor_ruby:gems:')/specifications
+ doins "${T}"/${P}.gemspec || die "Unable to install fake gemspec"
+}
+
+src_compile() {
+ if use doc; then
+ rake rerdoc || die "rake rerdoc failed"
+ fi
+}
+
+src_test() {
+ for ruby in $USE_RUBY; do
+ [[ -n `type -p $ruby` ]] && $ruby $(type -p rake) test || die "testsuite failed"
+ done
+}
+
+src_install() {
+ pushd lib
+ doruby -r * || die "doruby failed"
+ popd
+
+ if use doc; then
+ dohtml -r doc/* || die "dohtml failed"
+ fi
+
+ dodoc CHANGES README || die "dodoc failed"
+
+ dofakegemspec
+}