From 1e3d8e09d4fe7ad2eaa69200226ddc9931b89f7b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 29 Dec 2010 09:00:36 +0000 Subject: resync with Rainbows! 2.1.0 --- lib/zbatery.rb | 1 + t/GNUmakefile | 8 ++++---- t/test-lib.sh | 3 ++- t/test_isolate.rb | 12 ++++++++---- zbatery.gemspec | 2 +- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/lib/zbatery.rb b/lib/zbatery.rb index 071658b..9e459ed 100644 --- a/lib/zbatery.rb +++ b/lib/zbatery.rb @@ -36,6 +36,7 @@ module Rainbows build_app! unless preload_app Rainbows::Response.setup(self.class) Rainbows::MaxBody.setup + Rainbows::RackInput.setup Rainbows::ProcessClient.const_set(:APP, @app) logger.info "Zbatery #@use worker_connections=#@worker_connections" diff --git a/t/GNUmakefile b/t/GNUmakefile index 74d3fbc..598437b 100644 --- a/t/GNUmakefile +++ b/t/GNUmakefile @@ -23,11 +23,9 @@ models += WriterThreadPool models += WriterThreadSpawn models += ThreadPool models += ThreadSpawn -models += Rev +models += Coolio models += EventMachine models += NeverBlock -models += RevThreadSpawn -models += RevThreadPool ifeq ($(RUBY_ENGINE),ruby) rp := ) @@ -35,8 +33,10 @@ ifeq ($(RUBY_ENGINE),ruby) ifeq ($(ONENINE),true) models += Revactor models += FiberSpawn - models += RevFiberSpawn + models += CoolioFiberSpawn models += FiberPool + models += CoolioThreadSpawn + models += CoolioThreadPool endif endif diff --git a/t/test-lib.sh b/t/test-lib.sh index 0738b16..5f39549 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -126,7 +126,7 @@ EOF if test $# -ge 1 then echo " use :$1" - test $# -eq 2 && echo " worker_connections $2" + test $# -ge 2 && echo " worker_connections $2" if test $# -eq 3 then echo " keepalive_timeout $3" @@ -175,6 +175,7 @@ req_curl_chunked_upload_err_check () { case $model in Rev) require_check rev Rev::VERSION ;; +Coolio) require_check coolio Coolio::VERSION ;; Revactor) require_check revactor Revactor::VERSION ;; EventMachine) require_check eventmachine EventMachine::VERSION ;; esac diff --git a/t/test_isolate.rb b/t/test_isolate.rb index 572231e..06ba667 100644 --- a/t/test_isolate.rb +++ b/t/test_isolate.rb @@ -15,14 +15,14 @@ $stdout.reopen($stderr) Isolate.now!(opts) do gem 'rack', '1.2.1' - gem 'unicorn', '3.0.0' - gem 'rainbows', '2.0.0' + gem 'unicorn', '3.2.1' + gem 'rainbows', '2.1.0' if engine == "ruby" gem 'sendfile', '1.0.0' # next Rubinius should support this gem 'iobuffer', '0.1.3' - gem 'rev', '0.3.2' + gem 'cool.io', '1.0.0' gem 'eventmachine', '0.12.10' gem 'sinatra', '1.0.0' @@ -39,4 +39,8 @@ Isolate.now!(opts) do end $stdout.reopen(old_out) -puts Dir["#{path}/gems/*-*/lib"].map { |x| File.expand_path(x) }.join(':') +# don't load the old Rev if it exists, Cool.io 1.0.0 is compatible with it, +# even for everything Revactor uses. +dirs = Dir["#{path}/gems/*-*/lib"] +dirs.delete_if { |x| x =~ %r{/rev-[\d\.]+/lib} } +puts dirs.map { |x| File.expand_path(x) }.join(':') diff --git a/zbatery.gemspec b/zbatery.gemspec index 005acd2..b9f9f03 100644 --- a/zbatery.gemspec +++ b/zbatery.gemspec @@ -50,7 +50,7 @@ Gem::Specification.new do |s| # espace-neverblock + eventmachine # async_sinatra + sinatra + eventmachine # - s.add_dependency(%q, ["~> 2.0.0"]) + s.add_dependency(%q, ["~> 2.1"]) s.add_development_dependency(%q, "~> 3.0.0") # s.licenses = %w(GPLv2 Ruby) # accessor not compatible with older RubyGems -- cgit v1.2.3-24-ge0c7