From 67662fe0714cbcc89d732d4a04df975b0de2ca36 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 14 May 2010 14:18:36 -0700 Subject: update isolate config for Isolate 2.0.0 --- Rakefile | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index cb4cae0..9cb9156 100644 --- a/Rakefile +++ b/Rakefile @@ -187,6 +187,20 @@ end desc 'isolate gems for development' task :isolate do require 'isolate' - Isolate.gems "tmp/gems/#{RUBY_VERSION}", - :file => ENV['ISOLATE_CONFIG'] + require 'rbconfig' + + Isolate.now! :file => ENV['ISOLATE_CONFIG'], :system => false + + # for Ruby 1.8 isolate uses "1.8" instead of "1.8.7" for paths, + # but we'll still try to support 1.8.6 for now even though isolate + # does not. + if Gem.ruby_engine == "ruby" && + RbConfig::CONFIG["ruby_version"] != RUBY_VERSION + require 'fileutils' + Dir.chdir('tmp/isolate') do + FileUtils.rm_rf("ruby-#{RUBY_VERSION}") + File.symlink "ruby-#{RbConfig::CONFIG["ruby_version"]}", + "ruby-#{RUBY_VERSION}" + end + end end -- cgit v1.2.3-24-ge0c7