rvm 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README +0 -1
- data/binscripts/rvm-prompt +0 -2
- data/config/db +0 -1
- data/config/known +0 -3
- data/install +28 -5
- data/lib/VERSION.yml +1 -1
- data/lib/rvm/install_command_dumper.rb +1 -1
- data/man/man1/rvm.1 +0 -5
- data/rvm.gemspec +2 -2
- data/scripts/base +13 -1
- data/scripts/cd +10 -2
- data/scripts/cli +2 -2
- data/scripts/docs +5 -5
- data/scripts/fetch +3 -3
- data/scripts/gemsets +18 -8
- data/scripts/install +28 -5
- data/scripts/irbrc.rb +1 -0
- data/scripts/manage +17 -127
- data/scripts/notes +6 -5
- data/scripts/rubygems +1 -1
- data/scripts/rvm-install +28 -5
- data/scripts/selector +28 -37
- data/scripts/set +6 -4
- data/scripts/update +28 -5
- data/scripts/utility +11 -18
- metadata +4 -4
data/README
CHANGED
@@ -116,7 +116,6 @@ Implementation
|
|
116
116
|
macruby - MacRuby, insanely fast, can make real apps (Mac OS X Only).
|
117
117
|
maglev - GemStone Ruby, awesome persistent ruby object store.
|
118
118
|
ironruby - IronRuby, NOT supported yet. Looking for volunteers to help.
|
119
|
-
mput - shyouhei(mput)'s github repository, popular in Japan :)
|
120
119
|
system - use the system ruby (eg. pre-rvm state)
|
121
120
|
default - use rvm set default ruby and system if it hasn't been set.
|
122
121
|
http://rvm.beginrescueend.com/rubies/default/
|
data/binscripts/rvm-prompt
CHANGED
data/config/db
CHANGED
@@ -52,7 +52,6 @@ macruby_nightly_url=http://www.macruby.org/files/nightlies/macruby_nightly-lates
|
|
52
52
|
maglev_version=24566
|
53
53
|
maglev_url=http://glass-downloads.gemstone.com/maglev
|
54
54
|
maglev_repo_url=git://github.com/MagLev/maglev.git
|
55
|
-
shyouhei_repo_url=git://github.com/shyouhei/ruby.git
|
56
55
|
ironruby_version=1.0
|
57
56
|
ironruby_repo_url=git://github.com/ironruby/ironruby.git
|
58
57
|
ironruby_1.0_url=http://rubyforge.org/frs/download.php/70179/
|
data/config/known
CHANGED
data/install
CHANGED
@@ -206,13 +206,24 @@ while [[ $# -gt 0 ]] ; do
|
|
206
206
|
esac
|
207
207
|
done
|
208
208
|
|
209
|
-
if [[ -z "${rvm_prefix:-""}"
|
210
|
-
|
211
|
-
if [[ "$
|
212
|
-
|
209
|
+
if [[ -z "${rvm_prefix:-""}" ]] ; then
|
210
|
+
|
211
|
+
if [[ "$USER" = "root" ]] ; then
|
212
|
+
|
213
|
+
source /etc/rvmrc
|
214
|
+
|
215
|
+
if [[ ${rvm_selfcontained:-0} -eq 0 ]] ; then
|
216
|
+
rvm_prefix="${rvm_prefix:-"/usr/local/"}"
|
217
|
+
else
|
218
|
+
rvm_prefix="${rvm_prefix:-"$HOME/."}"
|
219
|
+
fi
|
220
|
+
|
213
221
|
else
|
222
|
+
|
214
223
|
rvm_prefix="${rvm_prefix:-"$HOME/."}"
|
224
|
+
|
215
225
|
fi
|
226
|
+
|
216
227
|
fi
|
217
228
|
|
218
229
|
if [[ -z "${rvm_path:-""}" ]] ; then
|
@@ -464,7 +475,7 @@ fi
|
|
464
475
|
#
|
465
476
|
mkdir -p "${rvm_rubies_path:-"$rvm_path/rubies"}/"
|
466
477
|
|
467
|
-
for ruby in $rvm_path/ruby-* $rvm_path/jruby-*
|
478
|
+
for ruby in $rvm_path/ruby-* $rvm_path/jruby-* \
|
468
479
|
$rvm_path/rbx-* $rvm_path/maglev-* $rvm_path/ree-* ; do
|
469
480
|
|
470
481
|
if [[ -d "$ruby" ]] ; then
|
@@ -495,6 +506,18 @@ done
|
|
495
506
|
# End of rubies migration.
|
496
507
|
#
|
497
508
|
|
509
|
+
if [[ -d "$rvm_path/environments" ]] ; then
|
510
|
+
#
|
511
|
+
# Remove BUNDLE_PATH from environment files
|
512
|
+
#
|
513
|
+
environments=($( find "$rvm_path/environments" -maxdepth 1 -mindepth 1 -type f ))
|
514
|
+
for file in "${environments[@]}" ; do
|
515
|
+
if grep 'BUNDLE_PATH' "$file" > /dev/null ; then
|
516
|
+
grep -v 'BUNDLE_PATH' "$file" > "$file.new"
|
517
|
+
mv "$file.new" "$file"
|
518
|
+
fi
|
519
|
+
done
|
520
|
+
fi
|
498
521
|
#
|
499
522
|
# Migrate old gemset directories to new gemset pattern.
|
500
523
|
#
|
data/lib/VERSION.yml
CHANGED
data/man/man1/rvm.1
CHANGED
@@ -358,11 +358,6 @@ GemStone Ruby, awesome persistent ruby object store\&.
|
|
358
358
|
IronRuby, NOT supported yet\&. Looking for volunteers to help\&.
|
359
359
|
.RE
|
360
360
|
.PP
|
361
|
-
\fBmput\fR
|
362
|
-
.RS 4
|
363
|
-
shyouhei(mput)\'s github repository, popular in Japan :)
|
364
|
-
.RE
|
365
|
-
.PP
|
366
361
|
\fBsystem\fR
|
367
362
|
.RS 4
|
368
363
|
Use the system ruby (eg\&. pre\-rvm state)\&.
|
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 = "1.1.
|
8
|
+
s.version = "1.1.1"
|
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-11-
|
12
|
+
s.date = %q{2010-11-24}
|
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}
|
data/scripts/base
CHANGED
@@ -28,12 +28,25 @@ unset script_name rvm_base_except
|
|
28
28
|
#fi
|
29
29
|
|
30
30
|
if [[ ${rvm_trace_flag:-0} -gt 0 ]]; then
|
31
|
+
|
31
32
|
export rvm_trace_flag=1
|
33
|
+
|
32
34
|
set -o xtrace
|
33
35
|
|
34
36
|
if [[ -z "${ZSH_VERSION:-""}" ]] ; then
|
37
|
+
|
35
38
|
export PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
|
39
|
+
|
36
40
|
fi
|
41
|
+
|
42
|
+
echo "In script '$0'"
|
43
|
+
|
44
|
+
elif [[ ${rvm_debug_flag:-0} > 0 ]] ; then
|
45
|
+
|
46
|
+
rvm_debug_flag=0
|
47
|
+
|
48
|
+
echo "In script '$0'"
|
49
|
+
|
37
50
|
fi
|
38
51
|
|
39
52
|
if [[ -n "${ZSH_VERSION:-""}" ]] ; then
|
@@ -44,6 +57,5 @@ fi
|
|
44
57
|
|
45
58
|
export GEM_HOME GEM_PATH rvm_action rvm_alias_expanded rvm_archflags rvm_archive_extension rvm_bin_flag rvm_bin_path rvm_clang_flag rvm_configure_flags rvm_debug_flag rvm_default_flag rvm_delete_flag rvm_docs_type rvm_dump_environment_flag rvm_error_message rvm_expanding_aliases rvm_file_name rvm_gemdir_flag rvm_gemset_name rvm_gemstone_package_file rvm_gemstone_url rvm_head_flag rvm_hook rvm_install_arguments rvm_install_on_use_flag rvm_interactive_flag rvm_llvm_flag rvm_loaded_flag rvm_make_flags rvm_niceness rvm_nightly_flag rvm_only_path_flag rvm_parse_break rvm_patch_names rvm_patch_original_pwd rvm_pretty_print_flag rvm_prior_cc rvm_proxy rvm_quiet_flag rvm_ree_options rvm_reload_flag rvm_remove_flag rvm_ruby_alias rvm_ruby_aliases rvm_ruby_args rvm_ruby_binary rvm_ruby_bits rvm_ruby_configure rvm_ruby_file rvm_ruby_gem_home rvm_ruby_gem_path rvm_ruby_global_gems_path rvm_ruby_home rvm_ruby_interpreter rvm_ruby_irbrc rvm_ruby_load_path rvm_ruby_major_version rvm_ruby_make rvm_ruby_make_install rvm_ruby_minor_version rvm_ruby_mode rvm_ruby_name rvm_ruby_package_file rvm_ruby_package_name rvm_ruby_patch rvm_ruby_patch_level rvm_ruby_release_version rvm_ruby_repo_url rvm_ruby_require rvm_ruby_revision rvm_ruby_selected_flag rvm_ruby_sha rvm_ruby_string rvm_ruby_strings rvm_ruby_tag rvm_ruby_url rvm_ruby_user_tag rvm_ruby_version rvm_script_name rvm_sdk rvm_silent_flag rvm_sticky_flag rvm_system_flag rvm_token rvm_trace_flag rvm_use_flag rvm_user_flag rvm_verbose_flag rvm_wrapper_name
|
46
59
|
|
47
|
-
|
48
60
|
# Cleanup tmp on exit.
|
49
61
|
trap "__rvm_cleanup_temp_for '$$'" 0 1 2 3 15
|
data/scripts/cd
CHANGED
@@ -6,12 +6,20 @@ if [[ ${rvm_project_rvmrc:-1} -ne 0 ]] ; then
|
|
6
6
|
|
7
7
|
if [[ -n "${ZSH_VERSION:-""}" ]] ; then
|
8
8
|
|
9
|
+
__rvm_after_cd() {
|
10
|
+
|
11
|
+
rvm_hook="after_cd"
|
12
|
+
|
13
|
+
source "$rvm_path/scripts/hook"
|
14
|
+
|
15
|
+
}
|
16
|
+
|
9
17
|
autoload is-at-least
|
10
18
|
|
11
19
|
if is-at-least 4.3.4 >/dev/null 2>&1; then
|
12
20
|
|
13
21
|
# On zsh, use chpwd_functions
|
14
|
-
chpwd_functions=( "${chpwd_functions[@]}" __rvm_project_rvmrc )
|
22
|
+
chpwd_functions=( "${chpwd_functions[@]}" __rvm_project_rvmrc __rvm_after_cd )
|
15
23
|
|
16
24
|
else
|
17
25
|
|
@@ -23,7 +31,7 @@ if [[ ${rvm_project_rvmrc:-1} -ne 0 ]] ; then
|
|
23
31
|
|
24
32
|
__rvm_project_rvmrc
|
25
33
|
|
26
|
-
|
34
|
+
__rvm_after_cd
|
27
35
|
|
28
36
|
return $result
|
29
37
|
}
|
data/scripts/cli
CHANGED
@@ -68,7 +68,7 @@ __rvm_parse_args()
|
|
68
68
|
;;
|
69
69
|
|
70
70
|
# Can likely remove this due to the *) case
|
71
|
-
jruby*|ree*|macruby*|rbx*|rubinius*|
|
71
|
+
jruby*|ree*|macruby*|rbx*|rubinius*|ironruby*|default*|maglev*|all)
|
72
72
|
if [[ "rubinius" = "$rvm_token" ]] ; then rvm_token="rbx"; fi
|
73
73
|
rvm_ruby_interpreter="$rvm_token"
|
74
74
|
rvm_ruby_string="$rvm_token"
|
@@ -241,7 +241,7 @@ __rvm_parse_args()
|
|
241
241
|
else
|
242
242
|
case "$next_token" in
|
243
243
|
|
244
|
-
ruby|rbx|jruby|macruby|ree|rubinius|maglev|
|
244
|
+
ruby|rbx|jruby|macruby|ree|rubinius|maglev|ironruby)
|
245
245
|
rvm_ruby_strings=$next_token
|
246
246
|
rvm_ruby_interpreter=$next_token
|
247
247
|
if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
|
data/scripts/docs
CHANGED
@@ -67,9 +67,9 @@ generate_ri()
|
|
67
67
|
|
68
68
|
"$rvm_path/scripts/log" "info" "Generating ri documentation, be aware that this could take a *long* time, and depends heavily on your system resources..."
|
69
69
|
|
70
|
-
"$rvm_path/scripts/log" "info" "( Errors will be logged to ${rvm_log_path:-"$rvm_path/log"}/$rvm_docs_ruby_string/docs.
|
70
|
+
"$rvm_path/scripts/log" "info" "( Errors will be logged to ${rvm_log_path:-"$rvm_path/log"}/$rvm_docs_ruby_string/docs.log )"
|
71
71
|
|
72
|
-
rdoc -a --ri --ri-site > /dev/null 2>> ${rvm_log_path:-"$rvm_path/log"}/$rvm_docs_ruby_string/docs.
|
72
|
+
rdoc -a --ri --ri-site > /dev/null 2>> ${rvm_log_path:-"$rvm_path/log"}/$rvm_docs_ruby_string/docs.log
|
73
73
|
)
|
74
74
|
}
|
75
75
|
|
@@ -82,15 +82,15 @@ generate_rdoc()
|
|
82
82
|
|
83
83
|
"$rvm_path/scripts/log" "info" "Generating rdoc documentation, be aware that this could take a *long* time, and depends heavily on your system resources..."
|
84
84
|
|
85
|
-
"$rvm_path/scripts/log" "info" "( Errors will be logged to ${rvm_log_path:-"$rvm_path/log"}/$rvm_docs_ruby_string/docs.
|
85
|
+
"$rvm_path/scripts/log" "info" "( Errors will be logged to ${rvm_log_path:-"$rvm_path/log"}/$rvm_docs_ruby_string/docs.log )"
|
86
86
|
|
87
87
|
if gem list | \grep -q ^hanna ; then
|
88
88
|
|
89
|
-
hanna -o "${rvm_docs_path:-"$rvm_path/docs"}/$rvm_docs_ruby_string/$rvm_docs_type" --inline-source --line-numbers --fmt=html > /dev/null 2>> "${rvm_log_path:-"$rvm_path/log"}/$rvm_docs_ruby_string/docs.
|
89
|
+
hanna -o "${rvm_docs_path:-"$rvm_path/docs"}/$rvm_docs_ruby_string/$rvm_docs_type" --inline-source --line-numbers --fmt=html > /dev/null 2>> "${rvm_log_path:-"$rvm_path/log"}/$rvm_docs_ruby_string/docs.log"
|
90
90
|
|
91
91
|
else
|
92
92
|
|
93
|
-
rdoc -a -o "${rvm_docs_path:-"$rvm_path/docs"}/$rvm_docs_ruby_string/$rvm_docs_type" > /dev/null 2>> "${rvm_log_path:-"$rvm_path/log"}/$rvm_docs_ruby_string/docs.
|
93
|
+
rdoc -a -o "${rvm_docs_path:-"$rvm_path/docs"}/$rvm_docs_ruby_string/$rvm_docs_type" > /dev/null 2>> "${rvm_log_path:-"$rvm_path/log"}/$rvm_docs_ruby_string/docs.log"
|
94
94
|
|
95
95
|
fi
|
96
96
|
)
|
data/scripts/fetch
CHANGED
@@ -178,7 +178,7 @@ if [[ $download -gt 0 ]] ; then
|
|
178
178
|
else
|
179
179
|
|
180
180
|
"$rvm_path/scripts/log" "error" \
|
181
|
-
"There was an error, please check ${rvm_log_path:-"$rvm_path/log"}/$rvm_ruby_string/*.
|
181
|
+
"There was an error, please check ${rvm_log_path:-"$rvm_path/log"}/$rvm_ruby_string/*.log. Next we'll try to fetch via http."
|
182
182
|
|
183
183
|
try_http=1
|
184
184
|
|
@@ -191,7 +191,7 @@ if [[ $download -gt 0 ]] ; then
|
|
191
191
|
if [[ $result -gt 0 ]] ; then
|
192
192
|
|
193
193
|
"$rvm_path/scripts/log" "error" \
|
194
|
-
"There was an error, please check ${rvm_log_path:-"$rvm_path/log"}/$rvm_ruby_string/*.
|
194
|
+
"There was an error, please check ${rvm_log_path:-"$rvm_path/log"}/$rvm_ruby_string/*.log"
|
195
195
|
|
196
196
|
else
|
197
197
|
|
@@ -208,7 +208,7 @@ if [[ $download -gt 0 ]] ; then
|
|
208
208
|
if [[ $result -gt 0 ]] ; then
|
209
209
|
|
210
210
|
"$rvm_path/scripts/log" "error" \
|
211
|
-
"There was an error, please check ${rvm_log_path:-"$rvm_path/log"}/$rvm_ruby_string/*.
|
211
|
+
"There was an error, please check ${rvm_log_path:-"$rvm_path/log"}/$rvm_ruby_string/*.log"
|
212
212
|
|
213
213
|
else
|
214
214
|
|
data/scripts/gemsets
CHANGED
@@ -598,10 +598,14 @@ gemset_import()
|
|
598
598
|
|
599
599
|
if [[ -s "$rvm_file_name" ]] ; then
|
600
600
|
|
601
|
-
|
601
|
+
printf "\nInstalling gems listed in $rvm_file_name file...\n\n"
|
602
602
|
|
603
|
-
rvm_ruby_gem_list=$(
|
604
|
-
|
603
|
+
rvm_ruby_gem_list=$(
|
604
|
+
builtin cd "$rvm_ruby_gem_home/specifications/" ;
|
605
|
+
find . -maxdepth 1 -mindepth 1 -type f -print 2> /dev/null | \
|
606
|
+
sed -e 's#.gems.*$##' -e 's#^./##g' 2> /dev/null
|
607
|
+
)
|
608
|
+
# rvm_ruby_gem_list="${rvm_ruby_gem_list//.\/}"
|
605
609
|
|
606
610
|
while read -r line
|
607
611
|
do # Keep this on 2nd line :(
|
@@ -612,6 +616,8 @@ gemset_import()
|
|
612
616
|
|
613
617
|
done < <(awk '/^[^#]+/{print}' "${rvm_file_name}")
|
614
618
|
|
619
|
+
printf "\nProcessing of $rvm_file_name is complete.\n\n"
|
620
|
+
|
615
621
|
else
|
616
622
|
"$rvm_path/scripts/log" "error" \
|
617
623
|
"${rvm_file_name} does not exist to import from."
|
@@ -675,8 +681,7 @@ gem_install()
|
|
675
681
|
if [[ ${rvm_force_flag:-0} -eq 0 && -f "${rvm_ruby_gem_home}/specifications/$(basename "$gem_file_name")spec" ]] ; then
|
676
682
|
gem=""
|
677
683
|
|
678
|
-
"$rvm_path/scripts/log" "info"
|
679
|
-
"$gem_name $gem_version exists, skipping (--force to re-install)"
|
684
|
+
"$rvm_path/scripts/log" "info" "$gem_name $gem_version is already installed."
|
680
685
|
|
681
686
|
else
|
682
687
|
if [[ -s "$gem" ]] ; then
|
@@ -739,7 +744,6 @@ gem_install()
|
|
739
744
|
|
740
745
|
else
|
741
746
|
|
742
|
-
#--ignore-dependencies
|
743
747
|
command="$gem_prefix gem install --ignore-dependencies $gems_args $rvm_gem_options -q $gem $gem_postfix $vars"
|
744
748
|
|
745
749
|
fi
|
@@ -753,12 +757,12 @@ gem_install()
|
|
753
757
|
if [[ $result -eq 0 ]] ; then
|
754
758
|
|
755
759
|
"$rvm_path/scripts/log" "info" \
|
756
|
-
"$gem_name $gem_version installed
|
760
|
+
"$gem_name $gem_version installed."
|
757
761
|
|
758
762
|
else
|
759
763
|
|
760
764
|
"$rvm_path/scripts/log" "error" \
|
761
|
-
"$gem_name $gem_version failed to install ( output logged to: $rvm_path/log/$rvm_ruby_string/gem.install.
|
765
|
+
"$gem_name $gem_version failed to install ( output logged to: $rvm_path/log/$rvm_ruby_string/gem.install.log )"
|
762
766
|
|
763
767
|
fi
|
764
768
|
fi
|
@@ -770,19 +774,25 @@ gem_install()
|
|
770
774
|
gemset_info()
|
771
775
|
{
|
772
776
|
if [[ ${rvm_user_flag:-0} -eq 1 ]] ; then
|
777
|
+
|
773
778
|
echo $(rvm system ; gem env | grep "\- $HOME" | awk '{print $NF}')
|
774
779
|
|
775
780
|
elif [[ ${rvm_system_flag:-0} -eq 1 ]] ; then
|
781
|
+
|
776
782
|
echo $(rvm system ; gem env $action system)
|
777
783
|
|
778
784
|
elif [[ -n "${rvm_ruby_string:-""}" ]] ; then
|
785
|
+
|
779
786
|
echo $(rvm "$rvm_ruby_string" ; gem env $action)
|
780
787
|
|
781
788
|
elif [[ -n "${GEM_HOME:-""}" ]] ; then
|
789
|
+
|
782
790
|
echo "$GEM_HOME"
|
783
791
|
|
784
792
|
else
|
793
|
+
|
785
794
|
gem env $action
|
795
|
+
|
786
796
|
fi
|
787
797
|
|
788
798
|
return $?
|
data/scripts/install
CHANGED
@@ -206,13 +206,24 @@ while [[ $# -gt 0 ]] ; do
|
|
206
206
|
esac
|
207
207
|
done
|
208
208
|
|
209
|
-
if [[ -z "${rvm_prefix:-""}"
|
210
|
-
|
211
|
-
if [[ "$
|
212
|
-
|
209
|
+
if [[ -z "${rvm_prefix:-""}" ]] ; then
|
210
|
+
|
211
|
+
if [[ "$USER" = "root" ]] ; then
|
212
|
+
|
213
|
+
source /etc/rvmrc
|
214
|
+
|
215
|
+
if [[ ${rvm_selfcontained:-0} -eq 0 ]] ; then
|
216
|
+
rvm_prefix="${rvm_prefix:-"/usr/local/"}"
|
217
|
+
else
|
218
|
+
rvm_prefix="${rvm_prefix:-"$HOME/."}"
|
219
|
+
fi
|
220
|
+
|
213
221
|
else
|
222
|
+
|
214
223
|
rvm_prefix="${rvm_prefix:-"$HOME/."}"
|
224
|
+
|
215
225
|
fi
|
226
|
+
|
216
227
|
fi
|
217
228
|
|
218
229
|
if [[ -z "${rvm_path:-""}" ]] ; then
|
@@ -464,7 +475,7 @@ fi
|
|
464
475
|
#
|
465
476
|
mkdir -p "${rvm_rubies_path:-"$rvm_path/rubies"}/"
|
466
477
|
|
467
|
-
for ruby in $rvm_path/ruby-* $rvm_path/jruby-*
|
478
|
+
for ruby in $rvm_path/ruby-* $rvm_path/jruby-* \
|
468
479
|
$rvm_path/rbx-* $rvm_path/maglev-* $rvm_path/ree-* ; do
|
469
480
|
|
470
481
|
if [[ -d "$ruby" ]] ; then
|
@@ -495,6 +506,18 @@ done
|
|
495
506
|
# End of rubies migration.
|
496
507
|
#
|
497
508
|
|
509
|
+
if [[ -d "$rvm_path/environments" ]] ; then
|
510
|
+
#
|
511
|
+
# Remove BUNDLE_PATH from environment files
|
512
|
+
#
|
513
|
+
environments=($( find "$rvm_path/environments" -maxdepth 1 -mindepth 1 -type f ))
|
514
|
+
for file in "${environments[@]}" ; do
|
515
|
+
if grep 'BUNDLE_PATH' "$file" > /dev/null ; then
|
516
|
+
grep -v 'BUNDLE_PATH' "$file" > "$file.new"
|
517
|
+
mv "$file.new" "$file"
|
518
|
+
fi
|
519
|
+
done
|
520
|
+
fi
|
498
521
|
#
|
499
522
|
# Migrate old gemset directories to new gemset pattern.
|
500
523
|
#
|
data/scripts/irbrc.rb
CHANGED
data/scripts/manage
CHANGED
@@ -993,15 +993,13 @@ RubyWrapper
|
|
993
993
|
|
994
994
|
unzip -o -d "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string" \
|
995
995
|
"${rvm_archives_path:-"$rvm_path/archives"}/${rvm_ruby_package_file}" >> \
|
996
|
-
"${rvm_log_path:-"$rvm_path/log"}/$rvm_ruby_string/extract.log" 2
|
997
|
-
"${rvm_log_path:-"$rvm_path/log"}/$rvm_ruby_string/extract.error.log"
|
996
|
+
"${rvm_log_path:-"$rvm_path/log"}/$rvm_ruby_string/extract.log" 2>&1
|
998
997
|
result=$?
|
999
998
|
|
1000
999
|
if [[ "$result" -gt 1 ]] ; then
|
1001
1000
|
|
1002
1001
|
"$rvm_path/scripts/log" "error" \
|
1003
|
-
"There has been an error while trying to extract $rvm_ruby_package_file.
|
1004
|
-
\nHalting the installation."
|
1002
|
+
"There has been an error while trying to extract $rvm_ruby_package_file.\n${rvm_log_path:-"$rvm_path/log"}/$rvm_ruby_string/extract.log might have more details.\nHalting the installation."
|
1005
1003
|
return $result
|
1006
1004
|
|
1007
1005
|
fi
|
@@ -1043,123 +1041,6 @@ RubyWrapper
|
|
1043
1041
|
"Installing $rvm_gem_name to $dir"
|
1044
1042
|
;;
|
1045
1043
|
|
1046
|
-
mput|shyouhei)
|
1047
|
-
|
1048
|
-
if [[ ${rvm_make_flags_flag:-0} -eq 1 ]] ; then __rvm_make_flags ; fi
|
1049
|
-
|
1050
|
-
unset GEM_HOME GEM_PATH MY_RUBY_HOME IRBRC
|
1051
|
-
|
1052
|
-
__rvm_remove_rvm_from_path
|
1053
|
-
|
1054
|
-
__rvm_conditionally_add_bin_path ; export PATH
|
1055
|
-
|
1056
|
-
builtin hash -r
|
1057
|
-
|
1058
|
-
rvm_ruby_home="$rvm_path/rubies/$rvm_ruby_interpreter-$rvm_ruby_version"
|
1059
|
-
|
1060
|
-
__rvm_fetch_from_github "mput" "trunk"
|
1061
|
-
|
1062
|
-
__rvm_apply_patches ; result=$?
|
1063
|
-
|
1064
|
-
if [[ "$result" -gt 0 ]] ; then
|
1065
|
-
"$rvm_path/scripts/log" "error" \
|
1066
|
-
"There has been an error while trying to apply patches to mput. \
|
1067
|
-
\nHalting the installation."
|
1068
|
-
return $result
|
1069
|
-
fi
|
1070
|
-
|
1071
|
-
if [[ ! -s "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string/configure" ]] ; then
|
1072
|
-
|
1073
|
-
if command -v autoconf &> /dev/null ; then
|
1074
|
-
|
1075
|
-
__rvm_run "autoconf" "autoconf" "Running autoconf"
|
1076
|
-
|
1077
|
-
else
|
1078
|
-
"$rvm_path/scripts/log" "fail" \
|
1079
|
-
"rvm expects autoconf to install this ruby interpreter, autoconf was not found in PATH. \
|
1080
|
-
\nHalting installation."
|
1081
|
-
return $result
|
1082
|
-
fi
|
1083
|
-
fi
|
1084
|
-
|
1085
|
-
if [[ -s ./Makefile && -z "$rvm_reconfigure_flag" ]] ; then
|
1086
|
-
|
1087
|
-
if [[ ${rvm_debug_flag:-0} -gt 0 ]] ; then
|
1088
|
-
"$rvm_path/scripts/log" "debug" \
|
1089
|
-
"Skipping configure step, Makefile exists so configure must have already been run."
|
1090
|
-
fi
|
1091
|
-
|
1092
|
-
elif [[ -n "$rvm_ruby_configure" ]] ; then
|
1093
|
-
|
1094
|
-
__rvm_run "configure" "$rvm_ruby_configure"
|
1095
|
-
result=$?
|
1096
|
-
|
1097
|
-
if [[ "$result" -gt 0 ]] ; then
|
1098
|
-
"$rvm_path/scripts/log" "error" \
|
1099
|
-
"There has been an error while trying to configure the source. \
|
1100
|
-
\nHalting the installation."
|
1101
|
-
return $result
|
1102
|
-
fi
|
1103
|
-
|
1104
|
-
elif [[ -s ./configure ]] ; then
|
1105
|
-
local configure_command="./configure --prefix=$rvm_ruby_home $rvm_configure_flags"
|
1106
|
-
|
1107
|
-
__rvm_run "configure" "" \
|
1108
|
-
"Configuring $rvm_ruby_string using $rvm_configure_flags, this may take a while depending on your cpu(s)..."
|
1109
|
-
result=$?
|
1110
|
-
|
1111
|
-
if [[ "$result" -gt 0 ]] ; then
|
1112
|
-
"$rvm_path/scripts/log" "error" \
|
1113
|
-
"There has been an error while trying to configure the source.\
|
1114
|
-
\nHalting the installation."
|
1115
|
-
return $result
|
1116
|
-
fi
|
1117
|
-
|
1118
|
-
else
|
1119
|
-
"$rvm_path/scripts/log" "error" \
|
1120
|
-
"Skipping configure step, 'configure' script does not exist, did autoconf not run successfully?"
|
1121
|
-
fi
|
1122
|
-
|
1123
|
-
rvm_ruby_make=${rvm_ruby_make:-"make"}
|
1124
|
-
|
1125
|
-
__rvm_run "make" "$rvm_ruby_make $rvm_make_flags" \
|
1126
|
-
"Compiling $rvm_ruby_string, this may take a while depending on your cpu(s)..."
|
1127
|
-
result=$?
|
1128
|
-
|
1129
|
-
if [[ "$result" -gt 0 ]] ; then
|
1130
|
-
"$rvm_path/scripts/log" "error" \
|
1131
|
-
"There has been an error while trying to run make.\
|
1132
|
-
\nHalting the installation."
|
1133
|
-
return $result
|
1134
|
-
fi
|
1135
|
-
|
1136
|
-
rvm_ruby_make_install=${rvm_ruby_make_install:-"make install"}
|
1137
|
-
|
1138
|
-
__rvm_run "install" "$rvm_ruby_make_install" "Installing $rvm_ruby_string"
|
1139
|
-
result=$?
|
1140
|
-
|
1141
|
-
if [[ "$result" -gt 0 ]] ; then
|
1142
|
-
"$rvm_path/scripts/log" "error" \
|
1143
|
-
"There has been an error while trying to run make install. \
|
1144
|
-
\nHalting the installation."
|
1145
|
-
return $result
|
1146
|
-
fi
|
1147
|
-
|
1148
|
-
"$rvm_path/scripts/log" "info" \
|
1149
|
-
"Installation of $rvm_ruby_string is complete."
|
1150
|
-
|
1151
|
-
export GEM_HOME="$rvm_ruby_gem_home"
|
1152
|
-
export GEM_PATH="$rvm_ruby_gem_path"
|
1153
|
-
|
1154
|
-
__rvm_rubygems_setup
|
1155
|
-
|
1156
|
-
__rvm_bin_script
|
1157
|
-
|
1158
|
-
__rvm_run "chmod.bin" "chmod +x $rvm_ruby_home/bin/*"
|
1159
|
-
|
1160
|
-
__rvm_post_install
|
1161
|
-
;;
|
1162
|
-
|
1163
1044
|
ruby)
|
1164
1045
|
|
1165
1046
|
__rvm_check_for_bison # && Run like hell...
|
@@ -1223,6 +1104,8 @@ __rvm_fetch_from_github()
|
|
1223
1104
|
__rvm_run "$1.repo" "git pull origin $branch" "Pulling from origin $branch"
|
1224
1105
|
fi
|
1225
1106
|
|
1107
|
+
rm -rf "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string"
|
1108
|
+
|
1226
1109
|
__rvm_run "$1.copy" "\\cp -R \"${rvm_repos_path:-"$rvm_path/repos"}/$rvm_ruby_string\" \"${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string\"" "Copying from repo to source..."
|
1227
1110
|
|
1228
1111
|
builtin cd "${rvm_src_path:-"$rvm_path/src"}/$rvm_ruby_string"
|
@@ -1826,8 +1709,7 @@ __rvm_rubygems_setup()
|
|
1826
1709
|
{
|
1827
1710
|
local home path dir directory_name version_number ruby_lib_gem_path
|
1828
1711
|
|
1829
|
-
if [[ -n "$(echo "$rvm_ruby_version" | awk '/^1\.9/')"
|
1830
|
-
|| -n "$(echo "$rvm_ruby_interpreter" | awk '/^mput/')" ]] ; then
|
1712
|
+
if [[ -n "$(echo "$rvm_ruby_version" | awk '/^1\.9/')" ]] ; then
|
1831
1713
|
install=0
|
1832
1714
|
|
1833
1715
|
elif [[ "$rvm_ruby_string" = "ruby-head" ]] ; then
|
@@ -2053,8 +1935,13 @@ __rvm_manage_rubies()
|
|
2053
1935
|
# Given list of ruby strings.
|
2054
1936
|
if [[ -n "${rubies_string:-""}" ]] ;then
|
2055
1937
|
|
2056
|
-
|
2057
|
-
|
1938
|
+
rubies=(${rubies_string//,/ })
|
1939
|
+
|
1940
|
+
for rvm_ruby_string in "${rubies[@]}" ; do
|
1941
|
+
|
1942
|
+
current_ruby_string="$rvm_ruby_string"
|
1943
|
+
|
1944
|
+
rvm_hook="before_install" ; source "$rvm_path/scripts/hook"
|
2058
1945
|
|
2059
1946
|
eval "__rvm_${action}_ruby"
|
2060
1947
|
result="$?"
|
@@ -2064,12 +1951,15 @@ __rvm_manage_rubies()
|
|
2064
1951
|
fi
|
2065
1952
|
|
2066
1953
|
if [[ "$result" = 0 && "$action" = "install" ]] ; then
|
2067
|
-
__rvm_record_install "$
|
1954
|
+
__rvm_record_install "$current_ruby_string"
|
2068
1955
|
fi
|
2069
1956
|
|
2070
|
-
unset
|
1957
|
+
unset current_ruby_string
|
2071
1958
|
|
2072
1959
|
__rvm_unset_ruby_variables
|
1960
|
+
|
1961
|
+
rvm_hook="after_install" ; source "$rvm_path/scripts/hook"
|
1962
|
+
|
2073
1963
|
done
|
2074
1964
|
|
2075
1965
|
else # all
|
data/scripts/notes
CHANGED
@@ -41,9 +41,10 @@ dependencies:
|
|
41
41
|
jruby: aptitude install curl sun-java6-bin sun-java6-jre sun-java6-jdk
|
42
42
|
|
43
43
|
# For Ruby (MRI & ree) you should install the following OS dependencies:
|
44
|
-
ruby: aptitude install build-essential bison openssl
|
44
|
+
ruby: aptitude install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev autoconf
|
45
45
|
|
46
|
-
|
46
|
+
# In addition to ruby: dependencies,
|
47
|
+
ruby-head: subversion
|
47
48
|
|
48
49
|
# For IronRuby (if you wish to use it) you will need:
|
49
50
|
ironruby: aptitude install curl mono-2.0-devel
|
@@ -57,7 +58,7 @@ dependencies:
|
|
57
58
|
|
58
59
|
# For MRI based rubies you will need:
|
59
60
|
ruby: # TODO: tell Wayne what goes here if you use Gentoo :)
|
60
|
-
ruby-head: # TODO: tell Wayne what goes here if you use Gentoo :)
|
61
|
+
ruby-head: dev/readline dev/zlib dev/libxml2 dev/openssl dev/iconv # TODO: tell Wayne what goes here if you use Gentoo :)
|
61
62
|
|
62
63
|
# For JRuby (if you wish to use it) you will need:
|
63
64
|
jruby: emerge dev-java/sun-jdk dev-java/sun-jre-bin
|
@@ -73,8 +74,8 @@ dependencies:
|
|
73
74
|
rvm: bash curl git
|
74
75
|
|
75
76
|
# For Ruby (MRI & Ree) you should install the following OS dependencies:
|
76
|
-
ruby: pacman -Sy --noconfirm patch curl bison zlib readline libxml2 git make
|
77
|
-
ruby-head: pacman -Sy --noconfirm subversion
|
77
|
+
ruby: pacman -Sy --noconfirm patch curl bison zlib readline libxml2 git autoconf diffutils patch bison make
|
78
|
+
ruby-head: pacman -Sy --noconfirm subversion
|
78
79
|
|
79
80
|
# For JRuby (if you wish to use it) you will need:
|
80
81
|
jruby: pacman -Sy --noconfirm jdk jre curl
|
data/scripts/rubygems
CHANGED
@@ -12,7 +12,7 @@ rubygems_setup()
|
|
12
12
|
|
13
13
|
unset RUBYOPT
|
14
14
|
|
15
|
-
if [[
|
15
|
+
if [[ -n "$(echo "$rvm_ruby_version" | awk '/^1\.9/')" ]] ; then
|
16
16
|
install=0
|
17
17
|
elif [[ "$rvm_ruby_string" = "ruby-head" ]] ; then
|
18
18
|
install=0
|
data/scripts/rvm-install
CHANGED
@@ -206,13 +206,24 @@ while [[ $# -gt 0 ]] ; do
|
|
206
206
|
esac
|
207
207
|
done
|
208
208
|
|
209
|
-
if [[ -z "${rvm_prefix:-""}"
|
210
|
-
|
211
|
-
if [[ "$
|
212
|
-
|
209
|
+
if [[ -z "${rvm_prefix:-""}" ]] ; then
|
210
|
+
|
211
|
+
if [[ "$USER" = "root" ]] ; then
|
212
|
+
|
213
|
+
source /etc/rvmrc
|
214
|
+
|
215
|
+
if [[ ${rvm_selfcontained:-0} -eq 0 ]] ; then
|
216
|
+
rvm_prefix="${rvm_prefix:-"/usr/local/"}"
|
217
|
+
else
|
218
|
+
rvm_prefix="${rvm_prefix:-"$HOME/."}"
|
219
|
+
fi
|
220
|
+
|
213
221
|
else
|
222
|
+
|
214
223
|
rvm_prefix="${rvm_prefix:-"$HOME/."}"
|
224
|
+
|
215
225
|
fi
|
226
|
+
|
216
227
|
fi
|
217
228
|
|
218
229
|
if [[ -z "${rvm_path:-""}" ]] ; then
|
@@ -464,7 +475,7 @@ fi
|
|
464
475
|
#
|
465
476
|
mkdir -p "${rvm_rubies_path:-"$rvm_path/rubies"}/"
|
466
477
|
|
467
|
-
for ruby in $rvm_path/ruby-* $rvm_path/jruby-*
|
478
|
+
for ruby in $rvm_path/ruby-* $rvm_path/jruby-* \
|
468
479
|
$rvm_path/rbx-* $rvm_path/maglev-* $rvm_path/ree-* ; do
|
469
480
|
|
470
481
|
if [[ -d "$ruby" ]] ; then
|
@@ -495,6 +506,18 @@ done
|
|
495
506
|
# End of rubies migration.
|
496
507
|
#
|
497
508
|
|
509
|
+
if [[ -d "$rvm_path/environments" ]] ; then
|
510
|
+
#
|
511
|
+
# Remove BUNDLE_PATH from environment files
|
512
|
+
#
|
513
|
+
environments=($( find "$rvm_path/environments" -maxdepth 1 -mindepth 1 -type f ))
|
514
|
+
for file in "${environments[@]}" ; do
|
515
|
+
if grep 'BUNDLE_PATH' "$file" > /dev/null ; then
|
516
|
+
grep -v 'BUNDLE_PATH' "$file" > "$file.new"
|
517
|
+
mv "$file.new" "$file"
|
518
|
+
fi
|
519
|
+
done
|
520
|
+
fi
|
498
521
|
#
|
499
522
|
# Migrate old gemset directories to new gemset pattern.
|
500
523
|
#
|
data/scripts/selector
CHANGED
@@ -162,16 +162,6 @@ __rvm_select()
|
|
162
162
|
fi
|
163
163
|
;;
|
164
164
|
|
165
|
-
mput|shyouhei)
|
166
|
-
rvm_ruby_interpreter="mput"
|
167
|
-
rvm_ruby_version="head"
|
168
|
-
rvm_ruby_string=$(echo $rvm_ruby_string | sed -e 's/shyouhei/mput/g')
|
169
|
-
rvm_ruby_patch_level=""
|
170
|
-
rvm_ruby_repo_url=${rvm_mput_repo_url:-"$(__rvm_db "shyouhei_repo_url")"}
|
171
|
-
rvm_ruby_url=$rvm_ruby_repo_url
|
172
|
-
rvm_ruby_configure="" ; rvm_ruby_make="" ; rvm_ruby_make_install=""
|
173
|
-
;;
|
174
|
-
|
175
165
|
ruby)
|
176
166
|
if [[ -z "${rvm_ruby_version:-""}" && ${rvm_head_flag:-0} -eq 0 ]]; then
|
177
167
|
"$rvm_path/scripts/log" "fail" "Ruby version was not specified!"
|
@@ -307,6 +297,7 @@ __rvm_use()
|
|
307
297
|
export rvm_ruby_string="system"
|
308
298
|
|
309
299
|
else
|
300
|
+
unset BUNDLE_PATH # Ensure that BUNDLE_PATH is not set!
|
310
301
|
GEM_HOME="$rvm_ruby_gem_home"
|
311
302
|
GEM_PATH="$rvm_ruby_gem_home:$rvm_ruby_global_gems_path"
|
312
303
|
MY_RUBY_HOME="$rvm_ruby_home"
|
@@ -430,13 +421,13 @@ __rvm_ruby_string()
|
|
430
421
|
|
431
422
|
rvm_expanding_aliases=${rvm_expanding_aliases:-0}
|
432
423
|
|
433
|
-
rvm_ruby_version
|
434
|
-
rvm_gemset_name
|
435
|
-
rvm_ruby_interpreter
|
436
|
-
rvm_ruby_version
|
437
|
-
rvm_ruby_patch_level
|
438
|
-
rvm_ruby_revision
|
439
|
-
rvm_ruby_tag
|
424
|
+
rvm_ruby_version="${rvm_ruby_version:-""}"
|
425
|
+
rvm_gemset_name="${rvm_gemset_name:-""}"
|
426
|
+
rvm_ruby_interpreter="${rvm_ruby_interpreter:-""}"
|
427
|
+
rvm_ruby_version="${rvm_ruby_version:-""}"
|
428
|
+
rvm_ruby_patch_level="${rvm_ruby_patch_level:-""}"
|
429
|
+
rvm_ruby_revision="${rvm_ruby_revision:-""}"
|
430
|
+
rvm_ruby_tag="${rvm_ruby_tag:-""}"
|
440
431
|
|
441
432
|
if echo "$rvm_ruby_string" | \grep -q "${rvm_gemset_separator:-"@"}" ; then
|
442
433
|
rvm_gemset_name="${rvm_ruby_string/*${rvm_gemset_separator:-"@"}/}"
|
@@ -444,8 +435,8 @@ __rvm_ruby_string()
|
|
444
435
|
fi
|
445
436
|
|
446
437
|
# Alias'd rubies
|
447
|
-
if [[ ${rvm_expanding_aliases:-0} -eq 0 && -n ${rvm_ruby_string:-""}
|
448
|
-
&& $rvm_ruby_string != "system" ]] ; then
|
438
|
+
if [[ ${rvm_expanding_aliases:-0} -eq 0 && -n "${rvm_ruby_string:-""}"
|
439
|
+
&& "$rvm_ruby_string" != "system" ]] ; then
|
449
440
|
if expanded_alias_name="$("$rvm_path/scripts/alias" show "$rvm_ruby_string" 2>/dev/null)" \
|
450
441
|
&& [[ -n "$expanded_alias_name" ]] ; then
|
451
442
|
rvm_ruby_string="$expanded_alias_name"
|
@@ -461,22 +452,22 @@ __rvm_ruby_string()
|
|
461
452
|
fi
|
462
453
|
|
463
454
|
# Stash the ruby string.
|
464
|
-
ruby_string
|
465
|
-
gemset_name
|
466
|
-
repo_url
|
467
|
-
branch_name
|
455
|
+
ruby_string="${rvm_ruby_string:-""}"
|
456
|
+
gemset_name="${rvm_gemset_name:-""}"
|
457
|
+
repo_url="${rvm_ruby_repo_url:-""}"
|
458
|
+
branch_name="${rvm_ruby_repo_branch:-""}"
|
468
459
|
|
469
460
|
__rvm_unset_ruby_variables
|
470
461
|
|
471
|
-
rvm_ruby_repo_url
|
472
|
-
rvm_ruby_repo_branch
|
462
|
+
rvm_ruby_repo_url="${repo_url:-""}"
|
463
|
+
rvm_ruby_repo_branch="${branch_name:-""}"
|
473
464
|
|
474
465
|
if [[ ! -z "$gemset_name" ]] ; then
|
475
466
|
rvm_gemset_name="$gemset_name"
|
476
467
|
rvm_sticky_flag=1 # <- not sold on this.
|
477
468
|
fi
|
478
469
|
|
479
|
-
strings=($(echo ${ruby_string//-/ }))
|
470
|
+
strings=($(echo "${ruby_string//-/ }"))
|
480
471
|
|
481
472
|
if [[ ${#strings[@]} -eq 0 ]] ; then
|
482
473
|
|
@@ -604,7 +595,7 @@ __rvm_ruby_string()
|
|
604
595
|
rvm_ruby_name="${string/n/}"
|
605
596
|
;;
|
606
597
|
|
607
|
-
ruby|rbx|jruby|macruby|ree|rubinius|maglev|
|
598
|
+
ruby|rbx|jruby|macruby|ree|rubinius|maglev|ironruby)
|
608
599
|
rvm_ruby_interpreter="$string"
|
609
600
|
;;
|
610
601
|
|
@@ -626,9 +617,9 @@ __rvm_ruby_string()
|
|
626
617
|
fi
|
627
618
|
|
628
619
|
# Unspecified version
|
629
|
-
rvm_ruby_version
|
620
|
+
rvm_ruby_version="${rvm_ruby_version:-""}"
|
630
621
|
if [[ -z "${rvm_ruby_version:-""}" && ${rvm_head_flag:-0} -eq 0 ]] ; then
|
631
|
-
rvm_ruby_version
|
622
|
+
rvm_ruby_version="${rvm_ruby_version:-"$(__rvm_db "${rvm_ruby_interpreter}_version")"}"
|
632
623
|
fi
|
633
624
|
|
634
625
|
if [[ -z "${rvm_ruby_version:-""}" ]] ; then
|
@@ -704,8 +695,8 @@ __rvm_gemset_select()
|
|
704
695
|
command -v gem > /dev/null
|
705
696
|
if [[ $? -gt 0 ]] ; then return 0 ; fi # Stop if no 'gem' command is available.
|
706
697
|
|
707
|
-
rvm_ruby_gem_home
|
708
|
-
rvm_gemset_name
|
698
|
+
rvm_ruby_gem_home="${rvm_ruby_gem_home:-""}"
|
699
|
+
rvm_gemset_name="${rvm_gemset_name:-""}"
|
709
700
|
|
710
701
|
if [[ -z "${rvm_gemset_name:-""}" ]] ; then
|
711
702
|
|
@@ -714,11 +705,11 @@ __rvm_gemset_select()
|
|
714
705
|
if [[ ${rvm_sticky_flag:-0} -eq 1 ]] ; then
|
715
706
|
|
716
707
|
if [[ -n "${GEM_HOME:-""}" ]] ; then
|
717
|
-
rvm_gemset_name
|
708
|
+
rvm_gemset_name="$(echo $GEM_HOME | xargs basename | awk -F${rvm_gemset_separator:-"@"} '{print $2}')"
|
718
709
|
fi
|
719
710
|
|
720
711
|
if [[ -n "${rvm_ruby_gem_home:-""}" ]] ; then
|
721
|
-
rvm_gemset_name
|
712
|
+
rvm_gemset_name="$(echo $rvm_ruby_gem_home | xargs basename | awk -F${rvm_gemset_separator:-"@"} '{print $2}')"
|
722
713
|
fi
|
723
714
|
fi
|
724
715
|
|
@@ -732,7 +723,7 @@ __rvm_gemset_select()
|
|
732
723
|
rvm_ruby_gem_home="${rvm_gems_path:-"$rvm_path/gems"}/$rvm_ruby_string"
|
733
724
|
|
734
725
|
elif [[ -z "${GEM_HOME:-""}" && -n "$(command -v gem)" ]] ; then
|
735
|
-
rvm_ruby_gem_home
|
726
|
+
rvm_ruby_gem_home="$(gem env gemdir)"
|
736
727
|
|
737
728
|
elif [[ -n "${GEM_HOME:-""}" ]] ; then
|
738
729
|
rvm_ruby_gem_home="$GEM_HOME"
|
@@ -742,10 +733,10 @@ __rvm_gemset_select()
|
|
742
733
|
fi
|
743
734
|
fi
|
744
735
|
else
|
745
|
-
local gemset
|
736
|
+
local gemset="$(echo "$rvm_ruby_gem_home" | awk -F'@' '{print $NF}')"
|
746
737
|
|
747
738
|
if [[ -z "${rvm_ruby_string:-""}" && -n "${GEM_HOME:-""}" && -n "${GEM_HOME/@*/}" ]] ; then
|
748
|
-
rvm_ruby_string
|
739
|
+
rvm_ruby_string="$(basename ${GEM_HOME/@*/})"
|
749
740
|
fi
|
750
741
|
|
751
742
|
if [[ -n "${rvm_ruby_string:-""}" ]] ; then
|
@@ -864,7 +855,7 @@ __rvm_gemset_clear()
|
|
864
855
|
|
865
856
|
rvm_ruby_global_gems_path="${rvm_ruby_gem_home}${rvm_gemset_separator:-"@"}global"
|
866
857
|
|
867
|
-
GEM_HOME
|
858
|
+
GEM_HOME="$rvm_ruby_gem_home"
|
868
859
|
|
869
860
|
GEM_PATH="$rvm_ruby_gem_home:$rvm_ruby_global_gems_path"
|
870
861
|
|
data/scripts/set
CHANGED
@@ -21,6 +21,8 @@ __rvm_ruby_do()
|
|
21
21
|
# Return on invalid rubies.
|
22
22
|
__rvm_become "$current_set_ruby" || return 1
|
23
23
|
|
24
|
+
rvm_hook="before_do" ; source "$rvm_path/scripts/hook"
|
25
|
+
|
24
26
|
if [[ "$action" = "exec" ]]; then
|
25
27
|
# Exec is a special case.
|
26
28
|
command="${args[@]}"
|
@@ -96,11 +98,9 @@ __rvm_ruby_do()
|
|
96
98
|
mkdir -p "./log/$rvm_ruby_string/"
|
97
99
|
fi
|
98
100
|
|
99
|
-
touch ./log/$rvm_ruby_string/$action.log
|
101
|
+
touch "./log/$rvm_ruby_string/$action.log"
|
100
102
|
|
101
|
-
eval "$command"
|
102
|
-
>> ./log/$rvm_ruby_string/$action.log \
|
103
|
-
2>> ./log/$rvm_ruby_string/$action.error.log
|
103
|
+
eval "$command" >> "./log/$rvm_ruby_string/$action.log" 2>&1
|
104
104
|
|
105
105
|
else
|
106
106
|
if [[ ${rvm_verbose_flag:-0} -gt 0 ]] ; then
|
@@ -140,6 +140,8 @@ __rvm_ruby_do()
|
|
140
140
|
|
141
141
|
unset string
|
142
142
|
|
143
|
+
rvm_hook="after_do" ; source "$rvm_path/scripts/hook"
|
144
|
+
|
143
145
|
__rvm_unset_ruby_variables
|
144
146
|
}
|
145
147
|
|
data/scripts/update
CHANGED
@@ -206,13 +206,24 @@ while [[ $# -gt 0 ]] ; do
|
|
206
206
|
esac
|
207
207
|
done
|
208
208
|
|
209
|
-
if [[ -z "${rvm_prefix:-""}"
|
210
|
-
|
211
|
-
if [[ "$
|
212
|
-
|
209
|
+
if [[ -z "${rvm_prefix:-""}" ]] ; then
|
210
|
+
|
211
|
+
if [[ "$USER" = "root" ]] ; then
|
212
|
+
|
213
|
+
source /etc/rvmrc
|
214
|
+
|
215
|
+
if [[ ${rvm_selfcontained:-0} -eq 0 ]] ; then
|
216
|
+
rvm_prefix="${rvm_prefix:-"/usr/local/"}"
|
217
|
+
else
|
218
|
+
rvm_prefix="${rvm_prefix:-"$HOME/."}"
|
219
|
+
fi
|
220
|
+
|
213
221
|
else
|
222
|
+
|
214
223
|
rvm_prefix="${rvm_prefix:-"$HOME/."}"
|
224
|
+
|
215
225
|
fi
|
226
|
+
|
216
227
|
fi
|
217
228
|
|
218
229
|
if [[ -z "${rvm_path:-""}" ]] ; then
|
@@ -464,7 +475,7 @@ fi
|
|
464
475
|
#
|
465
476
|
mkdir -p "${rvm_rubies_path:-"$rvm_path/rubies"}/"
|
466
477
|
|
467
|
-
for ruby in $rvm_path/ruby-* $rvm_path/jruby-*
|
478
|
+
for ruby in $rvm_path/ruby-* $rvm_path/jruby-* \
|
468
479
|
$rvm_path/rbx-* $rvm_path/maglev-* $rvm_path/ree-* ; do
|
469
480
|
|
470
481
|
if [[ -d "$ruby" ]] ; then
|
@@ -495,6 +506,18 @@ done
|
|
495
506
|
# End of rubies migration.
|
496
507
|
#
|
497
508
|
|
509
|
+
if [[ -d "$rvm_path/environments" ]] ; then
|
510
|
+
#
|
511
|
+
# Remove BUNDLE_PATH from environment files
|
512
|
+
#
|
513
|
+
environments=($( find "$rvm_path/environments" -maxdepth 1 -mindepth 1 -type f ))
|
514
|
+
for file in "${environments[@]}" ; do
|
515
|
+
if grep 'BUNDLE_PATH' "$file" > /dev/null ; then
|
516
|
+
grep -v 'BUNDLE_PATH' "$file" > "$file.new"
|
517
|
+
mv "$file.new" "$file"
|
518
|
+
fi
|
519
|
+
done
|
520
|
+
fi
|
498
521
|
#
|
499
522
|
# Migrate old gemset directories to new gemset pattern.
|
500
523
|
#
|
data/scripts/utility
CHANGED
@@ -269,25 +269,21 @@ __rvm_run()
|
|
269
269
|
\mkdir -p "${log%\/*}"
|
270
270
|
fi
|
271
271
|
|
272
|
-
\touch "$log"
|
272
|
+
\touch "$log" # for zsh :(
|
273
273
|
|
274
|
-
printf "[$(date +'%Y-%m-%d %H:%M:%S')] $command\n"
|
275
|
-
\tee "$log" \
|
276
|
-
>> "${log/%log/error.log}"
|
274
|
+
printf "[$(date +'%Y-%m-%d %H:%M:%S')] $command\n" > "$log"
|
277
275
|
|
278
276
|
if [[ ${rvm_niceness:-0} -gt 0 ]] ; then
|
279
277
|
command="nice -n $rvm_niceness $command"
|
280
278
|
fi
|
281
279
|
|
282
|
-
eval "$command"
|
283
|
-
>> "$log" \
|
284
|
-
2>> "${log/%log/error.log}"
|
280
|
+
eval "$command" >> "$log" 2>&1
|
285
281
|
|
286
282
|
result=$?
|
287
283
|
|
288
284
|
if [[ $result -gt 0 ]] ; then
|
289
285
|
"$rvm_path/scripts/log" "error" \
|
290
|
-
"Error running '$command', please
|
286
|
+
"Error running '$command', please read $log"
|
291
287
|
fi
|
292
288
|
|
293
289
|
return ${result:-0}
|
@@ -324,11 +320,9 @@ __rvm_run_with_env()
|
|
324
320
|
\mkdir -p "$path"
|
325
321
|
fi
|
326
322
|
|
327
|
-
\touch "$log"
|
323
|
+
\touch "$log" # for zsh :(
|
328
324
|
|
329
|
-
printf "[$(date +'%Y-%m-%d %H:%M:%S')] $command # under $environment\n"
|
330
|
-
| tee "${log}" \
|
331
|
-
>> "${log/%log/error.log}"
|
325
|
+
printf "[$(date +'%Y-%m-%d %H:%M:%S')] $command # under $environment\n" > "${log}"
|
332
326
|
|
333
327
|
if [[ ${rvm_niceness:-0} -gt 0 ]] ; then
|
334
328
|
command="nice -n $rvm_niceness $command"
|
@@ -339,17 +333,14 @@ __rvm_run_with_env()
|
|
339
333
|
|
340
334
|
__rvm_use
|
341
335
|
|
342
|
-
eval "$command"
|
343
|
-
>> "${log}" \
|
344
|
-
2>> "${log/%log/error.log}"
|
336
|
+
eval "$command" >> "${log}" 2>&1
|
345
337
|
)
|
346
338
|
|
347
339
|
result=$?
|
348
340
|
|
349
341
|
if [[ $result -gt 0 ]] ; then
|
350
342
|
"$rvm_path/scripts/log" "error" \
|
351
|
-
"Error running '$command' under $env_name,\
|
352
|
-
\nplease check ${log/%log/error.log}"
|
343
|
+
"Error running '$command' under $env_name,\nplease read $log"
|
353
344
|
fi
|
354
345
|
|
355
346
|
return ${result:-0}
|
@@ -1113,7 +1104,9 @@ __rvm_ultimate_question()
|
|
1113
1104
|
I do not know the Ultimate Question,
|
1114
1105
|
however I can help you build a more
|
1115
1106
|
powerful Ruby which can compute the
|
1116
|
-
Ultimate Question
|
1107
|
+
Ultimate Question:
|
1108
|
+
|
1109
|
+
$ rvm install rbx
|
1117
1110
|
|
1118
1111
|
"
|
1119
1112
|
return 0
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rvm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 1
|
10
|
+
version: 1.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Wayne E. Seguin
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-11-
|
18
|
+
date: 2010-11-24 00:00:00 -05:00
|
19
19
|
default_executable: rvm-install
|
20
20
|
dependencies: []
|
21
21
|
|