Module: Falcon::Environment::Configured

Included in:
Virtual
Defined in:
lib/falcon/environment/configured.rb

Overview

TODO:

Reuse this for proxy and redirect services.

This module provides a common interface for configuring the Falcon application.

Instance Method Summary collapse

Instance Method Details

#configurationObject



28
29
30
# File 'lib/falcon/environment/configured.rb', line 28

def configuration
	::Async::Service::Configuration.load(resolved_configuration_paths)
end

#configuration_pathsObject

All the falcon application configuration paths.



13
14
15
# File 'lib/falcon/environment/configured.rb', line 13

def configuration_paths
	["/srv/http/*/falcon.rb"]
end

#resolved_configuration_pathsObject

All the falcon application configuration paths, with wildcards expanded.



18
19
20
21
22
23
24
25
26
# File 'lib/falcon/environment/configured.rb', line 18

def resolved_configuration_paths
	if configuration_paths = self.configuration_paths
		configuration_paths.flat_map do |path|
			Dir.glob(path)
		end.uniq
	else
		[]
	end
end