rvm 0.1.24 → 0.1.26

Sign up to get free protection for your applications and to get access to all the features.
data/scripts/utility CHANGED
@@ -43,7 +43,7 @@ __rvm_environment_info() {
43
43
  if [[ ! -z "$ZSH_VERSION" ]] ; then echo -e " shell: \"zsh\"\n version: \"$ZSH_VERSION\"" ; fi
44
44
  if [[ ! -z "$BASH_VERSION" ]] ; then echo -e " shell: \"bash\"\n version: \"$BASH_VERSION\"" ; fi
45
45
 
46
- cat <<Info
46
+ cat <<Ruby
47
47
 
48
48
  ruby:
49
49
  interpreter: "$(echo $full_version | awk '{print $1}')"
@@ -53,15 +53,23 @@ ruby:
53
53
  patchlevel: "$(echo $full_version | sed 's/^.*(//' | sed 's/).*$//')"
54
54
  full_version: "$full_version"
55
55
 
56
+ Ruby
57
+
58
+ cat <<Homes
56
59
  homes:
57
60
  gem: "${GEM_HOME:-'not set'}"
58
61
  ruby: "${MY_RUBY_HOME:-'not set'}"
62
+ Homes
59
63
 
64
+ cat <<Binaries
60
65
  binaries:
61
66
  ruby: "$(which ruby 2>/dev/null)"
62
67
  irb: "$(which irb 2>/dev/null)"
63
68
  gem: "$(which gem 2>/dev/null)"
64
69
  rake: "$(which rake 2>/dev/null)"
70
+ Binaries
71
+
72
+ cat <<Environment
65
73
 
66
74
  environment:
67
75
  GEM_HOME: "$GEM_HOME"
@@ -69,8 +77,11 @@ environment:
69
77
  BUNDLE_PATH: "$BUNDLE_PATH"
70
78
  MY_RUBY_HOME: "$MY_RUBY_HOME"
71
79
  IRBRC: "$IRBRC"
80
+ Environment
81
+
82
+ gemset="$(echo $GEM_HOME | awk -F${rvm_gemset_separator:-'@'} '{print $2}')"
83
+ echo -e " gemset: \"$gemset\"\n"
72
84
 
73
- Info
74
85
  if [[ ! -z "$MAGLEV_HOME" ]] ; then info="$info\n MAGLEV_HOME: \"$MAGLEV_HOME\"" ; fi
75
86
 
76
87
  unset full_version
@@ -183,7 +194,7 @@ __rvm_cleanup_variables() {
183
194
 
184
195
  if [[ "$rvm_sticky_flag" = "1" ]] ; then export rvm_gemset_name ; else unset rvm_gemset_name ; fi
185
196
 
186
- 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
197
+ 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
187
198
  }
188
199
 
189
200
  # Unset ruby-specific variables
@@ -222,7 +233,7 @@ __rvm_benchmark() {
222
233
  echo -e "\n end \nend\n" >> "$rvm_tmp_path/$$.rb"
223
234
  rvm_ruby_args="$rvm_tmp_path/$$.rb"
224
235
  rvm_benchmark_flag=1
225
- action="ruby"
236
+ rvm_action="ruby"
226
237
  if [[ ! -z "$rvm_debug_flag" ]] ; then echo -e "$rvm_tmp_path/$$.rb:\n$(cat $rvm_tmp_path/$$.rb)" ; fi
227
238
  $rvm_scripts_path/set $rvm_action $rvm_ruby_args
228
239
  }
@@ -414,7 +425,7 @@ __rvm_list_known() {
414
425
  echo -e "jruby-1.2.0\njruby-1.3.1\njruby(-1.4.0) # the default\njruby-head"
415
426
  echo -e "rbx(-prc1) # default\nrbx-head"
416
427
  echo -e "ree-1.8.6\nree(-1.8.7) # the default\nree-1.8.6-head\nree-1.8.7-head"
417
- echo -e "maglev(-23082)\nmaglev-head"
428
+ echo -e "maglev(-23101)\nmaglev-head"
418
429
  echo -e "mput(-head) # shyouhei head, the default mput"
419
430
  echo -e "ironruby-0.9.3\nironruby-1.0-rc2\nironruby-head"
420
431
  if [[ "Darwin" = "$(uname)" ]] ; then
@@ -627,24 +638,25 @@ __rvm_make_flags() {
627
638
  # Select a gemset based on CLI set options and environment.
628
639
  # This only sets 'rvm_ruby_gem_home'
629
640
  __rvm_gemset_select() {
630
- if ! which gem > /dev/null 2>&1 ; then return 0 ; fi
641
+ which gem > /dev/null 2>&1
642
+ if [[ $? -gt 0 ]] ; then return 0 ; fi # Stop if no 'gem' command is available.
631
643
 
632
- rvm_ruby_global_gems_path="$rvm_gems_path/$rvm_ruby_string%global"
644
+ rvm_ruby_global_gems_path="$rvm_gems_path/${rvm_ruby_string}${rvm_gemset_separator}global"
633
645
 
634
646
  if [[ -z "$rvm_gemset_name" ]] ; then
635
647
  # No longer defaulting to 'sticky' gem sets.
636
648
  # Set 'rvm_sticky_flag=1' in ~/.rvmrc to enable.
637
649
  if [[ ! -z "$rvm_sticky_flag" ]] ; then
638
650
  if [[ ! -z "$GEM_HOME" ]] ; then
639
- rvm_gemset_name=$(echo $GEM_HOME | xargs basename | awk -F'%' '{print $2}')
651
+ rvm_gemset_name=$(echo $GEM_HOME | xargs basename | awk -F${rvm_gemset_separator} '{print $2}')
640
652
  fi
641
653
  if [[ ! -z "$rvm_ruby_gem_home" ]] ; then
642
- rvm_gemset_name=$(echo $rvm_ruby_gem_home | xargs basename | awk -F'%' '{print $2}')
654
+ rvm_gemset_name=$(echo $rvm_ruby_gem_home | xargs basename | awk -F${rvm_gemset_separator} '{print $2}')
643
655
  fi
644
656
  fi
645
657
 
646
658
  if [[ ! -z "$rvm_gemset_name" ]] && ! $rvm_scripts_path/match "$rvm_gemset_name" "^[0-9]\.[0-9]" ; then
647
- rvm_ruby_gem_home="$rvm_gems_path/$rvm_ruby_string%$rvm_gemset_name"
659
+ rvm_ruby_gem_home="$rvm_gems_path/${rvm_ruby_string}${rvm_gemset_separator}${rvm_gemset_name}"
648
660
  else
649
661
  if [[ ! -z "$rvm_ruby_string" ]] && [[ "$rvm_ruby_interpreter" != "system" ]] ; then
650
662
  rvm_ruby_gem_home="$rvm_gems_path/$rvm_ruby_string"
@@ -658,19 +670,26 @@ __rvm_gemset_select() {
658
670
  fi
659
671
  if [[ -z "$rvm_gemset_name" ]] ; then unset rvm_gemset_name ; fi
660
672
  else
661
- if [[ -z "$rvm_ruby_gem_home" ]] || [[ ! -z "$(echo $rvm_ruby_gem_home | grep '%')" ]] ; then
662
- rvm_ruby_gem_home="$rvm_gems_path/$rvm_ruby_string%$rvm_gemset_name"
673
+ if [[ -z "$rvm_ruby_gem_home" ]] || [[ ! -z "$(echo $rvm_ruby_gem_home | grep ${rvm_gemset_separator})" ]] ; then
674
+ rvm_ruby_gem_home="$rvm_gems_path/${rvm_ruby_string}${rvm_gemset_separator}${rvm_gemset_name}"
663
675
  fi
664
676
  fi
665
677
 
666
678
  # If the gemset does not exist, then notify the user as such and abort the action.
667
- if [[ ! -z "$rvm_gemset_name" ]] && [[ ! -d "$rvm_ruby_gem_home" ]] && [[ "$rvm_gemset_create_on_use_flag" -ne 1 ]] && [[ "$rvm_create_flag" -ne 1 ]] && [[ "$rvm_delete_flag" -ne 1 ]] ; then
668
- $rvm_scripts_path/log "error" "Gemset '$rvm_gemset_name' does not exist, rvm gemset create '$rvm_gemset_name' first."
669
- return 1
679
+ if [[ ! -z "$rvm_gemset_name" ]] && [[ ! -d "$rvm_ruby_gem_home" ]] ; then
680
+ if [[ "$rvm_gemset_create_on_use_flag" -ne 1 ]] && [[ "$rvm_create_flag" -ne 1 ]] && [[ "$rvm_delete_flag" -ne 1 ]] ; then
681
+ $rvm_scripts_path/log "error" "Gemset '$rvm_gemset_name' does not exist, rvm gemset create '$rvm_gemset_name' first."
682
+ return 1
683
+ fi
670
684
  elif [[ "$rvm_delete_flag" -eq 1 ]] ; then
671
685
  return 1
672
686
  fi
673
687
 
688
+ if [[ -z "$rvm_ruby_gem_home" ]] && [[ ! -z $rvm_ruby_string ]] ; then
689
+ rvm_ruby_gem_home="$rvm_gems_path/$rvm_ruby_string"
690
+ rvm_ruby_global_gems_path="$rvm_gems_path/$rvm_ruby_string${rvm_gemset_separator}global"
691
+ fi
692
+
674
693
  rvm_ruby_gem_path="$rvm_ruby_gem_home:$rvm_ruby_global_gems_path"
675
694
 
676
695
  # Careful not to nuke system gems cache.
@@ -710,10 +729,10 @@ __rvm_gemset_use() {
710
729
  $rvm_scripts_path/log "info" "Now using gemset '${rvm_gemset_name:-default}'"
711
730
  fi
712
731
 
713
- rvm_ruby_gem_home="$(echo $GEM_HOME | sed 's/%.*$//')%$rvm_gemset_name"
732
+ rvm_ruby_gem_home="$(echo $GEM_HOME | sed 's/'${rvm_gemset_separator}'.*$//')${rvm_gemset_separator}${rvm_gemset_name}"
714
733
  GEM_HOME="$rvm_ruby_gem_home"
715
734
  BUNDLE_PATH="$rvm_ruby_gem_home"
716
- GEM_PATH="$rvm_ruby_gem_home/bin:$(echo $GEM_HOME | sed 's/%.*$//')%global/bin"
735
+ GEM_PATH="$rvm_ruby_gem_home/bin:$(echo $GEM_HOME | sed 's/'${rvm_gemset_separator}'.*$//')${rvm_gemset_separator}global/bin"
717
736
  export rvm_ruby_gem_home GEM_HOME BUNDLE_PATH GEM_PATH
718
737
 
719
738
  __rvm_use # Now ensure the selection takes effect for the environment.
@@ -721,6 +740,17 @@ __rvm_gemset_use() {
721
740
  return 0
722
741
  }
723
742
 
743
+ __rvm_gemset_clear() {
744
+ unset rvm_gemset_name ; shift
745
+ rvm_ruby_gem_home="$(echo $GEM_HOME | sed "s#${rvm_gemset_separator:-'@'}.*\$##g")"
746
+ rvm_ruby_global_gems_path="$(echo $GEM_HOME | sed 's/'${rvm_gemset_separator}'.*$//')${rvm_gemset_separator}global"
747
+ GEM_HOME=$rvm_ruby_gem_home
748
+ BUNDLE_PATH="$rvm_ruby_gem_home"
749
+ GEM_PATH="$rvm_ruby_gem_home/bin:$rvm_ruby_global_gems_path/bin"
750
+ export rvm_ruby_gem_home rvm_ruby_global_gems_path GEM_HOME BUNDLE_PATH GEM_PATH
751
+ __rvm_use # Now ensure the selection takes effect for the environment.
752
+ }
753
+
724
754
  __rvm_mono_env() {
725
755
  export DYLD_LIBRARY_PATH="$rvm_usr_path/lib:$DYLD_LIBRARY_PATH"
726
756
  export C_INCLUDE_PATH="$rvm_usr_path/include:$C_INCLUDE_PATH"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 24
9
- version: 0.1.24
8
+ - 26
9
+ version: 0.1.26
10
10
  platform: ruby
11
11
  authors:
12
12
  - Wayne E. Seguin
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-21 00:00:00 -04:00
17
+ date: 2010-04-05 00:00:00 -04:00
18
18
  default_executable: rvm-install
19
19
  dependencies: []
20
20
 
@@ -31,6 +31,8 @@ files:
31
31
  - README
32
32
  - binscripts/rvm
33
33
  - binscripts/rvm-prompt
34
+ - binscripts/rvm-update-head
35
+ - binscripts/rvm-update-latest
34
36
  - binscripts/rvmsudo
35
37
  - config/db
36
38
  - config/md5
@@ -73,7 +75,7 @@ files:
73
75
  - scripts/update
74
76
  - scripts/utility
75
77
  - scripts/version
76
- has_rdoc: false
78
+ has_rdoc: true
77
79
  homepage: http://github.com/wayneeseguin/rvm
78
80
  licenses: []
79
81