rvm 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,7 +30,7 @@ fi
30
30
  # Setup default sandbox value. See scripts/rvm for origin.
31
31
  if [[ ${rvm_selfcontained:-0} -eq 0 ]]; then
32
32
 
33
- if [[ "root" = "$(whoami)" || -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
33
+ if [[ $(id -u) -eq 0 || -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
34
34
 
35
35
  rvm_selfcontained=0
36
36
 
@@ -85,7 +85,7 @@ __rvm_add_user_to_group() {
85
85
  os_type="$(uname)"
86
86
 
87
87
  # Require root to install it.
88
- if [[ "$(whoami)" != "root" ]]; then
88
+ if [[ $(id -u) -ne 0 ]]; then
89
89
  echo "Please rerun this installer as root." >&2
90
90
  exit 1
91
91
 
@@ -154,7 +154,7 @@ export rvm_selfcontained=0
154
154
  rvm_group_name="${rvm_group_name:-"rvm"}"
155
155
 
156
156
  __rvm_create_user_group "$rvm_group_name"
157
- __rvm_add_user_to_group "$(whoami)" "$rvm_group_name"
157
+ __rvm_add_user_to_group "$USER" "$rvm_group_name"
158
158
 
159
159
  echo "Creating the destination dir and making sure the permissions are correct"
160
160
  mkdir -p "$rvm_path"
@@ -0,0 +1,14 @@
1
+
2
+ Usage:
3
+
4
+ rvm gemset [action]
5
+
6
+ Action:
7
+
8
+ {import,export,create,copy,rename,empty,delete,name,dir,list,list_all,gemdir,install,pristine,clear,use,update,unpack,globalcache}
9
+
10
+ Description:
11
+
12
+ Commands for working with and manipulating gemsets within RVM.
13
+
14
+
data/install CHANGED
@@ -5,8 +5,7 @@ set -o errtrace
5
5
  export PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
6
6
 
7
7
  if [[ -z "$rvm_selfcontained" ]]; then
8
- if [[ "root" = "$(whoami)" \
9
- || -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
8
+ if [[ $(id -u) -eq 0 || -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
10
9
  export rvm_selfcontained=0
11
10
  else
12
11
  export rvm_selfcontained=1
@@ -126,7 +125,7 @@ andand_return_warning()
126
125
  thank_you()
127
126
  {
128
127
  printf "
129
- ${name:-"${USER:-$(whoami)}"},
128
+ ${name:-"${USER:-$(id | sed -e 's/^[^(]*(//' -e 's/).*$//')}"},
130
129
 
131
130
  Thank you very much for using RVM! I sincerely hope that RVM helps to
132
131
  make your work both easier and more enjoyable.
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 1
3
3
  :minor: 1
4
- :patch: 3
4
+ :patch: 4
@@ -16,13 +16,26 @@ Capistrano::Configuration.instance(true).load do
16
16
  set :default_shell do
17
17
  shell = File.join(rvm_bin_path, "rvm-shell")
18
18
  ruby = rvm_ruby_string.to_s.strip
19
- shell = "#{shell} '#{ruby}'" unless ruby.empty?
19
+ shell = "rvm_path=#{rvm_path} #{shell} '#{ruby}'" unless ruby.empty?
20
20
  shell
21
21
  end
22
22
 
23
23
  # Let users set the type of their rvm install.
24
24
  _cset(:rvm_type, :system)
25
25
 
26
+ # Define rvm_path
27
+ # This is used in the default_shell command to pass the required variable to rvm-shell, allowing
28
+ # rvm to boostrap using the proper path. This is being lost in Capistrano due to the lack of a
29
+ # full environment.
30
+ _cset(:rvm_path) do
31
+ case rvm_type
32
+ when :system_wide, :root, :system
33
+ "/usr/local/rvm"
34
+ when :local, :user, :default
35
+ "$HOME/.rvm/"
36
+ end
37
+ end
38
+
26
39
  # Let users override the rvm_bin_path
27
40
  _cset(:rvm_bin_path) do
28
41
  case rvm_type
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rvm}
8
- s.version = "1.1.3"
8
+ s.version = "1.1.4"
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-12-05}
12
+ s.date = %q{2010-12-09}
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}
@@ -170,7 +170,7 @@ __rvm_parse_args()
170
170
 
171
171
  -e)
172
172
  rvm_action="ruby"
173
- rvm_ruby_args="$rvm_token $next_token $(__rvm_quote_args "$@")"
173
+ IFS="\n" ; rvm_ruby_args="$rvm_token '$next_token $@'" ; IFS=" "
174
174
  rvm_parse_break=1
175
175
  ;;
176
176
 
@@ -221,7 +221,7 @@ __rvm_parse_args()
221
221
 
222
222
  elif [[ "-e" = "$next_token" ]] ; then
223
223
  rvm_action="ruby"
224
- rvm_ruby_args="$flag $next_token $(__rvm_quote_args "$@")"
224
+ IFS="\n" ; rvm_ruby_args="$flag $next_token '$@'" ; IFS=" "
225
225
  rvm_parse_break=1
226
226
 
227
227
  else
@@ -453,7 +453,6 @@ __rvm_parse_args()
453
453
  --install) rvm_install_on_use_flag=1 ;;
454
454
  --pretty) rvm_pretty_print_flag=1 ;;
455
455
 
456
-
457
456
  reboot|damnit|wtf|argh|BOOM|boom|wth) $rvm_action="reboot" ;;
458
457
 
459
458
  --self|--gem|--rubygems|--reconfigure|--default|--force|--export|--summary|--latest|--yaml|--json|--archive|--shebang|--env|--path|--tail|--delete|--verbose|--import|--rvmrc|--sticky|--create|--gems|--docs)
@@ -16,15 +16,17 @@ cleanup_download()
16
16
 
17
17
  record_md5()
18
18
  {
19
- if [[ "Darwin" = "$(uname)" ]] || [[ "FreeBSD" = "$(uname)" ]]; then
20
-
21
- archive_md5="$(/sbin/md5 -q "${archive}")"
22
-
23
- else
24
-
25
- archive_md5="$(md5sum "${archive}" | awk '{print $1}')"
26
-
27
- fi
19
+ case "$(uname)" in
20
+ Darwin|FreeBSD)
21
+ archive_md5="$(/sbin/md5 -q "${archive}")"
22
+ ;;
23
+ OpenBSD)
24
+ archive_md5="$(/bin/md5 -q "${archive}")"
25
+ ;;
26
+ Linux|*)
27
+ archive_md5="$(md5sum "${archive}" | awk '{print $1}')"
28
+ ;;
29
+ esac
28
30
 
29
31
  "$rvm_path/scripts/db" "$rvm_path/config/md5" "$archive" "$archive_md5"
30
32
 
@@ -15,7 +15,7 @@ usage()
15
15
 
16
16
  Action:
17
17
 
18
- {import,export,create,copy,rename,empty,delete,name,dir,list,gemdir,install,pristine,clear,use,update,unpack,globalcache}
18
+ {import,export,create,copy,rename,empty,delete,name,dir,list,list_all,gemdir,install,pristine,clear,use,update,unpack,globalcache}
19
19
 
20
20
  Description:
21
21
 
@@ -24,6 +24,14 @@ usage()
24
24
  "
25
25
  }
26
26
 
27
+ gemset_list_all()
28
+ {
29
+ for rvm_ruby_string in $(rvm list strings) ; do
30
+ (__rvm_use $ruby ; gemset_list)
31
+ done
32
+ unset rvm_ruby_string
33
+ }
34
+
27
35
  gemset_update()
28
36
  {
29
37
 
@@ -993,6 +1001,9 @@ case "$action" in
993
1001
  list)
994
1002
  gemset_list
995
1003
  ;;
1004
+ list_all)
1005
+ gemset_list_all
1006
+ ;;
996
1007
  gemdir|gempath|gemhome|home|path|version)
997
1008
  gemset_info
998
1009
  ;;
@@ -5,8 +5,7 @@ set -o errtrace
5
5
  export PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
6
6
 
7
7
  if [[ -z "$rvm_selfcontained" ]]; then
8
- if [[ "root" = "$(whoami)" \
9
- || -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
8
+ if [[ $(id -u) -eq 0 || -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
10
9
  export rvm_selfcontained=0
11
10
  else
12
11
  export rvm_selfcontained=1
@@ -126,7 +125,7 @@ andand_return_warning()
126
125
  thank_you()
127
126
  {
128
127
  printf "
129
- ${name:-"${USER:-$(whoami)}"},
128
+ ${name:-"${USER:-$(id | sed -e 's/^[^(]*(//' -e 's/).*$//')}"},
130
129
 
131
130
  Thank you very much for using RVM! I sincerely hope that RVM helps to
132
131
  make your work both easier and more enjoyable.
@@ -307,7 +307,7 @@ __rvm_install_ruby()
307
307
  # TODO: configure & make variables should be set here.
308
308
  rvm_ruby_configure=" true "
309
309
  rvm_ruby_make="rake"
310
- rvm_ruby_make_install="sudo rake install"
310
+ rvm_ruby_make_install="$rvm_path/bin/rvmsudo rake install"
311
311
 
312
312
  __rvm_db "${rvm_ruby_interpreter}_repo_url" "rvm_ruby_url"
313
313
 
@@ -777,6 +777,8 @@ RubyWrapper
777
777
 
778
778
  cp -R "$rvm_ruby_home/lib/ruby/gems/1.8/" "$rvm_ruby_gem_home/"
779
779
  fi
780
+
781
+ "$rvm_ruby_home/bin/gem" install jruby-launcher
780
782
  ;;
781
783
 
782
784
  maglev)
@@ -41,7 +41,7 @@ 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 libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev autoconf
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 libxslt-dev autoconf
45
45
 
46
46
  # In addition to ruby: dependencies,
47
47
  ruby-head: subversion
@@ -74,7 +74,7 @@ dependencies:
74
74
  rvm: bash curl git
75
75
 
76
76
  # For Ruby (MRI & Ree) you should install the following OS dependencies:
77
- ruby: pacman -Sy --noconfirm patch curl bison zlib readline libxml2 git autoconf diffutils patch bison make
77
+ ruby: pacman -Sy --noconfirm patch curl bison zlib readline libxml2 libxslt git autoconf diffutils patch bison make
78
78
  ruby-head: pacman -Sy --noconfirm subversion
79
79
 
80
80
  # For JRuby (if you wish to use it) you will need:
File without changes
@@ -34,7 +34,7 @@ if ! declare -f rvm > /dev/null || [[ ${rvm_reload_flag:-0} -eq 1 ]] ; then
34
34
  # Set the default sandboxed value.
35
35
  if [[ -z "$rvm_selfcontained" ]]; then
36
36
 
37
- if [[ "root" = "$(whoami)" || -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
37
+ if [[ $(id -u) -eq 0 || -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
38
38
 
39
39
  rvm_selfcontained=0
40
40
 
@@ -5,8 +5,7 @@ set -o errtrace
5
5
  export PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
6
6
 
7
7
  if [[ -z "$rvm_selfcontained" ]]; then
8
- if [[ "root" = "$(whoami)" \
9
- || -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
8
+ if [[ $(id -u) -eq 0 || -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
10
9
  export rvm_selfcontained=0
11
10
  else
12
11
  export rvm_selfcontained=1
@@ -126,7 +125,7 @@ andand_return_warning()
126
125
  thank_you()
127
126
  {
128
127
  printf "
129
- ${name:-"${USER:-$(whoami)}"},
128
+ ${name:-"${USER:-$(id | sed -e 's/^[^(]*(//' -e 's/).*$//')}"},
130
129
 
131
130
  Thank you very much for using RVM! I sincerely hope that RVM helps to
132
131
  make your work both easier and more enjoyable.
@@ -274,6 +274,18 @@ __rvm_use_system() {
274
274
  fi
275
275
  fi
276
276
 
277
+ if [[ ${rvm_default_flag:-0} -eq 1 ]] ; then
278
+
279
+ "$rvm_path/scripts/alias" delete default &> /dev/null
280
+
281
+ \find "${rvm_bin_path:-"$rvm_path/bin"}" -name 'default_*' -maxdepth 0 -delete
282
+ \rm -f "$rvm_path/config/default"
283
+ \rm -f "$rvm_path/environments/default"
284
+ \rm -rf "$rvm_path/wrappers/default"
285
+
286
+ fi
287
+
288
+
277
289
  # Check binaries, remove under the condition they're symlinks.
278
290
  if [[ ${rvm_selfcontained:-1} -eq 0 ]] ; then
279
291
 
@@ -377,22 +389,22 @@ __rvm_use()
377
389
  "$rvm_path/scripts/wrapper" "$rvm_ruby_string" "default"
378
390
  fi
379
391
 
392
+ if [[ "system" != "$rvm_ruby_interpreter" ]] ; then
380
393
 
381
- if [[ "system" = "$rvm_ruby_interpreter" ]] ; then
382
- "$rvm_path/scripts/alias" delete default &> /dev/null
383
- \find "${rvm_bin_path:-"$rvm_path/bin"}" -name 'default_*' -maxdepth 0 -delete
384
- \rm -f "$rvm_path/config/default"
385
- \rm -f "$rvm_path/environments/default"
386
- \rm -rf "$rvm_path/wrappers/default"
387
-
388
- else
389
394
  RUBY_VERSION="$("$rvm_ruby_home/bin/ruby" -v | sed 's#^\(.*\) (.*$#\1#')"
395
+
390
396
  export GEM_HOME GEM_PATH MY_RUBY_HOME RUBY_VERSION
397
+
391
398
  "$rvm_path/scripts/alias" delete default &> /dev/null
399
+
392
400
  "$rvm_path/scripts/alias" create default "$environment_id" >& /dev/null
401
+
393
402
  \ln -nfs "$rvm_path/environments/$environment_id" "$rvm_path/environments/default"
403
+
394
404
  \ln -nfs "$rvm_path/wrappers/$environment_id" "$rvm_path/wrappers/default"
405
+
395
406
  fi
407
+
396
408
  fi
397
409
 
398
410
  rvm_default_flag=0
@@ -35,7 +35,6 @@ __rvm_ruby_do()
35
35
 
36
36
  binary="$rvm_ruby_home/bin/$binary"
37
37
 
38
-
39
38
  elif [[ -x "$rvm_ruby_global_gems_path/bin/$binary" ]] ; then
40
39
 
41
40
  binary="$rvm_ruby_global_gems_path/bin/$binary"
@@ -5,8 +5,7 @@ set -o errtrace
5
5
  export PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
6
6
 
7
7
  if [[ -z "$rvm_selfcontained" ]]; then
8
- if [[ "root" = "$(whoami)" \
9
- || -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
8
+ if [[ $(id -u) -eq 0 || -n "$rvm_prefix" && "$rvm_prefix" != "$HOME"/* ]]; then
10
9
  export rvm_selfcontained=0
11
10
  else
12
11
  export rvm_selfcontained=1
@@ -126,7 +125,7 @@ andand_return_warning()
126
125
  thank_you()
127
126
  {
128
127
  printf "
129
- ${name:-"${USER:-$(whoami)}"},
128
+ ${name:-"${USER:-$(id | sed -e 's/^[^(]*(//' -e 's/).*$//')}"},
130
129
 
131
130
  Thank you very much for using RVM! I sincerely hope that RVM helps to
132
131
  make your work both easier and more enjoyable.
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: 21
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 3
10
- version: 1.1.3
9
+ - 4
10
+ version: 1.1.4
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-12-05 00:00:00 -05:00
18
+ date: 2010-12-09 00:00:00 -05:00
19
19
  default_executable: rvm-install
20
20
  dependencies: []
21
21