mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
obey address flag
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@807 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
parent
115ea67b51
commit
2a7f00e80a
1 changed files with 8 additions and 5 deletions
|
@ -4,11 +4,15 @@
|
||||||
# Additional work donated by contributors. See http://mongrel.rubyforge.org/attributions.html
|
# Additional work donated by contributors. See http://mongrel.rubyforge.org/attributions.html
|
||||||
# for more information.
|
# for more information.
|
||||||
|
|
||||||
require 'rubygems'
|
|
||||||
require 'yaml'
|
require 'yaml'
|
||||||
|
require 'etc'
|
||||||
|
|
||||||
|
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib"
|
||||||
require 'mongrel'
|
require 'mongrel'
|
||||||
require 'mongrel/rails'
|
require 'mongrel/rails'
|
||||||
require 'etc'
|
|
||||||
|
# require 'ruby-debug'
|
||||||
|
# Debugger.start
|
||||||
|
|
||||||
module Mongrel
|
module Mongrel
|
||||||
class Start < GemPlugin::Plugin "/commands"
|
class Start < GemPlugin::Plugin "/commands"
|
||||||
|
@ -174,15 +178,14 @@ module Mongrel
|
||||||
|
|
||||||
def config_keys
|
def config_keys
|
||||||
@config_keys ||=
|
@config_keys ||=
|
||||||
%w(host port cwd log_file pid_file environment docroot mime_map daemon debug includes config_script
|
%w(address host port cwd log_file pid_file environment docroot mime_map daemon debug includes config_script num_processors timeout throttle user group prefix)
|
||||||
num_processors timeout throttle user group prefix)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def settings
|
def settings
|
||||||
config_keys.inject({}) do |hash, key|
|
config_keys.inject({}) do |hash, key|
|
||||||
value = self.instance_variable_get("@#{key}")
|
value = self.instance_variable_get("@#{key}")
|
||||||
key = 'host' if key == 'address'
|
key = 'host' if key == 'address'
|
||||||
hash[key.to_sym] = value
|
hash[key.to_sym] ||= value
|
||||||
hash
|
hash
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue