summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2017-08-28 20:10:57 +0200
committerHans de Graaff <graaff@gentoo.org>2017-08-28 20:43:58 +0200
commite4ad7353fa2758a86bbe80f7e4151d36724ab250 (patch)
tree4f3e9829ee02a0145010e6568d02d1135be483ee /dev-vcs
parentdev-python/castellan: 0.12.0 bup (diff)
downloadgentoo-e4ad7353fa2758a86bbe80f7e4151d36724ab250.tar.gz
gentoo-e4ad7353fa2758a86bbe80f7e4151d36724ab250.tar.bz2
gentoo-e4ad7353fa2758a86bbe80f7e4151d36724ab250.zip
dev-vcs/git-num: run tests; add ruby23, ruby24
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'dev-vcs')
-rw-r--r--dev-vcs/git-num/git-num-2.0.1.ebuild19
1 files changed, 15 insertions, 4 deletions
diff --git a/dev-vcs/git-num/git-num-2.0.1.ebuild b/dev-vcs/git-num/git-num-2.0.1.ebuild
index 925423a91724..d3551f87af70 100644
--- a/dev-vcs/git-num/git-num-2.0.1.ebuild
+++ b/dev-vcs/git-num/git-num-2.0.1.ebuild
@@ -2,11 +2,11 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=5
-USE_RUBY="ruby21 ruby22"
+USE_RUBY="ruby22 ruby23 ruby24"
RUBY_FAKEGEM_RECIPE_DOC="rdoc"
RUBY_FAKEGEM_EXTRADOC="README.md CHANGELOG.md"
-RUBY_FAKEGEM_RECIPE_TEST="rspec"
+RUBY_FAKEGEM_RECIPE_TEST="rspec3"
inherit ruby-fakegem
@@ -17,9 +17,20 @@ SRC_URI="https://github.com/schreifels/git-num/archive/v${PV}.tar.gz -> ${P}.tar
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
-IUSE=""
+IUSE="test"
+
+DEPEND+=" test? ( dev-vcs/git )"
+RDEPEND+=" dev-vcs/git"
all_ruby_prepare() {
+ # cp git-num since specs depend on the default location
mkdir bin || die
- mv git-num bin || die
+ cp git-num bin || die
+
+ sed -i -e '14i`git config user.email "test-git-num@gentoo.org"`' \
+ -e '15i`git config user.name "git-num tester"`' spec/lib/git_tools.rb || die
+}
+
+each_ruby_test() {
+ RSPEC_VERSION=3 ruby-ng_rspec spec/unit.rb spec/integration.rb
}