scripts/gemsets in rvm-0.1.23 vs scripts/gemsets in rvm-0.1.24

- old
+ new

@@ -1,23 +1,18 @@ #!/usr/bin/env bash source $rvm_scripts_path/utility source $rvm_scripts_path/selector -color_green=$($rvm_scripts_path/color "green") -color_red=$($rvm_scripts_path/color "red") -color_yellow=$($rvm_scripts_path/color "yellow") -color_none=$($rvm_scripts_path/color "none") - if [[ ! -z "$rvm_trace_flag" ]] ; then set -x ; export rvm_trace_flag ; fi rvm_ruby_gem_home="${rvm_ruby_gem_home:-$GEM_HOME}" if [[ ! -d "$rvm_ruby_gem_home" ]] && which gem &> /dev/null ; then rvm_ruby_gem_home="$(gem env home)" ; fi trap "if [[ -d $rvm_tmp_path/ ]] && [[ -s $rvm_tmp_path/$$ ]] ; then rm -f $rvm_tmp_path/$$ > /dev/null 2>&1 ; fi ; exit" 0 1 2 3 15 __rvm_gemset_name() { - echo "$(gem env gemdir)" | awk -F'%' '{print $2}' + __rvm_gemset_gemdir | awk -F'%' '{print $2}' } __rvm_gemset_dir() { echo "$rvm_ruby_gem_home" } @@ -234,11 +229,11 @@ __rvm_parse_gems_args # Now we determine if a .gem cache file is already installed if [[ -z "$rvm_force_flag" ]] && [[ -f "${rvm_ruby_gem_home}/specifications/$(basename $gem_file_name)spec" ]] ; then unset gem - $rvm_scripts_path/log "info" "$color_green$gem_name $gem_version$yellow exists, skipping (--force to re-install)" + $rvm_scripts_path/log "info" "$gem_name $gem_version exists, skipping (--force to re-install)" else if [[ -s "$gem" ]] ; then cache_file="$gem" elif [[ -s "$rvm_gems_path/cache/${gem_file_name}" ]] ; then cache_file="$rvm_gems_path/cache/${gem_file_name}" @@ -258,11 +253,11 @@ gem_file_name="$(basename "$cache_file")" gem_string="$(echo "$gem_file_name" | sed 's#\.gem$##')" if [[ -z "$rvm_force_flag" ]] && [[ -s "${rvm_ruby_gem_home}/specifications/$(basename $gem_file_name)spec" ]] ; then unset gem # already installed, not forcing reinstall. - $rvm_scripts_path/log "info" "$color_green$gem_name $gem_version$yellow exists, skipping (--force to re-install)" + $rvm_scripts_path/log "info" "$gem_name $gem_version exists, skipping (--force to re-install)" else if [[ -s "$rvm_gems_path/cache/$(basename $gem_file_name)" ]] ; then mkdir -p "$rvm_tmp_path/$$/" mv "$rvm_gems_path/cache/$gem_file_name" "$rvm_tmp_path/$$/$gem_file_name" gem="$rvm_tmp_path/$$/$gem_file_name -f -l" @@ -331,10 +326,10 @@ __rvm_gemset_copy elif [[ "empty" = "$action" ]] ; then __rvm_gemset_empty elif [[ "delete" = "$action" ]] ; then __rvm_gemset_delete -elif [[ "name" = "$action" ]] ; then +elif [[ "name" = "$action" ]] || [[ "string" = "$action" ]]; then __rvm_gemset_name elif [[ "dir" = "$action" ]] ; then __rvm_gemset_dir elif [[ "list" = "$action" ]] ; then __rvm_gemset_list