rvm 0.1.34 → 0.1.35

Sign up to get free protection for your applications and to get access to all the features.
data/install CHANGED
@@ -265,7 +265,7 @@ else
265
265
  if [[ "root" != "$(whoami)" ]] ; then
266
266
  printf "\n$(tput setaf 1)You must now finish the install manually:$(tput sgr0)"
267
267
  printf "\n1) Place the folowing line at the end of your shell's loading files(.bashrc or .bash_profile for bash and .zshrc for zsh), after all path/variable settings:"
268
- printf "\n [[ -s \$HOME/scripts/rvm ]] && source \$HOME/scripts/rvm"
268
+ printf "\n [[ -s \$HOME/.rvm/scripts/rvm ]] && source \$HOME/.rvm/scripts/rvm"
269
269
  printf "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
270
270
  printf "\n This means that if you see '[ -z "$PS1" ] && return' then you must change this line to:"
271
271
  printf "\n if [[ ! -z "$PS1" ]] ; then"
data/lib/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 1
4
- :patch: 34
4
+ :patch: 35
data/rvm.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rvm}
8
- s.version = "0.1.34"
8
+ s.version = "0.1.35"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Wayne E. Seguin"]
data/scripts/cli CHANGED
@@ -52,6 +52,7 @@ __rvm_parse_args() {
52
52
  if [[ "rubinius" = "$rvm_token" ]] ; then rvm_token="rbx"; fi
53
53
  rvm_ruby_interpreter="$rvm_token"
54
54
  rvm_ruby_string="$rvm_token"
55
+ rvm_ruby_strings="$rvm_token"
55
56
  rvm_action="${rvm_action:-use}"
56
57
  if $rvm_scripts_path/match "$1" "^[0-9]\.[0-9]" ; then rvm_ruby_version=$1 ; shift ; fi
57
58
  ;;
@@ -129,7 +130,7 @@ __rvm_parse_args() {
129
130
  rvm_action="error"
130
131
  rvm_error_message="'rvm $rvm_action' must be followed by arguments."
131
132
  elif [[ "ruby" = "$rvm_action" ]] ; then
132
- if [[ -z "$(echo "$rvm_ruby_version" | awk '/,/')" ]] ; then
133
+ if [[ -z "$(echo "$rvm_ruby_strings" | awk '/,/')" ]] ; then
133
134
  rvm_action="ruby"
134
135
  rvm_ruby_args=""
135
136
  else
@@ -151,16 +152,18 @@ __rvm_parse_args() {
151
152
  fi
152
153
  else
153
154
  if $rvm_scripts_path/match "$1" "^-" ; then
154
- unset rvm_ruby_version
155
+ unset rvm_ruby_strings
155
156
  else
156
157
  if $rvm_scripts_path/match "$1" "^[0-9]" ; then
157
- rvm_ruby_version=$(echo "$1" | tr ',' ' ') ; shift
158
+ rvm_ruby_strings=$(echo "$1" | tr ',' ' ') ; shift
158
159
  unset rvm_ruby_interpreter
159
160
  else
160
161
  if $rvm_scripts_path/match "ruby rbx jruby macruby ree rubinius maglev mput shyouhei ironruby" "$1" ; then
161
- rvm_ruby_interpreter=$1 ; shift
162
+ rvm_ruby_strings=$1
163
+ rvm_ruby_interpreter=$1
164
+ shift
162
165
  else
163
- unset rvm_ruby_interpreter rvm_ruby_version
166
+ unset rvm_ruby_interpreter rvm_ruby_strings
164
167
  fi
165
168
  fi
166
169
  fi
@@ -343,24 +346,28 @@ __rvm_parse_args() {
343
346
  rvm_file_name="$rvm_gemset_name.gems"
344
347
  fi
345
348
  elif [[ ! -z "$(echo "$rvm_token" | awk '/,/')" ]] ; then
346
- rvm_ruby_version="$rvm_token"
347
- rvm_ruby_strings="$rvm_token" # Migrating to this from rvm_ruby_version
349
+ rvm_ruby_strings="$rvm_token"
348
350
  if [[ -z "$rvm_action" ]] ; then
349
351
  rvm_action="ruby" # Not sure if we really want to do this but we'll try it out.
350
352
  fi
351
353
  elif $rvm_scripts_path/match "$rvm_token" "^.+${rvm_gemset_separator}.+$" ; then
352
354
  rvm_gemset_name="$(echo "$rvm_token" | awk -F${rvm_gemset_separator} '{print $2}')"
353
355
  rvm_ruby_string="$(echo "$rvm_token" | awk -F${rvm_gemset_separator} '{print $1}')"
356
+ rvm_ruby_strings="$rvm_token"
354
357
  elif $rvm_scripts_path/match "$rvm_token" "-" ; then
355
358
  rvm_ruby_string="$rvm_token"
359
+ rvm_ruby_strings="$rvm_token"
356
360
  elif $rvm_scripts_path/match "$rvm_token" "^[0-9].[0-9]" ; then
357
361
  rvm_ruby_string="$rvm_token"
362
+ rvm_ruby_strings="$rvm_token"
358
363
  rvm_action="${rvm_action:-use}"
359
364
  elif $rvm_scripts_path/match "$rvm_token" "^ree-" ; then
360
365
  rvm_ruby_string="$rvm_token"
366
+ rvm_ruby_strings="$rvm_token"
361
367
  rvm_action="${rvm_action:-use}"
362
368
  elif [[ -L "$rvm_rubies_path/$rvm_token" ]] ; then # Alias
363
369
  rvm_ruby_string=$rvm_token
370
+ rvm_ruby_strings="$rvm_token"
364
371
  rvm_action="${rvm_action:-use}"
365
372
  else
366
373
  if $rvm_scripts_path/match "$rvm_token" "\.rb$" ; then # we have a specified ruby script
@@ -468,7 +475,9 @@ rvm() {
468
475
  ruby|gem|rake)
469
476
  old_rvm_ruby_string=$rvm_ruby_string
470
477
  unset rvm_ruby_string
478
+ export rvm_ruby_strings
471
479
  $rvm_scripts_path/set $rvm_action $rvm_ruby_args
480
+ # Restore the state pre-sets.
472
481
  [[ -n "$old_rvm_ruby_string" ]] && rvm_ruby_string=$old_rvm_ruby_string
473
482
  unset old_rvm_ruby_string
474
483
  result=$?
@@ -500,7 +509,7 @@ rvm() {
500
509
  ;;
501
510
 
502
511
  monitor)
503
- export rvm_ruby_version rvm_ruby_string
512
+ export rvm_ruby_strings rvm_ruby_string
504
513
  $rvm_scripts_path/monitor ; result=$?
505
514
  ;;
506
515
  notes) $rvm_scripts_path/notes ; result=$? ;;
@@ -509,8 +518,8 @@ rvm() {
509
518
  fetch|install|uninstall|remove)
510
519
  if [[ ! -z "$rvm_ruby_string" ]] ; then
511
520
  $rvm_scripts_path/manage "$rvm_action" "$rvm_ruby_string"
512
- elif $rvm_scripts_path/match "$rvm_ruby_version" "," ; then
513
- $rvm_scripts_path/manage "$rvm_action" "$rvm_ruby_version"
521
+ elif $rvm_scripts_path/match "$rvm_ruby_strings" "," ; then
522
+ $rvm_scripts_path/manage "$rvm_action" "$rvm_ruby_strings"
514
523
  else
515
524
  $rvm_scripts_path/manage "$rvm_action"
516
525
  fi
data/scripts/info CHANGED
@@ -131,7 +131,7 @@ fi
131
131
  if [[ -z "$sections" ]] ; then sections="$all_sections" ; fi
132
132
 
133
133
  if [[ -z "$ruby_strings" ]] ; then
134
- printf "$(echo "$GEM_HOME" | xargs basename):\n"
134
+ printf "$(__rvm_environment_identifier):\n"
135
135
  info_sections
136
136
  else
137
137
  for ruby_string in $(printf $ruby_strings | tr ',' ' ') ; do
data/scripts/install CHANGED
@@ -265,7 +265,7 @@ else
265
265
  if [[ "root" != "$(whoami)" ]] ; then
266
266
  printf "\n$(tput setaf 1)You must now finish the install manually:$(tput sgr0)"
267
267
  printf "\n1) Place the folowing line at the end of your shell's loading files(.bashrc or .bash_profile for bash and .zshrc for zsh), after all path/variable settings:"
268
- printf "\n [[ -s \$HOME/scripts/rvm ]] && source \$HOME/scripts/rvm"
268
+ printf "\n [[ -s \$HOME/.rvm/scripts/rvm ]] && source \$HOME/.rvm/scripts/rvm"
269
269
  printf "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
270
270
  printf "\n This means that if you see '[ -z "$PS1" ] && return' then you must change this line to:"
271
271
  printf "\n if [[ ! -z "$PS1" ]] ; then"
data/scripts/monitor CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  if [[ -z "$rvm_trace_flag" ]] ; then set +x ; else set -x ; fi
4
4
 
5
- original_ruby_version=$rvm_ruby_version
5
+ original_ruby_strings=$rvm_ruby_strings
6
6
  original_ruby_string=$rvm_ruby_string
7
7
 
8
8
  source $rvm_scripts_path/rvm
@@ -57,7 +57,7 @@ while : ; do
57
57
  done
58
58
 
59
59
  if [[ "$(array_length "changed_${framework}_files")" -gt 0 ]] ; then
60
- rvm_ruby_version=$original_ruby_version
60
+ rvm_ruby_strings=$original_ruby_strings
61
61
  rvm_ruby_string=$original_ruby_string
62
62
  if [[ "spec" = "$framework" ]] ; then
63
63
  rvm_action="spec"
@@ -72,7 +72,7 @@ while : ; do
72
72
  fi
73
73
 
74
74
  if [[ "$(array_length "changed_code_files")" -gt 0 ]] ; then
75
- rvm_ruby_version=$original_ruby_version
75
+ rvm_ruby_strings=$original_ruby_strings
76
76
  rvm_ruby_string=$original_ruby_string
77
77
  if [[ "spec" = "$framework" ]] ; then
78
78
  rvm_action="spec"
data/scripts/rvm-install CHANGED
@@ -265,7 +265,7 @@ else
265
265
  if [[ "root" != "$(whoami)" ]] ; then
266
266
  printf "\n$(tput setaf 1)You must now finish the install manually:$(tput sgr0)"
267
267
  printf "\n1) Place the folowing line at the end of your shell's loading files(.bashrc or .bash_profile for bash and .zshrc for zsh), after all path/variable settings:"
268
- printf "\n [[ -s \$HOME/scripts/rvm ]] && source \$HOME/scripts/rvm"
268
+ printf "\n [[ -s \$HOME/.rvm/scripts/rvm ]] && source \$HOME/.rvm/scripts/rvm"
269
269
  printf "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
270
270
  printf "\n This means that if you see '[ -z "$PS1" ] && return' then you must change this line to:"
271
271
  printf "\n if [[ ! -z "$PS1" ]] ; then"
data/scripts/selector CHANGED
@@ -255,6 +255,7 @@ __rvm_use() {
255
255
 
256
256
  if [[ ! -z "$rvm_verbose_flag" ]] ; then
257
257
  $rvm_scripts_path/log "info" "Now using system ruby."
258
+ printf "\n"
258
259
  fi
259
260
 
260
261
  export rvm_ruby_string="system"
@@ -286,6 +287,7 @@ __rvm_use() {
286
287
 
287
288
  if [[ ! -z "$rvm_verbose_flag" ]] ; then
288
289
  $rvm_scripts_path/log "info" "Using $(basename $GEM_HOME | tr '-' ' ' | sed 's/'${rvm_gemset_separator}'/ with gemset /')"
290
+ printf "\n"
289
291
  fi
290
292
 
291
293
  new_path="$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)"
data/scripts/set CHANGED
@@ -148,25 +148,11 @@ __rvm_json() {
148
148
  # Record the results and report based on CLI selections.
149
149
 
150
150
  rubies=() ; successes=() ; errors=() ; statuses=()
151
- # TODO: Extract the common functionality out of the if below
152
- if [[ ! -z "$rvm_ruby_string" ]] ; then
153
- unset rvm_ruby_interpreter rvm_ruby_version
151
+
152
+ rvm_ruby_strings="${rvm_ruby_strings:-"$($rvm_scripts_path/list strings)"}"
153
+ for rvm_ruby_string in $(echo "$rvm_ruby_strings" | tr ',' ' ') ; do
154
154
  __rvm_ruby_do
155
- elif [[ ! -z "$rvm_ruby_version" ]] ;then
156
- for rvm_ruby_string in $(echo $rvm_ruby_version | tr ',' ' ') ; do
157
- __rvm_ruby_do
158
- done
159
- elif [[ ! -z "$rvm_ruby_interpreter" ]] ; then
160
- unset rvm_ruby_string rvm_ruby_version
161
- __rvm_ruby_do
162
- else # all
163
- for full_binary in $rvm_rubies_path/*/bin/ruby ; do
164
- if [[ -x "$full_binary" ]] ; then
165
- rvm_ruby_string="$(dirname $full_binary | xargs dirname | xargs basename)"
166
- __rvm_ruby_do
167
- fi
168
- done ; unset full_binary
169
- fi
155
+ done
170
156
 
171
157
  if [[ ! -z "$rvm_summary_flag" ]] ; then __rvm_summary ; fi
172
158
  if [[ ! -z "$rvm_yaml_flag" ]] ; then __rvm_yaml ; fi
data/scripts/update CHANGED
@@ -265,7 +265,7 @@ else
265
265
  if [[ "root" != "$(whoami)" ]] ; then
266
266
  printf "\n$(tput setaf 1)You must now finish the install manually:$(tput sgr0)"
267
267
  printf "\n1) Place the folowing line at the end of your shell's loading files(.bashrc or .bash_profile for bash and .zshrc for zsh), after all path/variable settings:"
268
- printf "\n [[ -s \$HOME/scripts/rvm ]] && source \$HOME/scripts/rvm"
268
+ printf "\n [[ -s \$HOME/.rvm/scripts/rvm ]] && source \$HOME/.rvm/scripts/rvm"
269
269
  printf "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
270
270
  printf "\n This means that if you see '[ -z "$PS1" ] && return' then you must change this line to:"
271
271
  printf "\n if [[ ! -z "$PS1" ]] ; then"
data/scripts/utility CHANGED
@@ -21,6 +21,10 @@ __rvm_teardown() {
21
21
  else
22
22
  :
23
23
  fi
24
+ # Ruby strings are scoped to their action.
25
+ # Hence, we ensure we remove them at in
26
+ # the cleanup phase.
27
+ unset rvm_ruby_strings
24
28
  }
25
29
 
26
30
  # Query the rvm key-value database for a specific key
@@ -116,7 +120,7 @@ __rvm_cleanup_variables() {
116
120
 
117
121
  # Unset ruby-specific variables
118
122
  __rvm_unset_ruby_variables() {
119
- unset rvm_ruby_interpreter rvm_ruby_version rvm_url rvm_ruby_repo_url rvm_ruby_package_name rvm_ruby_patch_level rvm_ruby_make rvm_ruby_make_install rvm_ruby_revision rvm_ruby_tag rvm_release_version rvm_major_version rvm_minor_version rvm_ruby_gem_home rvm_ruby_binary rvm_ruby_home rvm_ruby_log_path rvm_ruby_src_path rvm_ruby_irbrc rvm_ruby_selected_flag rvm_ruby_src_path rvm_ruby_repo_url rvm_major_version rvm_minor_version rvm_ruby_gem_home rvm_head_flag rvm_ruby_configure rvm_ruby_mode rvm_ruby_package_file rvm_ruby_package_name rvm_ruby_gem_path rvm_ruby_name rvm_ruby_alias
123
+ unset rvm_ruby_interpreter rvm_ruby_version rvm_url rvm_ruby_repo_url rvm_ruby_package_name rvm_ruby_patch_level rvm_ruby_make rvm_ruby_make_install rvm_ruby_revision rvm_ruby_tag rvm_release_version rvm_major_version rvm_minor_version rvm_ruby_gem_home rvm_ruby_binary rvm_ruby_home rvm_ruby_log_path rvm_ruby_src_path rvm_ruby_irbrc rvm_ruby_selected_flag rvm_ruby_src_path rvm_ruby_repo_url rvm_major_version rvm_minor_version rvm_ruby_gem_home rvm_head_flag rvm_ruby_configure rvm_ruby_mode rvm_ruby_package_file rvm_ruby_package_name rvm_ruby_gem_path rvm_ruby_name rvm_ruby_alias rvm_ruby_strings
120
124
  }
121
125
 
122
126
  __rvm_set_rvmrc() {
@@ -545,12 +549,7 @@ __rvm_mono_env() {
545
549
  }
546
550
 
547
551
  __rvm_environment_identifier() {
548
- rvm_environment_identifier="${rvm_ruby_string}"
549
- if [[ -n "${rvm_gemset_name}" ]]; then
550
- rvm_environment_identifier="${rvm_environment_identifier}${rvm_gemset_separator}${rvm_gemset_name}"
551
- fi
552
- echo "$rvm_environment_identifier"
553
- unset rvm_environment_identifier
552
+ echo "$GEM_HOME" | xargs basename
554
553
  }
555
554
 
556
555
  __rvm_ensure_has_enviroment_files() {
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rvm
3
3
  version: !ruby/object:Gem::Version
4
- hash: 95
4
+ hash: 93
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 34
10
- version: 0.1.34
9
+ - 35
10
+ version: 0.1.35
11
11
  platform: ruby
12
12
  authors:
13
13
  - Wayne E. Seguin