wayneeseguin-rvm 0.0.36 → 0.0.37
Sign up to get free protection for your applications and to get access to all the features.
- data/rvm.gemspec +54 -0
- data/scripts/rvm +2 -1
- data/scripts/rvm-aliases +4 -0
- data/scripts/rvm-cli +29 -11
- data/scripts/rvm-functions +11 -0
- data/scripts/rvm-install +25 -4
- data/scripts/rvm-prompt +5 -0
- data/scripts/rvm-ruby-installer +9 -6
- data/scripts/rvm-selector +70 -13
- data/scripts/rvm-utility +63 -20
- metadata +6 -2
data/rvm.gemspec
ADDED
@@ -0,0 +1,54 @@
|
|
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.37"
|
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-09-09}
|
13
|
+
s.default_executable = %q{rvm-install}
|
14
|
+
s.description = %q{Manages Ruby interpreter installations and switching between them.}
|
15
|
+
s.email = %q{wayneeseguin@gmail.com}
|
16
|
+
s.executables = ["rvm-install"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"README"
|
19
|
+
]
|
20
|
+
s.files = [
|
21
|
+
"INSTALL",
|
22
|
+
"LICENCE",
|
23
|
+
"README",
|
24
|
+
"config/db",
|
25
|
+
"examples/rvmrc",
|
26
|
+
"lib/rvm.rb",
|
27
|
+
"rvm.gemspec",
|
28
|
+
"scripts/rvm",
|
29
|
+
"scripts/rvm-aliases",
|
30
|
+
"scripts/rvm-cli",
|
31
|
+
"scripts/rvm-functions",
|
32
|
+
"scripts/rvm-install",
|
33
|
+
"scripts/rvm-prompt",
|
34
|
+
"scripts/rvm-ruby-installer",
|
35
|
+
"scripts/rvm-selector",
|
36
|
+
"scripts/rvm-utility"
|
37
|
+
]
|
38
|
+
s.homepage = %q{http://github.com/wayneeseguin/rvm}
|
39
|
+
s.rdoc_options = ["--inline-source", "--charset=UTF-8"]
|
40
|
+
s.require_paths = ["lib"]
|
41
|
+
s.rubyforge_project = %q{dynamicreports}
|
42
|
+
s.rubygems_version = %q{1.3.5}
|
43
|
+
s.summary = %q{Ruby Version Manager (rvm)}
|
44
|
+
|
45
|
+
if s.respond_to? :specification_version then
|
46
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
47
|
+
s.specification_version = 3
|
48
|
+
|
49
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
50
|
+
else
|
51
|
+
end
|
52
|
+
else
|
53
|
+
end
|
54
|
+
end
|
data/scripts/rvm
CHANGED
@@ -14,4 +14,5 @@ source $rvm_path/scripts/rvm-selector
|
|
14
14
|
source $rvm_path/scripts/rvm-ruby-installer # TODO: Script not function.
|
15
15
|
source $rvm_path/scripts/rvm-cli
|
16
16
|
|
17
|
-
if [ -f ~/.rvm/
|
17
|
+
if [ -f ~/.rvm/default ] ; then source ~/.rvm/default ; fi
|
18
|
+
|
data/scripts/rvm-aliases
ADDED
data/scripts/rvm-cli
CHANGED
@@ -7,6 +7,7 @@ function __rvm_parse-args {
|
|
7
7
|
install|uninstall|path|info|setup|version|srcdir|list|symlinks|reset|debug|reload|usage|help|implode|update)
|
8
8
|
rvm_action=$rvm_token
|
9
9
|
;;
|
10
|
+
|
10
11
|
use)
|
11
12
|
rvm_action=$rvm_token
|
12
13
|
if [ "$1" = "default" ] ; then
|
@@ -70,6 +71,7 @@ function __rvm_parse-args {
|
|
70
71
|
rvm_ruby_version="$rvm_token"
|
71
72
|
rvm_action="${rvm_action:-use}"
|
72
73
|
;;
|
74
|
+
|
73
75
|
1.2.0|1.3.1)
|
74
76
|
rvm_ruby_interpreter="jruby"
|
75
77
|
rvm_ruby_version="$rvm_token"
|
@@ -111,6 +113,7 @@ function __rvm_parse-args {
|
|
111
113
|
break;
|
112
114
|
fi
|
113
115
|
;;
|
116
|
+
|
114
117
|
--re-configure) rvm_re_configure=1 ;;
|
115
118
|
-M|--make) rvm_ruby_make="$1" ; shift ;;
|
116
119
|
-I|--make-install) rvm_ruby_make_install="$1"; shift ;;
|
@@ -121,16 +124,31 @@ function __rvm_parse-args {
|
|
121
124
|
rvm_ruby_args="$@"
|
122
125
|
rvm_parse_break=1
|
123
126
|
;;
|
127
|
+
|
124
128
|
-h|--help) rvm_action=help ; shift ;;
|
125
129
|
-d|--default) rvm_set_default=1 ;;
|
126
130
|
--head) rvm_ruby_rev="head" ;;
|
127
131
|
--trace|--debug) rvm_debug=1 ;;
|
128
132
|
--force) rvm_force=1 ;;
|
129
|
-
--set-prompt) rvm_set_prompt=1 ;;
|
130
133
|
--all) rvm_all=1 ; shift ;;
|
131
134
|
-m|--gem-set) rvm_gem_set_name="$1" ; shift ;;
|
132
135
|
--rm-gem-set) rvm_gem_set_name_rm="$1" ; shift ;;
|
133
|
-
--
|
136
|
+
--dump) rvm_dump=1 ; shift ;;
|
137
|
+
--load)
|
138
|
+
rvm_load=1
|
139
|
+
if [ ! -z "$1" ] ; then
|
140
|
+
rvm_load_file="$1"
|
141
|
+
shift
|
142
|
+
else
|
143
|
+
rvm_action="error"
|
144
|
+
rvm_error_message="--load must be followed by the .gemset file to load."
|
145
|
+
break;
|
146
|
+
fi
|
147
|
+
shift
|
148
|
+
;;
|
149
|
+
|
150
|
+
--latest) rvm_latest=1 ; shift ;;
|
151
|
+
--jit) rvm_rubinius_jit="RBX_LLVM=1" ;;
|
134
152
|
|
135
153
|
default|system)
|
136
154
|
rvm_action="use"
|
@@ -158,15 +176,15 @@ function rvm {
|
|
158
176
|
__rvm_parse-args $@
|
159
177
|
|
160
178
|
case "$rvm_action" in
|
161
|
-
install) __rvm_install-ruby
|
162
|
-
uninstall) __rvm_uninstall
|
163
|
-
use) __rvm_use
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
symlinks) __rvm_symlinks
|
169
|
-
version) __rvm_version
|
179
|
+
install) __rvm_install-ruby ;;
|
180
|
+
uninstall) __rvm_uninstall ;;
|
181
|
+
use) __rvm_use ;;
|
182
|
+
gemdir) __rvm_gem-dir ;;
|
183
|
+
srcdir) __rvm_src-dir ;;
|
184
|
+
gemdup) __rvm_gem-dup ;;
|
185
|
+
list) __rvm_list ;;
|
186
|
+
symlinks) __rvm_symlinks ;;
|
187
|
+
version) __rvm_version ;;
|
170
188
|
rubydo|rakedo|gemdo)
|
171
189
|
if [ ! -z "$rvm_ruby_version" ] ; then
|
172
190
|
rvm_ruby_versions=$(echo $rvm_ruby_version | tr ',' ' ')
|
data/scripts/rvm-install
CHANGED
@@ -14,7 +14,7 @@ if [ ! -d "$source_dir" ] ; then unset source_dir ; fi
|
|
14
14
|
source_dir="${source_dir:-$cwd}"
|
15
15
|
rvm_dir=~/.rvm
|
16
16
|
|
17
|
-
echo -e "
|
17
|
+
echo -e "\nInstalling rvm source to ~/.rvm/scripts/rvm..."
|
18
18
|
for dir in src scripts bin log archives config gems examples ; do
|
19
19
|
mkdir -p $rvm_dir/$dir
|
20
20
|
done
|
@@ -60,11 +60,13 @@ if [ $? -gt 0 ] ; then
|
|
60
60
|
touch ~/.bash_profile
|
61
61
|
if [ -z "`grep '\.rvm/scripts/rvm' ~/.bash_profile`" ] ; then
|
62
62
|
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.bash_profile."
|
63
|
+
echo -e "\n" >> ~/.bash_profile
|
63
64
|
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.bash_profile
|
64
65
|
fi
|
65
66
|
touch ~/.bashrc
|
66
67
|
if [ -z "`grep '\.rvm/scripts/rvm' ~/.bashrc`" ] ; then
|
67
68
|
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.bashrc."
|
69
|
+
echo -e "\n" >> ~/.bashrc
|
68
70
|
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.bashrc
|
69
71
|
fi
|
70
72
|
|
@@ -75,6 +77,7 @@ if [ $? -gt 0 ] ; then
|
|
75
77
|
touch ~/.zshrc
|
76
78
|
if [ -z "`grep '\.rvm/scripts/rvm' ~/.zshrc`" ] ; then
|
77
79
|
echo "Adding 'if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi' to your ~/.zshrc."
|
80
|
+
echo -e "\n" >> ~/.zshrc
|
78
81
|
echo "if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi" >> ~/.zshrc
|
79
82
|
fi
|
80
83
|
fi
|
@@ -91,6 +94,15 @@ for file in ~/.bash_profile ~/.bashrc ~/.zshrc ; do
|
|
91
94
|
actual_file="$file"
|
92
95
|
fi
|
93
96
|
sed -i.orig 's/rvm\/bin\/rvm/rvm\/scripts\/rvm/g' $actual_file
|
97
|
+
|
98
|
+
if [ -f ~/.profile ] ; then
|
99
|
+
grep '.profile' $actual_file > /dev/null
|
100
|
+
if [ $? -gt 0 ] ; then
|
101
|
+
profile=~/.profile
|
102
|
+
echo -e "\n" >> $actual_file
|
103
|
+
echo "source $profile" >> $actual_file
|
104
|
+
fi
|
105
|
+
fi
|
94
106
|
fi
|
95
107
|
done
|
96
108
|
|
@@ -113,36 +125,45 @@ if [ "$system" = "Linux" ] ; then
|
|
113
125
|
rvm_pacman_binary=`which pacman 2> /dev/null`
|
114
126
|
rvm_yum_binary=`which yum 2> /dev/null`
|
115
127
|
|
116
|
-
echo -e "\033[0;33m <w> \033[0mFor jRuby & ree (if you wish to use it) you will need:"
|
117
128
|
if [ ! -z "$rvm_apt_get_binary" ] ; then
|
118
|
-
echo -e "\033[0;
|
129
|
+
echo -e "\033[0;33m <w> \033[0mFor jRuby (if you wish to use it) you will need:"
|
130
|
+
echo -e "\033[0;32m <i> \033[0msudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk"
|
131
|
+
echo -e "\033[0;33m <w> \033[0mFor ree (if you wish to use it) you will need:"
|
132
|
+
echo -e "\033[0;32m <i> \033[0msudo apt-get install libreadline5-dev libssl-dev "
|
119
133
|
|
120
134
|
elif [ ! -z "$rvm_emerge_binary" ] ; then
|
135
|
+
echo -e "\033[0;33m <w> \033[0mFor jRuby (if you wish to use it) you will need:"
|
121
136
|
echo -e "\033[0;32m <i> \033[0msudo emerge dev-java/sun-jdk dev-java/sun-jre-bin"
|
122
137
|
|
123
138
|
elif [ ! -z "$rvm_pacman_binary" ] ; then
|
139
|
+
echo -e "\033[0;33m <w> \033[0mFor jRuby (if you wish to use it) you will need:"
|
124
140
|
echo -e "\033[0;32m <i> \033[0msudo pacman -Sy jdk jre"
|
125
141
|
|
126
142
|
elif [ ! -z "$rvm_yum_binary" ] ; then
|
143
|
+
echo -e "\033[0;33m <w> \033[0mFor ree (if you wish to use it) you will need:"
|
127
144
|
echo -e "\033[0;32m <i> \033[0myum install -y rpm-build gcc gcc-c++ redhat-rpm-config ; then download and rpmbuild and install the sdk, Have fun..."
|
128
145
|
|
129
146
|
else
|
147
|
+
echo -e "\033[0;33m <w> \033[0mFor jRuby (if you wish to use it) you will need:"
|
130
148
|
echo -e "\033[0;32m <i> \033[0mThe SUN java runtime environment and development kit."
|
131
149
|
fi
|
132
150
|
elif [ "$sytem" = "Darwin" ] ; then
|
151
|
+
echo -e "\033[0;32m <i> \033[0mBe sure that you have XCode Tools installed in order to use rvm."
|
133
152
|
echo -e "\033[0;32m <i> \033[0mIf you intend on installing MacRuby you must install LLVM first."
|
134
153
|
fi
|
135
154
|
|
136
155
|
echo -e "$info There have been a great many updates since previous releases, please:"
|
137
156
|
echo -e "$info * remove sourcing of ~/.rvm/current from your shell profiles."
|
138
|
-
echo -e "$info *
|
157
|
+
echo -e "$info * CLOSE THIS SHELL AND OPEN A NEW ONE FOR rvm."
|
139
158
|
|
140
159
|
echo -e "\n$info Please visit the website for much more information: http://rvm.beginrescueend.com/\n"
|
141
160
|
echo ' w⦿‿⦿t! '
|
142
161
|
echo -e "\n ~ Wayne"
|
143
162
|
|
144
163
|
source $rvm_dir/scripts/rvm
|
164
|
+
|
145
165
|
rvm symlinks
|
146
166
|
echo
|
147
167
|
rvm -v
|
168
|
+
echo
|
148
169
|
|
data/scripts/rvm-prompt
ADDED
data/scripts/rvm-ruby-installer
CHANGED
@@ -1,9 +1,5 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
|
3
|
-
#
|
4
|
-
# Installer
|
5
|
-
#
|
6
|
-
|
7
3
|
function __rvm_install-source {
|
8
4
|
|
9
5
|
if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
|
@@ -238,7 +234,9 @@ function __rvm_install-ruby {
|
|
238
234
|
;;
|
239
235
|
|
240
236
|
rbx|rubinius)
|
241
|
-
|
237
|
+
# TODO: check if system is 1.8.X otherwise use rvm's 1.8.X and check for parsetree, install if missing
|
238
|
+
unset GEM_HOME MY_RUBY_HOME IRBRC
|
239
|
+
PATH="$rvm_default_path" ; export PATH
|
242
240
|
rvm_ruby_repo_url=$rvm_rubinius_repo_url
|
243
241
|
rvm_ruby_configure=""
|
244
242
|
rvm_ruby_make="rake"
|
@@ -278,7 +276,12 @@ function __rvm_install-ruby {
|
|
278
276
|
__rvm_log "info" "\tDownloading $rvm_package_file, this may take a while depending on your connection..."
|
279
277
|
__rvm_fetch $rvm_url
|
280
278
|
__rvm_log "info" "\tExtracting $rvm_package_file..."
|
281
|
-
|
279
|
+
rvm_unzip=`which unzip`
|
280
|
+
if [ $? -ne 0 ] ; then
|
281
|
+
__rvm_log "error" "\t'unzip' was not found in your PATH. jRuby official release comes as a .zip file, hence 'unzip' is required to extract it. Please install 'unzip' and try again."
|
282
|
+
else
|
283
|
+
__rvm_run "extract" unzip -q $rvm_archives_path/$rvm_package_file.zip -d $rvm_source_path
|
284
|
+
fi
|
282
285
|
cd $rvm_ruby_src_path
|
283
286
|
fi
|
284
287
|
fi
|
data/scripts/rvm-selector
CHANGED
@@ -32,6 +32,7 @@ function __rvm_select {
|
|
32
32
|
rbx|rubinius)
|
33
33
|
rvm_ruby_version="head"
|
34
34
|
unset rvm_ruby_patch_level
|
35
|
+
rvm_ruby_interpreter="rubinius"
|
35
36
|
rvm_ruby_repo_url=`__rvm_db "rubinius_repo_url"`
|
36
37
|
rvm_ruby_configure=""
|
37
38
|
rvm_ruby_make="build"
|
@@ -89,7 +90,7 @@ function __rvm_select {
|
|
89
90
|
fi
|
90
91
|
fi
|
91
92
|
|
92
|
-
if [ ! -z "$rvm_ruby_interpreter" -a ! -z "$rvm_ruby_version" ] ; then
|
93
|
+
if [ ! -z "$rvm_ruby_interpreter" -a ! -z "$rvm_ruby_version" -a "$rvm_ruby_interpreter" != "system" ] ; then
|
93
94
|
rvm_major_version=$(echo $rvm_ruby_version | awk -F'.' '{ print $2 }')
|
94
95
|
rvm_minor_version=$(echo $rvm_ruby_version | awk -F'.' '{ print $3 }')
|
95
96
|
|
@@ -102,6 +103,51 @@ function __rvm_select {
|
|
102
103
|
else
|
103
104
|
rvm_gem_home="$rvm_gem_path/$rvm_ruby_interpreter/$rvm_ruby_version-$rvm_gem_set_name"
|
104
105
|
fi
|
106
|
+
|
107
|
+
if [ ! -z "$rvm_load" ] ; then
|
108
|
+
# TODO: Load a .gemset file.
|
109
|
+
echo "Loading $rvm_load_file file... (not :)"
|
110
|
+
cat $rvm_load_file | $(
|
111
|
+
while read line ; do # for line in `cat $rvm_load_file` ; do
|
112
|
+
if [ -z "`echo $line | sed 's/ //g' | grep '^#'`" ] ; then # Skip comment lines
|
113
|
+
gem=`echo $line | awk -F';' '{print $1}'`
|
114
|
+
prefix=`echo $line | awk -F';' '{print $2}'`
|
115
|
+
if [ -z "$vars" ] ; then
|
116
|
+
GEM_HOME="$rvm_gem_home" gem install --no-rdoc --no-ri -q $gem
|
117
|
+
else
|
118
|
+
eval "GEM_HOME='$rvm_gem_home' $prefix gem install --no-rdoc --no-ri -q $gem"
|
119
|
+
fi
|
120
|
+
unset gem prefix
|
121
|
+
fi
|
122
|
+
done
|
123
|
+
)
|
124
|
+
fi
|
125
|
+
|
126
|
+
if [ ! -z "$rvm_dump" ] ; then
|
127
|
+
if [ -z "$rvm_gem_set_name" ] ; then
|
128
|
+
file_name="default"
|
129
|
+
else
|
130
|
+
file_name="$rvm_gem_set_name"
|
131
|
+
fi
|
132
|
+
|
133
|
+
echo "# $rvm_gem_set_name.gemset generated gem dump file. Note that any env variable settings will be missing. Append these after using a ';' field separator" > $rvm_gem_set_name.gemset
|
134
|
+
|
135
|
+
gems="`gem list | sed 's/[\(|\)]//g' | sed 's/, /,/g' | tr ' ' ';'`"
|
136
|
+
for gem in $gems ; do
|
137
|
+
name=`echo $gem | awk -F';' '{print $1}'`
|
138
|
+
if [ -z "$rvm_gem_latest" ] ; then
|
139
|
+
versions=`echo $gem | awk -F';' '{print $2}' | sed 's/,/ /g'`
|
140
|
+
for version in $versions ; do
|
141
|
+
echo "$name -v$version" >> $file_name.gemset
|
142
|
+
done
|
143
|
+
unset version
|
144
|
+
else
|
145
|
+
echo "$name" >> $file_name.gemset
|
146
|
+
fi
|
147
|
+
unset name
|
148
|
+
done
|
149
|
+
unset file_name gems versions
|
150
|
+
fi
|
105
151
|
fi
|
106
152
|
mkdir -p $rvm_gem_home
|
107
153
|
|
@@ -131,12 +177,27 @@ function __rvm_use {
|
|
131
177
|
if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
|
132
178
|
if [ -z "$rvm_ruby_interpreter" ] ; then rvm_ruby_interpreter="default" ; fi
|
133
179
|
|
134
|
-
if [ "$rvm_ruby_interpreter" = "default"
|
180
|
+
if [ "$rvm_ruby_interpreter" = "default" ] ; then
|
181
|
+
|
182
|
+
if [ -s $rvm_path/default ] ; then
|
183
|
+
source $rvm_path/default
|
184
|
+
else
|
185
|
+
__rvm_log "error" "no default rvm specified, defaulting to pre-rvm sytem."
|
186
|
+
unset GEM_HOME MY_RUBY_HOME IRBRC
|
187
|
+
PATH="$rvm_default_path" ; export PATH
|
188
|
+
if [ -s $rvm_path/system ] ; then
|
189
|
+
source $rvm_path/system
|
190
|
+
fi
|
191
|
+
fi
|
192
|
+
|
193
|
+
elif [ "$rvm_ruby_interpreter" = "system" ] ; then
|
194
|
+
|
135
195
|
unset GEM_HOME MY_RUBY_HOME IRBRC
|
136
196
|
PATH="$rvm_default_path" ; export PATH
|
137
|
-
if [
|
138
|
-
source $rvm_path/
|
197
|
+
if [ -s $rvm_path/system ] ; then
|
198
|
+
source $rvm_path/system
|
139
199
|
fi
|
200
|
+
|
140
201
|
else
|
141
202
|
GEM_HOME=$rvm_gem_home ; export GEM_HOME
|
142
203
|
MY_RUBY_HOME=$rvm_ruby_home ; export MY_RUBY_HOME
|
@@ -174,26 +235,22 @@ Config
|
|
174
235
|
fi
|
175
236
|
PATH="$MY_RUBY_HOME/bin:$GEM_HOME/bin:$rvm_path/bin:$rvm_default_path" ; export PATH
|
176
237
|
|
177
|
-
rvm_prompt="$rvm_ruby_package_name" ; export rvm_prompt
|
178
|
-
if [ ! -z "$rvm_set_prompt" -a ! -z "$PS1" ] ; then
|
179
|
-
PS1="\033[0;32m${rvm_prompt}\033[0m:: ${rvm_default_ps1}" ; export PS1
|
180
|
-
fi
|
181
|
-
|
182
238
|
if [ ! -z "$rvm_set_default" ] ; then
|
183
239
|
RUBY_VERSION="$($MY_RUBY_HOME/bin/ruby -v | sed 's/^\(.*\) (.*$/\1/')"
|
184
240
|
export GEM_HOME MY_RUBY_HOME RUBY_VERSION
|
185
241
|
|
186
|
-
echo "PATH=$MY_RUBY_HOME/bin:$GEM_HOME/bin:$rvm_path/bin:\$PATH ; export PATH" > $rvm_path/
|
242
|
+
echo "PATH=$MY_RUBY_HOME/bin:$GEM_HOME/bin:$rvm_path/bin:\$PATH ; export PATH" > $rvm_path/default
|
187
243
|
|
188
|
-
for variable in
|
244
|
+
for variable in RUBY_VERSION GEM_HOME MY_RUBY_HOME IRBRC ; do
|
189
245
|
eval "export $variable"
|
190
246
|
eval value=\$${variable}
|
191
247
|
if [ ! -z "$variable" ] ; then
|
192
|
-
echo "${variable}='$value' ; export ${variable}" >> $rvm_path/
|
248
|
+
echo "${variable}='$value' ; export ${variable}" >> $rvm_path/default
|
193
249
|
else
|
194
|
-
echo "unset ${variable}" >> $rvm_path/
|
250
|
+
echo "unset ${variable}" >> $rvm_path/default
|
195
251
|
fi
|
196
252
|
done
|
253
|
+
unset rvm_set_default
|
197
254
|
fi
|
198
255
|
fi
|
199
256
|
}
|
data/scripts/rvm-utility
CHANGED
@@ -4,8 +4,8 @@ function __rvm_meta {
|
|
4
4
|
rvm_meta_author="Wayne E. Seguin"
|
5
5
|
rvm_meta_author_email="wayneeseguin@gmail.com"
|
6
6
|
rvm_meta_website="http://rvm.beginrescueend.com/"
|
7
|
-
rvm_meta_version="0.0.
|
8
|
-
rvm_meta_updated="2009.09.
|
7
|
+
rvm_meta_version="0.0.37"
|
8
|
+
rvm_meta_updated="2009.09.09"
|
9
9
|
}
|
10
10
|
|
11
11
|
function __rvm_version { __rvm_meta ; echo "rvm $rvm_meta_version ($rvm_meta_updated) [$rvm_meta_website]" ; }
|
@@ -37,6 +37,7 @@ function __rvm_usage {
|
|
37
37
|
reset - Remove default and current settings, exit the shell.
|
38
38
|
(If you experience odd behavior try this first)
|
39
39
|
rubydo - Used with -f to run a ruby file against specified or all rubies
|
40
|
+
gemdo - Used with -f to execute a command using selected ruby's 'gem'
|
40
41
|
debug - Emit environment & configuration information for *current* ruby
|
41
42
|
|
42
43
|
reload - Reload rvm source itself (useful after changing rvm source)
|
@@ -118,6 +119,7 @@ binaries:
|
|
118
119
|
ruby: "`which ruby`"
|
119
120
|
irb: "`which irb`"
|
120
121
|
gem: "`which gem`"
|
122
|
+
rake: "`which rake`"
|
121
123
|
|
122
124
|
environment:
|
123
125
|
GEM_HOME: "$GEM_HOME"
|
@@ -127,15 +129,19 @@ Info
|
|
127
129
|
}
|
128
130
|
|
129
131
|
function __rvm_debug {
|
132
|
+
|
130
133
|
__rvm_log "info" "PATH:$(echo $PATH | awk -F":" '{print $1":"$2":"$3":"$4":"$5}')"
|
134
|
+
|
131
135
|
for file in .bash_profile .bashrc .zshrc ; do
|
132
136
|
if [ -s $file ] ; then
|
133
137
|
__rvm_log "debug" "~/$file:\n$(grep rvm ~/$file)\n"
|
134
138
|
fi
|
135
139
|
done
|
136
|
-
|
137
|
-
|
140
|
+
|
141
|
+
if [ -s $rvm_path/default ] ; then
|
142
|
+
__rvm_log "debug" "$rvm_path/default:\n$($rvm_path/default)\n"
|
138
143
|
fi
|
144
|
+
|
139
145
|
if [ -e $rvm_path/bin/rvm ] ; then
|
140
146
|
__rvm_log "debug" "rvm script in bin:\n$(ls -laht $rvm_path/bin/rvm)"
|
141
147
|
fi
|
@@ -178,7 +184,7 @@ function __rvm_run {
|
|
178
184
|
}
|
179
185
|
|
180
186
|
function __rvm_cleanup-variables {
|
181
|
-
unset rvm_selected rvm_action rvm_ruby_interpreter rvm_ruby_patch_level rvm_ruby_version rvm_irbrc_file rvm_ruby_irbrc rvm_source_path rvm_path rvm_debug rvm_prefix_path rvm_ruby_package_name rvm_gem_path rvm_command rvm_error_message rvm_ruby_home rvm_ruby_binary rvm_gem_set_name rvm_delete_flag rvm_ruby_tag rvm_ruby_rev rvm_url rvm_ruby_make rvm_ruby_make_install rvm_config_path rvm_bin_path rvm_force
|
187
|
+
unset rvm_selected rvm_action rvm_ruby_interpreter rvm_ruby_patch_level rvm_ruby_version rvm_irbrc_file rvm_ruby_irbrc rvm_source_path rvm_path rvm_debug rvm_prefix_path rvm_ruby_package_name rvm_gem_path rvm_command rvm_error_message rvm_ruby_home rvm_ruby_binary rvm_gem_set_name rvm_delete_flag rvm_ruby_tag rvm_ruby_rev rvm_url rvm_ruby_make rvm_ruby_make_install rvm_config_path rvm_bin_path rvm_force rvm_all rvm_re_configure
|
182
188
|
}
|
183
189
|
|
184
190
|
# TODO: root user loadng of /etc/rvmrc
|
@@ -191,6 +197,7 @@ function __rvm_bin_scripts {
|
|
191
197
|
|
192
198
|
ruby_wrapper=$(cat <<-RubyWrapper
|
193
199
|
#!/bin/bash
|
200
|
+
puts "rvm installed ruby binaries should *not* be run as the root user (yet): http://rvm.beginrescueend.com/faq/" if (`whoami`.strip == "root")
|
194
201
|
GEM_HOME=$rvm_gem_home ; export GEM_HOME
|
195
202
|
MY_RUBY_HOME=$rvm_ruby_home ; export MY_RUBY_HOME
|
196
203
|
PATH=$rvm_ruby_home/bin:$rvm_gem_home/bin:\$PATH ; export PATH
|
@@ -205,7 +212,6 @@ RubyWrapper
|
|
205
212
|
|
206
213
|
}
|
207
214
|
|
208
|
-
|
209
215
|
function __rvm_fetch {
|
210
216
|
|
211
217
|
pushd $rvm_archives_path > /dev/null
|
@@ -217,15 +223,15 @@ function __rvm_fetch {
|
|
217
223
|
|
218
224
|
function __rvm_load-defaults {
|
219
225
|
|
220
|
-
if [ ! -s $rvm_path/
|
221
|
-
for variable in
|
226
|
+
if [ ! -s $rvm_path/system ] ; then
|
227
|
+
for variable in RUBY_VERSION GEM_HOME MY_RUBY_HOME PATH ; do
|
222
228
|
eval value=\$${variable}
|
223
229
|
if [ -z "$value" ] ; then
|
224
|
-
echo "unset ${variable}" >> $rvm_path/
|
230
|
+
echo "unset ${variable}" >> $rvm_path/system
|
225
231
|
else
|
226
232
|
eval "export $variable"
|
227
233
|
eval value=\$${variable}
|
228
|
-
echo "${variable}='$value' ; export ${variable}" >> $rvm_path/
|
234
|
+
echo "${variable}='$value' ; export ${variable}" >> $rvm_path/system
|
229
235
|
fi
|
230
236
|
done
|
231
237
|
fi
|
@@ -271,9 +277,11 @@ function __rvm_load-defaults {
|
|
271
277
|
function __rvm_reset {
|
272
278
|
|
273
279
|
PATH="$rvm_path/bin:$rvm_default_path" ; export PATH
|
274
|
-
for variable in RUBY_VERSION GEM_HOME MY_RUBY_HOME
|
280
|
+
for variable in RUBY_VERSION GEM_HOME MY_RUBY_HOME ; do unset $variable ; done
|
281
|
+
if [ -f $rvm_path/system ] ; then rm -f $rvm_path/system ; fi
|
275
282
|
rm -f $rvm_path/default*
|
276
|
-
|
283
|
+
# TODO: Remove this after a few releases:
|
284
|
+
rm -f $rvm_path/current*
|
277
285
|
|
278
286
|
__rvm_select "system"
|
279
287
|
|
@@ -322,7 +330,7 @@ function __rvm_src-dir {
|
|
322
330
|
|
323
331
|
}
|
324
332
|
|
325
|
-
# clones from source implementation/version to
|
333
|
+
# clones from source implementation/version to default
|
326
334
|
function __rvm_gem-dup {
|
327
335
|
|
328
336
|
if [ "$1" = "default" ] ; then
|
@@ -404,10 +412,46 @@ function __rvm_list {
|
|
404
412
|
echo "rbx head --jit"
|
405
413
|
echo "ree 20090610"
|
406
414
|
else
|
407
|
-
|
408
|
-
echo -e "
|
409
|
-
|
410
|
-
|
415
|
+
current=`which ruby | xargs dirname | xargs dirname | xargs basename`
|
416
|
+
echo -e "\nruby:\n"
|
417
|
+
for version in `/bin/ls -l $rvm_path/ | awk '/ ruby-[1-2].*/ { print $NF }'` ; do
|
418
|
+
if [ "$current" = "$version" ] ; then
|
419
|
+
echo -e "=> $version"
|
420
|
+
selected="1"
|
421
|
+
else
|
422
|
+
echo -e " $version"
|
423
|
+
fi
|
424
|
+
done
|
425
|
+
unset version
|
426
|
+
|
427
|
+
echo -e "\njruby:\n"
|
428
|
+
for version in `/bin/ls -l $rvm_path/ | awk '/jruby-.*/ { print $NF }'` ; do
|
429
|
+
if [ "$current" = "$version" ] ; then
|
430
|
+
echo -e "=> $version"
|
431
|
+
selected="1"
|
432
|
+
else
|
433
|
+
echo -e " $version"
|
434
|
+
fi
|
435
|
+
done
|
436
|
+
unset version
|
437
|
+
|
438
|
+
echo -e "\nree:\n"
|
439
|
+
for version in `/bin/ls $rvm_path/ | awk '/ruby-enterprise-.*/ { print $NF }'` ; do
|
440
|
+
if [ "$current" = "$version" ] ; then
|
441
|
+
echo -e "=> $version"
|
442
|
+
selected="1"
|
443
|
+
else
|
444
|
+
echo -e " $version"
|
445
|
+
fi
|
446
|
+
done
|
447
|
+
|
448
|
+
echo -e "\nsystem:\n"
|
449
|
+
if [ "$selected" = "1" ] ; then
|
450
|
+
echo -e " $($rvm_default_system_ruby -v)\n"
|
451
|
+
else
|
452
|
+
echo -e "=> $($rvm_default_system_ruby -v)\n"
|
453
|
+
fi
|
454
|
+
unset current version selected
|
411
455
|
fi
|
412
456
|
|
413
457
|
}
|
@@ -418,9 +462,9 @@ function __rvm_initialize {
|
|
418
462
|
if [ $? -ne 0 ] ; then
|
419
463
|
rvm_fetch=`which wget`
|
420
464
|
if [ $? -ne 0 ] ; then
|
421
|
-
rvm_fetch="wget -q -c "
|
422
|
-
else
|
423
465
|
__rvm_log "fail" "rvm expects either curl or wget, neither seem to be in your path :("
|
466
|
+
else
|
467
|
+
rvm_fetch="wget -q -c "
|
424
468
|
fi
|
425
469
|
else
|
426
470
|
rvm_fetch="$rvm_fetch -O -L -s --create-dirs -C - "
|
@@ -463,4 +507,3 @@ function __rvm_initialize {
|
|
463
507
|
mkdir -p $rvm_source_path $rvm_bin_path $rvm_archives_path
|
464
508
|
}
|
465
509
|
|
466
|
-
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wayneeseguin-rvm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.37
|
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-09-
|
12
|
+
date: 2009-09-09 00:00:00 -07:00
|
13
13
|
default_executable: rvm-install
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -28,9 +28,13 @@ files:
|
|
28
28
|
- config/db
|
29
29
|
- examples/rvmrc
|
30
30
|
- lib/rvm.rb
|
31
|
+
- rvm.gemspec
|
31
32
|
- scripts/rvm
|
33
|
+
- scripts/rvm-aliases
|
32
34
|
- scripts/rvm-cli
|
35
|
+
- scripts/rvm-functions
|
33
36
|
- scripts/rvm-install
|
37
|
+
- scripts/rvm-prompt
|
34
38
|
- scripts/rvm-ruby-installer
|
35
39
|
- scripts/rvm-selector
|
36
40
|
- scripts/rvm-utility
|