Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Properly reflect on the gems(et) file.

  • Loading branch information...
commit 06c1ecedf966b62d6b032d32cd54d50406227364 1 parent eff71f4
@wayneeseguin authored
Showing with 12 additions and 10 deletions.
  1. +12 −10 scripts/gems
View
22 scripts/gems
@@ -79,17 +79,17 @@ __rvm_gems_dump() {
}
__rvm_gems_load() {
+
if [[ ! -z "$rvm_ruby_gem_home" ]] ; then
- GEM_HOME="$rvm_ruby_gem_home" ; export GEM_HOME ;
- GEM_PATH="$rvm_ruby_gem_home" ; export GEM_PATH ;
+ export GEM_HOME="$rvm_ruby_gem_home"
+ export GEM_PATH="$rvm_ruby_gem_home"
fi
-
- if [[ -z "$rvm_file_name" ]] ; then
- if [[ ! -z "$rvm_ruby_args" ]] ; then
- rvm_file_name="$rvm_ruby_args"
- fi
- fi
+ if [[ ! -z "$(echo "$rvm_token" | awk '/\.gem.*$/')" ]] ; then
+ rvm_gem_set_name="$(echo "$1" | sed 's#\.gem.*##g')"
+ else
+ rvm_gem_set_name="$1"
+ fi ; shift
if [[ -f "$rvm_gem_set_name.gems" ]] ; then
rvm_file_name="$rvm_gem_set_name.gems"
@@ -100,7 +100,7 @@ __rvm_gems_load() {
elif [[ -f ".gems" ]] ; then
rvm_file_name=".gems"
else
- $rvm_scripts_path/log "error" "No gem set file found."
+ $rvm_scripts_path/log "error" "No *.gems file found."
return 1
fi
@@ -237,13 +237,15 @@ __rvm_gems_gemdir() {
unset GEM_PATH
-if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select $* ; fi
+#if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select $* ; fi
if [[ -z "$(which gem 2>/dev/null)" ]] ; then
$rvm_scripts_path/log "error" "'gem' was not found, cannot perform gem actions."
return 1
fi
+action="$1" ; shift
+
if [[ "load" = "$1" ]] ; then
__rvm_gems_load
elif [[ "dump" = "$1" ]] ; then
Please sign in to comment.
Something went wrong with that request. Please try again.