Class: Falcon::Command::Host

Inherits:
Samovar::Command
  • Object
show all
Defined in:
lib/falcon/command/host.rb

Instance Method Summary collapse

Instance Method Details

#callObject



52
53
54
55
56
57
58
59
60
61
# File 'lib/falcon/command/host.rb', line 52

def call
	Async.logger.info(self) do |buffer|
		buffer.puts "Falcon Host v#{VERSION} taking flight!"
		buffer.puts "- Configuration: #{@paths.join(', ')}"
		buffer.puts "- To terminate: Ctrl-C or kill #{Process.pid}"
		buffer.puts "- To reload all sites: kill -HUP #{Process.pid}"
	end
	
	self.controller.run
end

#configuration(verbose = false) ⇒ Object



37
38
39
40
41
42
43
44
45
46
# File 'lib/falcon/command/host.rb', line 37

def configuration(verbose = false)
	configuration = Configuration.new(verbose)
	
	@paths.each do |path|
		path = File.expand_path(path)
		configuration.load_file(path)
	end
	
	return configuration
end

#container_classObject



33
34
35
# File 'lib/falcon/command/host.rb', line 33

def container_class
	Async::Container.best_container_class
end

#controllerObject



48
49
50
# File 'lib/falcon/command/host.rb', line 48

def controller
	Controller::Host.new(self)
end