Simplify puma server registration by using Rack::Handler::Puma

This commit is contained in:
Thomas Walpole 2016-11-14 16:49:57 -08:00
parent 19c861dcfc
commit 91dcc7f2d7
1 changed files with 2 additions and 4 deletions

View File

@ -480,10 +480,8 @@ Capybara.register_server :webrick do |app, port, host|
end
Capybara.register_server :puma do |app, port, host|
require 'puma'
Puma::Server.new(app).tap do |s|
s.add_tcp_listener host, port
end.run.join
require 'rack/handler/puma'
Rack::Handler::Puma.run(app, Host: host, Port: port, Threads: "0:4")
end
Capybara.configure do |config|