bump Unicorn dependency to 3.5.0
[rainbows.git] / t / test_isolate.rb
blob77edcfceeefcbfc7a18606aeb0f07ce9bb4bf72d
1 require 'rubygems'
2 require 'isolate'
3 engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby'
5 path = "tmp/isolate/#{engine}-#{RUBY_VERSION}"
6 opts = {
7   :system => false,
8   # we want "ruby-1.8.7" and not "ruby-1.8", so disable multiruby
9   :multiruby => false,
10   :path => path,
13 old_out = $stdout.dup
14 $stdout.reopen($stderr)
16 lock = File.open(__FILE__, "rb")
17 lock.flock(File::LOCK_EX)
18 Isolate.now!(opts) do
19   gem 'unicorn', '3.5.0'
20   gem 'kcar', '0.2.0'
21   gem 'raindrops', '0.4.1'
23   if engine == "ruby"
24     gem 'sendfile', '1.1.0' # next Rubinius should support this
25     gem 'cool.io', '1.0.0'
27     gem 'eventmachine', '0.12.10'
28     gem 'sinatra', '1.2.0'
29     gem 'async_sinatra', '0.5.0'
31     gem 'neverblock', '0.1.6.2'
32   end
34   if defined?(::Fiber) && engine == "ruby"
35     gem 'revactor', '0.1.5'
36     gem 'rack-fiber_pool', '0.9.1'
37   end
39   gem 'sleepy_penguin', '2.0.0' if RUBY_PLATFORM =~ /linux/
40 end
42 $stdout.reopen(old_out)
44 # don't load the old Rev if it exists, Cool.io 1.0.0 is compatible with it,
45 # even for everything Revactor uses.
46 dirs = Dir["#{path}/gems/*-*/lib"]
47 dirs.delete_if { |x| x =~ %r{/rev-[\d\.]+/lib} }
48 puts dirs.map { |x| File.expand_path(x) }.join(':')