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

Fix the Config constants not being available in the DSL. Fixes #683

This commit is contained in:
Evan Phoenix 2015-04-11 13:12:27 -07:00
parent d3bf7fea4b
commit e3b1f3264c
2 changed files with 10 additions and 3 deletions

View file

@ -1,13 +1,16 @@
require 'puma/dsl'
module Puma
class Configuration
module ConfigDefault
DefaultRackup = "config.ru"
DefaultTCPHost = "0.0.0.0"
DefaultTCPPort = 9292
DefaultWorkerTimeout = 60
DefaultWorkerShutdownTimeout = 30
end
class Configuration
include ConfigDefault
def initialize(options)
@options = options
@ -159,3 +162,5 @@ module Puma
end
end
end
require 'puma/dsl'

View file

@ -2,6 +2,8 @@ module Puma
# The methods that are available for use inside the config file.
#
class DSL
include ConfigDefault
def self.load(options, path)
new(options).tap do |obj|
obj._load_from(path)