1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Separate Config method so we can test output

The RackHandler for Puma has configuration options that I want to test without booting up a server. By separating out into a new method we can do this easily.
This commit is contained in:
schneems 2017-02-27 15:52:43 -06:00
parent b3704662a0
commit 6dde986e10

View file

@ -8,7 +8,7 @@ module Rack
:Silent => false
}
def self.run(app, options = {})
def self.config(app, options = {})
require 'puma/configuration'
require 'puma/events'
require 'puma/launcher'
@ -48,6 +48,11 @@ module Rack
c.app app
end
conf
end
def self.run(app, options = {})
conf = self.config(app, options)
events = options.delete(:Silent) ? ::Puma::Events.strings : ::Puma::Events.stdio