lib/busser/command/setup.rb in busser-0.4.1 vs lib/busser/command/setup.rb in busser-0.5.0

- old
+ new

@@ -53,27 +53,36 @@ # This file was generated by Busser. # # The application 'busser' is installed as part of a gem, and # this file is here to facilitate running it. # + [ -n "$DEBUG" ] && set -x # Get the directory where this ruby is. This will also resolve # any symlinks in the directory/script, so it will be the fully # resolved path. SOURCE="#{ruby_bin}" while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + # Set Busser Root path + BUSSER_ROOT="#{root_path}" + + export BUSSER_ROOT + # Export gem paths so that we use the isolated gems. - export GEM_HOME="#{gem_home}" - export GEM_PATH="${GEM_HOME}" + GEM_HOME="#{gem_home}" + GEM_PATH="#{gem_path}" + GEM_CACHE="#{gem_home}/cache" + export GEM_HOME GEM_PATH GEM_CACHE + # Unset RUBYOPT, we don't want this bleeding into our runtime. unset RUBYOPT GEMRC # Call the actual Busser bin with our arguments - exec "${DIR}/ruby" "${DIR}/busser" "$@" + exec "${DIR}/ruby" "#{gem_bindir}/busser" "$@" BUSSER_BINSTUB end chmod(binstub, 0755, :verbose => false) end @@ -85,9 +94,17 @@ end end def gem_home Gem.paths.home + end + + def gem_path + Gem.paths.path.join(":") + end + + def gem_bindir + Gem.bindir end end end end