rvm 0.0.95 → 0.0.96

Sign up to get free protection for your applications and to get access to all the features.
data/config/db CHANGED
@@ -8,6 +8,9 @@ macruby_nightly_url=http://macruby.icoretech.org/latest/macruby_nightly-latest.p
8
8
  jruby_version=1.4.0
9
9
  jruby_repo_url=git://github.com/jruby/jruby.git
10
10
  jruby_url=http://jruby.kenai.com/downloads/
11
+ ironruby_version=0.9.3
12
+ ironruby_repo_url=git://github.com/ironruby/ironruby.git
13
+ ironruby_url=http://cloud.github.com/downloads/nrk/ironruby/
11
14
  ruby_configure=--enable-shared
12
15
  interpreter=ruby
13
16
  ruby_version=1.8.6
data/lib/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 0
4
- :patch: 95
4
+ :patch: 96
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.0.95"
8
+ s.version = "0.0.96"
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{2009-12-15}
12
+ s.date = %q{2009-12-17}
13
13
  s.default_executable = %q{rvm-install}
14
14
  s.description = %q{Manages Ruby interpreter installations and switching between them.}
15
15
  s.email = %q{wayneeseguin@gmail.com}
@@ -58,6 +58,7 @@ Gem::Specification.new do |s|
58
58
  "scripts/rvm",
59
59
  "scripts/rvm-install",
60
60
  "scripts/selector",
61
+ "scripts/symlink",
61
62
  "scripts/update",
62
63
  "scripts/utility"
63
64
  ]
data/scripts/cli CHANGED
@@ -73,11 +73,16 @@ __rvm_parse_args() {
73
73
  if [[ "user" = "$1" ]] ; then export rvm_user_flag=1 ; shift ; fi
74
74
  ;;
75
75
 
76
- -S|-e)
76
+ -S)
77
77
  rvm_action="ruby"
78
78
  rvm_ruby_args="$rvm_token $@"
79
79
  rvm_parse_break=1
80
80
  ;;
81
+ -e)
82
+ rvm_action="ruby"
83
+ rvm_ruby_args="$rvm_token \"$@\""
84
+ rvm_parse_break=1
85
+ ;;
81
86
 
82
87
  do|ruby|rake|gem|rubydo|rakedo|gemdo)
83
88
  if [[ "do" = "$rvm_action" ]] ; then rvm_action="ruby" ; fi
@@ -260,8 +265,9 @@ __rvm_parse_args() {
260
265
 
261
266
  tests|specs) rvm_action="tests" ;;
262
267
  --trace) export rvm_trace_flag=1 ; set -x ;;
268
+ --symlink) rvm_symlink_name="$1" ; shift ;;
263
269
 
264
- --self|--gem|--rubygems|--reconfigure|--default|--debug|--force|--all|--dump|--summary|--jit|--latest|--yaml|--json|--archive|--shebang|--env|--path|--tail|--delete|--verbose|--load)
270
+ --self|--gem|--rubygems|--reconfigure|--default|--debug|--force|--all|--dump|--summary|--jit|--latest|--yaml|--json|--archive|--shebang|--env|--path|--tail|--delete|--verbose|--load|--passenger|--editor)
265
271
  export rvm_$(echo $rvm_token | sed 's#-##g')_flag=1
266
272
  if [[ "--debug" = "$rvm_token" ]] ; then export rvm_debug_flag ; fi
267
273
  ;;
@@ -337,7 +343,7 @@ __rvm_parse_args() {
337
343
 
338
344
  rvm() {
339
345
  if [[ -z "$ZSH_VERSION" ]] ; then
340
- trap 'rm -rf "/tmp/rvm/$$" >/dev/null 2>&1' 0 1 2 3 15
346
+ trap 'rm -rf "$rvm_path/tmp/$$" >/dev/null 2>&1' 0 1 2 3 15
341
347
  fi
342
348
 
343
349
  # Check that this is the current version.
data/scripts/completion CHANGED
@@ -50,7 +50,7 @@ _rvm ()
50
50
  system|default)
51
51
  ;;
52
52
 
53
- ruby|jruby|ree|macruby|rbx|rubinius|default|all)
53
+ ruby|jruby|ree|macruby|rbx|rubinius|ironruby|default|all)
54
54
  ;;
55
55
 
56
56
  gemdir)
data/scripts/gems CHANGED
@@ -12,7 +12,8 @@ color_none=$($rvm_scripts_path/color "none")
12
12
  if [[ -z "$rvm_ruby_gem_home" ]] ; then rvm_ruby_gem_home="$(gem env home)" ; fi
13
13
  if [[ "$rvm_trace_flag" -eq 1 ]] ; then set -x ; export rvm_trace_flag ; fi
14
14
 
15
- trap "rm -f $rvm_path/$$* > /dev/null 2>&1 ; exit" 0 1 2 3 15
15
+ trap "rm -f $rvm_path/tmp/$$* > /dev/null 2>&1 ; exit" 0 1 2 3 15
16
+
16
17
 
17
18
  __rvm_gems_name() {
18
19
  echo "$rvm_gem_set_name"
@@ -155,7 +156,7 @@ __rvm_gems_load() {
155
156
  }
156
157
  __rvm_gem_install() {
157
158
 
158
- installed_gem="$(ls ${rvm_ruby_gem_home}/specifications/${gem_file_name}*spec | head -n 1)"
159
+ installed_gem="$(ls ${rvm_ruby_gem_home}/specifications/${gem_file_name}*spec 2>/dev/null | head -n 1)"
159
160
  if [[ -z "$rvm_force_flag" ]] && [[ -f "$installed_gem" ]] ; then
160
161
  unset gem
161
162
  $rvm_scripts_path/log "info" "$color_green$gem_name $gem_version$yellow exists, skipping (--force to re-install)"
data/scripts/manage CHANGED
@@ -7,7 +7,7 @@ original_ruby_string=$rvm_ruby_string
7
7
 
8
8
  source $rvm_scripts_path/rvm
9
9
 
10
- trap "rm -f $rvm_path/$$* > /dev/null 2>&1 ; exit" 0 1 2 3 15
10
+ trap "rm -f $rvm_path/tmp/$$* > /dev/null 2>&1 ; exit" 0 1 2 3 15
11
11
 
12
12
  __rvm_install_source() {
13
13
  if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select $* ; fi
@@ -240,10 +240,10 @@ RubyWrapper
240
240
 
241
241
  builtin cd "$rvm_ruby_src_path"
242
242
  # TODO: Once installer is done add the prefix:
243
- rvm_ruby_configure="./configure --prefix=$rvm_ruby_home" ; message="Configuring rbx"
243
+ rvm_ruby_configure="./configure --prefix=$rvm_ruby_home --disable-llvm" ; message="Configuring rbx"
244
244
  #rvm_ruby_configure="./configure" ; message="Configuring rbx"
245
245
  if [[ ! -z "$rvm_jit_flag" ]] ; then
246
- rvm_ruby_configure="$rvm_ruby_configure --enable-llvm" ; message="$message with LLVM enabled"
246
+ rvm_ruby_configure="$rvm_ruby_configure" ; message="$message with LLVM enabled"
247
247
  fi
248
248
  __rvm_run "configure" "$rvm_ruby_configure" "$message"
249
249
 
@@ -351,6 +351,47 @@ RubyWrapper
351
351
  done ; unset rvm_gem_name
352
352
  ;;
353
353
 
354
+ ironruby|ir)
355
+ if [[ -z "$(which mono 2>/dev/null)" ]] ; then
356
+ echo -e "mono must be installed and in your path in order to install IronRuby." ; return 1
357
+ fi
358
+
359
+ $rvm_scripts_path/log "info" "Retrieving IronRuby"
360
+ $rvm_scripts_path/fetch "$rvm_url"
361
+ result=$? ; if [[ "$result" -gt 0 ]] ; then return $result ; fi
362
+
363
+ __rvm_run "extract" "unzip $rvm_archives_path/$rvm_ruby_package_file ironruby/bin/* ironruby/lib/* -d $rvm_ruby_home" "Extracting $rvm_ruby_package_file ..."
364
+ mv $rvm_ruby_home/ironruby/* $rvm_ruby_home
365
+ rm -rf $rvm_ruby_home/ironruby
366
+ mv $rvm_ruby_home/lib/ironruby $rvm_ruby_home/lib/IronRuby
367
+
368
+ binaries="gem irb rake rdoc ri ruby"
369
+ for binary_name in $(echo $binaries); do
370
+ binary_path=""
371
+ if [[ "ruby" != "$binary_name" ]] ; then
372
+ binary_path="$rvm_ruby_home/bin/i$binary_name"
373
+ fi
374
+ ruby_wrapper=$(cat <<RubyWrapper
375
+ #!/bin/bash
376
+
377
+ GEM_HOME="$rvm_ruby_gem_home" ; export GEM_HOME
378
+ GEM_PATH="$rvm_ruby_gem_home" ; export GEM_PATH
379
+ MY_RUBY_HOME="$rvm_ruby_home" ; export MY_RUBY_HOME
380
+ PATH="$rvm_ruby_home/bin:$rvm_ruby_gem_home/bin:\$PATH" ; export PATH
381
+
382
+ exec mono $rvm_ruby_home/bin/ir.exe $binary_path "\$@"
383
+ RubyWrapper
384
+ )
385
+ files="$rvm_ruby_home/bin/$binary_name $rvm_path/bin/$binary_name-$rvm_ruby_string"
386
+ for file_name in $(echo $files) ; do
387
+ rm -f $file_name
388
+ echo "$ruby_wrapper" > $file_name
389
+ if [[ -f $file_name ]] ; then chmod +x $file_name ; fi
390
+ done
391
+ unset file_name ruby_wrapper binary_name binary_path files prefix
392
+ done
393
+ ;;
394
+
354
395
  mput|shyouhei)
355
396
  if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
356
397
  unset GEM_HOME GEM_PATH MY_RUBY_HOME IRBRC
@@ -414,8 +455,6 @@ RubyWrapper
414
455
 
415
456
  ruby)
416
457
  if [[ "rvm_make_flags_flag" -eq 1 ]] ; then __rvm_make_flags ; fi
417
- if [[ -z "$rvm_ruby_configure_flags" ]] ; then rvm_ruby_configure_flags="--enable-shared" ; fi
418
-
419
458
  __rvm_install_source $*
420
459
  ;;
421
460
 
data/scripts/monitor CHANGED
@@ -9,7 +9,7 @@ source $rvm_scripts_path/rvm
9
9
 
10
10
  rvm_monitor_sleep="${rvm_monitor_sleep:-2}"
11
11
 
12
- trap "rm -f $rvm_path/$$* > /dev/null 2>&1 ; exit" 0 1 2 3 15
12
+ trap "rm -f $rvm_path/tmp/$$* > /dev/null 2>&1 ; exit" 0 1 2 3 15
13
13
 
14
14
  timestamp() {
15
15
  if [[ "Darwin" = "$(uname)" ]] ; then
data/scripts/notes CHANGED
@@ -16,9 +16,9 @@ if [[ "Linux" = "$system" ]] ; then
16
16
 
17
17
  if [[ ! -z "$rvm_apt_get_binary" ]] ; then
18
18
  echo -e " $item For JRuby (if you wish to use it) you will need:"
19
- echo -e "\n $ aptitude install sun-java6-bin sun-java6-jre sun-java6-jdk"
19
+ echo -e "\n $ aptitude install curl sun-java6-bin sun-java6-jre sun-java6-jdk"
20
20
  echo -e "\n $item For MRI & ree (if you wish to use it) you will need:"
21
- echo -e "\n $ aptitude install bison build-essential zlib1g-dev libssl-dev libreadline5-dev libxml2-dev"
21
+ echo -e "\n $ aptitude install curl bison build-essential zlib1g-dev libssl-dev libreadline5-dev libxml2-dev"
22
22
 
23
23
  elif [[ ! -z "$rvm_emerge_binary" ]] ; then
24
24
  echo -e " $item For JRuby (if you wish to use it) you will need:"
data/scripts/selector CHANGED
@@ -67,6 +67,15 @@ __rvm_select() {
67
67
  alias jruby_ng_server="jruby --ng-server"
68
68
  ;;
69
69
 
70
+ ironruby)
71
+ unset rvm_ruby_patch_level
72
+ rvm_ruby_version=${rvm_ruby_version:-"$(__rvm_db "ironruby_version")"}
73
+ rvm_ruby_string="${rvm_ruby_interpreter}-${rvm_ruby_version}"
74
+ rvm_ruby_package_file="${rvm_ruby_string}.zip"
75
+ rvm_ruby_package_name="${rvm_ruby_string}"
76
+ rvm_url="$(__rvm_db "ironruby_url")${rvm_ruby_package_file}"
77
+ ;;
78
+
70
79
  ree)
71
80
  rvm_ruby_interpreter=ree
72
81
  rvm_ruby_version=${rvm_ruby_version:-"$(__rvm_db "ree_version")"}
@@ -265,19 +274,17 @@ __rvm_use() {
265
274
  fi
266
275
  done ; unset variable value
267
276
 
268
- if [[ -s "$rvm_path/bin/$rvm_ruby_string" ]] ; then
269
- rm -f $rvm_path/bin/default*
270
- ln -fs "$rvm_path/bin/$rvm_ruby_string" "$rvm_path/bin/default_ruby" # So that people know what it's for :)
271
- ln -fs "$rvm_path/$rvm_ruby_string/bin/gem" "$rvm_path/bin/default_gem"
272
- ln -fs "$rvm_path/$rvm_ruby_string/bin/irb" "$rvm_path/bin/default_irb"
273
- else
274
- rm -f $rvm_path/bin/default*
275
- fi
277
+ if [[ ! -z "$rvm_default_flag" ]] ; then $rvm_scripts_path/symlink "default" ; fi
276
278
  fi
277
279
  fi
280
+
278
281
  unset rvm_default_flag
279
282
  fi
280
283
 
284
+ if [[ ! -z "$rvm_symlink_name" ]] ; then $rvm_scripts_path/symlink "$rvm_symlink_name" ; unset rvm_symlink_name ; fi
285
+ if [[ ! -z "$rvm_editor_flag" ]] ; then $rvm_scripts_path/symlink "editor" ; unset rvm_editor_flag ; fi
286
+ if [[ ! -z "$rvm_passenger_flag" ]] ; then $rvm_scripts_path/symlink "passenger" ; unset rvm_passenger_flag; fi
287
+
281
288
  # Export ruby string and gem set name for extrnal scripts to take advantage of them.
282
289
  if [[ ! -z "$rvm_ruby_string" ]] ; then export rvm_ruby_string ; fi
283
290
  if [[ ! -z "$rvm_gem_set_name" ]] ; then export rvm_gem_set_name ; fi
data/scripts/symlink ADDED
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env bash
2
+
3
+ if [[ "$rvm_trace_flag" -eq 1 ]] ; then set -x ; export rvm_trace_flag ; fi
4
+
5
+ trap "rm -f $rvm_path/tmp/$$* > /dev/null 2>&1 ; exit" 0 1 2 3 15
6
+
7
+ flag="$1" ; symlink_flag=0
8
+ if [[ -s "$rvm_path/bin/$rvm_ruby_string" ]] ; then
9
+ rm -f ${rvm_path}/bin/${flag}_*
10
+ ln -fs "$rvm_path/bin/$rvm_ruby_string" "$rvm_path/bin/${flag}_ruby"
11
+ for binary in gem irb rake ; do
12
+ ln -fs "$rvm_ruby_home/bin/${binary}" "$rvm_path/bin/${flag}_${binary}"
13
+ done
14
+ exit 0
15
+ else
16
+ $rvm_scripts_path/log "error" "Cannot set ${flag}_ruby since $rvm_path/bin/$rvm_ruby_string is missing."
17
+ exit 1
18
+ fi
data/scripts/utility CHANGED
@@ -217,6 +217,8 @@ __rvm_reset() {
217
217
 
218
218
  for variable in RUBY_VERSION GEM_HOME MY_RUBY_HOME ; do unset $variable ; done
219
219
 
220
+ for flag in default passenger editor ; do rm -f "$rvm_bin_path"/${flag}_* ; done
221
+
220
222
  for file in system default ; do
221
223
  if [[ -f "$rvm_path/$file" ]] ; then rm -f $rvm_path/$file ; fi
222
224
  done
@@ -276,6 +278,7 @@ __rvm_list() {
276
278
  echo -e "rbx(-head) # rubinius head, the default rbx \nrbx(-head) --jit (rubinius head with LLVM enabled)"
277
279
  echo -e "ree-1.8.6\nree(-1.8.7) # the default\nree-1.8.6-head\nree-1.8.7-head"
278
280
  echo -e "mput(-head) # shyouhei head, the default mput"
281
+ echo -e "ironruby-0.9.3 # (1.0 RC1)"
279
282
  if [[ "Darwin" = "$(uname)" ]] ; then
280
283
  echo -e "macruby(-nightly) # the default macruby\nmacruby-head # Build from the macruby git repository"
281
284
  fi
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.0.95
4
+ version: 0.0.96
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-12-15 00:00:00 -05:00
12
+ date: 2009-12-17 00:00:00 -05:00
13
13
  default_executable: rvm-install
14
14
  dependencies: []
15
15
 
@@ -62,6 +62,7 @@ files:
62
62
  - scripts/rvm
63
63
  - scripts/rvm-install
64
64
  - scripts/selector
65
+ - scripts/symlink
65
66
  - scripts/update
66
67
  - scripts/utility
67
68
  has_rdoc: true