module Capcode
class << self
# Set global configuration options
#
# Options :
# * :port = Listen port (default: 3000)
# * :host = Listen host (default: 0.0.0.0)
# * :server = Server type (webrick, mongrel or thin)
# * :log = Output logfile (default: STDOUT)
# * :session = Session parameters. See Rack::Session for more informations
# * :pid = PID file (default: $0.pid)
# * :daemonize = Daemonize application (default: false)
# * :db_config = database configuration file (default: database.yml)
# * :static = Static directory (default: the working directory)
# * :root = Root directory (default: directory of the main.rb) -- This is also the working directory !
# * :verbose = run in verbose mode
# * :auth = HTTP Basic Authentication options
#
# It can exist specifics options depending on a renderer, a helper, ...
#
# Example :
#
# module Capcode
# set :erb, "/path/to/erb/files"
# ...
# end
def set( key, value )
config[key] = value
end
def get( key ) #:nodoc:
config[key] || nil
end
def config
@configuration ||= {}
end
end
end