# ChangeLog for eclass directory
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1481 2014/12/27 23:52:24 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1482 2014/12/28 07:23:56 graaff Exp $
+
+ 28 Dec 2014; Hans de Graaff <graaff@gentoo.org> ruby-fakegem.eclass,
+ ruby-ng.eclass:
+ Use rspec-2 wrapper for the rspec recipe. This enables us to add rspec 3.x to
+ the tree while still being able to run rspec 2 specs. The changes have been
+ made in a way that is backwards compatible with the current situation.
27 Dec 2014; Michał Górny <mgorny@gentoo.org> python-utils-r1.eclass:
Update banned var docs.
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.42 2014/12/07 07:23:12 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.43 2014/12/28 07:23:56 graaff Exp $
# @ECLASS: ruby-fakegem.eclass
# @MAINTAINER:
;;
rspec)
IUSE+=" test"
- ruby_add_bdepend "test? ( dev-ruby/rspec:2 )"
+ # Also require a new enough rspec-core version that installs the
+ # rspec-2 wrapper.
+ ruby_add_bdepend "test? ( dev-ruby/rspec:2 >=dev-ruby/rspec-core-2.14.8-r2 )"
;;
cucumber)
IUSE+=" test"
# so better taking this into consideration.
local quoted_description=${DESCRIPTION//\"/\\\"}
cat - > $1 <<EOF
-# generated by ruby-fakegem.eclass $Revision: 1.42 $
+# generated by ruby-fakegem.eclass $Revision: 1.43 $
Gem::Specification.new do |s|
s.name = "${RUBY_FAKEGEM_NAME}"
s.version = "${RUBY_FAKEGEM_VERSION}"
#!${rubycmd}
# This is a simplified version of the RubyGems wrapper
#
-# Generated by ruby-fakegem.eclass $Revision: 1.42 $
+# Generated by ruby-fakegem.eclass $Revision: 1.43 $
require 'rubygems'
${RUBY} -S rake ${RUBY_FAKEGEM_TASK_TEST} || die "tests failed"
;;
rspec)
- ruby-ng_rspec
+ RSPEC_VERSION=2 ruby-ng_rspec
;;
cucumber)
ruby-ng_cucumber
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.55 2014/12/27 20:04:21 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.56 2014/12/28 07:23:56 graaff Exp $
# @ECLASS: ruby-ng.eclass
# @MAINTAINER:
esac
}
-# @FUNCTION: ruby-ng_rspec
+# @FUNCTION: ruby-ng_rspec <arguments>
# @DESCRIPTION:
# This is simply a wrapper around the rspec command (executed by $RUBY})
# which also respects TEST_VERBOSE and NOCOLOR environment variables.
+# Optionally takes arguments to pass on to the rspec invocation. The
+# environment variable RSPEC_VERSION can be used to control the specific
+# rspec version that must be executed. It defaults to 2 for historical
+# compatibility.
ruby-ng_rspec() {
+ local version=${RSPEC_VERSION-2}
+ local files="$@"
+
+ # Explicitly pass the expected spec directory since the versioned
+ # rspec wrappers don't handle this automatically.
+ if [ ${#@} -eq 0 ]; then
+ files="spec"
+ fi
+
if [[ ${DEPEND} != *"dev-ruby/rspec"* ]]; then
ewarn "Missing dev-ruby/rspec in \${DEPEND}"
fi
;;
esac
- ${RUBY} -S rspec ${rspec_params} "$@" || die "rspec failed"
+ ${RUBY} -S rspec-${version} ${rspec_params} ${files} || die "rspec failed"
}
# @FUNCTION: ruby-ng_cucumber