From f1893ae9786db250fd95def1cf958f2351cb84c5 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 7 Jan 2011 11:47:05 -0800 Subject: bump dependency on Rack to 1.2.1 We need to split out Cramp tests to Isolate to a different path, which sucks, but oh well. Cramp hasn't had a release in a while... --- t/t0500-cramp-streaming.sh | 2 ++ t/t0501-cramp-rainsocket.sh | 2 ++ t/test_isolate.rb | 3 +-- t/test_isolate_cramp.rb | 26 ++++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 t/test_isolate_cramp.rb diff --git a/t/t0500-cramp-streaming.sh b/t/t0500-cramp-streaming.sh index b97853d..81fd55d 100755 --- a/t/t0500-cramp-streaming.sh +++ b/t/t0500-cramp-streaming.sh @@ -7,6 +7,8 @@ EventMachine) ;; exit 0 ;; esac +RUBYLIB=$($RUBY test_isolate_cramp.rb):$RUBYLIB +export RUBYLIB require_check cramp Cramp::VERSION t_plan 7 "streaming test for Cramp" diff --git a/t/t0501-cramp-rainsocket.sh b/t/t0501-cramp-rainsocket.sh index a64145a..762d5ac 100755 --- a/t/t0501-cramp-rainsocket.sh +++ b/t/t0501-cramp-rainsocket.sh @@ -7,6 +7,8 @@ EventMachine) ;; exit 0 ;; esac +RUBYLIB=$($RUBY test_isolate_cramp.rb):$RUBYLIB +export RUBYLIB require_check cramp Cramp::VERSION t_plan 4 "WebSocket monkey patch validity test for Cramp" diff --git a/t/test_isolate.rb b/t/test_isolate.rb index d33baed..447e84f 100644 --- a/t/test_isolate.rb +++ b/t/test_isolate.rb @@ -14,7 +14,7 @@ old_out = $stdout.dup $stdout.reopen($stderr) Isolate.now!(opts) do - gem 'rack', '1.1.0' # Cramp currently requires ~> 1.1.0 + gem 'rack', '1.2.1' gem 'kgio', '2.1.1' gem 'unicorn', '3.3.0' gem 'kcar', '0.1.1' @@ -30,7 +30,6 @@ Isolate.now!(opts) do gem 'async_sinatra', '0.2.1' gem 'neverblock', '0.1.6.2' - gem 'cramp', '0.11' end if defined?(::Fiber) && engine == "ruby" diff --git a/t/test_isolate_cramp.rb b/t/test_isolate_cramp.rb new file mode 100644 index 0000000..2dbb606 --- /dev/null +++ b/t/test_isolate_cramp.rb @@ -0,0 +1,26 @@ +require 'rubygems' +require 'isolate' +engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby' + +path = "tmp/isolate/#{engine}-#{RUBY_VERSION}/cramp" +opts = { + :system => false, + # we want "ruby-1.8.7" and not "ruby-1.8", so disable multiruby + :multiruby => false, + :path => path, +} + +old_out = $stdout.dup +$stdout.reopen($stderr) + +lock = File.open(__FILE__, "rb") +lock.flock(File::LOCK_EX) +Isolate.now!(opts) do + if engine == "ruby" + gem 'cramp', '0.11' + end +end + +$stdout.reopen(old_out) +dirs = Dir["#{path}/gems/*-*/lib"] +puts dirs.map { |x| File.expand_path(x) }.join(':') -- cgit v1.2.3-24-ge0c7