scripts/cli in rvm-0.0.89 vs scripts/cli in rvm-0.0.90
- old
+ new
@@ -56,30 +56,26 @@
if $rvm_scripts_path/match "$1" "^[0-9]\.[0-9]" ; then rvm_ruby_version=$1 ; shift ; fi
;;
gems|gemset)
rvm_action="gems"
- if [[ "name" = "$1" ]] || [[ "dir" = "$1" ]] || [[ "list" = "$1" ]] || [[ "empty" = "$1" ]] || [[ "delete" = "$1" ]] ; then
- export rvm_${1}_flag=1 ; shift
- elif [[ "dump" = "$1" ]] || [[ "$1" = "load" ]] ; then
- export rvm_${1}_flag=1 ; shift
+ if [[ "name" = "$1" ]] || [[ "dir" = "$1" ]] || [[ "list" = "$1" ]] || [[ "empty" = "$1" ]] || [[ "delete" = "$1" ]] || [[ "dump" = "$1" ]] || [[ "load" = "$1" ]] ; then
+ rvm_ruby_args="$*"
+ #export rvm_${1}_flag=1 ; shift
else
+ rvm_gem_set_name="$1" ; shift
export rvm_use_flag=1 # Default is to use the (named) gem set.
fi
;;
gemdir)
rvm_action=$rvm_token
+ rvm_gemdir_flag=1
if [[ "system" = "$1" ]] ; then export rvm_system_flag=1 ; shift ; fi
if [[ "user" = "$1" ]] ; then export rvm_user_flag=1 ; shift ; fi
;;
- --load|load|dump|clear)
- rvm_action="gems"
- export rvm_${rvm_token}_flag=1
- ;;
-
-S|-e)
rvm_action="ruby"
rvm_ruby_args="$rvm_token $@"
rvm_parse_break=1
;;
@@ -359,22 +355,31 @@
__rvm_parse_args $@
result=0
case "$rvm_action" in
use) __rvm_use ; result=$? ;;
- gemdir) __rvm_gemdir ; result=$? ;;
srcdir) __rvm_source_dir ; result=$? ;;
list) __rvm_list ; result=$? ;;
version) __rvm_version ; result=$? ;;
reset) __rvm_reset ; result=$? ;;
implode) __rvm_implode ; result=$? ;;
update) __rvm_update ; result=$? ;;
reboot) __rvm_reboot ; result=$? ;;
usage|help) __rvm_usage ; result=$? ;;
benchmark) __rvm_benchmark ; result=$? ;;
inspect) __rvm_inspect ; result=$? ;;
- gems) $rvm_scripts_path/gems ${rvm_ruby_file:-$rvm_ruby_args} ; result=$? ;;
ruby|gem|rake) __rvm_do ; result=$? ;;
+ gemdir) $rvm_scripts_path/gems gemdir ; result=$? ;;
+ gems)
+ if [[ "$rvm_use_flag" -eq 1 ]] ; then
+ __rvm_gems_select
+ __rvm_gems_use
+ else
+ $rvm_scripts_path/gems $rvm_ruby_args
+ fi
+ result=$?
+ ;;
+
monitor)
export rvm_ruby_version rvm_ruby_string
$rvm_scripts_path/monitor ; result=$?
;;
notes) $rvm_scripts_path/notes ; result=$? ;;