class Falcon::Configuration
~~~
end
rack ‘hello.localhost’, :self_signed_tls do
supervisor
load :rack, :self_signed_tls, :supervisor
# frozen_string_literal: true
#!/usr/bin/env falcon-host
~~~ ruby
A typical configuration file might look something like:
Environments are key-value maps with lazy value resolution. An environment can inherit from a parent environment, which can provide defaults
Manages environments which describes how to host a specific application.
def add(environment)
def add(environment) name = environment.name unless name raise ArgumentError, "Environment name is nil #{environment.inspect}" end environment = environment.flatten raise KeyError.new("#{name.inspect} is already set", key: name) if @environments.key?(name) @environments[name] = environment end
def each(key = :authority)
Enumerate all environments that have the specified key.
def each(key = :authority) return to_enum(key) unless block_given? @environments.each do |name, environment| environment = environment.flatten if environment.include?(key) yield environment end end end
def initialize
def initialize @environments = {} end
def load_file(path)
def load_file(path) Loader.load_file(self, path) end