From 0de28fbab31a95b402b3c57d62495bb2e5207bbd Mon Sep 17 00:00:00 2001
From: Sofer Athlan-Guyot <sathlang@redhat.com>
Date: Fri, 26 Feb 2016 13:57:09 +0100
Subject: [PATCH] Fix rspec testing outside of the Openstack CI.

When testing rspec locally the r10k binary is never found because the
GEM_BIN_DIR is wrongly set to GEM_HOME/bin.  GEM_HOME is set by bundler
and GEM_HOME/bin do not point where bundler put the binary.  The
binaries are handled by bundler by changing the PATH.  rbenv, use
similar tricks.

install_all is only used outside of the CI, so this modification
wouldn't change anything as far as the official CI is concerned.

Change-Id: I07668d64f9adf6713f5c267cf45650ba92ee0b9c
Closes-Bug: 1550331
---
 functions | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/functions b/functions
index 6f845db1d..b531f68fe 100644
--- a/functions
+++ b/functions
@@ -46,9 +46,8 @@ EOF
 # Uses the following variables:
 #
 # - ``SCRIPT_DIR`` must be set to script path
-# - ``GEM_BIN_DIR`` must be set to Gem bin directory
 install_all() {
-  PUPPETFILE=${SCRIPT_DIR}/Puppetfile ${GEM_BIN_DIR}r10k puppetfile install -v
+  PUPPETFILE=${SCRIPT_DIR}/Puppetfile r10k puppetfile install -v
 }
 
 # Install Puppet OpenStack modules and dependencies by using