Skip to content
This repository
Browse code

Made progress on IronRuby during coderpath interview.

  • Loading branch information...
commit eb98b42cc719f4be8c6d82f601d8c21bec5241b9 1 parent aeea6ee
Wayne E. Seguin authored April 13, 2010
4  config/db
@@ -35,6 +35,6 @@ maglev_url=http://glass-downloads.gemstone.com/maglev
35 35
 maglev_repo_url=git://github.com/MagLev/maglev.git
36 36
 rubinius_repo_url=git://github.com/evanphx/rubinius.git
37 37
 shyouhei_repo_url=git://github.com/shyouhei/ruby.git
38  
-ironruby_version=1.0-rc2
  38
+ironruby_version=1.0
39 39
 ironruby_repo_url=git://github.com/ironruby/ironruby.git
40  
-ironruby_url=http://github.com/ironruby/ironruby/tarball/
  40
+ironruby_1.0_url=http://rubyforge.org/frs/download.php/70179/
2  config/md5
@@ -64,7 +64,7 @@ zlib-1.2.3.tar.gz=debc62758716a169df9f62e6ab2bc634
64 64
 curl-7.19.7.tar.gz=ecb2e37e45c9933e2a963cabe03670ab
65 65
 pkg-config-0.23.tar.gz=d922a88782b64441d06547632fd85744
66 66
 rubygems-1.3.6.tgz=789ca8e9ad1d4d3fe5f0534fcc038a0d
67  
-ironruby-ironruby-c912e86.tar.gz=80708c23577ff9bf557f63f0f716fe26
  67
+ironruby-1.0.zip=7a92888837b3507355ed391dbfc0ab83
68 68
 GemStone-23082.Darwin-i386.tar.gz=aa5f1768e5bad2bb687913c575f9cff6
69 69
 GemStone-23082.Linux-x86_64.tar.gz=7b7fd0df5d1deacf7aa12ccc9a94a33f
70 70
 MagLev-23082.Darwin-i386.tar.gz=d9027e7b7c8220573b1d3d588712ffc4
10  scripts/manage
@@ -520,19 +520,19 @@ RubyWrapper
520 520
           if [[ $? -gt 0 ]] ; then result=$? ; return $result ; fi
521 521
       else
522 522
         $rvm_scripts_path/log "info" "Retrieving IronRuby"
  523
+
523 524
         $rvm_scripts_path/fetch "$rvm_url" "$rvm_ruby_package_file"
524 525
         result=$? ; if [[ "$result" -gt 0 ]] ; then
525 526
           $rvm_scripts_path/log "error" "There has been an error while trying to fetch the source. Aborting the installation." ; __rvm_pushpop ; return $result
526 527
         fi
527 528
 
528  
-        __rvm_run "extract" "tar zxf $rvm_archives_path/$rvm_ruby_package_file -C $rvm_src_path" "Extracting $rvm_ruby_package_file ..."
529  
-        result=$? ; if [[ "$result" -gt 0 ]] ; then
  529
+        rm -rf "${rvm_src_path}/${rvm_ruby_string}/"
  530
+        $rvm_scripts_path/log "info"  "Extracting $rvm_ruby_package_file ..."
  531
+        unzip -o  -d ${rvm_src_path}/${rvm_ruby_string} ${rvm_archives_path}/${rvm_ruby_package_file} >> "$rvm_ruby_log_path/extract.log" 2>> "$rvm_ruby_log_path/extract.error.log"
  532
+        result=$? ; if [[ "$result" -gt 1 ]] ; then
530 533
           $rvm_scripts_path/log "error" "There has been an error while trying to extract the source. Aborting the installation." ; __rvm_pushpop ; return $result
531 534
         fi
532 535
 
533  
-        rm -rf $rvm_ruby_src_path
534  
-        mv $rvm_src_path/$rvm_ruby_package_name $rvm_ruby_src_path
535  
-
536 536
         #mv $rvm_ruby_home/ironruby/* $rvm_ruby_home
537 537
         #rm -rf $rvm_ruby_home/ironruby
538 538
         #mv $rvm_ruby_src_path/$rvm_ruby_package_file/* $rvm_ruby_home
24  scripts/selector
@@ -104,20 +104,20 @@ __rvm_select() {
104 104
     ironruby)
105 105
       unset rvm_ruby_patch_level
106 106
       if [[ "$rvm_head_flag" -eq 1 ]] ; then
107  
-        export rvm_ruby_version="head"
108  
-        export rvm_ruby_string="${rvm_ruby_interpreter}-${rvm_ruby_version}"
109  
-        export rvm_ruby_package_name="${rvm_ruby_string}"
110  
-        export rvm_ruby_repo_url="${rvm_ruby_repo_url:-$(__rvm_db "ironruby_repo_url")}"
111  
-        export rvm_url="${rvm_ruby_repo_url:-$(__rvm_db "ironruby_repo_url")}"
  107
+        rvm_ruby_version="head"
  108
+        rvm_ruby_string="${rvm_ruby_interpreter}-${rvm_ruby_version}"
  109
+        rvm_ruby_package_name="${rvm_ruby_string}"
  110
+        rvm_ruby_repo_url="${rvm_ruby_repo_url:-$(__rvm_db "ironruby_repo_url")}"
  111
+        rvm_url="${rvm_ruby_repo_url:-$(__rvm_db "ironruby_repo_url")}"
112 112
       else
113  
-        export rvm_archive_extension="tar.gz"
114  
-        export rvm_ruby_version=${rvm_ruby_version:-"$(__rvm_db "ironruby_version")"}
115  
-        export rvm_ruby_string="${rvm_ruby_interpreter}-${rvm_ruby_version}"
116  
-        sha1=$(curl -s http://github.com/api/v2/yaml/repos/show/ironruby/ironruby/tags | awk '/'${rvm_ruby_version}'/{print $NF}')
117  
-        export rvm_ruby_package_file="ironruby-ironruby-${sha1:0:7}.${rvm_archive_extension}"
118  
-        export rvm_ruby_package_name="ironruby-ironruby-${sha1:0:7}"
119  
-        export rvm_url="$(__rvm_db "ironruby_url")v${rvm_ruby_version}"
  113
+        rvm_archive_extension="zip"
  114
+        rvm_ruby_version=${rvm_ruby_version:-"$(__rvm_db "ironruby_version")"}
  115
+        rvm_ruby_string="${rvm_ruby_interpreter}-${rvm_ruby_version}"
  116
+        rvm_ruby_package_name="${rvm_ruby_interpreter}-${rvm_ruby_version}"
  117
+        rvm_ruby_package_file="${rvm_ruby_interpreter}-${rvm_ruby_version}.${rvm_archive_extension}"
  118
+        rvm_url="$(__rvm_db "ironruby_${rvm_ruby_version}_url")${rvm_ruby_package_file}"
120 119
       fi
  120
+      export rvm_ruby_version rvm_ruby_string rvm_ruby_package_name rvm_ruby_repo_url rvm_url rvm_archive_extension
121 121
     ;;
122 122
 
123 123
     ree)

0 notes on commit eb98b42

Please sign in to comment.
Something went wrong with that request. Please try again.