rvm 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  About:
3
3
 
4
- rvm 0.0.16 http://github.com/wayneeseguin/rvm
4
+ rvm 0.0.17 http://github.com/wayneeseguin/rvm
5
5
 
6
6
  by Wayne E. Seguin (wayneeseguin@gmail.com)
7
7
 
@@ -26,6 +26,8 @@
26
26
  (highly expiramental) Example: rvm gemdup ~/.gem/ruby/1.8/
27
27
  install - Install a ruby version, default is from source
28
28
  uninstall - Uninstall a ruby version
29
+ reset - Remove default and current settings, exit the shell.
30
+ (If you experience odd behavior try this first)
29
31
  debug - Emit environment & configuration information for *current* ruby
30
32
 
31
33
  Implementation:
data/bash/rvm CHANGED
@@ -3,7 +3,7 @@
3
3
  rvm_author="Wayne E. Seguin"
4
4
  rvm_author_email="wayneeseguin@gmail.com"
5
5
  rvm_website="http://github.com/wayneeseguin/rvm"
6
- rvm_version="0.0.16"
6
+ rvm_version="0.0.17"
7
7
  rvm_updated="2009.08.25"
8
8
 
9
9
  #
@@ -44,6 +44,8 @@ function rvm-usage {
44
44
  (highly expiramental) Example: rvm gemdup ~/.gem/ruby/1.8/
45
45
  install - Install a ruby version, default is from source
46
46
  uninstall - Uninstall a ruby version
47
+ reset - Remove default and current settings, exit the shell.
48
+ (If you experience odd behavior try this first)
47
49
  debug - Emit environment & configuration information for *current* ruby
48
50
 
49
51
  Implementation:
@@ -388,13 +390,10 @@ function rvm-use {
388
390
  case "$implementation" in
389
391
 
390
392
  default)
391
- # TODO: There is a reproducible bug here when switching off of 1.8.7...
392
- # Seems that the path is not reset properly.
393
393
  rm -f $install_path/current
394
394
  source $install_path/default
395
395
  PATH="$default_path" ; export PATH
396
396
  ;;
397
- #leopard) MY_RUBY_HOME="/System/Library/Frameworks/Ruby.framework/Versions/Current/usr"; GEM_HOME="$HOME/.gem/ruby/1.8" ;;
398
397
 
399
398
  jruby)
400
399
  version="${version-1.3.1}"
@@ -490,6 +489,25 @@ function rvm-list {
490
489
  echo "ree:"
491
490
  ls $install_path/ | awk '/ruby-enterprise-.*/ { print " - " $NF }'
492
491
  echo
492
+ echo "default:"
493
+ echo " - system (`$default_system_ruby -v`)"
494
+ }
495
+
496
+ function rvm-reset {
497
+
498
+ PATH="$default_path" ; export PATH
499
+ for variable in RUBY_VERSION GEM_HOME MY_RUBY_HOME ; do
500
+ unset $variable
501
+ done
502
+ rm -f $install_path/default* $install_path/current
503
+ if [ ! -z "$BASH_VERSION" ] ; then
504
+ exec bash -l
505
+ elif [ ! -z "$ZSH_VERSION" ] ; then
506
+ exec zsh -l
507
+ else
508
+ rvm-log-fail "Your shell is not supported bash and zsh are currently supported."
509
+ fi
510
+
493
511
  }
494
512
 
495
513
  function rvm-gem-dir {
@@ -623,12 +641,15 @@ function rvm {
623
641
  while [ $# -gt 0 ] ; do
624
642
  token="$1" ; shift
625
643
  case "$token" in
626
- install|uninstall|use|path|info|setup|version|debug|srcdir|list)
627
- action=$token ;;
644
+ install|uninstall|use|path|info|setup|version|srcdir|list|reset|debug)
645
+ action=$token
646
+ ;;
647
+
628
648
  ruby|jruby|ree|default|all)
629
- implementation="$token"
630
- action="${action-use}"
649
+ implementation="$token"
650
+ action="${action-use}"
631
651
  ;;
652
+
632
653
  gemdir)
633
654
  action=$token
634
655
  if [ "$1" = "system" ] ; then
@@ -640,10 +661,12 @@ function rvm {
640
661
 
641
662
  implementation="${implementation-current}"
642
663
  ;;
664
+
643
665
  1.8|1.8.6|1.8.7|1.9|1.9.1|1.9.2|1.2.0|1.3.1)
644
666
  version="$token"
645
667
  action="${action-use}"
646
668
  ;;
669
+
647
670
  -v|--version)
648
671
  if [ -z "$1" ] ; then
649
672
  action="version"
@@ -652,6 +675,7 @@ function rvm {
652
675
  fi
653
676
  shift
654
677
  ;;
678
+
655
679
  -l|--level) patchlevel="$1" ; shift ;;
656
680
  -p|--prefix) install_path="$1" ; shift ;;
657
681
  -s|--source) source_path="$1" ; shift ;; # Undocumented / untested "feature"
@@ -716,6 +740,14 @@ function rvm {
716
740
  ruby -r rubygems -e "puts Gem::default_path.compact[1] || Gem::default_path.compact.first" > $install_path/default_system_gem_path
717
741
  fi
718
742
 
743
+ # system ruby version
744
+ if [ -s $install_path/default_system_ruby ] ; then
745
+ default_system_ruby=`cat $install_path/default_system_ruby`
746
+ else
747
+ default_system_ruby=`which ruby`
748
+ echo $default_system_ruby > $install_path/default_system_ruby
749
+ fi
750
+
719
751
  if [ "$debug" = "1" ] ; then set -x ; fi
720
752
 
721
753
  case "$action" in
@@ -742,6 +774,7 @@ function rvm {
742
774
  gemdup) rvm-gem-dup $implementation $version $patchlevel ;;
743
775
  info) rvm-info $implementation $version $patchlevel ;;
744
776
  version) rvm-version ;;
777
+ reset) rvm-reset ;;
745
778
  debug)
746
779
  rvm-version
747
780
  rvm-info
@@ -0,0 +1,19 @@
1
+ #!/bin/bash
2
+
3
+ user=`whoami`
4
+ if [ "$user" = "root" ] ; then
5
+ echo -e "\e[0;31m <e> \e[0mroot user support is not yet implemented.\e[0m"
6
+ exit 1
7
+ fi
8
+
9
+ info="\n\e[0;32m<i>\e[0m"
10
+
11
+ echo -e "$info Updating rvm source ~/.rvm/bin/rvm ..."
12
+ mkdir -p ~/.rvm/src ~/.rvm/bin
13
+ cp $(pwd)/bash/rvm ~/.rvm/bin/
14
+
15
+ echo -e "\n Thank you, come again! \n"
16
+ echo -e " ~ Wayne"
17
+
18
+ source ~/.rvm/bin/rvm
19
+
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # Hot potato!!! Bash it!
4
- exec "bash -c 'cd #{File.dirname(File.dirname(__FILE__))} && ./bash/rvm-install #{ARGV.join(' ')} ; source ~/.bash_profile'"
4
+ exec "bash -l -c 'cd #{File.dirname(File.dirname(__FILE__))} && ./bash/rvm-install #{ARGV.join(' ')} && source ~/.rvm/bin/rvm'"
5
5
 
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # Hot potato!!! Bash it!
4
+ exec "bash -l -c 'cd #{File.dirname(File.dirname(__FILE__))} && ./bash/rvm-update #{ARGV.join(' ')} && source ~/.rvm/bin/rvm'"
5
+
@@ -0,0 +1,45 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{rvm}
8
+ s.version = "0.0.17"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Wayne E. Seguin"]
12
+ s.date = %q{2009-08-25}
13
+ s.description = %q{Manages Ruby interpreter installations and switching between them.}
14
+ s.email = %q{wayneeseguin@gmail.com}
15
+ s.executables = ["rvm-install", "rvm-update"]
16
+ s.extra_rdoc_files = [
17
+ "README"
18
+ ]
19
+ s.files = [
20
+ "INSTALL",
21
+ "LICENCE",
22
+ "README",
23
+ "bash/rvm",
24
+ "bash/rvm-install",
25
+ "bash/rvm-update",
26
+ "lib/rvm.rb",
27
+ "rvm.gemspec"
28
+ ]
29
+ s.homepage = %q{http://github.com/wayneeseguin/rvm}
30
+ s.rdoc_options = ["--inline-source", "--charset=UTF-8"]
31
+ s.require_paths = ["lib"]
32
+ s.rubyforge_project = %q{dynamicreports}
33
+ s.rubygems_version = %q{1.3.5}
34
+ s.summary = %q{Ruby Version Manager (rvm)}
35
+
36
+ if s.respond_to? :specification_version then
37
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
38
+ s.specification_version = 3
39
+
40
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
41
+ else
42
+ end
43
+ else
44
+ end
45
+ end
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.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wayne E. Seguin
@@ -10,13 +10,14 @@ bindir: bin
10
10
  cert_chain: []
11
11
 
12
12
  date: 2009-08-25 00:00:00 -04:00
13
- default_executable: rvm-install
13
+ default_executable:
14
14
  dependencies: []
15
15
 
16
16
  description: Manages Ruby interpreter installations and switching between them.
17
17
  email: wayneeseguin@gmail.com
18
18
  executables:
19
19
  - rvm-install
20
+ - rvm-update
20
21
  extensions: []
21
22
 
22
23
  extra_rdoc_files:
@@ -27,7 +28,9 @@ files:
27
28
  - README
28
29
  - bash/rvm
29
30
  - bash/rvm-install
31
+ - bash/rvm-update
30
32
  - lib/rvm.rb
33
+ - rvm.gemspec
31
34
  has_rdoc: true
32
35
  homepage: http://github.com/wayneeseguin/rvm
33
36
  licenses: []