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
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.(path) configuration.load_file(path) end return configuration end |
#container_class ⇒ Object
36 37 38 |
# File 'lib/falcon/command/host.rb', line 36 def container_class Async::Container.best_container_class end |
#controller ⇒ Object
51 52 53 |
# File 'lib/falcon/command/host.rb', line 51 def controller Controller::Host.new(self) end |