Class: RSMP::CLI
- Inherits:
-
Thor
- Object
- Thor
- RSMP::CLI
- Includes:
- Configuration
- Defined in:
- lib/rsmp/cli.rb,
lib/rsmp/cli/configuration.rb
Overview
CLI commands for running RSMP site and supervisor.
Defined Under Namespace
Modules: Configuration
Instance Method Summary collapse
Instance Method Details
#site ⇒ Object
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/rsmp/cli.rb', line 155 def site settings, log_settings = load_site_configuration (settings, log_settings) site_class = determine_site_class(settings) run_site(site_class, settings, log_settings) rescue Interrupt # ctrl-c rescue RSMP::ConfigurationError => e puts "Error: #{e}" exit 1 rescue StandardError => e warn "Uncaught error: #{e.class}: #{e.message}" warn e.(highlight: false, order: :top) exit 1 end |
#supervisor ⇒ Object
180 181 182 183 184 185 186 |
# File 'lib/rsmp/cli.rb', line 180 def supervisor settings, log_settings = load_supervisor_configuration (settings, log_settings) run_supervisor(settings, log_settings) rescue Interrupt # ctrl-c end |
#version ⇒ Object
140 141 142 |
# File 'lib/rsmp/cli.rb', line 140 def version puts RSMP::VERSION end |