diff options
author | 2012-08-13 22:21:26 +0000 | |
---|---|---|
committer | 2012-08-13 22:21:26 +0000 | |
commit | 65796bbe83cc70a50a84e0df859944302b3511dd (patch) | |
tree | 267c31d9c3e2db3e68d5a085d0d3b2e7d78a297e /eclass/ruby-fakegem.eclass | |
parent | Restore doc and test tasks, as both work fine; add support for ree18 and jruby. (diff) | |
download | historical-65796bbe83cc70a50a84e0df859944302b3511dd.tar.gz historical-65796bbe83cc70a50a84e0df859944302b3511dd.tar.bz2 historical-65796bbe83cc70a50a84e0df859944302b3511dd.zip |
Add support for cucumber as a test recipe. This allows abstracting some of the work needed to skip it over on JRuby.
Diffstat (limited to 'eclass/ruby-fakegem.eclass')
-rw-r--r-- | eclass/ruby-fakegem.eclass | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass index c050c58052ba..ff0cea2e8ec9 100644 --- a/eclass/ruby-fakegem.eclass +++ b/eclass/ruby-fakegem.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.33 2012/07/05 21:23:01 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-fakegem.eclass,v 1.34 2012/08/13 22:21:26 flameeyes Exp $ # @ECLASS: ruby-fakegem.eclass # @MAINTAINER: @@ -35,6 +35,8 @@ inherit ruby-ng # Specify one of the default testing function for ruby-fakegem: # - rake (default; see also RUBY_FAKEGEM_TASK_TEST) # - rspec (calls ruby-ng_rspec, adds dev-ruby/rspec:2 to the dependencies) +# - cucumber (calls ruby-ng_cucumber, adds dev-util/cucumber to the +# dependencies; does not work on JRuby). # - none # RUBY_FAKEGEM_RECIPE_TEST="rake" @@ -107,6 +109,13 @@ case ${RUBY_FAKEGEM_RECIPE_TEST} in IUSE+=" test" ruby_add_bdepend "test? ( dev-ruby/rspec:2 )" ;; + cucumber) + IUSE+=" test" + # Unfortunately as of August 2012, cucumber is not supported on + # JRuby. We work it around here to avoid repeating the same + # code over and over again. + USE_RUBY="${USE_RUBY/jruby/}" ruby_add_bdepend "test? ( dev-util/cucumber )" + ;; *) RUBY_FAKEGEM_RECIPE_TEST="none" ;; @@ -237,7 +246,7 @@ ruby_fakegem_genspec() { # so better taking this into consideration. local quoted_description=${DESCRIPTION//\"/\\\"} cat - > $1 <<EOF -# generated by ruby-fakegem.eclass $Revision: 1.33 $ +# generated by ruby-fakegem.eclass $Revision: 1.34 $ Gem::Specification.new do |s| s.name = "${RUBY_FAKEGEM_NAME}" s.version = "${RUBY_FAKEGEM_VERSION}" @@ -287,7 +296,7 @@ ruby_fakegem_binwrapper() { #!${rubycmd} # This is a simplified version of the RubyGems wrapper # -# Generated by ruby-fakegem.eclass $Revision: 1.33 $ +# Generated by ruby-fakegem.eclass $Revision: 1.34 $ require 'rubygems' @@ -374,6 +383,9 @@ each_fakegem_test() { rspec) ruby-ng_rspec ;; + cucumber) + ruby-ng_cucumber + ;; none) ewarn "each_fakegem_test called, but \${RUBY_FAKEGEM_RECIPE_TEST} is 'none'" ;; |