rvm 0.0.79 → 0.0.80

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 0
4
- :patch: 79
4
+ :patch: 80
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rvm}
8
- s.version = "0.0.79"
8
+ s.version = "0.0.80"
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{2009-11-18}
12
+ s.date = %q{2009-11-19}
13
13
  s.default_executable = %q{rvm-install}
14
14
  s.description = %q{Manages Ruby interpreter installations and switching between them.}
15
15
  s.email = %q{wayneeseguin@gmail.com}
@@ -293,7 +293,7 @@ __rvm_parse_args() {
293
293
  elif [[ ! -z "$(echo "$rvm_token" | awk '/,/')" ]] ; then
294
294
  rvm_ruby_version="$rvm_token"
295
295
  if [[ -z "$rvm_action" ]] ; then
296
- rvm_action="do" # Not sure if we really want to do this but we'll try it out.
296
+ rvm_action="ruby" # Not sure if we really want to do this but we'll try it out.
297
297
  fi
298
298
  elif match "$rvm_token" "^.+%.+$" ; then
299
299
  rvm_gem_set_name="$(echo "$rvm_token" | awk -F'%' '{print $2}')"
@@ -311,7 +311,7 @@ __rvm_parse_args() {
311
311
  rvm_ruby_args=$rvm_token
312
312
  rvm_ruby_file=$rvm_token
313
313
  if [[ -z "$rvm_action" ]] ; then
314
- rvm_action="ruby" # Not sure if we really want to do this but we'll try it out.
314
+ rvm_action="ruby"
315
315
  fi
316
316
  else
317
317
  rvm_action="error"
@@ -148,8 +148,15 @@ __rvm_gems_load() {
148
148
  gem_postfix="$(basename $gem | sed "s#.*\.gem##")"
149
149
  else
150
150
  gem_name="$(echo $gem | awk '{print $1}')"
151
- gem_version="$(echo $gem | awk '{print $2}' | sed 's#.*-v[=]*[ ]*##' )"
152
- gem_postfix="$(echo $gem | sed "s#${gem_name/ /}##" | sed "s#-v[=]*[ ]*${gem_version/ /}##")"
151
+ if match "$gem" "--version" ; then
152
+ gem_version="$(echo $gem | sed 's#.*--version[=]*[ ]*##' | awk '{print $1}')"
153
+ gem_postfix="$(echo $gem | sed "s#${gem_name/ /}##" | sed "s#--version[=]*[ ]*${gem_version/ /}##")"
154
+ elif match "$gem" "-v" ; then
155
+ gem_version="$(echo $gem | sed 's#.*-v[=]*[ ]*##' | awk '{print $1}')"
156
+ gem_postfix="$(echo $gem | sed "s#${gem_name/ /}##" | sed "s#-v[=]*[ ]*${gem_version/ /}##")"
157
+ else
158
+ unset gem_version # no version
159
+ fi
153
160
  fi
154
161
 
155
162
  if [[ -f "$gem" ]] ; then
@@ -206,6 +206,8 @@ __rvm_use() {
206
206
  __rvm_log "info" "Now using system ruby."
207
207
  fi
208
208
 
209
+ rvm_ruby_string="system"
210
+
209
211
  else
210
212
  GEM_HOME=$rvm_ruby_gem_home ; export GEM_HOME
211
213
  GEM_PATH=$rvm_ruby_gem_home ; export GEM_PATH
@@ -381,13 +381,19 @@ __rvm_db() {
381
381
 
382
382
  __rvm_list() {
383
383
  if [[ ! -z "$rvm_all_flag" ]] ; then
384
- svn list http://svn.ruby-lang.org/repos/ruby/tags/ | grep 'v1_[8|9]' | sed 's#^v1_##' | sed 's#/$##' | awk -F'_' '{print "1."$1"."$2 " -l "$3}' | sed 's#p$##'
385
- echo -e "jruby 1.2.0\njruby 1.3.0\njruby 1.3.1\njruby (1.4.0, the default)\njruby --head"
386
- echo -e "rbx (rubinius head, the default)\nrbx-head --jit"
387
- echo -e "ree 1.8.6-head\nree (1.8.7, the default)"
388
- echo -e "mput head (shyouhei head, the default)"
384
+ while read -r tag
385
+ do
386
+ prefix="$(echo ${tag/\//} | sed 's#^v1_##' | awk -F'_' '{print "(ruby-)1."$1"."$2}' | sed 's#p$##')"
387
+ echo "${prefix}-t${tag/\//}"
388
+ unset prefix tag
389
+ done < <(svn list http://svn.ruby-lang.org/repos/ruby/tags/ | awk '/^v1_[8|9]/')
390
+ echo -e "(ruby-)1.8.6(-p383)\n(ruby-)1.8.6-head\n(ruby-)1.8.7(-p174)\n(ruby-)1.8.7-head\n(ruby-)1.9.1(-p243)\n(ruby-)1.9.1-head\n(ruby-)1.9.2-preview1"
391
+ echo -e "jruby-1.2.0\njruby-1.3.0\njruby-1.3.1\njruby(-1.4.0) # the default\njruby-head"
392
+ echo -e "rbx(-head) # rubinius head, the default rbx \nrbx(-head) --jit (rubinius head with LLVM enabled)"
393
+ echo -e "ree-1.8.6\nree(-1.8.7) # the default\nree-1.8.6-head\nree-1.8.7-head"
394
+ echo -e "mput(-head) # shyouhei head, the default mput"
389
395
  if [[ "Darwin" = "$(uname)" ]] ; then
390
- echo -e "macruby-nightly (macruby-nightly, the default)\nmacruby-head"
396
+ echo -e "macruby(-nightly) # the default macruby\nmacruby-head # Build from the macruby git repository"
391
397
  fi
392
398
  else
393
399
  current_ruby="$(which ruby | xargs dirname | xargs dirname | xargs basename 2> /dev/null)"
@@ -584,41 +590,47 @@ __rvm_ruby_do() {
584
590
  __rvm_use
585
591
  binary="$(echo $rvm_action | sed 's#do$##')"
586
592
  if [[ -x "$rvm_ruby_home/bin/$binary" ]] ; then
587
- load_path="$rvm_ruby_home/bin:$rvm_ruby_load_path"
588
- # TODO: the else case below should be run if $rvm_ruby_args =~ /\.rb$/
589
- if [[ "ruby" = "$binary" ]] && [[ "$rvm_benchmark_flag" -ne 1 ]] ; then
590
- if match "$rvm_ruby_args" "\.rb$" ; then
591
- if [[ -z "$prefix" ]] ; then prefix="-S" ; fi
592
- if ! match "$rvm_ruby_args" "$prefix" ; then
593
- rvm_ruby_args="$prefix $rvm_ruby_args"
594
- fi
593
+ binary="$rvm_ruby_home/bin/$binary"
594
+ elif [[ "system" = "$rvm_ruby_string" ]] && [[ -x "$(which $binary)" ]] ; then
595
+ binary="$(which $binary)"
596
+ else
597
+ __rvm_log "warn" "'$binary not found for $rvm_ruby_string' either does not exist or is not executable? :("
598
+ __rvm_unset_ruby_variables
599
+ return 1
600
+ fi
601
+
602
+ load_path="$rvm_ruby_home/bin:$rvm_ruby_load_path"
603
+ # TODO: the else case below should be run if $rvm_ruby_args =~ /\.rb$/
604
+ if [[ "ruby" = "$binary" ]] && [[ "$rvm_benchmark_flag" -ne 1 ]] ; then
605
+ if match "$rvm_ruby_args" "\.rb$" ; then
606
+ if [[ -z "$prefix" ]] ; then prefix="-S" ; fi
607
+ if ! match "$rvm_ruby_args" "$prefix" ; then
608
+ rvm_ruby_args="$prefix $rvm_ruby_args"
595
609
  fi
596
- rvm_command="$rvm_ruby_home/bin/$binary $rvm_ruby_require -I$load_path $rvm_ruby_args"
597
- elif [[ "gem" = "$binary" ]] && match "$rvm_ruby_args" '^install' ; then
598
- rvm_command="$rvm_ruby_home/bin/$binary $rvm_ruby_args --no-rdoc --no-ri"
599
- else
600
- rvm_command="$rvm_ruby_home/bin/$binary $rvm_ruby_args"
601
610
  fi
611
+ rvm_command="$binary $rvm_ruby_require -I$load_path $rvm_ruby_args"
612
+ elif [[ "gem" = "$binary" ]] && match "$rvm_ruby_args" '^install' ; then
613
+ rvm_command="$binary $rvm_ruby_args --no-rdoc --no-ri"
614
+ else
615
+ rvm_command="$binary $rvm_ruby_args"
616
+ fi
602
617
 
603
- if [[ ! -z "$rvm_json_flag" ]] || [[ ! -z "$rvm_yaml_flag" ]] || [[ ! -z "$rvm_summary_flag" ]] ; then
604
- mkdir -p ./log/$rvm_ruby_string/
605
- touch ./log/$rvm_ruby_string/$rvm_action.log ./log/$rvm_ruby_string/$rvm_action.error.log
606
- eval "$rvm_command" >> ./log/$rvm_ruby_string/$rvm_action.log 2>> ./log/$rvm_ruby_string/$rvm_action.error.log
607
- else
608
- echo -e "\n\n\033[0;32m$rvm_ruby_string: $($rvm_ruby_home/bin/ruby -v | tr "\n" ' ')\033[0m\n"
609
- eval "$rvm_command"
610
- fi
611
- result=$?
612
- if [[ $result -eq 0 ]]; then
613
- eval "successes=(${successes[*]} $rvm_ruby_string)"
614
- else
615
- eval "errors=(${errors[*]} $rvm_ruby_string)"
616
- fi
617
- eval "rubies=(${rubies[*]} $rvm_ruby_string)"
618
- eval "statuses=(${statuses[*]} $result)"
618
+ if [[ ! -z "$rvm_json_flag" ]] || [[ ! -z "$rvm_yaml_flag" ]] || [[ ! -z "$rvm_summary_flag" ]] ; then
619
+ mkdir -p ./log/$rvm_ruby_string/
620
+ touch ./log/$rvm_ruby_string/$rvm_action.log ./log/$rvm_ruby_string/$rvm_action.error.log
621
+ eval "$rvm_command" >> ./log/$rvm_ruby_string/$rvm_action.log 2>> ./log/$rvm_ruby_string/$rvm_action.error.log
622
+ else
623
+ echo -e "\n\n\033[0;32m$rvm_ruby_string: $($rvm_ruby_home/bin/ruby -v | tr "\n" ' ')\033[0m\n"
624
+ eval "$rvm_command"
625
+ fi
626
+ result=$?
627
+ if [[ $result -eq 0 ]]; then
628
+ eval "successes=(${successes[*]} $rvm_ruby_string)"
619
629
  else
620
- __rvm_log "warn" "'$rvm_ruby_home/bin/$binary' either does not exist or is not executable? :("
630
+ eval "errors=(${errors[*]} $rvm_ruby_string)"
621
631
  fi
632
+ eval "rubies=(${rubies[*]} $rvm_ruby_string)"
633
+ eval "statuses=(${statuses[*]} $result)"
622
634
  __rvm_unset_ruby_variables
623
635
  }
624
636
 
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.0.79
4
+ version: 0.0.80
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: 2009-11-18 00:00:00 -05:00
12
+ date: 2009-11-19 00:00:00 -05:00
13
13
  default_executable: rvm-install
14
14
  dependencies: []
15
15