rvm 0.1.18 → 0.1.19
Sign up to get free protection for your applications and to get access to all the features.
- data/binscripts/rvm +14 -3
- data/config/db +1 -1
- data/config/md5 +4 -0
- data/examples/rvmrc +10 -10
- data/install +16 -9
- data/lib/VERSION.yml +1 -1
- data/rvm.gemspec +6 -5
- data/scripts/cli +82 -72
- data/scripts/{gems → gemsets} +33 -33
- data/scripts/initialize +4 -2
- data/scripts/install +16 -9
- data/scripts/manage +10 -5
- data/scripts/{libraries → package} +48 -26
- data/scripts/rvm +13 -6
- data/scripts/rvm-install +16 -9
- data/scripts/selector +10 -10
- data/scripts/set +179 -0
- data/scripts/update +16 -9
- data/scripts/utility +45 -205
- metadata +15 -7
data/binscripts/rvm
CHANGED
@@ -2,17 +2,28 @@
|
|
2
2
|
|
3
3
|
if [[ -f /etc/rvmrc ]] ; then source /etc/rvmrc ; fi
|
4
4
|
if [[ -f "$HOME/.rvmrc" ]] ; then source "$HOME/.rvmrc" ; fi
|
5
|
+
if [[ -z "$rvm_prefix" ]] ; then unset rvm_prefix ; fi
|
5
6
|
if [[ -z "$rvm_path" ]] ; then unset rvm_path ; fi
|
6
7
|
|
8
|
+
if [[ -z "$rvm_prefix" ]] ; then
|
9
|
+
if [[ "root" = "$(whoami)" ]] ; then
|
10
|
+
rvm_prefix="/usr/local"
|
11
|
+
else
|
12
|
+
rvm_prefix="$HOME"
|
13
|
+
fi
|
14
|
+
fi
|
15
|
+
|
7
16
|
if [[ -z "$rvm_path" ]] ; then
|
8
17
|
unset rvm_path
|
9
18
|
if [[ "root" = "$(whoami)" ]] ; then
|
10
|
-
rvm_path="/
|
19
|
+
rvm_path="$rvm_prefix/rvm"
|
11
20
|
else
|
12
21
|
if [[ -d "$HOME/.rvm" ]] && [[ -s "$HOME/.rvm/scripts/rvm" ]]; then
|
13
22
|
rvm_path="$HOME/.rvm"
|
14
|
-
elif [[ -d "/
|
15
|
-
rvm_path="$
|
23
|
+
elif [[ -d "$rvm_prefix/rvm" ]] && [[ -s "$rvm_prefix/rvm/scripts/rvm" ]] ; then
|
24
|
+
rvm_path="$rvm_prefix/rvm"
|
25
|
+
else
|
26
|
+
rvm_path="$HOME/.rvm"
|
16
27
|
fi
|
17
28
|
fi
|
18
29
|
fi
|
data/config/db
CHANGED
@@ -29,7 +29,7 @@ macruby_version=0.5
|
|
29
29
|
macruby_url=http://www.macruby.org/files
|
30
30
|
macruby_repo_url=git://git.macruby.org/macruby/MacRuby.git
|
31
31
|
macruby_nightly_url=http://macruby.icoretech.org/latest/macruby_nightly-latest.pkg
|
32
|
-
maglev_version=
|
32
|
+
maglev_version=22907
|
33
33
|
maglev_url=http://glass-downloads.gemstone.com/maglev
|
34
34
|
maglev_repo_url=git://github.com/MagLev/maglev.git
|
35
35
|
rubinius_repo_url=git://github.com/evanphx/rubinius.git
|
data/config/md5
CHANGED
@@ -43,6 +43,10 @@ MagLev-22891.Darwin-i386.tar.gz=d8d3a8aaff1473422d6a30ecd2b2e9ff
|
|
43
43
|
GemStone-22891.Darwin-i386.tar.gz=84080bda40c640aac9f19f5ea48403bf
|
44
44
|
MagLev-22891.Linux-x86_64.tar.gz=f91f1bec1f3defb49323a70ec25504ef
|
45
45
|
GemStone-22891.Linux-x86_64.tar.gz=5fd0d341a0eb586c9f804976cc290810
|
46
|
+
GemStone-22907.Darwin-i386.tar.gz=c55d586da20dc4dd65da2e7f731f1d74
|
47
|
+
GemStone-22907.Linux-x86_64.tar.gz=47c2d4527e3ea04715808048669d69ce
|
48
|
+
MagLev-22907.Darwin-i386.tar.gz=8b7b351581611d076c7c9c1f90a04160
|
49
|
+
MagLev-22907.Linux-x86_64.tar.gz=9f88d6bf8f607f5fdc1c476f7a6ab851
|
46
50
|
MacRuby%200.5.zip=675454a8c7bc19d606d90a726e08427c
|
47
51
|
jruby-bin-1.3.1.tar.gz=4a95db8fc93ed7219663fbede98b6117
|
48
52
|
jruby-bin-1.4.0.tar.gz=f37322c18e9134e91e064aebb4baa4c7
|
data/examples/rvmrc
CHANGED
@@ -10,42 +10,42 @@
|
|
10
10
|
|
11
11
|
# rvm Path
|
12
12
|
# This is where rvm installs and manages everything in by default.
|
13
|
-
#rvm_path="$HOME/.rvm"
|
13
|
+
#export rvm_path="$HOME/.rvm"
|
14
14
|
|
15
15
|
# Archives Path
|
16
16
|
# This is where all tarballs/zipfiles/packagefiles are downladed to
|
17
|
-
#rvm_archives_path="${rvm_path}/archives"
|
17
|
+
#export rvm_archives_path="${rvm_path}/archives"
|
18
18
|
|
19
19
|
# Source Path
|
20
20
|
# This is where rvm extracts to for compiling & installing.
|
21
|
-
#rvm_source_path="${rvm_path}/src"
|
21
|
+
#export rvm_source_path="${rvm_path}/src"
|
22
22
|
|
23
23
|
# Log Path
|
24
24
|
# This is where rvm logs all of it's actions to
|
25
25
|
# (not including the 'do' actions)
|
26
|
-
#rvm_log_path="${rvm_path}/log"
|
26
|
+
#export rvm_log_path="${rvm_path}/log"
|
27
27
|
|
28
28
|
# Bin Path
|
29
29
|
# This is where rvm places all of it's executable/wrapper scripts.
|
30
|
-
#rvm_bin_path="${$rvm_path}/bin"
|
30
|
+
#export rvm_bin_path="${$rvm_path}/bin"
|
31
31
|
|
32
32
|
# Gem Path
|
33
33
|
# This is where rvm installs all gems to for each ruby
|
34
34
|
# interpreter/version%gemset
|
35
|
-
#
|
35
|
+
#export rvm_gems_path="$rvm_path/gems"
|
36
36
|
|
37
37
|
# Hooks Path
|
38
38
|
# This is where rvm rubs custom hook files from.
|
39
|
-
#rvm_hooks_path="${rvm_hooks_path:-"$rvm_path/hooks"}"
|
39
|
+
#export rvm_hooks_path="${rvm_hooks_path:-"$rvm_path/hooks"}"
|
40
40
|
|
41
41
|
# Temp Path
|
42
42
|
# This is where rvm stores all of its temporary files.
|
43
|
-
#rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}"
|
43
|
+
#export rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}"
|
44
44
|
|
45
45
|
# Install On Use Flag
|
46
46
|
# Install rubies when used if are not installed.
|
47
|
-
#ruby_install_on_use=1
|
47
|
+
#export ruby_install_on_use=1
|
48
48
|
|
49
49
|
# Make Flags, I have 8 cpu's so I might use 7 make threads:
|
50
|
-
#rvm_make_flags="-
|
50
|
+
#export rvm_make_flags="-j7"
|
51
51
|
|
data/install
CHANGED
@@ -35,17 +35,17 @@ while [[ $# -gt 0 ]] ; do
|
|
35
35
|
esac
|
36
36
|
done
|
37
37
|
|
38
|
-
|
39
|
-
|
40
|
-
if [[ -z "$rvm_path" ]] ; then
|
41
|
-
unset rvm_path
|
38
|
+
if [[ -z "$rvm_prefix" ]] ; then
|
39
|
+
__rvm_load_rvmrc
|
42
40
|
if [[ "root" = "$(whoami)" ]] ; then
|
43
|
-
|
41
|
+
rvm_prefix="/usr/local/"
|
44
42
|
else
|
45
|
-
|
43
|
+
rvm_prefix="$HOME/."
|
46
44
|
fi
|
47
45
|
fi
|
48
46
|
|
47
|
+
if [[ -z "$rvm_path" ]] ; then rvm_path="${rvm_prefix}rvm" ; fi
|
48
|
+
|
49
49
|
source scripts/initialize
|
50
50
|
__rvm_initialize
|
51
51
|
|
@@ -69,7 +69,7 @@ rvm_scripts_path="${rvm_scripts_path:-"$rvm_path/scripts"}"
|
|
69
69
|
rvm_config_path="${rvm_config_path:-"$rvm_path/config"}"
|
70
70
|
rvm_hooks_path="${rvm_hooks_path:-"$rvm_path/hooks"}"
|
71
71
|
rvm_tmp_path="${rvm_tmp_path:-"$rvm_path/tmp"}"
|
72
|
-
rvm_symlink_path="${rvm_symlink_path
|
72
|
+
rvm_symlink_path="${rvm_symlink_path:-$rvm_prefix/bin}"
|
73
73
|
|
74
74
|
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
|
75
75
|
|
@@ -92,6 +92,11 @@ if [[ ! -s "$rvm_config_path/user" ]] ; then
|
|
92
92
|
echo '# Users settings file, overrides db file settings and persists across installs.' >> $rvm_config_path/user
|
93
93
|
fi
|
94
94
|
|
95
|
+
scripts="monitor match log install color db fetch log set libraries"
|
96
|
+
for script_name in $(echo $scripts) ; do
|
97
|
+
chmod +x $rvm_scripts_path/$script_name
|
98
|
+
done
|
99
|
+
|
95
100
|
#
|
96
101
|
# Bin Scripts
|
97
102
|
#
|
@@ -167,6 +172,7 @@ echo -e "\nThank you for using rvm. I hope that it makes your work easier and mo
|
|
167
172
|
echo -e "If you have any questions, issues and/or ideas for improvement please hop in #rvm on irc.freenode.net and let me know."
|
168
173
|
echo -e "My irc nickname is 'wayneeseguin' and I hang out from ~09:00-17:00EST and again from ~21:00EST-~00:00EST."
|
169
174
|
echo -e "If I do not respond right away, please hang around after asking your question, I will respond as soon as I am back."
|
175
|
+
echo -e "Be sure to get head often as rvm development happens fast, you can do this by typing 'rvm update --head'."
|
170
176
|
echo -e "\n w$(tput setaf 2)⦿‿⦿$(tput sgr0)t!"
|
171
177
|
echo -e "\n ~ Wayne"
|
172
178
|
echo -e "\n********************************************************************************"
|
@@ -176,13 +182,14 @@ if [[ "root" != "$(whoami)" ]] ; then
|
|
176
182
|
echo -e "\n1) Place the folowing line at the end of your shell's loading files(.bashrc and then .bash_profile for bash and .zshrc for zsh), after all path/variable settings:"
|
177
183
|
echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
|
178
184
|
echo -e "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
|
179
|
-
echo -e "\n This means that if you see '[ -z "$PS1" ] && return' then you must split your .bashrc"
|
185
|
+
echo -e "\n This means that if you see '[ -z "$PS1" ] && return' then you must remove it and split your .bashrc"
|
180
186
|
echo -e "\n Put everything *except the return code line(s)* into your .bash_profile, and everything above that code in your .bashrc."
|
187
|
+
echo -e "\n Be *sure* to REMOVE the '&& return' statement line."
|
181
188
|
echo -e "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the top of your .bash_profile."
|
182
189
|
echo -e "\n4) Then $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
|
183
190
|
fi
|
184
191
|
|
185
|
-
if grep '&& return'
|
192
|
+
if [[ -s $HOME/.bashrc ]] && grep '&& return' $HOME/.bashrc ; then
|
186
193
|
echo -e "\n\nWARNING: you have a 'return' statement in your .bashrc, likely this will cause untold havoc. Please remove it and refactor your profiles to be correct. If you have questions about this please visit #rvm on irc.freenode.net.\n\n"
|
187
194
|
fi
|
188
195
|
|
data/lib/VERSION.yml
CHANGED
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.
|
8
|
+
s.version = "0.1.19"
|
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
|
+
s.date = %q{2010-02-27}
|
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}
|
@@ -41,14 +41,13 @@ Gem::Specification.new do |s|
|
|
41
41
|
"scripts/color",
|
42
42
|
"scripts/db",
|
43
43
|
"scripts/fetch",
|
44
|
-
"scripts/
|
44
|
+
"scripts/gemsets",
|
45
45
|
"scripts/hash",
|
46
46
|
"scripts/hook",
|
47
47
|
"scripts/initialize",
|
48
48
|
"scripts/install",
|
49
49
|
"scripts/irbrc",
|
50
50
|
"scripts/irbrc.rb",
|
51
|
-
"scripts/libraries",
|
52
51
|
"scripts/log",
|
53
52
|
"scripts/maglev",
|
54
53
|
"scripts/manage",
|
@@ -56,9 +55,11 @@ Gem::Specification.new do |s|
|
|
56
55
|
"scripts/md5",
|
57
56
|
"scripts/monitor",
|
58
57
|
"scripts/notes",
|
58
|
+
"scripts/package",
|
59
59
|
"scripts/rvm",
|
60
60
|
"scripts/rvm-install",
|
61
61
|
"scripts/selector",
|
62
|
+
"scripts/set",
|
62
63
|
"scripts/symlink",
|
63
64
|
"scripts/update",
|
64
65
|
"scripts/utility",
|
@@ -79,7 +80,7 @@ Gem::Specification.new do |s|
|
|
79
80
|
s.rdoc_options = ["--inline-source", "--charset=UTF-8"]
|
80
81
|
s.require_paths = ["lib"]
|
81
82
|
s.rubyforge_project = %q{rvm}
|
82
|
-
s.rubygems_version = %q{1.3.
|
83
|
+
s.rubygems_version = %q{1.3.6}
|
83
84
|
s.summary = %q{Ruby Version Manager (rvm)}
|
84
85
|
|
85
86
|
if s.respond_to? :specification_version then
|
data/scripts/cli
CHANGED
@@ -8,10 +8,16 @@ __rvm_parse_args() {
|
|
8
8
|
while [[ $# -gt 0 ]] ; do
|
9
9
|
rvm_token="$1" ; shift
|
10
10
|
case "$rvm_token" in
|
11
|
-
fetch|version|srcdir|reset|debug|reload|implode|
|
11
|
+
fetch|version|srcdir|reset|debug|reload|implode|seppuku|update|monitor|notes)
|
12
12
|
rvm_action=$rvm_token
|
13
13
|
;;
|
14
14
|
|
15
|
+
package)
|
16
|
+
rvm_action="$rvm_token"
|
17
|
+
export rvm_ruby_args="$@"
|
18
|
+
rvm_parse_break=1
|
19
|
+
;;
|
20
|
+
|
15
21
|
use)
|
16
22
|
rvm_action=$rvm_token
|
17
23
|
export rvm_verbose_flag=1
|
@@ -34,24 +40,18 @@ __rvm_parse_args() {
|
|
34
40
|
export rvm_remove_flag=1
|
35
41
|
;;
|
36
42
|
|
37
|
-
system|default)
|
38
|
-
rvm_action=${rvm_action:-use}
|
39
|
-
rvm_ruby_interpreter="$rvm_token"
|
40
|
-
rvm_ruby_string="$rvm_token"
|
41
|
-
;;
|
42
|
-
|
43
43
|
# Can likely remove this due to the *) case
|
44
44
|
jruby|ree|macruby|rbx|rubinius|mput|shyouhei|ironruby|default|maglev|all)
|
45
|
-
rvm_ruby_interpreter="$rvm_token"
|
46
|
-
rvm_ruby_string="$rvm_token"
|
45
|
+
export rvm_ruby_interpreter="$rvm_token"
|
46
|
+
export rvm_ruby_string="$rvm_token"
|
47
47
|
rvm_action="${rvm_action:-use}"
|
48
48
|
if $rvm_scripts_path/match "$1" "^[0-9]\.[0-9]" ; then rvm_ruby_version=$1 ; shift ; fi
|
49
49
|
;;
|
50
50
|
|
51
|
-
|
52
|
-
rvm_action
|
51
|
+
gemset)
|
52
|
+
rvm_action=$rvm_token
|
53
53
|
if [[ "clear" = "$1" ]] ; then
|
54
|
-
unset
|
54
|
+
unset rvm_gemset_name ; shift
|
55
55
|
export rvm_ruby_gem_home="$(echo $GEM_HOME | sed 's/%.*$//')"
|
56
56
|
export GEM_HOME="$rvm_ruby_gem_home"
|
57
57
|
export BUNDLE_PATH="$rvm_ruby_gem_home"
|
@@ -61,15 +61,15 @@ __rvm_parse_args() {
|
|
61
61
|
elif [[ "delete" = "$1" ]] || [[ "use" = "$1" ]] ; then
|
62
62
|
export rvm_${1}_flag=1
|
63
63
|
export rvm_ruby_args="$*" ; shift
|
64
|
-
|
65
|
-
rvm_ruby_string=$(echo $
|
66
|
-
|
67
|
-
if [[ "$rvm_ruby_string" != "$
|
68
|
-
if [[ ! -z "$
|
64
|
+
rvm_gemset_name="$1"; shift
|
65
|
+
export rvm_ruby_string=$(echo $rvm_gemset_name | sed 's/\(.*\)%.*/\1/')
|
66
|
+
export rvm_gemset_name=$(echo $rvm_gemset_name | sed 's/.*%\(.*\)/\1/')
|
67
|
+
if [[ "$rvm_ruby_string" != "$rvm_gemset_name" ]] ; then export rvm_ruby_string ; fi
|
68
|
+
if [[ ! -z "$rvm_gemset_name" ]] ; then export rvm_gemset_name ; fi
|
69
69
|
else
|
70
70
|
if [[ -z "$1" ]] ; then
|
71
71
|
rvm_action="error"
|
72
|
-
rvm_error_message="'gems' must be followed by a
|
72
|
+
rvm_error_message="'gems' must be followed by a gemset action, see http://rvm.beginrescueend.com/gemsets/ for details."
|
73
73
|
else
|
74
74
|
export rvm_ruby_args="$*" ; export rvm_${1}_flag=1 ; shift
|
75
75
|
fi
|
@@ -103,20 +103,23 @@ __rvm_parse_args() {
|
|
103
103
|
|
104
104
|
do|ruby|rake|gem|rubydo|rakedo|gemdo)
|
105
105
|
if [[ "do" = "$rvm_action" ]] ; then rvm_action="ruby" ; fi
|
106
|
-
rvm_action=$(echo $rvm_token | sed 's#do##g')
|
106
|
+
export rvm_action=$(echo $rvm_token | sed 's#do##g')
|
107
107
|
if [[ "rake" = "$rvm_action" ]] || [[ "gem" = "$rvm_action" ]] || [[ "ruby" = "$rvm_action" ]] ; then
|
108
108
|
if [[ -z "$1" ]] ; then
|
109
109
|
if [[ "gem" = "$rvm_action" ]] || [[ "ruby" = "$rvm_action" ]] ; then
|
110
110
|
rvm_action="error"
|
111
111
|
rvm_error_message="the '$rvm_action' actions must be followed by arguments."
|
112
112
|
fi
|
113
|
-
elif [[ "-S" = "$1" ]]
|
114
|
-
rvm_action="ruby"
|
115
|
-
|
116
|
-
|
113
|
+
elif [[ "-S" = "$1" ]] ; then
|
114
|
+
export rvm_action="ruby"
|
115
|
+
export rvm_ruby_args="$flag $@"
|
116
|
+
rvm_parse_break=1
|
117
|
+
elif [[ "-e" = "$1" ]] ; then
|
118
|
+
export rvm_action="ruby"
|
119
|
+
export rvm_ruby_args="$flag '$@'"
|
117
120
|
rvm_parse_break=1
|
118
121
|
else
|
119
|
-
rvm_ruby_args="$*"
|
122
|
+
export rvm_ruby_args="$*"
|
120
123
|
rvm_parse_break=1
|
121
124
|
fi
|
122
125
|
else
|
@@ -187,7 +190,7 @@ __rvm_parse_args() {
|
|
187
190
|
;;
|
188
191
|
|
189
192
|
--head)
|
190
|
-
if [[ -z "$rvm_ruby_string" ]] ; then rvm_ruby_string="head"; else rvm_ruby_string="${rvm_ruby_string}-head" ; fi
|
193
|
+
if [[ -z "$rvm_ruby_string" ]] ; then export rvm_ruby_string="head"; else export rvm_ruby_string="${rvm_ruby_string}-head" ; fi
|
191
194
|
rvm_ruby_revision="head"
|
192
195
|
export rvm_head_flag=1
|
193
196
|
rvm_action="${rvm_action:-use}"
|
@@ -259,12 +262,13 @@ __rvm_parse_args() {
|
|
259
262
|
shift
|
260
263
|
;;
|
261
264
|
|
262
|
-
default
|
263
|
-
rvm_action
|
264
|
-
rvm_ruby_interpreter="$rvm_token"
|
265
|
-
rvm_ruby_string="$rvm_token"
|
265
|
+
system|default)
|
266
|
+
rvm_action=${rvm_action:-use}
|
267
|
+
export rvm_ruby_interpreter="$rvm_token"
|
268
|
+
export rvm_ruby_string="$rvm_token"
|
266
269
|
;;
|
267
270
|
|
271
|
+
|
268
272
|
-h|--help|usage|help) rvm_action=help ;;
|
269
273
|
-G|--gems) rvm_gems_path="$1" ; shift ;;
|
270
274
|
--source) rvm_src_path="$1" ; shift ;;
|
@@ -274,11 +278,10 @@ __rvm_parse_args() {
|
|
274
278
|
--nice) rvm_niceness="$1" ; shift ;;
|
275
279
|
-l|--level) rvm_ruby_patch_level="p$1" ; shift ;;
|
276
280
|
# TODO: handle this below better (if $1 is null)
|
277
|
-
-m|--
|
281
|
+
-m|--gemset) rvm_gemset_name="$1" ; shift ;;
|
278
282
|
--sdk) rvm_sdk="$1" ; shift ;;
|
279
283
|
--archflags) rvm_archflags="$1" ; shift ;;
|
280
284
|
--symlink) rvm_symlink_name="$1" ; shift ;;
|
281
|
-
tests|specs) rvm_action="tests" ;;
|
282
285
|
--install) export rvm_install_on_use_flag=1 ;;
|
283
286
|
--trace) export rvm_trace_flag=1 ; set -x ;;
|
284
287
|
--proxy) export rvm_proxy="$1" ; shift ;;
|
@@ -301,37 +304,37 @@ __rvm_parse_args() {
|
|
301
304
|
|
302
305
|
*)
|
303
306
|
if [[ ! -z "$rvm_token" ]] ; then
|
304
|
-
if [[ "
|
307
|
+
if [[ "gemset" = "$rvm_action" ]] ; then
|
305
308
|
if $rvm_scripts_path/match "$rvm_token" "^.+%.+$" ; then
|
306
|
-
|
307
|
-
rvm_ruby_string="$(echo "$rvm_token" | awk -F'%' '{print $1}')"
|
309
|
+
export rvm_gemset_name="$(echo "$rvm_token" | awk -F'%' '{print $2}')"
|
310
|
+
export rvm_ruby_string="$(echo "$rvm_token" | awk -F'%' '{print $1}')"
|
308
311
|
elif [[ ! -z "$(echo "$rvm_token" | awk '/\.gems$/')" ]] ; then
|
309
|
-
rvm_file_name="$(echo "$rvm_token" | sed 's#\.gems##g').gems"
|
312
|
+
export rvm_file_name="$(echo "$rvm_token" | sed 's#\.gems##g').gems"
|
310
313
|
# elif [[ ! -z "$(echo "$rvm_token" | awk '/\.gems$/')" ]] ; then
|
311
314
|
else
|
312
|
-
|
313
|
-
rvm_file_name="$
|
315
|
+
export rvm_gemset_name="$(echo "$rvm_token" | sed 's#\.gems##g')"
|
316
|
+
export rvm_file_name="$rvm_gemset_name.gems"
|
314
317
|
fi
|
315
318
|
elif [[ ! -z "$(echo "$rvm_token" | awk '/,/')" ]] ; then
|
316
|
-
rvm_ruby_version="$rvm_token"
|
319
|
+
export rvm_ruby_version="$rvm_token"
|
317
320
|
if [[ -z "$rvm_action" ]] ; then
|
318
321
|
rvm_action="ruby" # Not sure if we really want to do this but we'll try it out.
|
319
322
|
fi
|
320
323
|
elif $rvm_scripts_path/match "$rvm_token" "^.+%.+$" ; then
|
321
|
-
|
322
|
-
rvm_ruby_string="$(echo "$rvm_token" | awk -F'%' '{print $1}')"
|
324
|
+
export rvm_gemset_name="$(echo "$rvm_token" | awk -F'%' '{print $2}')"
|
325
|
+
export rvm_ruby_string="$(echo "$rvm_token" | awk -F'%' '{print $1}')"
|
323
326
|
elif $rvm_scripts_path/match "$rvm_token" "-" ; then
|
324
|
-
rvm_ruby_string="$rvm_token"
|
327
|
+
export rvm_ruby_string="$rvm_token"
|
325
328
|
elif $rvm_scripts_path/match "$rvm_token" "^[0-9].[0-9]" ; then
|
326
|
-
rvm_ruby_string="$rvm_token"
|
327
|
-
rvm_action="${rvm_action:-use}"
|
329
|
+
export rvm_ruby_string="$rvm_token"
|
330
|
+
export rvm_action="${rvm_action:-use}"
|
328
331
|
elif $rvm_scripts_path/match "$rvm_token" "^ree-" ; then
|
329
|
-
rvm_ruby_string="$rvm_token"
|
330
|
-
rvm_action="${rvm_action:-use}"
|
332
|
+
export rvm_ruby_string="$rvm_token"
|
333
|
+
export rvm_action="${rvm_action:-use}"
|
331
334
|
else
|
332
335
|
if $rvm_scripts_path/match "$rvm_token" "\.rb$" ; then # we have a specified ruby script
|
333
|
-
rvm_ruby_args=$rvm_token
|
334
|
-
rvm_ruby_file=$rvm_token
|
336
|
+
export rvm_ruby_args=$rvm_token
|
337
|
+
export rvm_ruby_file=$rvm_token
|
335
338
|
if [[ -z "$rvm_action" ]] ; then
|
336
339
|
rvm_action="ruby"
|
337
340
|
fi
|
@@ -347,7 +350,6 @@ __rvm_parse_args() {
|
|
347
350
|
if [[ "error" = "$rvm_action" ]] ; then
|
348
351
|
break;
|
349
352
|
fi
|
350
|
-
|
351
353
|
esac
|
352
354
|
|
353
355
|
if [[ -z "$rvm_action" ]] && [[ ! -z "$rvm_ruby_string" ]] ; then rvm_action="use" ; fi
|
@@ -381,31 +383,39 @@ rvm() {
|
|
381
383
|
|
382
384
|
result=0
|
383
385
|
case "$rvm_action" in
|
384
|
-
use)
|
385
|
-
srcdir)
|
386
|
-
list)
|
387
|
-
strings)
|
388
|
-
info)
|
389
|
-
debug)
|
390
|
-
version)
|
391
|
-
reset)
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
gemdir)
|
400
|
-
|
386
|
+
use) __rvm_use ; result=$? ;;
|
387
|
+
srcdir) __rvm_source_dir ; result=$? ;;
|
388
|
+
list) __rvm_list ; result=$? ;;
|
389
|
+
strings) __rvm_strings ; result=$? ;;
|
390
|
+
info) __rvm_info ; result=$? ;;
|
391
|
+
debug) __rvm_debug ; result=$? ;;
|
392
|
+
version) __rvm_version ; result=$? ;;
|
393
|
+
reset) __rvm_reset ; result=$? ;;
|
394
|
+
update) __rvm_update ; result=$? ;;
|
395
|
+
reboot) __rvm_reboot ; result=$? ;;
|
396
|
+
usage|help) __rvm_usage ; result=$? ;;
|
397
|
+
benchmark) __rvm_benchmark ; result=$? ;;
|
398
|
+
inspect) __rvm_inspect ; result=$? ;;
|
399
|
+
implode|seppuku) __rvm_implode ; result=$? ;;
|
400
|
+
|
401
|
+
gemdir)
|
402
|
+
$rvm_scripts_path/gemsets gemdir
|
403
|
+
result=$?
|
404
|
+
;;
|
405
|
+
|
406
|
+
ruby|gem|rake)
|
407
|
+
$rvm_scripts_path/set $rvm_action $rvm_ruby_args
|
408
|
+
result=$?
|
409
|
+
;;
|
410
|
+
gemset)
|
401
411
|
if [[ "$rvm_use_flag" -eq 1 ]] ; then
|
402
|
-
|
403
|
-
result=$?
|
412
|
+
__rvm_gemset_select
|
413
|
+
result=$?
|
404
414
|
if [[ $result -eq 0 ]] ; then
|
405
|
-
|
415
|
+
__rvm_gemset_use
|
406
416
|
fi
|
407
417
|
else
|
408
|
-
$rvm_scripts_path/
|
418
|
+
$rvm_scripts_path/gemsets $rvm_ruby_args
|
409
419
|
fi
|
410
420
|
result=$?
|
411
421
|
;;
|
@@ -416,6 +426,7 @@ rvm() {
|
|
416
426
|
;;
|
417
427
|
notes) $rvm_scripts_path/notes ; result=$? ;;
|
418
428
|
reload) unset rvm_loaded_flag ; rvm_reload_flag=1 ;;
|
429
|
+
|
419
430
|
fetch|install|uninstall|remove)
|
420
431
|
if [[ ! -z "$rvm_ruby_string" ]] ; then
|
421
432
|
$rvm_scripts_path/manage "$rvm_action" "$rvm_ruby_string"
|
@@ -428,12 +439,11 @@ rvm() {
|
|
428
439
|
;;
|
429
440
|
tests|specs) rvm_action="rake" ; __rvm_do ; result=$? ;;
|
430
441
|
|
431
|
-
|
432
|
-
|
442
|
+
package)
|
443
|
+
$rvm_scripts_path/package $rvm_ruby_args
|
433
444
|
result=$?
|
434
445
|
;;
|
435
446
|
|
436
|
-
|
437
447
|
error)
|
438
448
|
$rvm_scripts_path/log "fail" "$rvm_error_message ( see: 'rvm usage' )"
|
439
449
|
__rvm_pushpop
|