Skip to content
This repository
Browse code

s/gems/gemset/g Thanks everyone for such a decisive vote.

  • Loading branch information...
commit f16aad156dcc8026a0e39d612fd3de2a5366bbad 1 parent bc5469b
Wayne E. Seguin authored
38 scripts/cli
@@ -48,10 +48,10 @@ __rvm_parse_args() {
48 48 if $rvm_scripts_path/match "$1" "^[0-9]\.[0-9]" ; then rvm_ruby_version=$1 ; shift ; fi
49 49 ;;
50 50
51   - gems|gemset)
52   - rvm_action="gems"
  51 + gemset)
  52 + rvm_action="gemset"
53 53 if [[ "clear" = "$1" ]] ; then
54   - unset rvm_gem_set_name ; shift
  54 + unset rvm_gemset_name ; shift
55 55 export rvm_ruby_gem_home="$(echo $GEM_HOME | sed 's/%.*$//')"
56 56 export GEM_HOME="$rvm_ruby_gem_home"
57 57 export BUNDLE_PATH="$rvm_ruby_gem_home"
@@ -61,15 +61,15 @@ __rvm_parse_args() {
61 61 elif [[ "delete" = "$1" ]] || [[ "use" = "$1" ]] ; then
62 62 export rvm_${1}_flag=1
63 63 export rvm_ruby_args="$*" ; shift
64   - rvm_gem_set_name="$1"; shift
65   - rvm_ruby_string=$(echo $rvm_gem_set_name | sed 's/\(.*\)%.*/\1/')
66   - rvm_gem_set_name=$(echo $rvm_gem_set_name | sed 's/.*%\(.*\)/\1/')
67   - if [[ "$rvm_ruby_string" != "$rvm_gem_set_name" ]] ; then export rvm_ruby_string ; fi
68   - if [[ ! -z "$rvm_gem_set_name" ]] ; then export rvm_gem_set_name ; fi
  64 + rvm_gemset_name="$1"; shift
  65 + rvm_ruby_string=$(echo $rvm_gemset_name | sed 's/\(.*\)%.*/\1/')
  66 + rvm_gemset_name=$(echo $rvm_gemset_name | sed 's/.*%\(.*\)/\1/')
  67 + if [[ "$rvm_ruby_string" != "$rvm_gemset_name" ]] ; then export rvm_ruby_string ; fi
  68 + if [[ ! -z "$rvm_gemset_name" ]] ; then export rvm_gemset_name ; fi
69 69 else
70 70 if [[ -z "$1" ]] ; then
71 71 rvm_action="error"
72   - rvm_error_message="'gems' must be followed by a gems(et) action, see http://rvm.beginrescueend.com/gemsets/#managing for details."
  72 + rvm_error_message="'gems' must be followed by a gemset action, see http://rvm.beginrescueend.com/gemsets/ for details."
73 73 else
74 74 export rvm_ruby_args="$*" ; export rvm_${1}_flag=1 ; shift
75 75 fi
@@ -274,7 +274,7 @@ __rvm_parse_args() {
274 274 --nice) rvm_niceness="$1" ; shift ;;
275 275 -l|--level) rvm_ruby_patch_level="p$1" ; shift ;;
276 276 # TODO: handle this below better (if $1 is null)
277   - -m|--gem-set) rvm_gem_set_name="$1" ; shift ;;
  277 + -m|--gemset) rvm_gemset_name="$1" ; shift ;;
278 278 --sdk) rvm_sdk="$1" ; shift ;;
279 279 --archflags) rvm_archflags="$1" ; shift ;;
280 280 --symlink) rvm_symlink_name="$1" ; shift ;;
@@ -300,16 +300,16 @@ __rvm_parse_args() {
300 300
301 301 *)
302 302 if [[ ! -z "$rvm_token" ]] ; then
303   - if [[ "gems" = "$rvm_action" ]] ; then
  303 + if [[ "gemset" = "$rvm_action" ]] ; then
304 304 if $rvm_scripts_path/match "$rvm_token" "^.+%.+$" ; then
305   - rvm_gem_set_name="$(echo "$rvm_token" | awk -F'%' '{print $2}')"
  305 + rvm_gemset_name="$(echo "$rvm_token" | awk -F'%' '{print $2}')"
306 306 rvm_ruby_string="$(echo "$rvm_token" | awk -F'%' '{print $1}')"
307 307 elif [[ ! -z "$(echo "$rvm_token" | awk '/\.gems$/')" ]] ; then
308 308 rvm_file_name="$(echo "$rvm_token" | sed 's#\.gems##g').gems"
309 309 # elif [[ ! -z "$(echo "$rvm_token" | awk '/\.gems$/')" ]] ; then
310 310 else
311   - rvm_gem_set_name="$(echo "$rvm_token" | sed 's#\.gems##g')"
312   - rvm_file_name="$rvm_gem_set_name.gems"
  311 + rvm_gemset_name="$(echo "$rvm_token" | sed 's#\.gems##g')"
  312 + rvm_file_name="$rvm_gemset_name.gems"
313 313 fi
314 314 elif [[ ! -z "$(echo "$rvm_token" | awk '/,/')" ]] ; then
315 315 export rvm_ruby_version="$rvm_token"
@@ -317,7 +317,7 @@ __rvm_parse_args() {
317 317 rvm_action="ruby" # Not sure if we really want to do this but we'll try it out.
318 318 fi
319 319 elif $rvm_scripts_path/match "$rvm_token" "^.+%.+$" ; then
320   - rvm_gem_set_name="$(echo "$rvm_token" | awk -F'%' '{print $2}')"
  320 + rvm_gemset_name="$(echo "$rvm_token" | awk -F'%' '{print $2}')"
321 321 rvm_ruby_string="$(echo "$rvm_token" | awk -F'%' '{print $1}')"
322 322 elif $rvm_scripts_path/match "$rvm_token" "-" ; then
323 323 rvm_ruby_string="$rvm_token"
@@ -394,20 +394,20 @@ rvm() {
394 394 usage|help) __rvm_usage ; result=$? ;;
395 395 benchmark) __rvm_benchmark ; result=$? ;;
396 396 inspect) __rvm_inspect ; result=$? ;;
397   - gemdir) $rvm_scripts_path/gems gemdir ; result=$? ;;
  397 + gemdir) $rvm_scripts_path/gemset gemdir ; result=$? ;;
398 398 ruby|gem|rake)
399 399 $rvm_scripts_path/set $rvm_action $rvm_ruby_args
400 400 result=$?
401 401 ;;
402 402 gems)
403 403 if [[ "$rvm_use_flag" -eq 1 ]] ; then
404   - __rvm_gems_select
  404 + __rvm_gemset_select
405 405 result=$?
406 406 if [[ $result -eq 0 ]] ; then
407   - __rvm_gems_use
  407 + __rvm_gemset_use
408 408 fi
409 409 else
410   - $rvm_scripts_path/gems $rvm_ruby_args
  410 + $rvm_scripts_path/gemset $rvm_ruby_args
411 411 fi
412 412 result=$?
413 413 ;;
62 scripts/gems → scripts/gemsets
@@ -14,15 +14,15 @@ if [[ ! -d "$rvm_ruby_gem_home" ]] && which gem &> /dev/null ; then rvm_ruby_gem
14 14
15 15 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
16 16
17   -__rvm_gems_name() {
  17 +__rvm_gemset_name() {
18 18 echo "$(gem env gemdir)" | awk -F'%' '{print $2}'
19 19 }
20 20
21   -__rvm_gems_dir() {
  21 +__rvm_gemset_dir() {
22 22 echo "$rvm_ruby_gem_home"
23 23 }
24 24
25   -__rvm_gems_create() {
  25 +__rvm_gemset_create() {
26 26 for gemset in $(echo $gems_args) ; do
27 27 gem_home="$rvm_ruby_gem_home%${gems_args/ /}"
28 28 mkdir -p $gem_home
@@ -31,7 +31,7 @@ __rvm_gems_create() {
31 31 done ; unset gem_home
32 32 }
33 33
34   -__rvm_gems_list() {
  34 +__rvm_gemset_list() {
35 35 if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi
36 36
37 37 $rvm_scripts_path/log "info" "gems(ets) : for $rvm_ruby_string (found in $rvm_gems_path/)"
@@ -49,14 +49,14 @@ __rvm_gems_list() {
49 49 fi
50 50 }
51 51
52   -__rvm_gems_delete() {
  52 +__rvm_gemset_delete() {
53 53 if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi
54   - if [[ ! -z "$rvm_gem_set_name" ]] ; then
55   - gemdir="$rvm_gems_path/$rvm_ruby_string%$rvm_gem_set_name"
  54 + if [[ ! -z "$rvm_gemset_name" ]] ; then
  55 + gemdir="$rvm_gems_path/$rvm_ruby_string%$rvm_gemset_name"
56 56 if [[ -d "$gemdir" ]] && [[ "$gemdir" != '/' ]] && [[ ! -z "$rvm_force_flag" ]] ; then
57 57 rm -rf "$gemdir"
58 58 elif [[ -d "$gemdir" ]] ; then
59   - $rvm_scripts_path/log "warn" "Are you SURE you wish to remove the entire gemset directory '$rvm_gem_set_name' ($gemdir)?"
  59 + $rvm_scripts_path/log "warn" "Are you SURE you wish to remove the entire gemset directory '$rvm_gemset_name' ($gemdir)?"
60 60 echo -n "(anything other than 'yes' will cancel) > "
61 61 read response
62 62 if [[ "yes" = "$response" ]] ; then
@@ -72,13 +72,13 @@ __rvm_gems_delete() {
72 72 fi
73 73 }
74 74
75   -__rvm_gems_empty() {
  75 +__rvm_gemset_empty() {
76 76 if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi
77 77 gemdir="$rvm_ruby_gem_home"
78 78 if [[ -d "$gemdir" ]] && [[ "$gemdir" != '/' ]] && [[ ! -z "$rvm_force_flag" ]] ; then
79 79 cd $gemdir && rm -rf ./bin/* ./doc/* ./gems/* ./specifications/*
80 80 elif [[ -d "$gemdir" ]] ; then
81   - $rvm_scripts_path/log "warn" "Are you SURE you wish to remove the installed gems for gemset '%$rvm_gem_set_name' ($gemdir)?"
  81 + $rvm_scripts_path/log "warn" "Are you SURE you wish to remove the installed gems for gemset '%$rvm_gemset_name' ($gemdir)?"
82 82 echo -n "(anything other than 'yes' will cancel) > "
83 83 read response
84 84 if [[ "yes" = "$response" ]] ; then
@@ -92,7 +92,7 @@ __rvm_gems_empty() {
92 92 }
93 93
94 94 # Migrate gemsets from ruby X to ruby Y
95   -__rvm_gems_copy() {
  95 +__rvm_gemset_copy() {
96 96 source_ruby="$(echo $gems_args | awk '{print $1}')"
97 97 destination_ruby="$(echo $gems_args | awk '{print $2}')"
98 98 if [[ -z "$source_ruby" ]] ; then
@@ -118,7 +118,7 @@ __rvm_gems_copy() {
118 118 unset source_ruby destination_ruby source_path destination_path
119 119 }
120 120
121   -__rvm_gems_export() {
  121 +__rvm_gemset_export() {
122 122 rvm_file_name="${rvm_file_name:-$gems_args}"
123 123
124 124 if [[ ! -z "$rvm_ruby_gem_home" ]] ; then
@@ -128,8 +128,8 @@ __rvm_gems_export() {
128 128 fi
129 129
130 130 if [[ -z "$rvm_file_name" ]] ; then
131   - if [[ ! -z "$rvm_gem_set_name" ]] ; then
132   - rvm_file_name="$rvm_gem_set_name.gems"
  131 + if [[ ! -z "$rvm_gemset_name" ]] ; then
  132 + rvm_file_name="$rvm_gemset_name.gems"
133 133 else
134 134 rvm_file_name="default.gems"
135 135 fi
@@ -152,7 +152,7 @@ __rvm_gems_export() {
152 152 done ; unset file_name
153 153 }
154 154
155   -__rvm_gems_import() {
  155 +__rvm_gemset_import() {
156 156
157 157 if [[ ! -z "$rvm_ruby_gem_home" ]] ; then
158 158 export GEM_HOME="$rvm_ruby_gem_home"
@@ -161,13 +161,13 @@ __rvm_gems_import() {
161 161 fi
162 162
163 163 if [[ ! -z "$(echo "$gems_args" | awk '/\.gem.*$/')" ]] ; then
164   - rvm_gem_set_name="$(echo "$gems_args" | sed 's#\.gem.*##g' | sed 's# ##g')"
  164 + rvm_gemset_name="$(echo "$gems_args" | sed 's#\.gem.*##g' | sed 's# ##g')"
165 165 else
166   - rvm_gem_set_name="$(echo "$gems_args" | sed 's# ##g')"
  166 + rvm_gemset_name="$(echo "$gems_args" | sed 's# ##g')"
167 167 fi
168 168
169   - if [[ -s "$rvm_gem_set_name.gems" ]] ; then
170   - rvm_file_name="$rvm_gem_set_name.gems"
  169 + if [[ -s "$rvm_gemset_name.gems" ]] ; then
  170 + rvm_file_name="$rvm_gemset_name.gems"
171 171 elif [[ -s "default.gems" ]] ; then
172 172 rvm_file_name="default.gems"
173 173 elif [[ -s "system.gems" ]] ; then
@@ -295,7 +295,7 @@ __rvm_gem_install() {
295 295 }
296 296
297 297 # Output the user's current gem directory.
298   -__rvm_gems_gemdir() {
  298 +__rvm_gemset_gemdir() {
299 299 if [[ "$rvm_user_flag" -eq 1 ]] ; then
300 300 echo $(rvm system ; gem env | grep "\- $HOME" | awk '{print $NF}')
301 301 elif [[ "$rvm_system_flag" -eq 1 ]] ; then
@@ -320,29 +320,29 @@ action="$(echo $* | awk '{print $1}')"
320 320 gems_args=$(echo "$*" | awk '{$1="" ; print}' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
321 321
322 322 if [[ "import" = "$action" ]] || [[ "load" = "$action" ]] ; then
323   - __rvm_gems_import
  323 + __rvm_gemset_import
324 324 elif [[ "export" = "$action" ]] || [[ "dump" = "$action" ]] ; then
325   - __rvm_gems_export
  325 + __rvm_gemset_export
326 326 elif [[ "create" = "$action" ]] ; then
327   - __rvm_gems_create
  327 + __rvm_gemset_create
328 328 elif [[ "copy" = "$action" ]] ; then
329   - __rvm_gems_copy
  329 + __rvm_gemset_copy
330 330 elif [[ "empty" = "$action" ]] ; then
331   - __rvm_gems_empty
  331 + __rvm_gemset_empty
332 332 elif [[ "delete" = "$action" ]] ; then
333   - __rvm_gems_delete
  333 + __rvm_gemset_delete
334 334 elif [[ "name" = "$action" ]] ; then
335   - __rvm_gems_name
  335 + __rvm_gemset_name
336 336 elif [[ "dir" = "$action" ]] ; then
337   - __rvm_gems_dir
  337 + __rvm_gemset_dir
338 338 elif [[ "list" = "$action" ]] ; then
339   - __rvm_gems_list
  339 + __rvm_gemset_list
340 340 elif [[ "gemdir" = "$action" ]] ; then
341   - __rvm_gems_gemdir
  341 + __rvm_gemset_gemdir
342 342 elif [[ "install" = "$action" ]] ; then
343 343 __rvm_gem_install $*
344 344 elif [[ "clear" = "$action" ]] ; then
345   - $rvm_scripts_path/log "info" "gems(et) cleared."
  345 + $rvm_scripts_path/log "info" "gemset cleared."
346 346 exit 0
347 347 else
348 348 $rvm_scripts_path/log "error" "Unrecognized gems action '$action'.\n\nValid gems actions are: {create,use,import,export,copy,delete,empty,name,list,gemdir,install}"
2  scripts/manage
@@ -967,7 +967,7 @@ __rvm_actual_file() {
967 967 __rvm_manage_rubies() {
968 968 rubies=() ; successes=() ; errors=() ; statuses=()
969 969
970   - unset rvm_gem_set_name rvm_ruby_selected_flag
  970 + unset rvm_gemset_name rvm_ruby_selected_flag
971 971
972 972 rvm_ruby_gem_home=$(echo $rvm_ruby_gem_home | awk -F'%' '{print $1}')
973 973 rvm_ruby_string=$(echo $rvm_ruby_string | awk -F'%' '{print $1}')
18 scripts/selector
@@ -207,15 +207,15 @@ __rvm_select() {
207 207 export GEMSTONE_GLOBAL_DIR=$MAGLEV_HOME
208 208 fi
209 209
210   - if [[ ! -z "$rvm_gem_set_name" ]] ; then
211   - rvm_ruby_gem_home="${rvm_ruby_gem_home}%${rvm_gem_set_name}"
  210 + if [[ ! -z "$rvm_gemset_name" ]] ; then
  211 + rvm_ruby_gem_home="${rvm_ruby_gem_home}%${rvm_gemset_name}"
212 212 fi
213 213
214 214 rvm_ruby_selected_flag=1
215 215
216 216 mkdir -p $rvm_ruby_log_path
217 217
218   - export rvm_ruby_interpreter rvm_ruby_version rvm_ruby_repo_url rvm_ruby_package_name rvm_url rvm_ruby_patch_level rvm_ruby_configure rvm_ruby_configure_flags rvm_ruby_make rvm_ruby_make_install rvm_ruby_revision rvm_ruby_tag rvm_major_version rvm_minor_version rvm_gem_set_name rvm_gems_path rvm_ruby_gem_home rvm_path rvm_src_path rvm_bin_path rvm_ruby_binary rvm_ruby_home rvm_log_path rvm_ruby_log_path rvm_src_path rvm_ruby_src_path rvm_ruby_irbrc rvm_ruby_selected_flag rvm_ruby_string
  218 + export rvm_ruby_interpreter rvm_ruby_version rvm_ruby_repo_url rvm_ruby_package_name rvm_url rvm_ruby_patch_level rvm_ruby_configure rvm_ruby_configure_flags rvm_ruby_make rvm_ruby_make_install rvm_ruby_revision rvm_ruby_tag rvm_major_version rvm_minor_version rvm_gemset_name rvm_gems_path rvm_ruby_gem_home rvm_path rvm_src_path rvm_bin_path rvm_ruby_binary rvm_ruby_home rvm_log_path rvm_ruby_log_path rvm_src_path rvm_ruby_src_path rvm_ruby_irbrc rvm_ruby_selected_flag rvm_ruby_string
219 219 else
220 220 rvm_ruby_interpreter="${rvm_ruby_interpreter:-system}"
221 221 fi
@@ -319,7 +319,7 @@ __rvm_use() {
319 319
320 320 echo "export PATH=\"$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:$rvm_ruby_global_gems_path/bin:$rvm_bin_path:\$PATH\"" > $rvm_config_path/default
321 321
322   - for variable in RUBY_VERSION GEM_HOME GEM_PATH BUNDLE_PATH MY_RUBY_HOME IRBRC rvm_ruby_string rvm_gem_set_name MAGLEV_HOME ; do
  322 + for variable in RUBY_VERSION GEM_HOME GEM_PATH BUNDLE_PATH MY_RUBY_HOME IRBRC rvm_ruby_string rvm_gemset_name MAGLEV_HOME ; do
323 323 eval "export $variable"
324 324 eval value=\$${variable}
325 325 if [[ ! -z "$value" ]] ; then
@@ -340,7 +340,7 @@ __rvm_use() {
340 340 if [[ ! -z "$rvm_rvmrc_flag" ]] ; then __rvm_set_rvmrc ; fi
341 341 # Export ruby string and gem set name for extrnal scripts to take advantage of them.
342 342 if [[ ! -z "$rvm_ruby_string" ]] ; then export rvm_ruby_string ; fi
343   - if [[ ! -z "$rvm_gem_set_name" ]] ; then export rvm_gem_set_name ; fi
  343 + if [[ ! -z "$rvm_gemset_name" ]] ; then export rvm_gemset_name ; fi
344 344 if [[ ! -z "$new_path" ]] ; then export PATH="$new_path" ; unset new_path ; fi
345 345
346 346 if [[ "maglev" = "$rvm_ruby_interpreter" ]] ; then
@@ -357,7 +357,7 @@ __rvm_use() {
357 357
358 358 __rvm_ruby_string() {
359 359 # rvm_ruby_string may designate any of the following items:
360   - # * rvm_gem_set_name
  360 + # * rvm_gemset_name
361 361 # * rvm_ruby_interpreter
362 362 # * rvm_ruby_version
363 363 # * rvm_ruby_patch_level
@@ -366,7 +366,7 @@ __rvm_ruby_string() {
366 366 # * rvm_ruby_patch
367 367
368 368 set_name=$(echo "$rvm_ruby_string" | awk -F'%' '{print $2}')
369   - if [[ ! -z "$set_name" ]] ; then rvm_gem_set_name="$set_name" ; fi
  369 + if [[ ! -z "$set_name" ]] ; then rvm_gemset_name="$set_name" ; fi
370 370 ruby_string=$(echo "$rvm_ruby_string" | awk -F'%' '{print $1}')
371 371
372 372 __rvm_unset_ruby_variables
@@ -378,11 +378,11 @@ __rvm_ruby_string() {
378 378 export rvm_head_flag=1
379 379 elif [[ "default" = "$string" ]] ; then
380 380 rvm_ruby_interpreter="default"
381   - unset rvm_ruby_patch_level rvm_ruby_tag rvm_head_flag rvm_ruby_revision rvm_ruby_version rvm_gem_set_name
  381 + unset rvm_ruby_patch_level rvm_ruby_tag rvm_head_flag rvm_ruby_revision rvm_ruby_version rvm_gemset_name
382 382 return
383 383 elif [[ "system" = "$string" ]] ; then
384 384 rvm_ruby_interpreter="system"
385   - unset rvm_ruby_patch_level rvm_ruby_tag rvm_head_flag rvm_ruby_revision rvm_ruby_version rvm_gem_set_name
  385 + unset rvm_ruby_patch_level rvm_ruby_tag rvm_head_flag rvm_ruby_revision rvm_ruby_version rvm_gemset_name
386 386 return
387 387 elif [[ "nightly" = "$string" ]] ; then
388 388 rvm_ruby_version="nightly"
32 scripts/utility
@@ -179,7 +179,7 @@ __rvm_run() {
179 179 __rvm_cleanup_variables() {
180 180 __rvm_unset_ruby_variables
181 181
182   - if [[ "$rvm_sticky_flag" = "1" ]] ; then export rvm_gem_set_name ; else unset rvm_gem_set_name ; fi
  182 + if [[ "$rvm_sticky_flag" = "1" ]] ; then export rvm_gemset_name ; else unset rvm_gemset_name ; fi
183 183
184 184 unset rvm_action rvm_irbrc_file rvm_command rvm_error_message rvm_url rvm_force_flag rvm_all_flag rvm_reconfigure_flag rvm_make_flags rvm_bin_flag rvm_import_flag rvm_export_flag rvm_self_flag rvm_gem_flag rvm_rubygems_flag rvm_debug_flag rvm_delete_flag rvm_summary_flag rvm_test_flag _rvm_spec_flag rvm_json_flag rvm_yaml_flag rvm_shebang_flag rvm_env_flag rvm_tail_flag rvm_use_flag rvm_dir_flag rvm_list_flag rvm_empty_flag rvm_file_name rvm_benchmark_flag rvm_clear_flag rvm_name_flag rvm_verbose_flag rvm_user_flag rvm_system_flag rvm_ruby_configure_flags rvm_uninstall_flag rvm_install_flag rvm_llvm_flag rvm_ruby_bits rvm_ruby_patch rvm_sticky_flag
185 185 }
@@ -615,27 +615,27 @@ __rvm_make_flags() {
615 615 fi
616 616 }
617 617
618   -# Select a gems(et) based on CLI set options and environment.
  618 +# Select a gemset based on CLI set options and environment.
619 619 # This only sets 'rvm_ruby_gem_home'
620   -__rvm_gems_select() {
  620 +__rvm_gemset_select() {
621 621 if ! which gem > /dev/null 2>&1 ; then return 0 ; fi
622 622
623 623 rvm_ruby_global_gems_path="$rvm_gems_path/$rvm_ruby_string%global"
624 624
625   - if [[ -z "$rvm_gem_set_name" ]] ; then
  625 + if [[ -z "$rvm_gemset_name" ]] ; then
626 626 # No longer defaulting to 'sticky' gem sets.
627 627 # Set 'rvm_sticky_flag=1' in ~/.rvmrc to enable.
628 628 if [[ ! -z "$rvm_sticky_flag" ]] ; then
629 629 if [[ ! -z "$GEM_HOME" ]] ; then
630   - rvm_gem_set_name=$(echo $GEM_HOME | xargs basename | awk -F'%' '{print $2}')
  630 + rvm_gemset_name=$(echo $GEM_HOME | xargs basename | awk -F'%' '{print $2}')
631 631 fi
632 632 if [[ ! -z "$rvm_ruby_gem_home" ]] ; then
633   - rvm_gem_set_name=$(echo $rvm_ruby_gem_home | xargs basename | awk -F'%' '{print $2}')
  633 + rvm_gemset_name=$(echo $rvm_ruby_gem_home | xargs basename | awk -F'%' '{print $2}')
634 634 fi
635 635 fi
636 636
637   - if [[ ! -z "$rvm_gem_set_name" ]] && ! $rvm_scripts_path/match "$rvm_gem_set_name" "^[0-9]\.[0-9]" ; then
638   - rvm_ruby_gem_home="$rvm_gems_path/$rvm_ruby_string%$rvm_gem_set_name"
  637 + if [[ ! -z "$rvm_gemset_name" ]] && ! $rvm_scripts_path/match "$rvm_gemset_name" "^[0-9]\.[0-9]" ; then
  638 + rvm_ruby_gem_home="$rvm_gems_path/$rvm_ruby_string%$rvm_gemset_name"
639 639 else
640 640 if [[ ! -z "$rvm_ruby_string" ]] && [[ "$rvm_ruby_interpreter" != "system" ]] ; then
641 641 rvm_ruby_gem_home="$rvm_gems_path/$rvm_ruby_string"
@@ -647,14 +647,14 @@ __rvm_gems_select() {
647 647 unset rvm_ruby_gem_home
648 648 fi
649 649 fi
650   - if [[ -z "$rvm_gem_set_name" ]] ; then unset rvm_gem_set_name ; fi
  650 + if [[ -z "$rvm_gemset_name" ]] ; then unset rvm_gemset_name ; fi
651 651 else
652   - rvm_ruby_gem_home="$rvm_gems_path/$rvm_ruby_string%$rvm_gem_set_name"
  652 + rvm_ruby_gem_home="$rvm_gems_path/$rvm_ruby_string%$rvm_gemset_name"
653 653 fi
654 654
655 655 # If the gemset does not exist, then notify the user as such and abort the action.
656   - if [[ ! -d "$rvm_ruby_gem_home" ]] && [[ ! -z "$rvm_gem_set_name" ]] && [[ -z "$rvm_create_flag" ]]; then
657   - $rvm_scripts_path/log "error" "Gemset '$rvm_gem_set_name' does not exist, rvm gems create '$rvm_gem_set_name' first."
  656 + if [[ ! -d "$rvm_ruby_gem_home" ]] && [[ ! -z "$rvm_gemset_name" ]] && [[ -z "$rvm_create_flag" ]]; then
  657 + $rvm_scripts_path/log "error" "Gemset '$rvm_gemset_name' does not exist, rvm gems create '$rvm_gemset_name' first."
658 658 return 1
659 659 fi
660 660
@@ -698,18 +698,18 @@ __rvm_gems_select() {
698 698 fi ; export rvm_ruby_gem_path rvm_ruby_gem_home
699 699 }
700 700
701   -# Use a gems(et) specified by 'rvm_ruby_gem_home'
702   -__rvm_gems_use() {
  701 +# Use a gemset specified by 'rvm_ruby_gem_home'
  702 +__rvm_gemset_use() {
703 703 if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi
704 704
705 705 if [[ ! -z "$rvm_ruby_gem_home" ]] ; then
706 706 if [[ ! -d "$rvm_ruby_gem_home" ]] ; then
707   - $rvm_scripts_path/log "error" "Gemset '$rvm_gem_set_name' does not exist, rvm gems create '$rvm_gem_set_name' first."
  707 + $rvm_scripts_path/log "error" "Gemset '$rvm_gemset_name' does not exist, rvm gems create '$rvm_gemset_name' first."
708 708 return 1
709 709 fi
710 710
711 711 if [[ "$rvm_interactive" = 1 ]] ; then
712   - $rvm_scripts_path/log "info" "gems(et) : ${rvm_gem_set_name:-default}"
  712 + $rvm_scripts_path/log "info" "gemset : ${rvm_gemset_name:-default}"
713 713 fi
714 714
715 715 export GEM_HOME="$rvm_ruby_gem_home"

0 comments on commit f16aad1

Please sign in to comment.
Something went wrong with that request. Please try again.