rvm 0.1.13 → 0.1.14

Sign up to get free protection for your applications and to get access to all the features.
data/binscripts/rvmsudo CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  prefix="PATH='$PATH'"
4
+ if [[ ! -z "$BUNDLE_PATH" ]] ; then prefix="BUNDLE_PATH='$BUNDLE_PATH' $prefix" ; fi
4
5
  if [[ ! -z "$GEM_HOME" ]] ; then prefix="GEM_HOME='$GEM_HOME' $prefix" ; fi
5
6
  if [[ ! -z "$GEM_PATH" ]] ; then prefix="GEM_PATH='$GEM_PATH' $prefix" ; fi
6
7
 
data/install CHANGED
@@ -73,7 +73,7 @@ rvm_hooks_path="${rvm_hooks_path:-"$rvm_path/hooks"}"
73
73
  rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}"
74
74
  rvm_symlink_path="${rvm_symlink_path:-/usr/local/bin}"
75
75
 
76
- mkdir -p $rvm_archives_path $rvm_src_path $rvm_log_path $rvm_bin_path $rvm_gems_path $rvm_rubies_path $rvm_config_path $rvm_hooks_path $rvm_tmp_path $rvm_symlink_path $rvm_gems_path/cache $rvm_gems_path/doc
76
+ mkdir -p $rvm_archives_path $rvm_src_path $rvm_log_path $rvm_bin_path $rvm_gems_path $rvm_rubies_path $rvm_config_path $rvm_hooks_path $rvm_tmp_path $rvm_symlink_path $HOME/.gem/cache
77
77
 
78
78
  for file in README LICENCE ; do
79
79
  cp -f "$source_path/$file" "$rvm_path/"
@@ -179,7 +179,7 @@ if [[ "root" != "$(whoami)" ]] ; then
179
179
  echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
180
180
  echo -e "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
181
181
  echo -e "\n This means that if you see '[ -z "$PS1" ] && return' then you must split your .bashrc"
182
- echo -e "\n Put everything below and above that line into your .bash_profile, and delete that line and below from .bashrc"
182
+ echo -e "\n Put everything *except the return code line(s)* into your .bash_profile, and everything above that code in your .bashrc."
183
183
  echo -e "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the top of your .bash_profile."
184
184
  echo -e "\n4) Then $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
185
185
  fi
data/lib/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 1
4
- :patch: 13
4
+ :patch: 14
data/rvm.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rvm}
8
- s.version = "0.1.13"
8
+ s.version = "0.1.14"
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-02-12}
12
+ s.date = %q{2010-02-13}
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}
data/scripts/cli CHANGED
@@ -56,12 +56,13 @@ __rvm_parse_args() {
56
56
  unset rvm_gem_set_name ; shift
57
57
  export rvm_ruby_gem_home="$(echo $GEM_HOME | sed 's/%.*$//')"
58
58
  export GEM_HOME="$rvm_ruby_gem_home"
59
- export GEM_PATH="$rvm_ruby_gem_path"
59
+ export BUNDLE_PATH="$rvm_ruby_gem_home"
60
+ export GEM_PATH="$rvm_ruby_gem_home/bin:$rvm_ruby_gem_home%global/bin"
60
61
  rvm_ruby_args="clear"
61
62
  rvm_parse_break=1
62
63
  elif [[ "delete" = "$1" ]] ; then
63
- export rvm_delete_flag=1 ; shift
64
- rvm_ruby_args="$*"
64
+ export rvm_delete_flag=1
65
+ rvm_ruby_args="$*" ; shift
65
66
  rvm_gem_set_name="$1"; shift
66
67
  rvm_ruby_string=$(echo $rvm_gem_set_name | sed 's/\(.*\)%.*/\1/')
67
68
  rvm_gem_set_name=$(echo $rvm_gem_set_name | sed 's/.*%\(.*\)/\1/')
@@ -280,7 +281,7 @@ __rvm_parse_args() {
280
281
  --disable-llvm|--disable-jit) export rvm_llvm_flag=0 ;;
281
282
  --enable-llvm|--enable-jit) export rvm_llvm_flag=1 ;;
282
283
 
283
- --self|--gem|--rubygems|--reconfigure|--default|--debug|--force|--all|--dump|--summary|--latest|--yaml|--json|--archive|--shebang|--env|--path|--tail|--delete|--verbose|--load|--passenger|--editor)
284
+ --self|--gem|--rubygems|--reconfigure|--default|--debug|--force|--all|--dump|--summary|--latest|--yaml|--json|--archive|--shebang|--env|--path|--tail|--delete|--verbose|--load|--rvmrc|--passenger|--editor)
284
285
  export rvm_$(echo $rvm_token | sed 's#-##g')_flag=1
285
286
  if [[ "--debug" = "$rvm_token" ]] ; then export rvm_debug_flag ; fi
286
287
  ;;
data/scripts/fetch CHANGED
@@ -48,6 +48,7 @@ else
48
48
  fi
49
49
 
50
50
  if [[ $download -gt 0 ]] ; then
51
+ rm -f $archive
51
52
  eval $fetch_command "$1"
52
53
  result=$?
53
54
  if [[ $result -gt 0 ]] ; then
data/scripts/gems CHANGED
@@ -47,7 +47,7 @@ __rvm_gems_delete() {
47
47
  if [[ -d "$gemdir" ]] && [[ "$gemdir" != '/' ]] && [[ ! -z "$rvm_force_flag" ]] ; then
48
48
  rm -rf "$gemdir"
49
49
  elif [[ -d "$gemdir" ]] ; then
50
- $rvm_scripts_path/log "warn" "Are you SURE you wish to remove the entire gemset '$rvm_gem_set_name' ($gemdir)?"
50
+ $rvm_scripts_path/log "warn" "Are you SURE you wish to remove the entire gemset directory '$rvm_gem_set_name' ($gemdir)?"
51
51
  echo -n "(anything other than 'yes' will cancel) > "
52
52
  read response
53
53
  if [[ "yes" = "$response" ]] ; then
@@ -92,6 +92,7 @@ __rvm_gems_dump() {
92
92
  if [[ ! -z "$rvm_ruby_gem_home" ]] ; then
93
93
  export GEM_HOME="$rvm_ruby_gem_home"
94
94
  export GEM_PATH="$rvm_ruby_gem_home/bin:$rvm_gems_path/$rvm_ruby_string%global/bin"
95
+ export BUNDLE_PATH="$rvm_ruby_gem_home"
95
96
  fi
96
97
 
97
98
  if [[ -z "$rvm_file_name" ]] ; then
@@ -124,6 +125,7 @@ __rvm_gems_load() {
124
125
  if [[ ! -z "$rvm_ruby_gem_home" ]] ; then
125
126
  export GEM_HOME="$rvm_ruby_gem_home"
126
127
  export GEM_PATH="$rvm_ruby_gem_home/bin:$rvm_gems_path/$rvm_ruby_string%global/bin"
128
+ export BUNDLE_PATH="$rvm_ruby_gem_home"
127
129
  fi
128
130
 
129
131
  if [[ ! -z "$(echo "$gems_args" | awk '/\.gem.*$/')" ]] ; then
@@ -244,7 +246,7 @@ __rvm_gem_install() {
244
246
  if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
245
247
 
246
248
  if [[ ! -z "$rvm_ruby_gem_home" ]] && [[ "$rvm_ruby_gem_home" != "$rvm_gems_path" ]] ; then
247
- command="GEM_HOME='$rvm_ruby_gem_home' GEM_PATH='$rvm_ruby_gem_home/bin:$rvm_gems_path/$rvm_ruby_string%global/bin' $gem_prefix gem install $gems_args $rvm_gem_options $gem_postfix $vars"
249
+ command="GEM_HOME='$rvm_ruby_gem_home' GEM_PATH='$rvm_ruby_gem_home/bin:$rvm_gems_path/$rvm_ruby_string%global/bin' BUNDLE_PATH='$rvm_ruby_gem_home' $gem_prefix gem install $gems_args $rvm_gem_options $gem_postfix $vars"
248
250
  else
249
251
  command="$gem_prefix gem install $gems_args $rvm_gem_options -q $gem $gem_postfix $vars"
250
252
  fi
data/scripts/install CHANGED
@@ -73,7 +73,7 @@ rvm_hooks_path="${rvm_hooks_path:-"$rvm_path/hooks"}"
73
73
  rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}"
74
74
  rvm_symlink_path="${rvm_symlink_path:-/usr/local/bin}"
75
75
 
76
- mkdir -p $rvm_archives_path $rvm_src_path $rvm_log_path $rvm_bin_path $rvm_gems_path $rvm_rubies_path $rvm_config_path $rvm_hooks_path $rvm_tmp_path $rvm_symlink_path $rvm_gems_path/cache $rvm_gems_path/doc
76
+ mkdir -p $rvm_archives_path $rvm_src_path $rvm_log_path $rvm_bin_path $rvm_gems_path $rvm_rubies_path $rvm_config_path $rvm_hooks_path $rvm_tmp_path $rvm_symlink_path $HOME/.gem/cache
77
77
 
78
78
  for file in README LICENCE ; do
79
79
  cp -f "$source_path/$file" "$rvm_path/"
@@ -179,7 +179,7 @@ if [[ "root" != "$(whoami)" ]] ; then
179
179
  echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
180
180
  echo -e "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
181
181
  echo -e "\n This means that if you see '[ -z "$PS1" ] && return' then you must split your .bashrc"
182
- echo -e "\n Put everything below and above that line into your .bash_profile, and delete that line and below from .bashrc"
182
+ echo -e "\n Put everything *except the return code line(s)* into your .bash_profile, and everything above that code in your .bashrc."
183
183
  echo -e "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the top of your .bash_profile."
184
184
  echo -e "\n4) Then $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
185
185
  fi
data/scripts/manage CHANGED
@@ -42,12 +42,15 @@ __rvm_install_source() {
42
42
 
43
43
  if [[ "1.8.5" = "$rvm_ruby_version" ]] ; then
44
44
  # How to install ruby 1.8.5... "sneaky sneaky, sir"
45
- if [[ ! -d "$HOME/.rvm/src/ruby-1.8.7-p248/ext/openssl/" ]] ; then $rvm_path/bin/rvm fetch 1.8.6-p248 > /dev/null ; fi
46
- if [[ ! -d "$HOME/.rvm/src/ruby-1.8.6-p383/ext/openssl/" ]] ; then $rvm_path/bin/rvm fetch 1.8.6-p383 > /dev/null ; fi
47
- cp ~/.rvm/src/ruby-1.8.7-p248/ext/openssl/extconf.rb ~/.rvm/src/ruby-1.8.5-p231/ext/openssl/
48
- cp ~/.rvm/src/ruby-1.8.7-p248/ext/openssl/openssl_missing.* ~/.rvm/src/ruby-1.8.5-p231/ext/openssl/
49
- cp ~/.rvm/src/ruby-1.8.7-p248/ext/openssl/ossl_hmac.c ~/.rvm/src/ruby-1.8.5-p231/ext/openssl/
50
- cp ~/.rvm/src/ruby-1.8.6-p383/ext/readline/* ~/.rvm/src/ruby-1.8.5-p231/ext/readline/
45
+ src_dir="ruby-1.8.7-p$(__rvm_db "ruby_1.8.7_patch_level")"
46
+ if [[ ! -d "$HOME/.rvm/src/$src_dir/ext/openssl/" ]] ; then $rvm_path/bin/rvm fetch 1.8.6-p248 > /dev/null ; fi
47
+ cp ~/.rvm/src/$src_dir/ext/openssl/extconf.rb ~/.rvm/src/ruby-1.8.5-p231/ext/openssl/
48
+ cp ~/.rvm/src/$src_dir/ext/openssl/openssl_missing.* ~/.rvm/src/ruby-1.8.5-p231/ext/openssl/
49
+ cp ~/.rvm/src/$src_dir/ext/openssl/ossl_hmac.c ~/.rvm/src/ruby-1.8.5-p231/ext/openssl/
50
+ src_dir="ruby-1.8.6-p$(__rvm_db "ruby_1.8.6_patch_level")"
51
+ if [[ ! -d "$HOME/.rvm/src/$src_dir/ext/openssl/" ]] ; then $rvm_path/bin/rvm fetch 1.8.6-p383 > /dev/null ; fi
52
+ cp ~/.rvm/src/$src_dir/ext/readline/* ~/.rvm/src/ruby-1.8.5-p231/ext/readline/
53
+ unset src_dir
51
54
  fi
52
55
 
53
56
  if [[ -s ./Makefile ]] && [[ -z "$rvm_reconfigure_flag" ]] ; then
@@ -90,8 +93,9 @@ __rvm_install_source() {
90
93
 
91
94
  $rvm_scripts_path/log "info" "Installation of $rvm_ruby_string is complete."
92
95
 
93
- GEM_HOME="$rvm_ruby_gem_home" ; export GEM_HOME
94
- GEM_PATH="$rvm_ruby_gem_path" ; export GEM_PATH
96
+ export GEM_HOME="$rvm_ruby_gem_home"
97
+ export GEM_PATH="$rvm_ruby_gem_path"
98
+ export BUNDLE_PATH="$rvm_ruby_gem_home"
95
99
 
96
100
  __rvm_rubygems_setup
97
101
  __rvm_bin_script
@@ -151,12 +155,12 @@ __rvm_install_ruby() {
151
155
  for binary_name in $(echo $binaries); do
152
156
  # if [[ $binary_name != "gem" ]] ; then prefix="-S" ; fi
153
157
  ruby_wrapper=$(cat <<RubyWrapper
154
- #!/bin/bash
158
+ #!/usr/bin/env bash
155
159
 
156
- GEM_HOME="$rvm_ruby_gem_home" ; export GEM_HOME
157
- GEM_PATH="$rvm_ruby_gem_path" ; export GEM_PATH
158
- MY_RUBY_HOME="$rvm_ruby_home" ; export MY_RUBY_HOME
159
- PATH="$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:$rvm_ruby_global_gems_path/bin:\$PATH" ; export PATH
160
+ export GEM_HOME="$rvm_ruby_gem_home"
161
+ export GEM_PATH="$rvm_ruby_gem_path"
162
+ export MY_RUBY_HOME="$rvm_ruby_home"
163
+ export PATH="$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:$rvm_ruby_global_gems_path/bin:\$PATH"
160
164
 
161
165
  exec $macruby_path/mac$binary_name $prefix "\$@"
162
166
  RubyWrapper
@@ -254,7 +258,7 @@ RubyWrapper
254
258
  __rvm_unset_ruby_variables ; rvm_ruby_string="$original_string" ; __rvm_select
255
259
  unset original_string
256
260
 
257
- unset GEM_HOME GEM_PATH MY_RUBY_HOME IRBRC
261
+ unset BUNDLE_PATH GEM_HOME GEM_PATH MY_RUBY_HOME IRBRC
258
262
  PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
259
263
  PATH=$rvm_bin_path:$PATH ; export PATH
260
264
 
@@ -327,10 +331,11 @@ RubyWrapper
327
331
  ruby_wrapper=$(cat <<RubyWrapper
328
332
  #!/usr/bin/env bash
329
333
 
330
- GEM_HOME="$rvm_ruby_gem_home" ; export GEM_HOME
331
- GEM_PATH="$rvm_ruby_gem_path" ; export GEM_PATH
332
- MY_RUBY_HOME="$rvm_ruby_home" ; export MY_RUBY_HOME
333
- PATH="$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:$rvm_ruby_global_gems_path/bin:\$PATH" ; export PATH
334
+ export GEM_HOME="$rvm_ruby_gem_home"
335
+ export GEM_PATH="$rvm_ruby_gem_path"
336
+ export BUNDLE_PATH="$rvm_ruby_gem_home"
337
+ export MY_RUBY_HOME="$rvm_ruby_home"
338
+ export PATH="$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:$rvm_ruby_global_gems_path/bin:\$PATH"
334
339
 
335
340
  exec $rvm_ruby_home/bin/rbx $prefix$binary_name "\$@"
336
341
  RubyWrapper
@@ -547,10 +552,11 @@ RubyWrapper
547
552
  ruby_wrapper=$(cat <<RubyWrapper
548
553
  #!/bin/bash
549
554
 
550
- GEM_HOME="$rvm_ruby_gem_home" ; export GEM_HOME
551
- GEM_PATH="$rvm_ruby_gem_path" ; export GEM_PATH
552
- MY_RUBY_HOME="$rvm_ruby_home" ; export MY_RUBY_HOME
553
- PATH="$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:$rvm_ruby_global_gems_path/bin:\$PATH" ; export PATH
555
+ export GEM_HOME="$rvm_ruby_gem_home"
556
+ export GEM_PATH="$rvm_ruby_gem_path"
557
+ export BUNDLE_PATH="$rvm_ruby_gem_home"
558
+ export MY_RUBY_HOME="$rvm_ruby_home"
559
+ export PATH="$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:$rvm_ruby_global_gems_path/bin:\$PATH"
554
560
 
555
561
  exec mono $rvm_ruby_home/bin/ir.exe $binary_path "\$@"
556
562
  RubyWrapper
@@ -570,7 +576,7 @@ RubyWrapper
570
576
 
571
577
  mput|shyouhei)
572
578
  if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
573
- unset GEM_HOME GEM_PATH MY_RUBY_HOME IRBRC
579
+ unset BUNDLE_PATH GEM_HOME GEM_PATH MY_RUBY_HOME IRBRC
574
580
  PATH=$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)
575
581
  PATH=$rvm_bin_path:$PATH ; export PATH
576
582
 
@@ -626,8 +632,9 @@ RubyWrapper
626
632
 
627
633
  $rvm_scripts_path/log "info" "Installation of $rvm_ruby_string is complete."
628
634
 
629
- GEM_HOME="$rvm_ruby_gem_home" ; export GEM_HOME
630
- GEM_PATH="$rvm_ruby_gem_path" ; export GEM_PATH
635
+ export GEM_HOME="$rvm_ruby_gem_home"
636
+ export GEM_PATH="$rvm_ruby_gem_path"
637
+ export BUNDLE_PATH="$rvm_ruby_gem_home"
631
638
 
632
639
  __rvm_rubygems_setup
633
640
  __rvm_bin_script
@@ -823,10 +830,12 @@ __rvm_post_install() {
823
830
  $rvm_scripts_path/log "info" "Installing gems for $rvm_ruby_string."
824
831
 
825
832
  for rvm_gem_name in rake ; do
826
- home="$GEM_HOME" ; export GEM_HOME="$rvm_ruby_global_gems_path"
827
- path="$GEM_PATH" ; export GEM_PATH="$rvm_ruby_global_gems_path"
833
+ home="$GEM_HOME" ; path="$GEM_PATH" # Save
834
+ export GEM_HOME="$rvm_ruby_global_gems_path"
835
+ export GEM_PATH="$rvm_ruby_global_gems_path"
836
+ export BUNDLE_PATH="$rvm_ruby_global_gems_path"
828
837
  __rvm_run "gems.install" "$rvm_ruby_home/bin/gem install $rvm_gem_name $rvm_gem_options" "Installing $rvm_gem_name"
829
- export GEM_HOME="$home" ; export GEM_PATH="$path" ; unset home path
838
+ export GEM_HOME="$home" ; export GEM_PATH="$path" ; export BUNDLE_PATH="$home" ; unset home path
830
839
  done ; unset rvm_gem_name
831
840
 
832
841
  $rvm_scripts_path/log "info" "Installation of gems for $rvm_ruby_string is complete."
@@ -848,10 +857,12 @@ __rvm_rubygems_setup() {
848
857
  __rvm_inject_ruby_shebang "$rvm_ruby_src_path/bin/gem"
849
858
  __rvm_inject_gem_env "$rvm_ruby_home/bin/gem"
850
859
  cp $rvm_ruby_src_path/bin/gem $rvm_ruby_home/bin/gem
851
- home="$GEM_HOME" ; export GEM_HOME="$rvm_ruby_global_gems_path"
852
- path="$GEM_PATH" ; export GEM_PATH="$rvm_ruby_global_gems_path"
860
+ home="$GEM_HOME" ; path="$GEM_PATH" # Save
861
+ export GEM_HOME="$rvm_ruby_global_gems_path"
862
+ export GEM_PATH="$rvm_ruby_global_gems_path"
863
+ export BUNDLE_PATH="$rvm_ruby_global_gems_path"
853
864
  __rvm_run "rubygems.update" "$rvm_ruby_home/bin/gem update --system" "Updating rubygems for $rvm_ruby_string"
854
- export GEM_HOME="$home" ; export GEM_PATH="$path" ; unset home path
865
+ export GEM_HOME="$home" ; export GEM_PATH="$path" ; export BUNDLE_PATH="$home" unset home path
855
866
 
856
867
  __rvm_inject_ruby_shebang "$rvm_ruby_home/bin/gem"
857
868
  __rvm_inject_gem_env "$rvm_ruby_home/bin/gem"
@@ -881,7 +892,7 @@ __rvm_rubygems_setup() {
881
892
 
882
893
  builtin cd "$rvm_src_path/$rvm_gem_package_name"
883
894
 
884
- __rvm_run "rubygems.install" "GEM_PATH=$rvm_ruby_gem_path GEM_HOME=$rvm_ruby_gem_home $rvm_ruby_home/bin/ruby $rvm_src_path/$rvm_gem_package_name/setup.rb" "Installing rubygems for $rvm_ruby_home/bin/ruby"
895
+ __rvm_run "rubygems.install" "GEM_PATH=$rvm_ruby_gem_path GEM_HOME=$rvm_ruby_gem_home BUNDLE_PATH=$rvm_ruby_gem_home $rvm_ruby_home/bin/ruby $rvm_src_path/$rvm_gem_package_name/setup.rb" "Installing rubygems for $rvm_ruby_home/bin/ruby"
885
896
  result=$?
886
897
  if [[ $result -eq 0 ]] ; then
887
898
  $rvm_scripts_path/log "info" "Installation of rubygems $rvm_ruby_package_name completed successfully."
@@ -922,9 +933,9 @@ __rvm_inject_gem_env() {
922
933
  __rvm_actual_file $1
923
934
  if [[ -f "$actual_file" ]] ; then
924
935
  if [[ ! -z "$(head -n 1 $actual_file | awk '/[j]*ruby/')" ]] ; then
925
- string="ENV['GEM_HOME']=ENV['GEM_HOME'] || '$rvm_ruby_gem_home'\nENV['GEM_PATH']=ENV['GEM_PATH'] || '$rvm_ruby_gem_path'\nENV['PATH']='$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:' + ENV['PATH']"
936
+ string="ENV['GEM_HOME']=ENV['GEM_HOME'] || '$rvm_ruby_gem_home'\nENV['GEM_PATH']=ENV['GEM_PATH'] || '$rvm_ruby_gem_path'\nENV['PATH']='$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:' + ENV['PATH']\nENV['BUNDLE_PATH']=ENV['BUNDLE_PATH'] || '$rvm_ruby_gem_home'\n"
926
937
  elif [[ ! -z "$(head -n 1 $actual_file | awk '/bash/')" ]] ; then
927
- string="GEM_HOME=\${GEM_HOME:-'$rvm_ruby_gem_home'}\nGEM_PATH=\${GEM_PATH:-'$rvm_ruby_gem_path'}\nPATH=$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:\$PATH"
938
+ string="GEM_HOME=\${GEM_HOME:-'$rvm_ruby_gem_home'}\nGEM_PATH=\${GEM_PATH:-'$rvm_ruby_gem_path'}\nPATH=$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:\$PATH\nBUNDLE_PATH=\${BUNDLE_PATH:-'$rvm_ruby_gem_home'}\n"
928
939
  fi
929
940
  if [[ ! -z "$string" ]] ; then
930
941
  awk "NR==2 {print \"$string\"} {print}" "$actual_file" > "$actual_file.new"
data/scripts/notes CHANGED
@@ -45,8 +45,10 @@ if [[ "Linux" = "$system" ]] ; then
45
45
  echo -e "\n $ pacman -Sy mono"
46
46
 
47
47
  elif [[ ! -z "$rvm_yum_binary" ]] ; then
48
- echo -e " $item For ree (if you wish to use it) you will need:"
49
- echo -e "\n $ yum install -y rpm-build gcc gcc-c++ redhat-rpm-config ; then download and rpmbuild and install the sdk, Have fun..."
48
+ echo -e " $item For MRI/ree (if you wish to use it) you will need:"
49
+ echo -e "\n $ yum install -y gcc-c++ patch readline readline-devel iconv-devel"
50
+ echo -e " $item For JRuby (if you wish to use it) you will need:"
51
+ echo -e "\n $ yum install -y java"
50
52
 
51
53
  else
52
54
  echo -e " $item For JRuby (if you wish to use it) you will need:"
data/scripts/rvm CHANGED
@@ -7,6 +7,8 @@
7
7
  if [[ "$rvm_loaded_flag" != "1" ]] || [[ "$rvm_reload_flag" = "1" ]] ; then
8
8
  unset rvm_reload_flag
9
9
 
10
+ mkdir -p $HOME/.gem/cache
11
+
10
12
  if [[ -f /etc/rvmrc ]] ; then source /etc/rvmrc ; fi
11
13
  if [[ -f "$HOME/.rvmrc" ]] ; then source "$HOME/.rvmrc" ; fi
12
14
 
data/scripts/rvm-install CHANGED
@@ -73,7 +73,7 @@ rvm_hooks_path="${rvm_hooks_path:-"$rvm_path/hooks"}"
73
73
  rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}"
74
74
  rvm_symlink_path="${rvm_symlink_path:-/usr/local/bin}"
75
75
 
76
- mkdir -p $rvm_archives_path $rvm_src_path $rvm_log_path $rvm_bin_path $rvm_gems_path $rvm_rubies_path $rvm_config_path $rvm_hooks_path $rvm_tmp_path $rvm_symlink_path $rvm_gems_path/cache $rvm_gems_path/doc
76
+ mkdir -p $rvm_archives_path $rvm_src_path $rvm_log_path $rvm_bin_path $rvm_gems_path $rvm_rubies_path $rvm_config_path $rvm_hooks_path $rvm_tmp_path $rvm_symlink_path $HOME/.gem/cache
77
77
 
78
78
  for file in README LICENCE ; do
79
79
  cp -f "$source_path/$file" "$rvm_path/"
@@ -179,7 +179,7 @@ if [[ "root" != "$(whoami)" ]] ; then
179
179
  echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
180
180
  echo -e "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
181
181
  echo -e "\n This means that if you see '[ -z "$PS1" ] && return' then you must split your .bashrc"
182
- echo -e "\n Put everything below and above that line into your .bash_profile, and delete that line and below from .bashrc"
182
+ echo -e "\n Put everything *except the return code line(s)* into your .bash_profile, and everything above that code in your .bashrc."
183
183
  echo -e "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the top of your .bash_profile."
184
184
  echo -e "\n4) Then $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
185
185
  fi
data/scripts/selector CHANGED
@@ -238,13 +238,13 @@ __rvm_use() {
238
238
  else
239
239
  rvm_ruby_interpreter="system"
240
240
  $rvm_scripts_path/log "warn" "no default rvm specified, defaulting to pre-rvm system."
241
- unset GEM_HOME GEM_PATH MY_RUBY_HOME RUBY_VERSION IRBRC
241
+ unset GEM_HOME GEM_PATH BUNDLE_PATH MY_RUBY_HOME RUBY_VERSION IRBRC
242
242
  if [[ -s $rvm_config_path/system ]] ; then source $rvm_config_path/system ; fi
243
243
  fi
244
244
 
245
245
  elif [[ "system" = "$rvm_ruby_interpreter" ]] ; then
246
246
 
247
- unset GEM_HOME GEM_PATH MY_RUBY_HOME RUBY_VERSION IRBRC
247
+ unset GEM_HOME GEM_PATH BUNDLE_PATH MY_RUBY_HOME RUBY_VERSION IRBRC
248
248
  new_path="$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)"
249
249
  new_path="$rvm_bin_path:$new_path"
250
250
  if [[ -s $rvm_config_path/system ]] ; then
@@ -271,11 +271,12 @@ __rvm_use() {
271
271
  else
272
272
  GEM_HOME="$rvm_ruby_gem_home"
273
273
  GEM_PATH="$rvm_ruby_gem_path"
274
+ BUNDLE_PATH="$rvm_ruby_gem_home"
274
275
  MY_RUBY_HOME="$rvm_ruby_home"
275
276
  RUBY_VERSION="$rvm_ruby_string"
276
277
  IRBRC="$rvm_ruby_irbrc"
277
278
 
278
- export GEM_HOME GEM_PATH MY_RUBY_HOME RUBY_VERSION IRBRC
279
+ export GEM_HOME GEM_PATH BUNDLE_PATH MY_RUBY_HOME RUBY_VERSION IRBRC
279
280
 
280
281
  if [[ -z "$IRBRC" ]] ; then unset IRBRC ; fi
281
282
 
@@ -312,11 +313,11 @@ __rvm_use() {
312
313
  rm -f $rvm_bin_path/default*
313
314
  else
314
315
  RUBY_VERSION="$($rvm_ruby_home/bin/ruby -v | sed 's#^\(.*\) (.*$#\1#')"
315
- export GEM_HOME GEM_PATH MY_RUBY_HOME RUBY_VERSION
316
+ export GEM_HOME GEM_PATH BUNDLE_PATH MY_RUBY_HOME RUBY_VERSION
316
317
 
317
318
  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
318
319
 
319
- for variable in RUBY_VERSION GEM_HOME GEM_PATH MY_RUBY_HOME IRBRC rvm_ruby_string rvm_gem_set_name MAGLEV_HOME ; do
320
+ 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
320
321
  eval "export $variable"
321
322
  eval value=\$${variable}
322
323
  if [[ ! -z "$value" ]] ; then
@@ -334,6 +335,7 @@ __rvm_use() {
334
335
  if [[ ! -z "$rvm_symlink_name" ]] ; then $rvm_scripts_path/symlink "$rvm_symlink_name" ; unset rvm_symlink_name ; fi
335
336
  if [[ ! -z "$rvm_editor_flag" ]] ; then $rvm_scripts_path/symlink "editor" ; unset rvm_editor_flag ; fi
336
337
  if [[ ! -z "$rvm_passenger_flag" ]] ; then $rvm_scripts_path/symlink "passenger" ; unset rvm_passenger_flag ; fi
338
+ if [[ ! -z "$rvm_rvmrc_flag" ]] ; then __rvm_set_rvmrc ; fi
337
339
  # Export ruby string and gem set name for extrnal scripts to take advantage of them.
338
340
  if [[ ! -z "$rvm_ruby_string" ]] ; then export rvm_ruby_string ; fi
339
341
  if [[ ! -z "$rvm_gem_set_name" ]] ; then export rvm_gem_set_name ; fi
data/scripts/update CHANGED
@@ -73,7 +73,7 @@ rvm_hooks_path="${rvm_hooks_path:-"$rvm_path/hooks"}"
73
73
  rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}"
74
74
  rvm_symlink_path="${rvm_symlink_path:-/usr/local/bin}"
75
75
 
76
- mkdir -p $rvm_archives_path $rvm_src_path $rvm_log_path $rvm_bin_path $rvm_gems_path $rvm_rubies_path $rvm_config_path $rvm_hooks_path $rvm_tmp_path $rvm_symlink_path $rvm_gems_path/cache $rvm_gems_path/doc
76
+ mkdir -p $rvm_archives_path $rvm_src_path $rvm_log_path $rvm_bin_path $rvm_gems_path $rvm_rubies_path $rvm_config_path $rvm_hooks_path $rvm_tmp_path $rvm_symlink_path $HOME/.gem/cache
77
77
 
78
78
  for file in README LICENCE ; do
79
79
  cp -f "$source_path/$file" "$rvm_path/"
@@ -179,7 +179,7 @@ if [[ "root" != "$(whoami)" ]] ; then
179
179
  echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
180
180
  echo -e "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
181
181
  echo -e "\n This means that if you see '[ -z "$PS1" ] && return' then you must split your .bashrc"
182
- echo -e "\n Put everything below and above that line into your .bash_profile, and delete that line and below from .bashrc"
182
+ echo -e "\n Put everything *except the return code line(s)* into your .bash_profile, and everything above that code in your .bashrc."
183
183
  echo -e "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the top of your .bash_profile."
184
184
  echo -e "\n4) Then $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
185
185
  fi
data/scripts/utility CHANGED
@@ -53,8 +53,10 @@ binaries:
53
53
  environment:
54
54
  GEM_HOME: "$GEM_HOME"
55
55
  GEM_PATH: "$GEM_PATH"
56
+ BUNDLE_PATH: "$BUNDLE_PATH"
56
57
  MY_RUBY_HOME: "$MY_RUBY_HOME"
57
58
  IRBRC: "$IRBRC"
59
+
58
60
  Info
59
61
  if [[ ! -z "$MAGLEV_HOME" ]] ; then echo -e " MAGLEV_HOME: \"$MAGLEV_HOME\"" ; fi
60
62
 
@@ -158,6 +160,16 @@ __rvm_unset_ruby_variables() {
158
160
  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_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_string rvm_ruby_string 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
159
161
  }
160
162
 
163
+ __rvm_set_rvmrc() {
164
+ if [[ "$HOME" != "$(pwd)" ]] ; then
165
+ if [[ -s .rvmrc ]] ; then
166
+ mv .rvmrc .rvmrc.$(date +%m.%d.%Y-%H:%M:%S)
167
+ fi
168
+ echo "rvm use $(basename $rvm_ruby_gem_home)" > .rvmrc
169
+ else
170
+ echo -e "Not setting a project specific rvmrc file, currently in the HOME directory."
171
+ fi
172
+ }
161
173
  __rvm_load_rvmrc() {
162
174
  if [[ -f /etc/rvmrc ]] ; then source /etc/rvmrc ; fi
163
175
  if [[ -f "$HOME/.rvmrc" ]] ; then source "$HOME/.rvmrc" ; fi
@@ -177,14 +189,17 @@ __rvm_bin_scripts() {
177
189
  # Write the bin/ wrapper script for currently selected ruby.
178
190
  # TODO: Adjust binscript to be able to handle all rubies not just the standard interpreteres.
179
191
  __rvm_bin_script() {
192
+
180
193
  if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi
194
+
181
195
  ruby_wrapper=$(cat <<RubyWrapper
182
- #!/bin/bash
196
+ #!/usr/bin/env bash
183
197
 
184
- GEM_HOME=$rvm_ruby_gem_home ; export GEM_HOME
185
- GEM_PATH=$rvm_ruby_gem_path ; export GEM_PATH
186
- MY_RUBY_HOME=$rvm_ruby_home ; export MY_RUBY_HOME
187
- PATH=$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:$rvm_ruby_global_gems_path/bin:$rvm_bin_path:\$PATH ; export PATH
198
+ export GEM_HOME="$rvm_ruby_gem_home"
199
+ export GEM_PATH="$rvm_ruby_gem_path"
200
+ export BUNDLE_PATH="$rvm_ruby_gem_home"
201
+ export MY_RUBY_HOME="$rvm_ruby_home"
202
+ export PATH="$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:$rvm_ruby_global_gems_path/bin:$rvm_bin_path:\$PATH"
188
203
 
189
204
  exec "$rvm_ruby_binary" "\$@"
190
205
  RubyWrapper
@@ -198,7 +213,7 @@ RubyWrapper
198
213
  # Load default ruby, if default is not set load system ruby.
199
214
  __rvm_load_defaults() {
200
215
  if [[ ! -s "$rvm_config_path/system" ]] ; then
201
- for variable in RUBY_VERSION GEM_HOME GEM_PATH MY_RUBY_HOME ; do
216
+ for variable in RUBY_VERSION GEM_HOME GEM_PATH BUNDLE_PATH MY_RUBY_HOME ; do
202
217
  eval value=\$${variable}
203
218
  if [[ -z "$value" ]] ; then
204
219
  echo "unset ${variable}" >> $rvm_config_path/system
@@ -241,7 +256,7 @@ __rvm_reset() {
241
256
  PATH="$(echo $PATH | tr ':' '\n' | awk '$0 !~ /rvm/' | paste -sd : -)"
242
257
  PATH="$rvm_bin_path:$PATH" ; export PATH
243
258
 
244
- for variable in RUBY_VERSION GEM_HOME MY_RUBY_HOME ; do unset $variable ; done
259
+ for variable in RUBY_VERSION GEM_HOME BUNDLE_PATH MY_RUBY_HOME ; do unset $variable ; done
245
260
 
246
261
  for flag in default passenger editor ; do rm -f "$rvm_bin_path"/${flag}_* ; done
247
262
 
@@ -748,11 +763,20 @@ __rvm_gems_select() {
748
763
 
749
764
  rvm_ruby_gem_path="$rvm_ruby_gem_home:$rvm_ruby_global_gems_path"
750
765
 
751
- # TODO: Remove next line after a few releases.
752
- mkdir -p $rvm_gems_path/cache $rvm_gems_path/doc
766
+ # TODO: Remove next section after a several releases.
767
+ # Migrate original rvm global gem cache directory to $HOME/.gem/cache
768
+ if [[ -d "$rvm_path/gems/cache" ]] && [[ ! -L "$rvm_path/gems/cache" ]] ; then
769
+ if [[ ! -z "$(ls -A "$rvm_path"/gems/cache/)" ]] ; then
770
+ mv $rvm_path/gems/cache/* $HOME/.gem/cache/
771
+ fi
772
+ rmdir $rvm_path/gems/cache
773
+ fi
774
+ rm -f "$rvm_path/gems/cache"
775
+ ln -nfs "$HOME/.gem/cache" "$rvm_path/gems/cache"
776
+ # /TODO
777
+
753
778
  # Careful not to nuke system gems cache.
754
779
  if [[ ! -z "$rvm_ruby_gem_home" ]] && [[ ! -z "$(echo $rvm_ruby_gem_home | awk '/rvm/')" ]] ; then
755
- # Global gems cache
756
780
  # Ensure that the ruby gem home exists.
757
781
  mkdir -p "$rvm_ruby_gem_home"
758
782
 
@@ -760,15 +784,14 @@ __rvm_gems_select() {
760
784
  # move all the gems to the global cache directory and remove it.
761
785
  if [[ -d "$rvm_ruby_gem_home/cache" ]] && [[ ! -L "$rvm_ruby_gem_home/cache" ]] ; then
762
786
  if [[ ! -z "$(ls -A "$rvm_ruby_gem_home"/cache/)" ]] ; then
763
- mv "$rvm_ruby_gem_home"/cache/* "$rvm_gems_path"/cache/
787
+ mv "$rvm_ruby_gem_home"/cache/* "$HOME"/.gem/cache/
764
788
  fi
765
- rm -rf "$rvm_ruby_gem_home/cache"
789
+ rmdir "$rvm_ruby_gem_home"/cache
766
790
  fi
767
791
 
768
- # If the ruby's gems cache directory is not a symlink to the global cache,
769
- # symlink it
792
+ # If the ruby's gems cache directory is not a symlink to the global cache, symlink it
770
793
  if [[ ! -L "$rvm_ruby_gem_home/cache" ]] ; then
771
- ln -nfs "$rvm_gems_path/cache" "$rvm_ruby_gem_home/cache"
794
+ ln -nfs "$HOME/.gem/cache" "$rvm_ruby_gem_home/cache"
772
795
  fi
773
796
  fi ; export rvm_ruby_gem_path rvm_ruby_gem_home
774
797
  }
@@ -786,8 +809,9 @@ __rvm_gems_use() {
786
809
  $rvm_scripts_path/log "info" "gems(et) : ${rvm_gem_set_name:-default}"
787
810
  fi
788
811
 
789
- GEM_HOME="$rvm_ruby_gem_home" ; export GEM_HOME
790
- GEM_PATH="$rvm_ruby_gem_path" ; export GEM_PATH
812
+ export GEM_HOME="$rvm_ruby_gem_home"
813
+ export GEM_PATH="$rvm_ruby_gem_path"
814
+ export BUNDLE_PATH="$rvm_ruby_gem_home"
791
815
  __rvm_use
792
816
  fi
793
817
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rvm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wayne E. Seguin
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-12 00:00:00 -05:00
12
+ date: 2010-02-13 00:00:00 -05:00
13
13
  default_executable: rvm-install
14
14
  dependencies: []
15
15