diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-01-25 18:55:57 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-01-25 18:55:57 +0000 |
commit | ead1a783498096e45e2e0e3e95801fee9db302b6 (patch) | |
tree | b6415ea13609f428ea12afe1bdbd97d64c5ee3f5 /dev-ruby/shotgun | |
parent | Add ~ia64 wrt #281056 (diff) | |
download | gentoo-2-ead1a783498096e45e2e0e3e95801fee9db302b6.tar.gz gentoo-2-ead1a783498096e45e2e0e3e95801fee9db302b6.tar.bz2 gentoo-2-ead1a783498096e45e2e0e3e95801fee9db302b6.zip |
Initial import of shotgun, a way to auto-relaod rackup servers.
(Portage version: 2.2_rc61/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby/shotgun')
-rw-r--r-- | dev-ruby/shotgun/ChangeLog | 10 | ||||
-rw-r--r-- | dev-ruby/shotgun/files/shotgun-0.5-optional-launchy.patch | 31 | ||||
-rw-r--r-- | dev-ruby/shotgun/metadata.xml | 5 | ||||
-rw-r--r-- | dev-ruby/shotgun/shotgun-0.5.ebuild | 45 |
4 files changed, 91 insertions, 0 deletions
diff --git a/dev-ruby/shotgun/ChangeLog b/dev-ruby/shotgun/ChangeLog new file mode 100644 index 000000000000..00469528c9ca --- /dev/null +++ b/dev-ruby/shotgun/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for dev-ruby/shotgun +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/shotgun/ChangeLog,v 1.1 2010/01/25 18:55:56 flameeyes Exp $ + +*shotgun-0.5 (25 Jan 2010) + + 25 Jan 2010; Diego E. Pettenò <flameeyes@gentoo.org> +shotgun-0.5.ebuild, + +files/shotgun-0.5-optional-launchy.patch, +metadata.xml: + Initial import of shotgun, a way to auto-relaod rackup servers. + diff --git a/dev-ruby/shotgun/files/shotgun-0.5-optional-launchy.patch b/dev-ruby/shotgun/files/shotgun-0.5-optional-launchy.patch new file mode 100644 index 000000000000..a060234a4299 --- /dev/null +++ b/dev-ruby/shotgun/files/shotgun-0.5-optional-launchy.patch @@ -0,0 +1,31 @@ +From 7d571983f5794f88c92560f1fc5061aa4ac12bac Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Diego=20Elio=20'Flameeyes'=20Petten=C3=B2?= <flameeyes@gmail.com> +Date: Mon, 25 Jan 2010 19:09:53 +0100 +Subject: [PATCH] Don't fail away if launchy could not be loaded. + +Since it's just a minor feature, make launchy optional this way. +--- + bin/shotgun | 8 ++++++-- + 1 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/bin/shotgun b/bin/shotgun +index d618d29..e12c4d8 100755 +--- a/bin/shotgun ++++ b/bin/shotgun +@@ -137,7 +137,11 @@ server.run app, options do |inst| + puts "== Shotgun starting #{server.to_s} on http://#{options[:Host]}:#{options[:Port]}" + + if browse +- require 'launchy' +- Launchy.open("http://#{options[:Host]}:#{options[:Port]}#{options[:Path]}") ++ begin ++ require 'launchy' ++ Launchy.open("http://#{options[:Host]}:#{options[:Port]}#{options[:Path]}") ++ rescue LoadError ++ $stderr.puts "Unable to load 'launchy', the browser won't be launched." ++ end + end + end +-- +1.6.6.1 + diff --git a/dev-ruby/shotgun/metadata.xml b/dev-ruby/shotgun/metadata.xml new file mode 100644 index 000000000000..852136183369 --- /dev/null +++ b/dev-ruby/shotgun/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/shotgun/shotgun-0.5.ebuild b/dev-ruby/shotgun/shotgun-0.5.ebuild new file mode 100644 index 000000000000..c01fd4117488 --- /dev/null +++ b/dev-ruby/shotgun/shotgun-0.5.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/shotgun/shotgun-0.5.ebuild,v 1.1 2010/01/25 18:55:56 flameeyes Exp $ + +EAPI=2 +USE_RUBY="ruby18" + +# No documentation task +RUBY_FAKEGEM_TASK_DOC="" + +RUBY_FAKEGEM_EXTRADOC="README" + +inherit ruby-fakegem + +DESCRIPTION="Forking implementation of rackup" +HOMEPAGE="http://rtomayko.github.com/shotgun/" + +GITHUB_USER="rtomayko" +# Untagged, but should correspond to 0.5 release +TREE_HASH="91f76ba3a75a22f60121b1403881aec70f35d75f" + +SRC_URI="http://github.com/${GITHUB_USER}/${PN}/tarball/${TREE_HASH} -> ${PN}-git-${PV}.tgz" +S="${WORKDIR}/${GITHUB_USER}-${PN}-${TREE_HASH:0:7}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +# Warning: the code does not use gem versioning to make sure to load +# only the right rack version so we might need to patch it to work :/ +# Has a runtime dependency over launchy, but it's not striclty needed, +# so we'll patch it and announce its possible requirement. +ruby_add_rdepend '=dev-ruby/rack-1.0*' +ruby_add_bdepend test dev-ruby/bacon + +all_ruby_prepare() { + epatch "${FILESDIR}"/${P}-optional-launchy.patch +} + +pkg_postinst() { + elog "${PN} can also launch your browser at startup, but to do so it needs" + elog "the dev-ruby/launchy package that is currently available just on the Ruby" + elog "project's overlay for dependency/license issues." +} |