about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-06-03 17:15:18 -0700
committerEric Wong <normalperson@yhbt.net>2010-06-03 17:15:36 -0700
commit6d62a7de86369e046e6f6b221153d867df11e74c (patch)
treec51c9f0d6d674fae46060627ef62d9f88a4c8f81
parentcf122e941e10c2812b7ba5e75c053a28950ddcb6 (diff)
downloadrainbows-6d62a7de86369e046e6f6b221153d867df11e74c.tar.gz
depend on Isolate ~> 2.0.2 for development
It's useful given all the Gems we support but don't have hard
installation dependencies on.
-rw-r--r--GNUmakefile5
-rw-r--r--Rakefile21
-rw-r--r--rainbows.gemspec1
-rw-r--r--t/GNUmakefile1
4 files changed, 9 insertions, 19 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 1125e69..4c4e783 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -3,7 +3,6 @@ all::
 RUBY = ruby
 RAKE = rake
 GIT_URL = git://git.bogomips.org/rainbows.git
-ISOLATE_CONFIG = config/isolate.rb
 
 GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
         @./GIT-VERSION-GEN
@@ -18,8 +17,8 @@ endif
 
 # rake takes forever to start
 isolate: tmp/isolate/ruby-$(RUBY_VERSION)/.isolate
-tmp/isolate/ruby-$(RUBY_VERSION)/.isolate: $(ISOLATE_CONFIG)
-        ISOLATE_CONFIG=$(ISOLATE_CONFIG) $(RAKE) isolate
+tmp/isolate/ruby-$(RUBY_VERSION)/.isolate: config/isolate.rb
+        $(RAKE) isolate
         > $@
 
 base_bins := rainbows
diff --git a/Rakefile b/Rakefile
index 9cb9156..4f038c4 100644
--- a/Rakefile
+++ b/Rakefile
@@ -187,20 +187,9 @@ end
 desc 'isolate gems for development'
 task :isolate do
   require 'isolate'
-  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
+
+  Isolate.now!(
+    :system => false,
+    :multiruby => false,
+    :path => "tmp/isolate/ruby-#{RUBY_VERSION}")
 end
diff --git a/rainbows.gemspec b/rainbows.gemspec
index 57447a7..3327d05 100644
--- a/rainbows.gemspec
+++ b/rainbows.gemspec
@@ -44,6 +44,7 @@ Gem::Specification.new do |s|
   # The HTTP parser in Unicorn <= 0.97.0 was vulnerable to a remote DoS
   # when exposed directly to untrusted clients.
   s.add_dependency(%q<unicorn>, [">= 0.97.1", "< 2.0.0"])
+  s.add_development_dependency(%q<isolate>, "~> 2.0.2")
 
   # Unicorn already depends on Rack
   # s.add_dependency(%q<rack>)
diff --git a/t/GNUmakefile b/t/GNUmakefile
index 66c4681..81484a7 100644
--- a/t/GNUmakefile
+++ b/t/GNUmakefile
@@ -100,6 +100,7 @@ $(deps):
           { echo >&2 "E '$(dep_bin)' not found in PATH=$(PATH)"; exit 1; }
         @mv $@.$(pid) $@
 dep: $(deps)
+        $(MAKE) -C .. isolate
 
 $(MODEL_T): export model = $(firstword $(subst ., ,$@))
 $(MODEL_T): script = $(subst $(model).,,$@)