rvm 0.1.12 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/install +4 -1
- data/lib/VERSION.yml +1 -1
- data/rvm.gemspec +2 -3
- data/scripts/cli +2 -2
- data/scripts/gems +42 -17
- data/scripts/install +4 -1
- data/scripts/manage +7 -5
- data/scripts/rvm-install +4 -1
- data/scripts/update +4 -1
- data/scripts/utility +1 -1
- metadata +2 -3
- data/scripts/functions +0 -1
data/install
CHANGED
@@ -178,7 +178,10 @@ if [[ "root" != "$(whoami)" ]] ; then
|
|
178
178
|
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:"
|
179
179
|
echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
|
180
180
|
echo -e "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
|
181
|
-
echo -e "\
|
181
|
+
echo -e "\n This means that if you see '[ -z "$PS1" ] && return' then you must split your .bashrc"
|
182
|
+
echo -e "\n Put everything below and above that line into your .bash_profile, and delete that line and below from .bashrc"
|
183
|
+
echo -e "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the top of your .bash_profile."
|
184
|
+
echo -e "\n4) Then $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
|
182
185
|
fi
|
183
186
|
|
184
187
|
exit 0
|
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.13"
|
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-12}
|
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,7 +41,6 @@ Gem::Specification.new do |s|
|
|
41
41
|
"scripts/color",
|
42
42
|
"scripts/db",
|
43
43
|
"scripts/fetch",
|
44
|
-
"scripts/functions",
|
45
44
|
"scripts/gems",
|
46
45
|
"scripts/hash",
|
47
46
|
"scripts/hook",
|
data/scripts/cli
CHANGED
@@ -50,8 +50,8 @@ __rvm_parse_args() {
|
|
50
50
|
|
51
51
|
gems|gemset)
|
52
52
|
rvm_action="gems"
|
53
|
-
if [[ "name" = "$1" ]] || [[ "dir" = "$1" ]] || [[ "list" = "$1" ]] || [[ "empty" = "$1" ]] || [[ "dump" = "$1" ]] || [[ "load" = "$1" ]] ; then
|
54
|
-
rvm_ruby_args="$*" ; export rvm_${1}_flag=1 ; shift
|
53
|
+
if [[ "name" = "$1" ]] || [[ "dir" = "$1" ]] || [[ "list" = "$1" ]] || [[ "empty" = "$1" ]] || [[ "dump" = "$1" ]] || [[ "load" = "$1" ]] || [[ "nuke" = "$1" ]] ; then
|
54
|
+
export rvm_ruby_args="$*" ; export rvm_${1}_flag=1 ; shift
|
55
55
|
elif [[ "clear" = "$1" ]] ; then
|
56
56
|
unset rvm_gem_set_name ; shift
|
57
57
|
export rvm_ruby_gem_home="$(echo $GEM_HOME | sed 's/%.*$//')"
|
data/scripts/gems
CHANGED
@@ -12,7 +12,7 @@ if [[ ! -z "$rvm_trace_flag" ]] ; then set -x ; export rvm_trace_flag ; fi
|
|
12
12
|
rvm_ruby_gem_home="${rvm_ruby_gem_home:-$GEM_HOME}"
|
13
13
|
if [[ -d "$rvm_ruby_gem_home" ]] && which gem &> /dev/null ; then rvm_ruby_gem_home="$(gem env home)" ; fi
|
14
14
|
|
15
|
-
trap "if [[ -d $rvm_tmp_path/ ]] && [[ -
|
15
|
+
trap "if [[ -d $rvm_tmp_path/ ]] && [[ -s $rvm_tmp_path/$$ ]] ; then rm -f $rvm_tmp_path/$$ > /dev/null 2>&1 ; fi ; exit" 0 1 2 3 15
|
16
16
|
|
17
17
|
__rvm_gems_name() {
|
18
18
|
echo "$(gem env gemdir)" | awk -F'%' '{print $2}'
|
@@ -47,11 +47,34 @@ __rvm_gems_delete() {
|
|
47
47
|
if [[ -d "$gemdir" ]] && [[ "$gemdir" != '/' ]] && [[ ! -z "$rvm_force_flag" ]] ; then
|
48
48
|
rm -rf "$gemdir"
|
49
49
|
elif [[ -d "$gemdir" ]] ; then
|
50
|
-
$rvm_scripts_path/log "warn" "Are you SURE you wish to remove the
|
50
|
+
$rvm_scripts_path/log "warn" "Are you SURE you wish to remove the entire gemset '$rvm_gem_set_name' ($gemdir)?"
|
51
51
|
echo -n "(anything other than 'yes' will cancel) > "
|
52
52
|
read response
|
53
53
|
if [[ "yes" = "$response" ]] ; then
|
54
|
-
rm -rf
|
54
|
+
rm -f $gemdir/cache && rm -rf $gemdir
|
55
|
+
else
|
56
|
+
$rvm_scripts_path/log "info" "Not doing anything, phew... close call that one eh?"
|
57
|
+
fi
|
58
|
+
else
|
59
|
+
$rvm_scripts_path/log "info" "$gemdir already does not exist."
|
60
|
+
fi ; unset gemdir
|
61
|
+
else
|
62
|
+
$rvm_scripts_path/log "error" "A gems name must be specified in order to delete a gems."
|
63
|
+
fi
|
64
|
+
}
|
65
|
+
|
66
|
+
__rvm_gems_nuke() {
|
67
|
+
if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select ; fi
|
68
|
+
if [[ ! -z "$rvm_gem_set_name" ]] ; then
|
69
|
+
gemdir="$rvm_gems_path/$rvm_ruby_string%$rvm_gem_set_name"
|
70
|
+
if [[ -d "$gemdir" ]] && [[ "$gemdir" != '/' ]] && [[ ! -z "$rvm_force_flag" ]] ; then
|
71
|
+
cd $gemdir && rm -rf ./bin/* ./doc/* ./gems/* ./specifications/*
|
72
|
+
elif [[ -d "$gemdir" ]] ; then
|
73
|
+
$rvm_scripts_path/log "warn" "Are you SURE you wish to remove the installed gems for gemset '%$rvm_gem_set_name' ($gemdir)?"
|
74
|
+
echo -n "(anything other than 'yes' will cancel) > "
|
75
|
+
read response
|
76
|
+
if [[ "yes" = "$response" ]] ; then
|
77
|
+
cd $gemdir && rm -rf ./bin/* ./doc/* ./gems/* ./specifications/*
|
55
78
|
else
|
56
79
|
$rvm_scripts_path/log "info" "Not doing anything, phew... close call that one eh?"
|
57
80
|
fi
|
@@ -104,18 +127,18 @@ __rvm_gems_load() {
|
|
104
127
|
fi
|
105
128
|
|
106
129
|
if [[ ! -z "$(echo "$gems_args" | awk '/\.gem.*$/')" ]] ; then
|
107
|
-
rvm_gem_set_name="$(echo "$gems_args" | sed 's#\.gem.*##g')"
|
130
|
+
rvm_gem_set_name="$(echo "$gems_args" | sed 's#\.gem.*##g' | sed 's# ##g')"
|
108
131
|
else
|
109
|
-
rvm_gem_set_name="$gems_args"
|
132
|
+
rvm_gem_set_name="$(echo "$gems_args" | sed 's# ##g')"
|
110
133
|
fi
|
111
134
|
|
112
|
-
if [[ -
|
135
|
+
if [[ -s "$rvm_gem_set_name.gems" ]] ; then
|
113
136
|
rvm_file_name="$rvm_gem_set_name.gems"
|
114
|
-
elif [[ -
|
137
|
+
elif [[ -s "default.gems" ]] ; then
|
115
138
|
rvm_file_name="default.gems"
|
116
|
-
elif [[ -
|
139
|
+
elif [[ -s "system.gems" ]] ; then
|
117
140
|
rvm_file_name="system.gems"
|
118
|
-
elif [[ -
|
141
|
+
elif [[ -s ".gems" ]] ; then
|
119
142
|
rvm_file_name=".gems"
|
120
143
|
else
|
121
144
|
$rvm_scripts_path/log "error" "No *.gems file found."
|
@@ -124,7 +147,7 @@ __rvm_gems_load() {
|
|
124
147
|
|
125
148
|
mkdir -p "$rvm_gems_path/cache" # Ensure the base cache dir is initialized.
|
126
149
|
|
127
|
-
if [[ -
|
150
|
+
if [[ -s "$rvm_file_name" ]] ; then
|
128
151
|
echo "Loading $rvm_file_name file..."
|
129
152
|
rvm_ruby_gem_list=$(\ls $rvm_ruby_gem_home/specifications/ 2> /dev/null | sed 's#.gems.*$##' 2> /dev/null)
|
130
153
|
|
@@ -159,7 +182,7 @@ __rvm_parse_gem_args() {
|
|
159
182
|
fi
|
160
183
|
fi
|
161
184
|
|
162
|
-
if [[ -
|
185
|
+
if [[ -s "$gem" ]] ; then
|
163
186
|
gem_file_name="$gem"
|
164
187
|
elif $rvm_scripts_path/match "$gem" ".gem$" ; then
|
165
188
|
gem_file_name="$gem"
|
@@ -180,16 +203,16 @@ __rvm_gem_install() {
|
|
180
203
|
unset gem
|
181
204
|
$rvm_scripts_path/log "info" "$color_green$gem_name $gem_version$yellow exists, skipping (--force to re-install)"
|
182
205
|
else
|
183
|
-
if [[ -
|
206
|
+
if [[ -s "$gem" ]] ; then
|
184
207
|
cache_file="$gem"
|
185
|
-
elif [[ -
|
208
|
+
elif [[ -s "$rvm_gems_path/cache/${gem_file_name}" ]] ; then
|
186
209
|
cache_file="$rvm_gems_path/cache/${gem_file_name}"
|
187
210
|
else
|
188
211
|
cache_file="${cache_file:-$(\ls ${rvm_gems_path}/cache/${gem_file_name} 2> /dev/null | sort | head -n1)}"
|
189
212
|
fi
|
190
213
|
|
191
|
-
if [[ ! -
|
192
|
-
if [[ -
|
214
|
+
if [[ ! -s "$cache_file" ]] ; then
|
215
|
+
if [[ -s "$gem_file_name" ]] ; then
|
193
216
|
gem="$gem_file_name"
|
194
217
|
elif [[ -z "${gem_version/ /}" ]] ; then
|
195
218
|
gem="${gem_name/ /}"
|
@@ -200,7 +223,7 @@ __rvm_gem_install() {
|
|
200
223
|
gem_file_name="$(basename "$cache_file")"
|
201
224
|
gem_string="$(echo "$gem_file_name" | sed 's#\.gem$##')"
|
202
225
|
|
203
|
-
if [[ -z "$rvm_force_flag" ]] && [[ -
|
226
|
+
if [[ -z "$rvm_force_flag" ]] && [[ -s "${rvm_ruby_gem_home}/specifications/$(basename $gem_file_name)spec" ]] ; then
|
204
227
|
unset gem # already installed, not forcing reinstall.
|
205
228
|
$rvm_scripts_path/log "info" "$color_green$gem_name $gem_version$yellow exists, skipping (--force to re-install)"
|
206
229
|
else
|
@@ -260,12 +283,14 @@ if [[ -z "$(which gem 2>/dev/null)" ]] ; then
|
|
260
283
|
fi
|
261
284
|
|
262
285
|
action="$(echo $* | awk '{print $1}')"
|
263
|
-
gems_args="$(echo $* | awk '{$1="" ; print}' | sed 's
|
286
|
+
gems_args="$(echo $* | awk '{$1="" ; print}' | sed 's/^\s*//')"
|
264
287
|
|
265
288
|
if [[ "load" = "$action" ]] ; then
|
266
289
|
__rvm_gems_load
|
267
290
|
elif [[ "dump" = "$action" ]] ; then
|
268
291
|
__rvm_gems_dump
|
292
|
+
elif [[ "nuke" = "$action" ]] ; then
|
293
|
+
__rvm_gems_nuke
|
269
294
|
elif [[ "delete" = "$action" ]] ; then
|
270
295
|
__rvm_gems_delete
|
271
296
|
elif [[ "name" = "$action" ]] ; then
|
data/scripts/install
CHANGED
@@ -178,7 +178,10 @@ if [[ "root" != "$(whoami)" ]] ; then
|
|
178
178
|
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:"
|
179
179
|
echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
|
180
180
|
echo -e "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
|
181
|
-
echo -e "\
|
181
|
+
echo -e "\n This means that if you see '[ -z "$PS1" ] && return' then you must split your .bashrc"
|
182
|
+
echo -e "\n Put everything below and above that line into your .bash_profile, and delete that line and below from .bashrc"
|
183
|
+
echo -e "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the top of your .bash_profile."
|
184
|
+
echo -e "\n4) Then $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
|
182
185
|
fi
|
183
186
|
|
184
187
|
exit 0
|
data/scripts/manage
CHANGED
@@ -69,7 +69,10 @@ __rvm_install_source() {
|
|
69
69
|
|
70
70
|
if [[ ! -z "$rvm_ruby_patch" ]] ; then
|
71
71
|
for patch in $(echo $rvm_ruby_patch | tr ',' ' ') ; do
|
72
|
-
patch -p0 -f < $patch
|
72
|
+
__rvm_run "patch" "patch -p0 -f < $patch" "Applying patch '$patch'..."
|
73
|
+
if [[ $? -gt 0 ]] ; then
|
74
|
+
$rvm_scripts_path/log "error" "Patch $patch did not apply cleanly... back to the patching board :(" ; exit 1
|
75
|
+
fi
|
73
76
|
done
|
74
77
|
fi
|
75
78
|
|
@@ -289,8 +292,7 @@ RubyWrapper
|
|
289
292
|
# __rvm_run "rake.distclean" "\$(rvm 1.8.7 ; rake distclean --trace)" "Running distclean."
|
290
293
|
#fi
|
291
294
|
|
292
|
-
builtin cd "$rvm_ruby_src_path"
|
293
|
-
chmod +x ./configure
|
295
|
+
builtin cd "$rvm_ruby_src_path" ; chmod +x ./configure
|
294
296
|
rvm_ruby_configure="./configure --prefix=$rvm_ruby_home" ; message="Configuring rbx"
|
295
297
|
if [[ "$rvm_llvm_flag" = "0" ]] ; then
|
296
298
|
rvm_ruby_configure="$rvm_ruby_configure --disable-llvm"
|
@@ -305,9 +307,9 @@ RubyWrapper
|
|
305
307
|
fi
|
306
308
|
|
307
309
|
if [[ "$rvm_trace_flag" -eq 1 ]] ; then
|
308
|
-
rvm_ruby_make="$rvm_bin_path/
|
310
|
+
rvm_ruby_make="$rvm_bin_path/ruby-1.8.7-p$(__rvm_db "ruby_1.8.7_patch_level") -S rake install --trace" ; message="Compiling rbx (with --trace)"
|
309
311
|
else
|
310
|
-
rvm_ruby_make="$rvm_bin_path/
|
312
|
+
rvm_ruby_make="$rvm_bin_path/ruby-1.8.7-p$(__rvm_db "ruby_1.8.7_patch_level") -S rake install" ; message="Compiling rbx"
|
311
313
|
fi
|
312
314
|
__rvm_run "rake" "$rvm_ruby_make" "$message"
|
313
315
|
result=$? ; if [[ "$result" -gt 0 ]] ; then
|
data/scripts/rvm-install
CHANGED
@@ -178,7 +178,10 @@ if [[ "root" != "$(whoami)" ]] ; then
|
|
178
178
|
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:"
|
179
179
|
echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
|
180
180
|
echo -e "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
|
181
|
-
echo -e "\
|
181
|
+
echo -e "\n This means that if you see '[ -z "$PS1" ] && return' then you must split your .bashrc"
|
182
|
+
echo -e "\n Put everything below and above that line into your .bash_profile, and delete that line and below from .bashrc"
|
183
|
+
echo -e "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the top of your .bash_profile."
|
184
|
+
echo -e "\n4) Then $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
|
182
185
|
fi
|
183
186
|
|
184
187
|
exit 0
|
data/scripts/update
CHANGED
@@ -178,7 +178,10 @@ if [[ "root" != "$(whoami)" ]] ; then
|
|
178
178
|
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:"
|
179
179
|
echo -e "\n if [[ -s $rvm_path/scripts/rvm ]] ; then source $rvm_path/scripts/rvm ; fi"
|
180
180
|
echo -e "\n2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly)."
|
181
|
-
echo -e "\
|
181
|
+
echo -e "\n This means that if you see '[ -z "$PS1" ] && return' then you must split your .bashrc"
|
182
|
+
echo -e "\n Put everything below and above that line into your .bash_profile, and delete that line and below from .bashrc"
|
183
|
+
echo -e "\n If you wish to DRY up your config you can 'source ~/.bashrc' at the top of your .bash_profile."
|
184
|
+
echo -e "\n4) Then $(tput setaf 1)CLOSE THIS SHELL$(tput sgr0) and open a new one in order to use rvm.\n"
|
182
185
|
fi
|
183
186
|
|
184
187
|
exit 0
|
data/scripts/utility
CHANGED
@@ -139,7 +139,7 @@ __rvm_run() {
|
|
139
139
|
else
|
140
140
|
eval "nice -n $rvm_niceness $command" >> $rvm_ruby_log_path/$log_file_name.log 2>> $rvm_ruby_log_path/$log_file_name.error.log
|
141
141
|
fi
|
142
|
-
if [[ $? -gt 0 ]] ; then $rvm_scripts_path/log "error" "Error running '$command', please check $rvm_ruby_log_path/$log_file_name
|
142
|
+
if [[ $? -gt 0 ]] ; then $rvm_scripts_path/log "error" "Error running '$command', please check $rvm_ruby_log_path/$log_file_name*.log" ; __rvm_pushpop ; return 1 ; fi
|
143
143
|
unset log_file command
|
144
144
|
}
|
145
145
|
|
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.1.
|
4
|
+
version: 0.1.13
|
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: 2010-02-
|
12
|
+
date: 2010-02-12 00:00:00 -05:00
|
13
13
|
default_executable: rvm-install
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -45,7 +45,6 @@ files:
|
|
45
45
|
- scripts/color
|
46
46
|
- scripts/db
|
47
47
|
- scripts/fetch
|
48
|
-
- scripts/functions
|
49
48
|
- scripts/gems
|
50
49
|
- scripts/hash
|
51
50
|
- scripts/hook
|
data/scripts/functions
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|