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:
parent
b3704662a0
commit
6dde986e10
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue