Browse files

Initial jruby-head support.

  • Loading branch information...
1 parent ed773a7 commit d432fdb3cf98ece41dac5c9545e27b0b91b7aeda @wayneeseguin wayneeseguin committed Nov 2, 2009
Showing with 36 additions and 11 deletions.
  1. +2 −2 config/db
  2. +25 −5 scripts/ruby-installer
  3. +9 −4 scripts/selector
View
4 config/db
@@ -5,12 +5,12 @@ shyouhei_repo_url=git://github.com/shyouhei/ruby.git
macruby_version=nightly
macruby_repo_url=git://git.macruby.org/macruby/MacRuby.git
macruby_nightly_url=http://macruby.icoretech.org/latest
-jruby_repo_url=git://kenai.com/jruby~main
+jruby_version=1.3.1
+jruby_repo_url=git://github.com/jruby/jruby.git
ruby_configure=--enable-shared
interpreter=ruby
ruby_version=1.8.6
ruby_patchlevel=383
-jruby_version=1.3.1
ree_version=1.8.7
ree_1.8.6_patch_level=20090610
ree_1.8.6_url=http://rubyforge.org/frs/download.php/58677
View
30 scripts/ruby-installer
@@ -315,14 +315,34 @@ RubyWrapper
;;
jruby)
- mkdir -p $rvm_ruby_log_path
+ mkdir -p "$rvm_ruby_log_path" "$rvm_ruby_src_path"
__rvm_pushpop $rvm_src_path
- if [[ ! -z "$rvm_ruby_revision" ]] ; then
- if [[ ! -d "$rvm_path/$rvm_ruby_interpreter-$rvm_ruby_version" ]] || [[ ! -d "$rvm_path/$rvm_ruby_interpreter-$rvm_ruby_version/.git" ]] ; then
- git clone --depth 1 $rvm_jruby_repo_url $rvm_ruby_src_path
- cd $rvm_ruby_src_path && ant # TODO: Test if 'ant' is installed, if not throw error.
+ if [[ "$rvm_head_flag" -eq 1 ]] || [[ ! -z "$rvm_ruby_revision" ]] ; then
+ if [[ -d "$rvm_ruby_src_path/.git" ]] ; then
+ cd "$rvm_ruby_src_path"
+ if [[ -z "$rvm_ruby_revision" ]] ; then
+ __rvm_log "info" "Pulling from $rvm_ruby_repo_url, this may take a while depending on your connection..."
+ git pull origin master
+ if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
+ else
+ if [[ -z "$rvm_ruby_sha" ]] ; then
+ git checkout HEAD
+ else
+ git checkout $(echo $rvm_ruby_sha | sed 's#^s##')
+ fi
+ if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
+ fi
+ else
+ rm -rf "$rvm_ruby_src_path"
+ __rvm_log "info" "Cloning from $rvm_ruby_repo_url, this may take a while depending on your connection..."
+ git clone --depth 1 "$rvm_ruby_repo_url" "$rvm_ruby_src_path"
+ if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
fi
+
+ cd "$rvm_ruby_src_path"
+ ant dist
+
else
if [[ -d $rvm_ruby_src_path ]] ; then
cd $rvm_ruby_src_path
View
13 scripts/selector
@@ -51,18 +51,23 @@ function __rvm_select {
;;
jruby)
- rvm_jruby_repo_url="${rvm_jruby_repo_url:-"git://kenai.com/jruby~main"}"
- rvm_ruby_version="${rvm_ruby_version:-"$(__rvm_db "jruby_version")"}"
unset rvm_ruby_patch_level
- if match "$rvm_ruby_version" "^1.4" ; then
+ if [[ "$rvm_head_flag" -eq 1 ]] ; then
+ rvm_ruby_version="head"
+ rvm_ruby_string="jruby-head"
+ rvm_ruby_repo_url="${rvm_ruby_repo_url:-$(__rvm_db "jruby_repo_url")}"
+ rvm_url="${rvm_ruby_repo_url:-$(__rvm_db "jruby_repo_url")}"
+ elif match "$rvm_ruby_version" "^1.4" ; then
+ rvm_url="http://jruby.kenai.com/downloads/$rvm_ruby_interpreter/$rvm_ruby_version/$rvm_package_file.tar.gz"
rvm_ruby_version="1.4.0RC3"
rvm_ruby_string="jruby-1.4.0RC3"
rvm_package_file="$rvm_ruby_interpreter-bin-${rvm_ruby_version}"
else
+ rvm_ruby_version="${rvm_ruby_version:-"$(__rvm_db "jruby_version")"}"
+ rvm_url="http://jruby.kenai.com/downloads/$rvm_ruby_interpreter/$rvm_ruby_version/$rvm_package_file.tar.gz"
rvm_package_file="$rvm_ruby_interpreter-bin-$rvm_ruby_version"
rvm_ruby_string="${rvm_ruby_interpreter}-${rvm_ruby_version}"
fi
- rvm_url="http://jruby.kenai.com/downloads/$rvm_ruby_interpreter/$rvm_ruby_version/$rvm_package_file.tar.gz"
alias jruby_ng="jruby --ng"
alias jruby_ng_server="jruby --ng-server"
;;

0 comments on commit d432fdb

Please sign in to comment.