Class: Falcon::Command::Host
- Inherits:
-
Samovar::Command
- Object
- Samovar::Command
- Falcon::Command::Host
- Defined in:
- lib/falcon/command/host.rb
Instance Method Summary collapse
- #call ⇒ Object
- #configuration(verbose = false) ⇒ Object
- #container_class ⇒ Object
- #controller ⇒ Object
Instance Method Details
#call ⇒ Object
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.(path) configuration.load_file(path) end return configuration end |
#container_class ⇒ Object
33 34 35 |
# File 'lib/falcon/command/host.rb', line 33 def container_class Async::Container.best_container_class end |
#controller ⇒ Object
48 49 50 |
# File 'lib/falcon/command/host.rb', line 48 def controller Controller::Host.new(self) end |