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



55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/falcon/command/host.rb', line 55

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: kill -HUP #{Process.pid}"
	end
	
	Bundler.require(:preload)
	
	self.controller.run
end

#configuration(verbose = false) ⇒ Object



40
41
42
43
44
45
46
47
48
49
# File 'lib/falcon/command/host.rb', line 40

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



36
37
38
# File 'lib/falcon/command/host.rb', line 36

def container_class
	Async::Container.best_container_class
end

#controllerObject



51
52
53
# File 'lib/falcon/command/host.rb', line 51

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