wayneeseguin-rvm 0.0.40 → 0.0.42

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/config/db CHANGED
@@ -13,8 +13,8 @@ ree_interpreter=ruby-enterprise
13
13
  ree_version=1.8.6
14
14
  ree_patch_level=20090610
15
15
  macruby_version=2009-09-04
16
- ruby_1.9.1_patch_level=p243
16
+ ruby_1.9.1_patch_level=243
17
17
  ruby_1.9.2_patch_level=preview1
18
- ruby_1.8.5_patch_level=p115
19
- ruby_1.8.6_patch_level=p383
20
- ruby_1.8.7_patch_level=p174
18
+ ruby_1.8.5_patch_level=115
19
+ ruby_1.8.6_patch_level=383
20
+ ruby_1.8.7_patch_level=174
@@ -30,3 +30,6 @@
30
30
 
31
31
  # Default gems directory
32
32
  # rvm_gem_path="$HOME/.gem"
33
+
34
+ # Install rubies on use when they are not installed
35
+ #ruby_install_on_use=1
@@ -0,0 +1,4 @@
1
+ ---
2
+ :major: 0
3
+ :minor: 0
4
+ :patch: 42
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rvm}
8
- s.version = "0.0.40"
8
+ s.version = "0.0.42"
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-09-15}
12
+ s.date = %q{2009-09-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}
@@ -23,6 +23,7 @@ Gem::Specification.new do |s|
23
23
  "README",
24
24
  "config/db",
25
25
  "examples/rvmrc",
26
+ "lib/VERSION.yml",
26
27
  "lib/rvm.rb",
27
28
  "rvm.gemspec",
28
29
  "scripts/rvm",
@@ -4,8 +4,8 @@ function __rvm_meta {
4
4
  rvm_meta_author="Wayne E. Seguin"
5
5
  rvm_meta_author_email="wayneeseguin@gmail.com"
6
6
  rvm_meta_website="http://rvm.beginrescueend.com/"
7
- rvm_meta_version="`cat $rvm_path/VERSION.yml | tail -n 3 | sed 's/^.*: //g' | tr "\n" '.' | sed 's/\.$//'`"
8
- rvm_meta_updated="2009.09.15"
7
+ rvm_meta_version="`cat $rvm_path/lib/VERSION.yml | tail -n 3 | sed 's/^.*: //g' | tr "\n" '.' | sed 's/\.$//'`"
8
+ rvm_meta_updated="2009.09.17"
9
9
  }
10
10
 
11
11
  function __rvm_version { __rvm_meta ; echo "rvm $rvm_meta_version ($rvm_meta_updated) [$rvm_meta_website]" ; }
@@ -20,7 +20,7 @@ function __rvm_usage {
20
20
 
21
21
  Usage:
22
22
 
23
- rvm Action [Implementation] [Options]
23
+ rvm Action [Implementation] [Options] [Flags]
24
24
 
25
25
  Action:
26
26
 
@@ -43,6 +43,8 @@ function __rvm_usage {
43
43
  reload - Reload rvm source itself (useful after changing rvm source)
44
44
  implode - Removes all ruby installations it manages, everything in ~/.rvm
45
45
  update - Upgrades rvm to the latest version.
46
+ tests - run 'rake test' across selected ruby versions
47
+ specs - run 'rake spec' across selected ruby versions
46
48
 
47
49
  Implementation:
48
50
 
@@ -55,41 +57,41 @@ function __rvm_usage {
55
57
 
56
58
  Options:
57
59
 
58
- -v|--version - Ruby Package Version, defaults to 'latest'
59
- -l|--level - Patch level for the specified Ruby version
60
- -p|--prefix - Package and source directory prefix, with trailing slash!
61
- Default is a users home directory and /usr/local/ for root
62
- -a|--archives - Directory to place downladed files into (~/.rvm/archives/)
63
- -n|--nice - Specify a process niceness (for slow computers, default 0)
64
- -m|--gem-set - Named gem set for switching between different gem sets
65
- --rm-gem-set - Removes a named gemset.
66
-
67
- -l|--level - Specify a patch level to use
68
- -t|--tag -
69
- -r|--rev - Specify the repository revision # to use or 'head' for
70
-
71
- -P|--prefix - Sets the prefix path for installs to be installed to
72
- --bin - Specify path for binaries to be placed
73
- --source - Specify src directory to use
74
- --archive - Specify archive directory to use (tabralls / zips)
75
- -G|--gems - Specify root gem path to use
76
- -C|--configure - Specify custom configure options, comma separated
77
- default: --enable-shared=true
78
- --re-configure - Force installer to re-run configure if already run
79
- -M|--make - Specify a custom make command
80
- -I|--make-install - " a custom make install command
81
-
82
- -f|--file - Specify a ruby file to run with 'rubydo' command
60
+ -v|--version - Emit rvm version loaded for current shell
83
61
  -h|--help - Emit this output and exit
84
- -d|--default - Set the default Ruby to a specified version
85
- -m|--gem-set - Use a named gem set instead of the default set.
62
+ -l|--level - patch level to use with rvm use / install
63
+ --tag - subersion tag to use
64
+ --rev - repository revision # to use or 'head' for
65
+
66
+ --prefix - path for all rvm files (~/.rvm/), with trailing slash!
67
+ --bin - path for binaries to be placed (~/.rvm/bin/)
68
+ --source - src directory to use (~/.rvm/src/)
69
+ --archives - directory for downladed files (~/.rvm/archives/)
86
70
  -S|--script - Specify a script file to attempt to load and run (rubydo)
87
- --all - Used with 'rvm list' to list "most" installable versions.
71
+ -G|--gems - root gem path to use
72
+ -C|--configure - custom configure options, comma separated
73
+ default: --enable-shared=true
74
+ --reconfigure - Force installer to re-run configure if already run
75
+ --make - custom make command
76
+ --make-install - custom make install command
77
+ --nice - process niceness (for slow computers, default 0)
78
+ -m|--gem-set - use a named gem set, instead of the default set.
88
79
  --rm-gem-set - Remove a named gem set
89
- --jit - Enable JIT for the Rubinius build
90
- --force - Force install, removes old install & source directories.
91
- --set-prompt - Set prompt to have the selected ruby prepended.
92
- --debug|--trace - Toggle debug mode on for very verbose output.
80
+
81
+ Flags
82
+
83
+ --self - with update, updates rvm itself
84
+ --rubygems - with update, updates rubygems for selected ruby
85
+ --default - with ruby select, sets a default ruby for new shells.
86
+ --debug - Toggle debug mode on for very verbose output.
87
+ --force - Force install, removes old install & source before install.
88
+ --all - Used with 'rvm list' to display "most" available versions.
89
+ --dump - Used with gemset to dump the current ruby's gemset.
90
+ --load - Used with gemset to load a specified gemset file
91
+ --summary - Used with rubydo to print out a summary of the commands run.
92
+ --jit - Used with rubinius install to build with JIT
93
+ --latest - with gemset --dump skips version strings for latest gem.
94
+ --reconfigure - Force ./configure on install even if Makefile already exists.
93
95
 
94
96
  Resources:
95
97
 
@@ -104,7 +106,7 @@ function __rvm_parse-args {
104
106
  while [ $# -gt 0 ] ; do
105
107
  rvm_token="$1" ; shift
106
108
  case "$rvm_token" in
107
- install|uninstall|path|info|setup|version|srcdir|list|symlinks|reset|debug|reload|usage|help|implode|update|readline|iconv)
109
+ install|uninstall|remove|path|info|setup|version|srcdir|list|symlinks|reset|debug|reload|usage|help|implode|update|readline|iconv)
108
110
  rvm_action=$rvm_token
109
111
  ;;
110
112
 
@@ -166,45 +168,49 @@ function __rvm_parse-args {
166
168
  ;;
167
169
 
168
170
  1.8|1.8.0|1.8.1|1.8.2|1.8.3|1.8.4|1.8.5|1.8.6|1.8.7|1.9|1.9.1|1.9.2)
169
- rvm_ruby_interpreter="ruby"
170
- rvm_ruby_version="$rvm_token"
171
- rvm_action="${rvm_action:-use}"
171
+ rvm_ruby_interpreter="ruby"
172
+ rvm_ruby_version="$rvm_token"
173
+ rvm_action="${rvm_action:-use}"
172
174
  ;;
173
175
 
174
176
  1.2.0|1.3.1)
175
- rvm_ruby_interpreter="jruby"
176
- rvm_ruby_version="$rvm_token"
177
- rvm_action="${rvm_action:-use}"
177
+ rvm_ruby_interpreter="jruby"
178
+ rvm_ruby_version="$rvm_token"
179
+ rvm_action="${rvm_action:-use}"
178
180
  ;;
179
181
 
180
182
  -v|--version)
181
- if [ -z "$1" ] ; then
182
- rvm_action="version"
183
- else
184
- rvm_ruby_version="$1"
185
- shift
186
- fi
183
+ if [ -z "$1" ] ; then
184
+ rvm_action="version"
185
+ else
186
+ rvm_ruby_version="$1"
187
+ shift
188
+ fi
189
+ ;;
190
+
191
+ -t|--tag)
192
+ rvm_ruby_tag="$1";
193
+ rvm_action="${rvm_action:-use}"
194
+ shift
187
195
  ;;
188
196
 
189
- -t|--tag) rvm_ruby_tag="$1";
190
- rvm_action="${rvm_action:-use}"
191
- shift ;;
192
197
  --head)
193
- rvm_ruby_rev="head"
194
- rvm_action="${rvm_action:-use}"
198
+ rvm_ruby_rev="head"
199
+ rvm_action="${rvm_action:-use}"
195
200
  ;;
196
- --rev|--revision) rvm_ruby_rev="$1";
197
- rvm_action="${rvm_action:-use}"
198
- shift ;;
199
- -b|--branch) rvm_ruby_branch="$1";
200
- rvm_action="${rvm_action:-use}"
201
- shift ;;
202
201
 
202
+ --rev|--revision)
203
+ rvm_ruby_rev="$1";
204
+ rvm_action="${rvm_action:-use}"
205
+ shift
206
+ ;;
203
207
 
204
- -P|--prefix) rvm_prefix_path="$1" ; shift ;;
208
+ -b|--branch)
209
+ rvm_ruby_branch="$1";
210
+ rvm_action="${rvm_action:-use}"
211
+ shift
212
+ ;;
205
213
 
206
- --rubygems) rvm_rubygems_flag=1 ;;
207
- --rvm|--gem) rvm_update_flag=1 ;;
208
214
  --bin)
209
215
  if [ "$rvm_action" = "update" ] ; then
210
216
  rvm_bin_flag=1
@@ -213,34 +219,27 @@ function __rvm_parse-args {
213
219
  fi
214
220
  ;;
215
221
 
216
- --source) rvm_source_path="$1" ; shift ;;
217
- --archive) rvm_archives_path="$1" ; shift ;;
218
- -G|--gems) rvm_gem_path="$1" ; shift ;;
219
- -C|--configure)
222
+ -j)
220
223
  if [ ! -z "$1" ] ; then
221
- rvm_ruby_configure="$(echo $1 | tr ',' ' ')"
224
+ rvm_make_flags="$rvm_make_flags -j$1"
222
225
  shift
223
226
  else
224
227
  rvm_action="error"
225
- rvm_error_message="--configure *must* be followed by configure flags."
228
+ rvm_error_message="-j *must* be followed by an integer (normally the # of CPU's in your machine)."
226
229
  fi
227
230
  ;;
228
231
 
229
- --re-configure) rvm_re_configure=1 ;;
230
- --make) rvm_ruby_make="$1" ; shift ;;
231
- --make-install) rvm_ruby_make_install="$1"; shift ;;
232
- -j)
232
+
233
+ -C|--configure)
233
234
  if [ ! -z "$1" ] ; then
234
- rvm_make_flags="$rvm_make_flags -j$1"
235
+ rvm_ruby_configure="$(echo $1 | tr ',' ' ')"
235
236
  shift
236
237
  else
237
238
  rvm_action="error"
238
- rvm_error_message="-j *must* be followed by an integer (normally the # of CPU's in your machine)."
239
+ rvm_error_message="--configure *must* be followed by configure flags."
239
240
  fi
240
241
  ;;
241
- --nice) rvm_niceness="$1" ; shift ;;
242
- -l|--level) rvm_ruby_patch_level="$1" ; shift ;;
243
- --summary) rvm_summary=1 ;;
242
+
244
243
  -r|--require)
245
244
  if [ -z "$1" ] ; then
246
245
  rvm_action="error"
@@ -250,6 +249,7 @@ function __rvm_parse-args {
250
249
  shift
251
250
  fi
252
251
  ;;
252
+
253
253
  -I|--include)
254
254
  if [ -z "$1" ] ; then
255
255
  rvm_action="error"
@@ -259,47 +259,64 @@ function __rvm_parse-args {
259
259
  shift
260
260
  fi
261
261
  ;;
262
+
262
263
  -f|--file)
263
- rvm_action="rubydo"
264
- rvm_ruby_args="$1"
265
- shift
264
+ rvm_action="rubydo"
265
+ rvm_ruby_args="$1"
266
+ shift
266
267
  ;;
267
- -S|--script|-e|--execute)
268
- rvm_action="rubydo"
269
- rvm_ruby_args="$@"
270
- rvm_parse_break=1
268
+
269
+ specs|tests)
270
+ rvm_action="rubydo"
271
+ rvm_ruby_args="rake $rvm_token"
271
272
  ;;
272
273
 
273
- -h|--help) rvm_action=help ; shift ;;
274
- -d|--default) rvm_set_default=1 ;;
275
- --trace|--debug) rvm_debug=1 ;;
276
- --force) rvm_force=1 ;;
277
- --all) rvm_all=1 ;;
278
- -m|--gem-set) rvm_gem_set_name="$1" ; shift ;;
279
- --rm-gem-set) rvm_gem_set_name_rm="$1" ; shift ;;
280
- --dump) rvm_dump=1 ;;
281
- --load)
282
- rvm_load=1
283
- if [ ! -z "$1" ] ; then
284
- rvm_load_file="$1"
285
- shift
286
- else
287
- rvm_action="error"
288
- rvm_error_message="--load must be followed by the .gemset file to load."
289
- break;
290
- fi
291
- shift
274
+ rake|gem)
275
+ rvm_action="rubydo"
276
+ rvm_ruby_args="$rvm_token $@"
277
+ rvm_parse_break=1
292
278
  ;;
293
279
 
294
- --jit) rvm_rubinius_jit="RBX_LLVM=1" ;;
295
- --latest) rvm_latest=1 ;;
296
- --tests|--specs) rvm_action="tests" ;;
280
+ -S|--script|-e|--execute)
281
+ rvm_action="rubydo"
282
+ rvm_ruby_args="$@"
283
+ rvm_parse_break=1
284
+ ;;
285
+
286
+ --load)
287
+ rvm_load_flag=1
288
+ if [ ! -z "$1" ] ; then
289
+ rvm_load_file="$1"
290
+ shift
291
+ else
292
+ rvm_action="error"
293
+ rvm_error_message="--load must be followed by the .gemset file to load."
294
+ break;
295
+ fi
296
+ ;;
297
297
 
298
298
  default|system)
299
299
  rvm_action="use"
300
300
  rvm_ruby_interpreter="system"
301
301
  ;;
302
302
 
303
+ --prefix) rvm_prefix_path="$1" ; shift ;;
304
+ -G|--gems) rvm_gem_path="$1" ; shift ;;
305
+ --source) rvm_source_path="$1" ; shift ;;
306
+ --archives) rvm_archives_path="$1" ; shift ;;
307
+ --make) rvm_ruby_make="$1" ; shift ;;
308
+ --make-install) rvm_ruby_make_install="$1"; shift ;;
309
+ --nice) rvm_niceness="$1" ; shift ;;
310
+ -l|--level) rvm_ruby_patch_level="$1" ; shift ;;
311
+ -h|--help) rvm_action=help ; shift ;;
312
+ -m|--gem-set) rvm_gem_set_name="$1" ; shift ;;
313
+ --rm-gem-set) rvm_gem_set_name_rm="$1" ; shift ;;
314
+ tests|specs) rvm_action="tests" ;;
315
+
316
+ --self|--gem|--rubygems|--reconfigure|--default|--debug|debug|--force|--all|--dump|--summary|--jit|--latest)
317
+ eval "rvm_$(echo $rvm_token | sed 's/-//g')_flag=1"
318
+ ;;
319
+
303
320
  reboot|flush|asdf|damnit|wtf|argh|work|workdamnit|BOOM|boom|wth)
304
321
  $rvm_action="reboot"
305
322
  ;;
@@ -337,8 +354,6 @@ function __rvm_parse-args {
337
354
  done
338
355
 
339
356
  if [ ! -z "$rvm_error_message" ] ; then popd 2> /dev/null ; return 1 ; fi
340
- if [ -z "$rvm_debug" ] ; then set +x ; else set -x ; fi
341
-
342
357
  }
343
358
 
344
359
  function rvm {
@@ -349,38 +364,43 @@ function rvm {
349
364
  __rvm_load-defaults
350
365
  __rvm_parse-args $@
351
366
 
352
- status=0
367
+ if [ -z "$rvm_debug_flag" ] ; then set +x ; else set -x ; fi
368
+ result=0
353
369
  case "$rvm_action" in
354
- install) __rvm_install-ruby ;status=$? ;;
355
- uninstall) __rvm_uninstall ;status=$? ;;
356
- use) __rvm_use ;status=$? ;;
357
- gemdir) __rvm_gem-dir ;status=$? ;;
358
- srcdir) __rvm_src-dir ;status=$? ;;
359
- gemdup) __rvm_gem-dup ;status=$? ;;
360
- list) __rvm_list ;status=$? ;;
361
- symlinks) __rvm_symlinks ;status=$? ;;
362
- version) __rvm_version ;status=$? ;;
370
+ install) __rvm_install-ruby ; result=$? ;;
371
+ uninstall) __rvm_uninstall ; result=$? ;;
372
+ remove) __rvm_remove ; result=$? ;;
373
+ use) __rvm_use ; result=$? ;;
374
+ gemdir) __rvm_gem-dir ; result=$? ;;
375
+ srcdir) __rvm_src-dir ; result=$? ;;
376
+ gemdup) __rvm_gem-dup ; result=$? ;;
377
+ list) __rvm_list ; result=$? ;;
378
+ symlinks) __rvm_symlinks ; result=$? ;;
379
+ version) __rvm_version ; result=$? ;;
380
+ reset) __rvm_reset ; result=$? ;;
381
+ # TODO: how can we use bin_path here for reload, default file?
382
+ reload) __rvm_reload ; result=$? ;;
383
+ implode) __rvm_implode ; result=$? ;;
384
+ update) __rvm_update ; result=$? ;;
385
+ readline) __rvm_readline_install ; result=$? ;;
386
+ iconv) __rvm_iconv_install ; result=$? ;;
387
+ reboot) __rvm_reboot ; result=$? ;;
388
+ usage|help) __rvm_usage ; result=$? ;;
389
+ rubydo|rakedo|gemdo) __rvm_do ; result=$? ;;
390
+
363
391
  tests|specs)
364
- rvm_do_summary=1
392
+ rvm_summary_flag=1
365
393
  rvm_action="rake"
366
394
  __rvm_do
367
395
  ;;
368
- rubydo|rakedo|gemdo) __rvm_do ; status=$? ;;
369
- reset) __rvm_reset ;;
370
- # TODO: how can we use bin_path here for reload, default file?
371
- reload) __rvm_reload ;;
372
- implode) __rvm_implode ;;
373
- update) __rvm_update ;;
374
- readline) __rvm_readline_install ;;
375
- iconv) __rvm_iconv_install ;;
376
- reboot) __rvm_reboot ;;
377
- usage|help) __rvm_usage ;;
396
+
378
397
  info|debug)
379
- __rvm_version
380
- __rvm_info
381
- if [ "$rvm_action" = "debug" ] ; then __rvm_debug ; fi
382
- return 0
398
+ __rvm_version
399
+ __rvm_info
400
+ if [ "$rvm_action" = "debug" ] ; then __rvm_debug ; fi
401
+ result=0
383
402
  ;;
403
+
384
404
  error) __rvm_log "fail" "$rvm_error_message ( see: 'rvm usage' )" ; popd 2> /dev/null ; return 1; ;;
385
405
  *)
386
406
  if [ ! -z "$rvm_action" ] ; then
@@ -388,11 +408,10 @@ function rvm {
388
408
  else
389
409
  __rvm_usage
390
410
  fi
391
- return 1
411
+ result=1
392
412
  esac
393
-
394
- if [ "$rvm_debug" = "1" ] ; then set +x ; unset rvm_debug ; fi
395
- return $status
413
+ if [ "$rvm_debug_flag" = "1" ] ; then set +x ; unset rvm_debug_flag ; fi
414
+ return $result
396
415
  }
397
416
 
398
417