/[gentoo-x86]/eclass/ruby-ng.eclass
Gentoo

Diff of /eclass/ruby-ng.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.47 Revision 1.48
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.47 2012/07/05 21:23:01 flameeyes Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/ruby-ng.eclass,v 1.48 2012/07/08 12:38:10 flameeyes Exp $
4 4
5# @ECLASS: ruby-ng.eclass 5# @ECLASS: ruby-ng.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Ruby herd <ruby@gentoo.org> 7# Ruby herd <ruby@gentoo.org>
8# @AUTHOR: 8# @AUTHOR:
656 ;; 656 ;;
657 esac 657 esac
658 658
659 ${RUBY} -S rspec ${rspec_params} "$@" || die "rspec failed" 659 ${RUBY} -S rspec ${rspec_params} "$@" || die "rspec failed"
660} 660}
661
662# @FUNCTION: ruby-ng_testrb-2
663# @DESCRIPTION:
664# This is simply a replacement for the testrb command that load the test
665# files and execute them, with test-unit 2.x. This actually requires
666# either an old test-unit-2 version or 2.5.1-r1 or later, as they remove
667# their script and we installed a broken wrapper for a while.
668# This also respects TEST_VERBOSE and NOCOLOR environment variables.
669ruby-ng_testrb-2() {
670 if [[ ${DEPEND} != *"dev-ruby/test-unit"* ]]; then
671 ewarn "Missing dev-ruby/test-unit in \${DEPEND}"
672 fi
673
674 local testrb_params=
675 case ${NOCOLOR} in
676 1|yes|true)
677 testrb_params+=" --no-use-color"
678 ;;
679 *)
680 testrb_params+=" --use-color=auto"
681 ;;
682 esac
683
684 case ${TEST_VERBOSE} in
685 1|yes|true)
686 testrb_params+=" --verbose=verbose"
687 ;;
688 *)
689 testrb_params+=" --verbose=normal"
690 ;;
691 esac
692
693 ${RUBY} -S testrb-2 ${testrb_params} "$@" || die "testrb-2 failed"
694}

Legend:
Removed from v.1.47  
changed lines
  Added in v.1.48

  ViewVC Help
Powered by ViewVC 1.1.20