rvm 0.1.35 → 0.1.36

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -15,6 +15,7 @@ Flags
15
15
  --jit - Used with rubinius install to build with JIT
16
16
  --latest - with gemset --dump skips version strings for latest gem.
17
17
  --gems - with uninstall/remove removes gems with the interpreter.
18
+ --docs - with install, attempt to generate ri after installation.
18
19
  --reconfigure - Force ./configure on install even if Makefile already exists.
19
20
 
20
21
 
data/config/db CHANGED
@@ -1,7 +1,7 @@
1
1
  niceness=0
2
2
  interpreter=ruby
3
3
  ruby_version=1.8.7
4
- ruby_patchlevel=249
4
+ ruby_patchlevel=174
5
5
  ruby_configure=--enable-shared
6
6
  ruby_repo_url=http://svn.ruby-lang.org/repos/ruby
7
7
  ruby_1.0_url=ftp://ftp.ruby-lang.org/pub/ruby/1.0
@@ -15,10 +15,10 @@ ruby_1.8_url=ftp://ftp.ruby-lang.org/pub/ruby/1.8
15
15
  ruby_1.9_url=ftp://ftp.ruby-lang.org/pub/ruby/1.9
16
16
  ruby_2.0_url=ftp://ftp.ruby-lang.org/pub/ruby/2.0
17
17
  ruby_1.9.1_patch_level=378
18
- ruby_1.9.2_patch_level=preview1
18
+ ruby_1.9.2_patch_level=preview3
19
19
  ruby_1.8.5_patch_level=231
20
20
  ruby_1.8.6_patch_level=399
21
- ruby_1.8.7_patch_level=249
21
+ ruby_1.8.7_patch_level=174
22
22
  rubygems_version=1.3.7
23
23
  rubygems_1.3.5_url=http://rubyforge.org/frs/download.php/60718
24
24
  rubygems_1.3.6_url=http://rubyforge.org/frs/download.php/69365
@@ -1,11 +1,11 @@
1
1
  (ruby-)1.8.6(-p399)
2
2
  (ruby-)1.8.6-head
3
- (ruby-)1.8.7(-p249)
3
+ (ruby-)1.8.7(-p174)
4
4
  (ruby-)1.8.7-head
5
5
  (ruby-)1.9.1(-p243)
6
6
  (ruby-)1.9.1(-p376)
7
7
  (ruby-)1.9.1-head
8
- (ruby-)1.9.2-preview1
8
+ (ruby-)1.9.2-preview3
9
9
  (ruby-)1.9.2-head
10
10
  ruby-head
11
11
 
data/config/md5 CHANGED
@@ -20,6 +20,7 @@ ruby-1.9.1-p376.tar.gz=ebb20550a11e7f1a2fbd6fdec2a3e0a3
20
20
  ruby-1.9.1-p376.tar.gz=ebb20550a11e7f1a2fbd6fdec2a3e0a3
21
21
  ruby-1.9.1-p378.tar.gz=9fc5941bda150ac0a33b299e1e53654c
22
22
  ruby-1.9.2-preview1.tar.gz=e2b8cdbf300f53472be09699a5837fd1
23
+ ruby-1.9.2-preview3.tar.gz=209e59f3495a5503fa948c2732f1d705
23
24
  ruby-enterprise-1.8.6-20090610.tar.gz=0bf66ee626918464a6eccdd83c99d63a
24
25
  ruby-enterprise-1.8.7-2009.10.tar.gz=3727eef7b6b1b2f31db7d091328d966e
25
26
  ruby-enterprise-1.8.7-20090928.tar.gz=ae00018ce89d95419dfde370fcd485ac
data/help/ruby CHANGED
@@ -13,7 +13,7 @@ Given:
13
13
  ruby-1.8.7-p174 [x86_64]
14
14
  ruby-1.9.1-head [x86_64]
15
15
  => ruby-1.9.1-p243 [x86_64]
16
- ruby-1.9.2-preview1 [x86_64]
16
+ ruby-1.9.2-preview3 [x86_64]
17
17
 
18
18
  jruby:
19
19
 
@@ -70,9 +70,9 @@ We can run the ruby program 'test.rb' against all versions of ruby installed by
70
70
  patchlevel: 243, release_date: 2009-07-16, ruby_version: 1.9.1, ruby_platform: i386-darwin10.0.0
71
71
 
72
72
 
73
- ruby-1.9.2-preview1: ruby 1.9.2dev (2009-07-18 trunk 24186) [i386-darwin10.0.0]
73
+ ruby-1.9.2-preview3: ruby 1.9.2dev (2010-05-31 revision 28117) [x86_64-darwin10.3.0]
74
74
 
75
- patchlevel: -1, release_date: 2009-07-18, ruby_version: 1.9.2, ruby_platform: i386-darwin10.0.0
75
+ patchlevel: -1, release_date: 2010-05-31, ruby_version: 1.9.2, ruby_platform: x86_64-darwin10.3.0
76
76
 
77
77
  ree-1.8.7-20090928: ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.0.0], MBARI 0x6770, Ruby Enterprise Edition 20090928
78
78
 
data/install CHANGED
@@ -38,7 +38,7 @@ while [[ $# -gt 0 ]] ; do
38
38
  token="$1" ; shift
39
39
  case "$token" in
40
40
  --auto) rvm_auto_flag=1 ;;
41
- --prefix) prefix_path="$1" ; shift ;;
41
+ --prefix) rvm_prefix="$1" ; shift ;;
42
42
  --version) rvm_path="$(pwd)" ; __rvm_version ; unset rvm_path ; exit ;;
43
43
  --help|*) usage ;;
44
44
  esac
@@ -258,7 +258,8 @@ if [[ "$upgrade_flag" -eq 1 ]] ; then
258
258
  printf "\n$(tput setaf 6)Upgrade Notes\n"
259
259
  printf "\n * Gemset separator is '@' and will remain unless any rubies error using it."
260
260
  printf "\n * If you encounter any issues with a ruby your best bet is to 'rvm remove X ; rvm install X' "
261
- printf "\n * Do not forget that 'rvm notes' tells you OS dependency packages for installing rubies."
261
+ printf "\n * 'rvm notes' tells you OS dependency packages for installing rubies."
262
+ printf "\n * 1.8.7 default patchlevel is p174, override ~/.rvm/config/db in ~/.rvm/config/user"
262
263
  printf "\n$(tput sgr0)\n"
263
264
  printf "\nUpgrade of RVM in $rvm_path/ is complete.\n\n"
264
265
  else
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 1
4
- :patch: 35
4
+ :patch: 36
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rvm}
8
- s.version = "0.1.35"
8
+ s.version = "0.1.36"
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"]
12
- s.date = %q{2010-05-29}
12
+ s.date = %q{2010-05-31}
13
13
  s.default_executable = %q{rvm-install}
14
14
  s.description = %q{Manages Ruby interpreter environments and switching between them.}
15
15
  s.email = %q{wayneeseguin@gmail.com}
@@ -326,7 +326,7 @@ __rvm_parse_args() {
326
326
 
327
327
  reboot|damnit|wtf|argh|BOOM|boom|wth) $rvm_action="reboot" ;;
328
328
 
329
- --self|--gem|--rubygems|--reconfigure|--default|--debug|--force|--export|--summary|--latest|--yaml|--json|--archive|--shebang|--env|--path|--tail|--delete|--verbose|--import|--rvmrc|--sticky|--create|--rvmrc|--gems)
329
+ --self|--gem|--rubygems|--reconfigure|--default|--debug|--force|--export|--summary|--latest|--yaml|--json|--archive|--shebang|--env|--path|--tail|--delete|--verbose|--import|--rvmrc|--sticky|--create|--rvmrc|--gems|--docs)
330
330
  export rvm_$(echo $rvm_token | sed 's#-##g')_flag=1
331
331
  if [[ "--debug" = "$rvm_token" ]] ; then rvm_debug_flag ; fi
332
332
  ;;
@@ -449,7 +449,7 @@ rvm() {
449
449
  fi
450
450
  result=$?
451
451
  ;;
452
- docs) $rvm_scripts_path/docs ; result=$? ;;
452
+ docs) $rvm_scripts_path/docs $rvm_ruby_args ; result=$? ;;
453
453
  alias) $rvm_scripts_path/alias $rvm_ruby_args ; result=$? ;;
454
454
  help) $rvm_scripts_path/help $rvm_ruby_args ; result=$? ;;
455
455
 
@@ -547,7 +547,11 @@ rvm() {
547
547
  result=1
548
548
  esac
549
549
 
550
- if [[ ! -z "$rvm_reload_flag" ]] ; then source "$rvm_scripts_path/rvm" ; fi
550
+ if [[ ! -z "$rvm_reload_flag" ]] ; then
551
+ source "$rvm_scripts_path/rvm"
552
+ # Note: Not using builtin on purpose. Done so we can trigger a reload the rvmrc.
553
+ cd .
554
+ fi
551
555
 
552
556
  if [[ ! -z "$rvm_trace_flag" ]] ; then set +x ; unset rvm_trace_flag ; fi
553
557
 
@@ -5,24 +5,32 @@ if [[ ! -z "$rvm_trace_flag" ]] ; then set -x ; export rvm_trace_flag ; fi
5
5
  trap "if [[ -d $rvm_tmp_path/ ]] && [[ -f $rvm_tmp_path/$$ ]] ; then rm -f $rvm_tmp_path/$$ > /dev/null 2>&1 ; fi ; exit" 0 1 2 3 15
6
6
 
7
7
  source $rvm_scripts_path/initialize
8
+ source $rvm_scripts_path/utility
8
9
 
9
- rvm_ruby_string="$(basename $GEM_HOME 2>/dev/null | awk -F'@' '{print $1}')"
10
- if [[ -z "$rvm_ruby_string" ]] && echo $GEM_HOME | grep -v 'rvm/' > /dev/null 2>&1 ; then
10
+ rvm_docs_ruby_string="$(__rvm_environment_identifier | awk -F"$rvm_gemset_separator" '{print $1}')"
11
+ if [[ "$rvm_docs_ruby_string" = "system" || -z "$rvm_docs_ruby_string" ]]; then
11
12
  $rvm_scripts_path/log "error" "Currently 'rvm docs ...' does not work with non-rvm rubies."
12
13
  exit 1
13
14
  fi
14
15
 
15
16
  rvm_docs_type="${rvm_docs_type:-rdoc}"
16
- action="$(echo $rvm_ruby_args | awk '{print $1}')"
17
17
 
18
- if [[ ! -d "$rvm_docs_path" ]] ; then mkdir -p "$rvm_docs_path/rdoc" "$rvm_docs_path/yard" ; fi
18
+ # Ensure we have the doc directories.
19
+ if [[ ! -d "$rvm_docs_path" ]] ; then
20
+ mkdir -p "$rvm_docs_path/rdoc" "$rvm_docs_path/yard"
21
+ fi
22
+
23
+ usage() {
24
+ printf "Usage: 'rvm docs {open,generate,generate-ri,generate-rdoc}'\n"
25
+ exit 1
26
+ }
19
27
 
20
28
  open_docs() {
21
- if [[ -s "$rvm_docs_path/$rvm_ruby_string/$rvm_docs_type/index.html" ]] ; then
29
+ if [[ -s "$rvm_docs_path/$rvm_docs_ruby_string/$rvm_docs_type/index.html" ]] ; then
22
30
  if command -v open >/dev/null ; then
23
- open $rvm_docs_path/$rvm_ruby_string/$rvm_docs_type/index.html
31
+ open $rvm_docs_path/$rvm_docs_ruby_string/$rvm_docs_type/index.html
24
32
  elif command -v xdg-open >/dev/null ; then
25
- xdg-open $rvm_docs_path/$rvm_ruby_string/$rvm_docs_type/index.html
33
+ xdg-open $rvm_docs_path/$rvm_docs_ruby_string/$rvm_docs_type/index.html
26
34
  else
27
35
  $rvm_scripts_path/log "error" "Neither open nor xdg-open were found, in order to open the docs one of these two are required. \n(OR you can let me know how else to open the html in your browser from comand line on your OS :) )"
28
36
  fi
@@ -31,26 +39,34 @@ open_docs() {
31
39
  fi
32
40
  }
33
41
 
34
- generate_docs() {
35
- builtin cd "$rvm_src_path/$rvm_ruby_string/"
36
- rm -rf $rvm_docs_path/$rvm_ruby_string/$rvm_docs_type/
37
- $rvm_scripts_path/log "info" "Generating documentation, be aware that this could take a *long* time, and depends heavily on your system resources..."
38
- $rvm_scripts_path/log "info" "( Errors will be logged to $rvm_log_path/$rvm_ruby_string/docs.error.log )"
39
- if gem list | grep ^hanna >/dev/null 2>&1 ; then
40
- hanna -o $rvm_docs_path/$rvm_ruby_string/$rvm_docs_type --inline-source --line-numbers --fmt=html 2>> $rvm_log_path/$rvm_ruby_string/docs.error.log
42
+ generate_ri() {
43
+ # Generate ri docs
44
+ __rvm_pushpop "$rvm_src_path/$rvm_docs_ruby_string/"
45
+ $rvm_scripts_path/log "info" "Generating ri documentation, be aware that this could take a *long* time, and depends heavily on your system resources..."
46
+ $rvm_scripts_path/log "info" "( Errors will be logged to $rvm_log_path/$rvm_docs_ruby_string/docs.error.log )"
47
+ rdoc -a --ri --ri-site > /dev/null 2>> $rvm_log_path/$rvm_docs_ruby_string/docs.error.log
48
+ __rvm_pushpop
49
+ }
50
+
51
+ generate_rdoc() {
52
+ __rvm_pushpop "$rvm_src_path/$rvm_docs_ruby_string/"
53
+ rm -rf "$rvm_docs_path/$rvm_docs_ruby_string/$rvm_docs_type/"
54
+ $rvm_scripts_path/log "info" "Generating rdoc documentation, be aware that this could take a *long* time, and depends heavily on your system resources..."
55
+ $rvm_scripts_path/log "info" "( Errors will be logged to $rvm_log_path/$rvm_docs_ruby_string/docs.error.log )"
56
+ if gem list | grep -q ^hanna ; then
57
+ hanna -o $rvm_docs_path/$rvm_docs_ruby_string/$rvm_docs_type --inline-source --line-numbers --fmt=html > /dev/null 2>> $rvm_log_path/$rvm_docs_ruby_string/docs.error.log
41
58
  else
42
- rdoc -a -o $rvm_docs_path/$rvm_ruby_string/$rvm_docs_type 2>> $rvm_log_path/$rvm_ruby_string/docs.error.log
59
+ rdoc -a -o $rvm_docs_path/$rvm_docs_ruby_string/$rvm_docs_type > /dev/null 2>> $rvm_log_path/$rvm_docs_ruby_string/docs.error.log
43
60
  fi
44
- rdoc -a --ri-site 2>> $rvm_log_path/$rvm_ruby_string/docs.error.log
61
+ __rvm_pushpop
45
62
  }
46
63
 
47
- if [[ "open" = "$action" ]] ; then
48
- open_docs
49
- elif [[ "generate" = "$action" ]] ; then
50
- generate_docs
51
- else
52
- $rvm_scripts_path/log "error" ""
53
- exit 1
54
- fi
64
+ case "$1" in
65
+ open) open_docs ;;
66
+ generate) generate_ri; generate_rdoc ;;
67
+ generate-ri) generate_ri ;;
68
+ generate-rdoc) generate_rdoc ;;
69
+ *) usage ;;
70
+ esac
55
71
 
56
72
  exit $result
@@ -38,7 +38,7 @@ while [[ $# -gt 0 ]] ; do
38
38
  token="$1" ; shift
39
39
  case "$token" in
40
40
  --auto) rvm_auto_flag=1 ;;
41
- --prefix) prefix_path="$1" ; shift ;;
41
+ --prefix) rvm_prefix="$1" ; shift ;;
42
42
  --version) rvm_path="$(pwd)" ; __rvm_version ; unset rvm_path ; exit ;;
43
43
  --help|*) usage ;;
44
44
  esac
@@ -258,7 +258,8 @@ if [[ "$upgrade_flag" -eq 1 ]] ; then
258
258
  printf "\n$(tput setaf 6)Upgrade Notes\n"
259
259
  printf "\n * Gemset separator is '@' and will remain unless any rubies error using it."
260
260
  printf "\n * If you encounter any issues with a ruby your best bet is to 'rvm remove X ; rvm install X' "
261
- printf "\n * Do not forget that 'rvm notes' tells you OS dependency packages for installing rubies."
261
+ printf "\n * 'rvm notes' tells you OS dependency packages for installing rubies."
262
+ printf "\n * 1.8.7 default patchlevel is p174, override ~/.rvm/config/db in ~/.rvm/config/user"
262
263
  printf "\n$(tput sgr0)\n"
263
264
  printf "\nUpgrade of RVM in $rvm_path/ is complete.\n\n"
264
265
  else
@@ -8,20 +8,20 @@ message=$1
8
8
 
9
9
  if [[ -z "$rvm_interactive" ]] || [[ -z "$TERM" ]] || [[ "unknown" = "$TERM" ]] ; then
10
10
  case "$level" in
11
- debug) shift ; printf "\n$level: $message" ;;
12
- info) shift ; printf "\n$level: $message" ;;
13
- warn) shift ; printf "\n$level: $message" ;;
14
- error) shift ; printf "\n$level: $message" >&2 ;;
15
- fail) shift ; printf "\n$level: $message" >&2 ;;
11
+ debug) shift ; printf "\n$level: $message\n" ;;
12
+ info) shift ; printf "\n$level: $message\n" ;;
13
+ warn) shift ; printf "\n$level: $message\n" ;;
14
+ error) shift ; printf "\n$level: $message\n" >&2 ;;
15
+ fail) shift ; printf "\n$level: $message\n" >&2 ;;
16
16
  *) printf "$message"
17
17
  esac
18
18
  else
19
19
  case "$level" in
20
- debug) shift ; printf "\n$(tput setaf 5)$message$(tput sgr0)" ;;
21
- info) shift ; printf "\n$(tput setaf 2)$message$(tput sgr0)" ;;
22
- warn) shift ; printf "\n$(tput setaf 3)$message$(tput sgr0)" ;;
23
- error) shift ; printf "\n$(tput setaf 1)$message$(tput sgr0)" >&2 ;;
24
- fail) shift ; printf "\n$(tput setaf 1)$message$(tput sgr0)" >&2 ;;
20
+ debug) shift ; printf "\n$(tput setaf 5)$level$(tput sgr0): $message\n" ;;
21
+ info) shift ; printf "\n$(tput setaf 2)$level$(tput sgr0): $message\n" ;;
22
+ warn) shift ; printf "\n$(tput setaf 3)$level$(tput sgr0): $message\n" ;;
23
+ error) shift ; printf "\n$(tput setaf 1)$level$(tput sgr0): $message\n" >&2 ;;
24
+ fail) shift ; printf "\n$(tput setaf 1)$level$(tput sgr0): $message\n" >&2 ;;
25
25
  *) printf "$message"
26
26
  esac
27
27
  fi
@@ -11,6 +11,16 @@ trap "rm -rf ${rvm_tmp_path}/$$* > /dev/null 2>&1 ; exit" 0 1 2 3 15
11
11
 
12
12
  if [[ ! -z "$rvm_trace_flag" ]] ; then set -x ; export rvm_trace_flag ; fi
13
13
 
14
+ # Checks for bison, returns zero iff it is found
15
+ __rvm_check_for_bison() {
16
+ if [[ "$rvm_head_flag" -gt 0 ]]; then
17
+ if ! command -v bison >/dev/null ; then
18
+ $rvm_scripts_path/log "fail" "bison is not available in your path. Please ensure it exists before compiling from head."
19
+ return 1
20
+ fi
21
+ fi
22
+ }
23
+
14
24
  __rvm_install_source() {
15
25
  if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi
16
26
 
@@ -670,6 +680,9 @@ RubyWrapper
670
680
  ;;
671
681
 
672
682
  ruby)
683
+ __rvm_check_for_bison
684
+ result=$? ; if [[ "$result" -gt 0 ]] ; then return $result ; fi
685
+
673
686
  if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
674
687
  __rvm_install_source $*
675
688
  ;;
@@ -898,6 +911,15 @@ __rvm_post_install() {
898
911
 
899
912
  __rvm_irbrc
900
913
  __rvm_load_gemsets
914
+
915
+ __rvm_generate_default_docs
916
+ }
917
+
918
+ __rvm_generate_default_docs() {
919
+ if [[ "$rvm_docs_flag" = "1" && "$rvm_ruby_interpreter" != "macruby" ]]; then
920
+ $rvm_scripts_path/log "info" "Attempting to generate ri docs..."
921
+ (source $rvm_scripts_path/rvm; rvm use "$rvm_ruby_string"; rvm docs generate-ri) > ~/rvm-install-docs 2>&1
922
+ fi
901
923
  }
902
924
 
903
925
  __rvm_load_gemsets() {
@@ -1063,21 +1085,11 @@ __rvm_manage_rubies() {
1063
1085
  rvm_ruby_gem_home=$(echo $rvm_ruby_gem_home | awk -F${rvm_gemset_separator} '{print $1}')
1064
1086
  rvm_ruby_string=$(echo $rvm_ruby_string | awk -F${rvm_gemset_separator} '{print $1}')
1065
1087
 
1066
- # TODO: Extract the common functionality out of the if below
1067
- #if [[ ! -z "$rvm_ruby_string" ]] ; then
1068
- # unset rvm_ruby_interpreter rvm_ruby_version
1069
- # eval "__rvm_${rvm_action}_ruby"
1070
- # __rvm_unset_ruby_variables
1071
- #elif [[ ! -z "$rvm_ruby_version" ]] ;then
1072
1088
  if [[ ! -z "$rubies_string" ]] ;then
1073
1089
  for rvm_ruby_string in $(echo $rubies_string | tr ',' ' ') ; do
1074
1090
  eval "__rvm_${rvm_action}_ruby"
1075
1091
  __rvm_unset_ruby_variables
1076
1092
  done
1077
- #elif [[ ! -z "$rvm_ruby_interpreter" ]] ; then
1078
- # unset rvm_ruby_string rvm_ruby_version
1079
- # eval "__rvm_${rvm_action}_ruby"
1080
- # __rvm_unset_ruby_variables
1081
1093
  else # all
1082
1094
  if [[ "$rvm_action" != "install" ]] ; then
1083
1095
  while read -r bin_line
@@ -38,7 +38,7 @@ while [[ $# -gt 0 ]] ; do
38
38
  token="$1" ; shift
39
39
  case "$token" in
40
40
  --auto) rvm_auto_flag=1 ;;
41
- --prefix) prefix_path="$1" ; shift ;;
41
+ --prefix) rvm_prefix="$1" ; shift ;;
42
42
  --version) rvm_path="$(pwd)" ; __rvm_version ; unset rvm_path ; exit ;;
43
43
  --help|*) usage ;;
44
44
  esac
@@ -258,7 +258,8 @@ if [[ "$upgrade_flag" -eq 1 ]] ; then
258
258
  printf "\n$(tput setaf 6)Upgrade Notes\n"
259
259
  printf "\n * Gemset separator is '@' and will remain unless any rubies error using it."
260
260
  printf "\n * If you encounter any issues with a ruby your best bet is to 'rvm remove X ; rvm install X' "
261
- printf "\n * Do not forget that 'rvm notes' tells you OS dependency packages for installing rubies."
261
+ printf "\n * 'rvm notes' tells you OS dependency packages for installing rubies."
262
+ printf "\n * 1.8.7 default patchlevel is p174, override ~/.rvm/config/db in ~/.rvm/config/user"
262
263
  printf "\n$(tput sgr0)\n"
263
264
  printf "\nUpgrade of RVM in $rvm_path/ is complete.\n\n"
264
265
  else
@@ -255,7 +255,6 @@ __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"
259
258
  fi
260
259
 
261
260
  export rvm_ruby_string="system"
@@ -287,7 +286,6 @@ __rvm_use() {
287
286
 
288
287
  if [[ ! -z "$rvm_verbose_flag" ]] ; then
289
288
  $rvm_scripts_path/log "info" "Using $(basename $GEM_HOME | tr '-' ' ' | sed 's/'${rvm_gemset_separator}'/ with gemset /')"
290
- printf "\n"
291
289
  fi
292
290
 
293
291
  new_path="$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)"
@@ -50,9 +50,6 @@ __rvm_ruby_do() {
50
50
  fi
51
51
  fi
52
52
  rvm_command="$binary $rvm_ruby_mode $rvm_ruby_require -I$load_path $args"
53
- elif [[ "gem" = "$(basename $binary)" ]] && $rvm_scripts_path/match "$args" '^install' ; then
54
- #$rvm_scripts_path/gem install $args
55
- rvm_command="$rvm_scripts_path/gemsets $rvm_ruby_mode $args $rvm_gem_options"
56
53
  else
57
54
  rvm_command="$binary $rvm_ruby_mode $args"
58
55
  fi
@@ -38,7 +38,7 @@ while [[ $# -gt 0 ]] ; do
38
38
  token="$1" ; shift
39
39
  case "$token" in
40
40
  --auto) rvm_auto_flag=1 ;;
41
- --prefix) prefix_path="$1" ; shift ;;
41
+ --prefix) rvm_prefix="$1" ; shift ;;
42
42
  --version) rvm_path="$(pwd)" ; __rvm_version ; unset rvm_path ; exit ;;
43
43
  --help|*) usage ;;
44
44
  esac
@@ -258,7 +258,8 @@ if [[ "$upgrade_flag" -eq 1 ]] ; then
258
258
  printf "\n$(tput setaf 6)Upgrade Notes\n"
259
259
  printf "\n * Gemset separator is '@' and will remain unless any rubies error using it."
260
260
  printf "\n * If you encounter any issues with a ruby your best bet is to 'rvm remove X ; rvm install X' "
261
- printf "\n * Do not forget that 'rvm notes' tells you OS dependency packages for installing rubies."
261
+ printf "\n * 'rvm notes' tells you OS dependency packages for installing rubies."
262
+ printf "\n * 1.8.7 default patchlevel is p174, override ~/.rvm/config/db in ~/.rvm/config/user"
262
263
  printf "\n$(tput sgr0)\n"
263
264
  printf "\nUpgrade of RVM in $rvm_path/ is complete.\n\n"
264
265
  else
@@ -115,7 +115,7 @@ __rvm_cleanup_variables() {
115
115
 
116
116
  if [[ "$rvm_sticky_flag" = "1" ]] ; then export rvm_gemset_name ; else unset rvm_gemset_name ; fi
117
117
 
118
- 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_flagrvm_rvmrc_flag rvm_gems_flag rvm_only_path_flag
118
+ 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_flagrvm_rvmrc_flag rvm_gems_flag rvm_only_path_flag rvm_docs_flag
119
119
  }
120
120
 
121
121
  # Unset ruby-specific variables
@@ -356,10 +356,12 @@ __rvm_pushpop() {
356
356
  # Meant for use before and after an operation that might reset the currently selected ruby.
357
357
  __rvm_state() {
358
358
  if [[ -z "$rvm_state" ]] ; then
359
- if [[ -z "$(command -v ruby | awk /$(basename $rvm_rubies_path)/)" ]] ; then
360
- rvm_state=system
361
- else
362
- rvm_state="$(dirname "$(command -v ruby)" | xargs dirname | xargs basename)"
359
+ rvm_state="$(__rvm_environment_identifier)"
360
+ rvm_state="${rvm_state:-"system"}"
361
+ if [[ -n "$1" ]]; then
362
+ rvm_ruby_string="$1"
363
+ __rvm_select
364
+ __rvm_use
363
365
  fi
364
366
  else
365
367
  rvm_ruby_string="$rvm_state"
@@ -549,7 +551,13 @@ __rvm_mono_env() {
549
551
  }
550
552
 
551
553
  __rvm_environment_identifier() {
552
- echo "$GEM_HOME" | xargs basename
554
+ ruby_string="$(command -v ruby)"
555
+ if [ -n "$ruby_string" ] && echo "$ruby_string" | grep -q -F "$rvm_rubies_path"; then
556
+ echo "$GEM_HOME" | xargs basename
557
+ else
558
+ echo "system"
559
+ fi
560
+ unset ruby_string
553
561
  }
554
562
 
555
563
  __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: 93
4
+ hash: 83
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 35
10
- version: 0.1.35
9
+ - 36
10
+ version: 0.1.36
11
11
  platform: ruby
12
12
  authors:
13
13
  - Wayne E. Seguin
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-05-29 00:00:00 -04:00
18
+ date: 2010-05-31 00:00:00 -04:00
19
19
  default_executable: rvm-install
20
20
  dependencies: []
21
21