mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
add mizuno
This commit is contained in:
parent
f9b1c60ae4
commit
700d5b22d2
4 changed files with 20 additions and 5 deletions
2
Gemfile
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'
|
||||
|
|
|
@ -1617,10 +1617,11 @@ module Sinatra
|
|||
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
|
||||
|
|
|
@ -130,6 +130,14 @@ module IntegrationHelper
|
|||
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
|
||||
|
@ -137,8 +145,10 @@ module IntegrationHelper
|
|||
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
|
||||
|
|
|
@ -13,7 +13,7 @@ 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
|
||||
|
@ -21,7 +21,7 @@ class IntegrationTest < Test::Unit::TestCase
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue