Browse files

add mizuno

  • Loading branch information...
1 parent f9b1c60 commit ff3bc9d310e32cc59b5da922cef3380a4fb530a9 @rkh rkh committed May 13, 2012
Showing with 20 additions and 5 deletions.
  1. +2 −0 Gemfile
  2. +2 −1 lib/sinatra/base.rb
  3. +12 −2 test/integration_helper.rb
  4. +4 −2 test/integration_test.rb
View
2 Gemfile
@@ -46,6 +46,8 @@ gem 'radius'
if RUBY_ENGINE == 'jruby'
gem 'nokogiri', '!= 1.5.0'
gem 'jruby-openssl'
+ gem 'trinidad'
+ gem 'mizuno'
else
gem 'yajl-ruby'
gem 'nokogiri'
View
3 lib/sinatra/base.rb
@@ -1617,10 +1617,11 @@ class << self
server.unshift 'controll_tower'
else
server.unshift 'mongrel' if ruby_engine.nil?
+ server.unshift 'mizuno' if ruby_engine =='jruby'
server.unshift 'puma' if ruby_engine != 'rbx'
server.unshift 'thin' if ruby_engine != 'jruby'
server.unshift 'puma' if ruby_engine == 'rbx'
- server.unshift 'trinidat' if ruby_engine =='jruby'
+ server.unshift 'trinidad' if ruby_engine =='jruby'
end
set :absolute_redirects, true
View
14 test/integration_helper.rb
@@ -130,15 +130,25 @@ def puma?
name.to_s == "puma"
end
+ def trinidad?
+ name.to_s == "trinidad"
+ end
+
+ def mizuno?
+ name.to_s == "mizuno"
+ end
+
def warnings
log.scan(%r[(?:\(eval|lib/sinatra).*warning:.*$])
end
def run_test(target, &block)
retries ||= 3
target.server = self
- run unless alive?
- target.instance_eval(&block)
+ Timeout.timeout(60) do
+ run unless alive?
+ target.instance_eval(&block)
+ end
rescue Exception => error
retries -= 1
kill
View
6 test/integration_test.rb
@@ -13,15 +13,15 @@ class IntegrationTest < Test::Unit::TestCase
it('only extends main') { assert_equal "true", server.get("/mainonly") }
it 'logs once in development mode' do
- next if server.puma?
+ next if server.puma? or RUBY_ENGINE == 'jruby'
random = "%064x" % Kernel.rand(2**256-1)
server.get "/ping?x=#{random}"
count = server.log.scan("GET /ping?x=#{random}").count
server.webrick? ? assert(count > 0) : assert_equal(1, count)
end
it 'streams' do
- next if server.webrick?
+ next if server.webrick? or server.trinidad? or server.mizuno?
times, chunks = [Time.now], []
server.get_stream do |chunk|
next if chunk.empty?
@@ -70,6 +70,8 @@ class IntegrationTest < Test::Unit::TestCase
end
it 'starts the correct server' do
+ next if RUBY_ENGINE == 'jruby'
+
exp = %r{
==\sSinatra/#{Sinatra::VERSION}\s
has\staken\sthe\sstage\son\s\d+\sfor\sdevelopment\s

0 comments on commit ff3bc9d

Please sign in to comment.