Permalink
Browse files

Beginning final overhaul before 0.1.0.

  • Loading branch information...
1 parent 6a310a3 commit 321e7b1ce511ac21bb1b88d09d5548c7591d44f5 @wayneeseguin wayneeseguin committed Sep 24, 2009
Showing with 274 additions and 1,353 deletions.
  1. +0 −1 INSTALL
  2. +1 −0 INSTALL
  3. +1 −1 Rakefile
  4. +1 −1 bin/rvm-install
  5. +2 −0 config/db
  6. +1 −1 rvm.gemspec
  7. 0 scripts/{rvm-aliases → aliases}
  8. +4 −4 scripts/{rvm-cli → cli}
  9. +198 −0 scripts/completion
  10. 0 scripts/{rvm-functions → functions}
  11. 0 scripts/{rvm-install → install}
  12. +39 −34 scripts/{rvm-ruby-installer → ruby-installer}
  13. +4 −4 scripts/rvm
  14. +0 −1 scripts/rvm-update
  15. +2 −2 scripts/{rvm-selector → selector}
  16. +1 −0 scripts/update
  17. +4 −10 scripts/{rvm-utility → utility}
  18. +1 −0 site/content/donations.html
  19. +2 −2 site/content/examples.html
  20. +1 −1 site/content/faq.html
  21. +1 −1 site/content/index.html
  22. +2 −2 site/content/install.html
  23. +1 −1 site/content/upgrade.html
  24. +0 −7 site/layouts/default.html
  25. +0 −7 site/output/about/index.html
  26. +0 −7 site/output/benchmark/index.html
  27. +0 −258 site/output/bp.css
  28. +0 −7 site/output/cli/index.html
  29. +0 −7 site/output/contribute/index.html
  30. +1 −7 site/output/donations/index.html
  31. +0 −225 site/output/examples/examples.html
  32. +2 −9 site/output/examples/index.html
  33. +1 −8 site/output/faq/index.html
  34. +0 −7 site/output/gem/index.html
  35. +0 −7 site/output/gems/index.html
  36. +0 −7 site/output/gemsets/index.html
  37. BIN site/output/images/bottom-gradient.gif
  38. +0 −7 site/output/implementations/index.html
  39. +1 −8 site/output/index.html
  40. +2 −9 site/output/install/index.html
  41. +0 −101 site/output/notes/index.html
  42. +0 −7 site/output/passenger/index.html
  43. +0 −7 site/output/patchlevels/index.html
  44. +0 −7 site/output/prompt/index.html
  45. +0 −7 site/output/rake/index.html
  46. +0 −7 site/output/requirements/index.html
  47. +0 −7 site/output/revisions/index.html
  48. BIN site/output/ruby.png
  49. +0 −7 site/output/ruby/index.html
  50. +0 −153 site/output/rubydo/index.html
  51. +0 −7 site/output/rvmrc/index.html
  52. +0 −7 site/output/setdefault/index.html
  53. +0 −97 site/output/style.css
  54. +0 −7 site/output/subshells/index.html
  55. +0 −7 site/output/tags/index.html
  56. +0 −7 site/output/thanks/index.html
  57. +0 −86 site/output/todo/index.html
  58. +0 −7 site/output/troubleshooting/index.html
  59. +1 −8 site/output/upgrade/index.html
  60. +0 −164 site/output/use/index.html
  61. BIN site/tmp/dependencies
View
@@ -1 +0,0 @@
-From the *project directory* run bin/rvm-install
View
View
@@ -6,7 +6,7 @@ puts <<-LOCAL_INSTALL_WARNING
If you're using rvm from source, don't build the gem
Instead, run the following from the rvm source root
- \033[0;32mFor installing/updating: ./scripts/rvm-install\033[0m
+ \033[0;32mFor installing/updating: ./scripts/install\033[0m
LOCAL_INSTALL_WARNING
View
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
# Hot potato!!! Bash it!
-exec "bash -l -c 'cd #{File.dirname(File.dirname(__FILE__))} && ./scripts/rvm-install #{ARGV.join(' ')} && source ~/.rvm/scripts/rvm'"
+exec "bash -l -c 'cd #{File.dirname(File.dirname(__FILE__))} && ./scripts/install #{ARGV.join(' ')} && source ~/.rvm/scripts/rvm'"
View
@@ -12,6 +12,8 @@ jruby_version=1.3.1
ree_interpreter=ruby-enterprise
ree_version=1.8.6
ree_patch_level=20090610
+ree_1.8.6_repo_url=git://github.com/FooBarWidget/rubyenterpriseedition.git
+ree_1.8.7_repo_url=git://github.com/FooBarWidget/rubyenterpriseedition187.git
macruby_version=2009-09-04
ruby_1.9.1_patch_level=243
ruby_1.9.2_patch_level=preview1
View
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
"scripts/rvm-cli",
"scripts/rvm-completion",
"scripts/rvm-functions",
- "scripts/rvm-install",
+ "scripts/install",
"scripts/rvm-prompt",
"scripts/rvm-ruby-installer",
"scripts/rvm-selector",
File renamed without changes.
@@ -192,15 +192,15 @@ function __rvm_parse-args {
;;
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)
- rvm_ruby_interpreter="ruby"
+ rvm_ruby_interpreter=${rvm_ruby_interpreter:-ruby}
rvm_ruby_version="$rvm_token"
- rvm_action="${rvm_action:-use}"
+ rvm_action=${rvm_action:-use}
;;
1.2.0|1.3.1)
- rvm_ruby_interpreter="jruby"
+ rvm_ruby_interpreter=${rvm_ruby_interpreter:-jruby}
rvm_ruby_version="$rvm_token"
- rvm_action="${rvm_action:-use}"
+ rvm_action=${rvm_action:-use}
;;
-v|--version)
View
@@ -0,0 +1,198 @@
+#!/bin/bash
+
+complete -o default -o nospace -F _rvm rvm
+
+_rvm ()
+{
+ local i c=1 command __git_dir
+
+ while [ $c -lt $COMP_CWORD ]; do
+ i="${COMP_WORDS[c]}"
+ case "$i" in
+ --git-dir=*) __git_dir="${i#--git-dir=}" ;;
+ --bare) __git_dir="." ;;
+ --version|-p|--paginate) ;;
+ --help) command="help"; break ;;
+ *) command="$i"; break ;;
+ esac
+ c=$((++c))
+ done
+
+ if [ -z "$command" ]; then
+ case "${COMP_WORDS[COMP_CWORD]}" in
+ --*) __gitcomp "
+ --paginate
+ --no-pager
+ --git-dir=
+ --bare
+ --version
+ --exec-path
+ --html-path
+ --work-tree=
+ --help
+ "
+ ;;
+ *) __gitcomp "$(__git_porcelain_commands) $(__git_aliases)" ;;
+ esac
+ return
+ fi
+
+ local expansion=$(__git_aliased_command "$command")
+ [ "$expansion" ] && command="$expansion"
+
+ case "$command" in
+ install|uninstall|path|info|setup|version|srcdir|list|reset|debug|reload|usage|help|implode|update|readline|iconv|benchmark|bench|use|gemsync)
+ ;;
+
+ rm|remove)
+ ;;
+
+ system|default)
+ ;;
+
+ ruby|jruby|ree|macruby|rbx|rubinius|default|all)
+ ;;
+
+ gemdir)
+ ;;
+
+ gemdup)
+ "system"
+ "user"
+ "default"
+ ;;
+
+
+ 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)
+ ;;
+
+ 1.2.0|1.3.1)
+ ;;
+
+ do|rubydo|rakedo|gemdo)
+ ;;
+ specs|tests)
+ ;;
+ rake|gem)
+ ;;
+ -S|--script|-e|--execute)
+ ;;
+ default|system)
+ ;;
+
+ --install) rvm_install_on_use_flag=1 ;;
+ --prefix) rvm_prefix_path="$1" ; shift ;;
+ -G|--gems) rvm_gem_path="$1" ; shift ;;
+ --source) rvm_source_path="$1" ; shift ;;
+ --archives) rvm_archives_path="$1" ; shift ;;
+ --make) rvm_ruby_make="$1" ; shift ;;
+ --make-install) rvm_ruby_make_install="$1"; shift ;;
+ --nice) rvm_niceness="$1" ; shift ;;
+ -l|--level) rvm_ruby_patch_level="$1" ; shift ;;
+ -h|--help) rvm_action=help ; shift ;;
+ -m|--gem-set) rvm_gem_set_name="$1" ; shift ;;
+ --rm-gem-set) rvm_gem_set_name_rm="$1" ; shift ;;
+ tests|specs) rvm_action="tests" ;;
+
+ --self|--gem|--rubygems|--reconfigure|--default|--debug|debug|--force|--all|--dump|--summary|--jit|--latest|--yaml|yaml|--json|json)
+ eval "rvm_$(echo $rvm_token | sed 's/-//g')_flag=1"
+ ;;
+
+ stash) _git_stash ;;
+ stage) _git_add ;;
+ submodule) _git_submodule ;;
+ svn) _git_svn ;;
+ tag) _git_tag ;;
+ whatchanged) _git_log ;;
+ *) COMPREPLY=() ;;
+ esac
+}
+
+# __gitcomp accepts 1, 2, 3, or 4 arguments
+# generates completion reply with compgen
+function __rvm_completion_reply
+{
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ if [ $# -gt 2 ]; then
+ cur="$3"
+ fi
+ case "$cur" in
+ --*=)
+ COMPREPLY=()
+ ;;
+ *)
+ local IFS=$'\n'
+ COMPREPLY=($(compgen -P "${2-}" \
+ -W "$(__gitcomp_1 "${1-}" "${4-}")" \
+ -- "$cur"))
+ ;;
+ esac
+}
+
+function _rvm {
+
+ __rvm_cleanup_variables
+ __rvm_load-rvmrc
+ __rvm_initialize
+ __rvm_load_defaults
+ __rvm_parse-args $@
+
+ result=0
+ case "$rvm_action" in
+ install) __rvm_install ; result=$? ;;
+ uninstall) __rvm_uninstall ; result=$? ;;
+ remove) __rvm_remove ; result=$? ;;
+ use) __rvm_use ; result=$? ;;
+ gemdir) __rvm_gem-dir ; result=$? ;;
+ srcdir) __rvm_src-dir ; result=$? ;;
+ gemdup) __rvm_gem-dup ; result=$? ;;
+ list) __rvm_list ; result=$? ;;
+ version) __rvm_version ; result=$? ;;
+ reset) __rvm_reset ; result=$? ;;
+ # TODO: how can we use bin_path here for reload, default file?
+ reload) __rvm_reload ; result=$? ;;
+ implode) __rvm_implode ; result=$? ;;
+ update) __rvm_update ; result=$? ;;
+ readline) __rvm_readline_install ; result=$? ;;
+ iconv) __rvm_iconv_install ; result=$? ;;
+ reboot) __rvm_reboot ; result=$? ;;
+ usage|help) __rvm_usage ; result=$? ;;
+ bench|benchmark) __rvm_benchmark ; result=$? ;;
+ rubydo|rakedo|gemdo) __rvm_do ; result=$? ;;
+
+ gemsync)
+ result=0
+ rvm_source_gem_path=`__rvm_select ; echo $rvm_gem_home`
+ __rvm_gem_sync
+ ;;
+
+ tests|specs)
+ rvm_summary_flag=1
+ rvm_action="rake"
+ __rvm_do
+ ;;
+
+ info|debug)
+ __rvm_version
+ __rvm_info
+ if [ "$rvm_action" = "debug" ] ; then __rvm_debug ; fi
+ result=0
+ ;;
+
+ error)
+ __rvm_log "fail" "$rvm_error_message ( see: 'rvm usage' )"
+ __rvm_pushpop
+ result=1;
+ ;;
+ *)
+ if [ ! -z "$rvm_action" ] ; then
+ __rvm_log "fail" "unknown action '$rvm_action'"
+ else
+ __rvm_usage
+ fi
+ result=1
+ esac
+ return $result
+}
+
+
File renamed without changes.
File renamed without changes.
@@ -127,8 +127,9 @@ function __rvm_install_source {
function __rvm_install_ruby {
- if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
- if [ ! -z "$RUBYOPT" ] ; then ruby_options=$RUBYOPT ; unset RUBYOPT ; fi
+ if [ -z "$rvm_selected" ] ; then __rvm_select $* ; fi
+ if [ ! -z "$RUBYOPT" ] ; then ruby_options=$RUBYOPT ; unset RUBYOPT ; fi
+ if [ "`uname`" = "Darwin" ] ; then ARCHFLAGS="-arch x86_64 -arch i386" ; export ARCHFLAGS ; fi
case "$rvm_ruby_interpreter" in
@@ -169,42 +170,46 @@ function __rvm_install_ruby {
;;
ruby-enterprise|ree)
- rvm_url="http://rubyforge.org/frs/download.php/58677/$rvm_ruby_package_name.tar.gz"
- __rvm_log "info" "Installing Ruby Enterprise Edition from source to: $rvm_ruby_home"
- __rvm_pushpop $rvm_source_path
- if [ -d $rvm_ruby_src_path ] ; then
- cd $rvm_ruby_src_path
- else
- __rvm_log "info" "Downloading $rvm_ruby_package_name, this may take a while depending on your connection..."
- __rvm_fetch $rvm_url
- if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
- __rvm_log "info" "Extracting $rvm_ruby_package_name..."
- mkdir -p $rvm_ruby_src_path
- __rvm_run "extract" tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path
- if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
- fi
-
- __rvm_log "info" "Installing $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..."
- mkdir -p $rvm_ruby_log_path
+ if [ "$rvm_ruby_version" = "1.8.6" -a -z "$rvm_head_flag" ] ; then
+ rvm_url="http://rubyforge.org/frs/download.php/58677/$rvm_ruby_package_name.tar.gz"
+ __rvm_log "info" "Installing Ruby Enterprise Edition from source to: $rvm_ruby_home"
+ __rvm_pushpop $rvm_source_path
+ if [ -d $rvm_ruby_src_path ] ; then
+ cd $rvm_ruby_src_path
+ else
+ __rvm_log "info" "Downloading $rvm_ruby_package_name, this may take a while depending on your connection..."
+ __rvm_fetch $rvm_url
+ if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
+ __rvm_log "info" "Extracting $rvm_ruby_package_name..."
+ mkdir -p $rvm_ruby_src_path
+ __rvm_run "extract" tar xzf $rvm_archives_path/$rvm_ruby_package_name.tar.gz -C $rvm_source_path
+ if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
+ fi
- cd $rvm_ruby_src_path
- mkdir -p $rvm_ruby_home/lib/ruby/gems/1.8/gems
- if [ ! -z "$rvm_ruby_configure" ] ; then rvm_ruby_configure="-c $rvm_ruby_configure"; fi
- __rvm_run "install" ./installer -a $rvm_path/ruby-enterprise-$rvm_ruby_version-$rvm_ruby_patch_level --dont-install-useful-gems --no-tcmalloc $rvm_ruby_configure
- if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
- chmod +x $rvm_ruby_home/bin/*
+ __rvm_log "info" "Installing $rvm_ruby_package_name, this may take a while, depending on your cpu(s)..."
+ mkdir -p $rvm_ruby_log_path
- __rvm_rubygems_setup
+ cd $rvm_ruby_src_path
+ mkdir -p $rvm_ruby_home/lib/ruby/gems/1.8/gems
+ if [ ! -z "$rvm_ruby_configure" ] ; then rvm_ruby_configure="-c $rvm_ruby_configure"; fi
+ __rvm_run "install" ./installer -a $rvm_path/ruby-enterprise-$rvm_ruby_version-$rvm_ruby_patch_level --dont-install-useful-gems --no-tcmalloc $rvm_ruby_configure
+ if [ $? -gt 0 ] ; then result=$? ; return $result ; fi
+ chmod +x $rvm_ruby_home/bin/*
- for rvm_gem_name in rake ; do
- __rvm_log "info" "Installing $rvm_gem_name"
- __rvm_run "gems" $rvm_ruby_home/bin/gem install $rvm_gem_name --no-rdoc --no-ri -q
- done
+ __rvm_rubygems_setup
- __rvm_irbrc
- __rvm_bin_scripts
- __rvm_post_install
- __rvm_pushpop
+ for rvm_gem_name in rake ; do
+ __rvm_log "info" "Installing $rvm_gem_name"
+ __rvm_run "gems" $rvm_ruby_home/bin/gem install $rvm_gem_name --no-rdoc --no-ri -q
+ done
+ __rvm_irbrc
+ __rvm_bin_scripts
+ __rvm_post_install
+ __rvm_pushpop
+ else
+ rvm_ruby_configure="--enable-shared --enable-pthread $rvm_ruby_configure "
+ __rvm_install_source $*
+ fi
;;
rbx|rubinius)
View
@@ -9,10 +9,10 @@
if [ -s ~/.rvmrc ] ; then source ~/.rvmrc ; fi
eval rvm_path="${rvm_path:-~/.rvm}"
-source $rvm_path/scripts/rvm-utility
-source $rvm_path/scripts/rvm-selector
-source $rvm_path/scripts/rvm-ruby-installer # TODO: Script not function.
-source $rvm_path/scripts/rvm-cli
+source $rvm_path/scripts/utility
+source $rvm_path/scripts/selector
+source $rvm_path/scripts/ruby-installer # TODO: Script not function.
+source $rvm_path/scripts/cli
if [ -f $rvm_path/default ] ; then source $rvm_path/default ; fi
View
@@ -54,7 +54,7 @@ function __rvm_select {
jruby)
rvm_ruby_version="${rvm_ruby_version:-`__rvm_db "jruby_version"`}"
unset rvm_ruby_patch_level
- if [ "$rvm_ruby_version" != "1.2.0" -a "$rvm_ruby_version" != "1.3.1" ] ; then
+ if [ ! -z "$(echo $rvm_ruby_version | awk '/^1\.2\.0/')" -o ! -z "$(rvm_ruby_version | awk '/^1\.3\.[0-3]/')" ] ; then
__rvm_log "fail" "Unknown jRuby version: $rvm_ruby_version"
fi
alias jruby_ng="jruby --ng"
@@ -67,7 +67,7 @@ function __rvm_select {
rvm_ruby_version=${rvm_ruby_version:-`__rvm_db "ree_version"`}
rvm_ruby_patch_level="${3:-`__rvm_db "ree_patch_level"`}"
- if [ "$rvm_ruby_version" != "1.8.6" ] ; then
+ if [ -z "$(echo $rvm_ruby_version | awk '/^1\.8/')" ] ; then
__rvm_log "fail" "Unknown Ruby Enterprise Edition version: $rvm_ruby_version"
fi
;;
View
Oops, something went wrong. Retry.

0 comments on commit 321e7b1

Please sign in to comment.