diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-09-07 00:36:58 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-09-15 21:37:40 +0000 |
commit | ac346b5abcfa6253bd792091e5fb011774c40d49 (patch) | |
tree | b304b96f42c3ba2cde396de8ed626754ae9d78cc /lib/unicorn/configurator.rb | |
parent | b48c6659b294b37f2c6ff3e75c1c9245522d48d1 (diff) | |
download | unicorn-ac346b5abcfa6253bd792091e5fb011774c40d49.tar.gz |
This will also be the foundation of SSL support in Rainbows! and Zbatery. Some users may also want to use this in Unicorn on LANs to meet certain security/auditing requirements. Of course, Nightmare! (in whatever form) should also be able to use it.
Diffstat (limited to 'lib/unicorn/configurator.rb')
-rw-r--r-- | lib/unicorn/configurator.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/unicorn/configurator.rb b/lib/unicorn/configurator.rb index 8816c85..a93c1dc 100644 --- a/lib/unicorn/configurator.rb +++ b/lib/unicorn/configurator.rb @@ -1,5 +1,6 @@ # -*- encoding: binary -*- require 'logger' +require 'unicorn/ssl_configurator' # Implements a simple DSL for configuring a \Unicorn server. # @@ -12,6 +13,7 @@ require 'logger' # See the link:/TUNING.html document for more information on tuning unicorn. class Unicorn::Configurator include Unicorn + include Unicorn::SSLConfigurator # :stopdoc: attr_accessor :set, :config_file, :after_reload @@ -563,13 +565,16 @@ private end end - def set_bool(var, bool) #:nodoc: + def check_bool(var, bool) # :nodoc: case bool when true, false - set[var] = bool - else - raise ArgumentError, "#{var}=#{bool.inspect} not a boolean" + return bool end + raise ArgumentError, "#{var}=#{bool.inspect} not a boolean" + end + + def set_bool(var, bool) #:nodoc: + set[var] = check_bool(var, bool) end def set_hook(var, my_proc, req_arity = 2) #:nodoc: |