about summary refs log tree commit homepage
path: root/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 598852e..469ed3d 100644
--- a/Rakefile
+++ b/Rakefile
@@ -189,3 +189,24 @@ begin
   end
 rescue LoadError
 end
+
+task :isolate do
+  require 'isolate'
+  opts = {
+    :system => false,
+    :path => "tmp/isolate/ruby-#{RUBY_VERSION}",
+    :multiruby => false, # we want "1.8.7" instead of "1.8"
+  }
+
+  # C extensions aren't binary-compatible across Ruby versions
+  fork { Isolate.now!(opts) { gem 'sqlite3-ruby', '1.2.5' } }
+
+  # pure Ruby gems can be shared across all Rubies
+  %w(3.0.0.beta3).each do |rails_ver|
+    opts[:path] = "tmp/isolate/rails-#{rails_ver}"
+    fork { Isolate.now!(opts) { gem 'rails', rails_ver } }
+  end
+
+  failed = Process.waitall.delete_if { |(_,status)| status.success? }
+  abort failed.inspect unless failed.empty?
+end