Class: RSMP::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/rsmp/cli.rb

Overview

CLI commands for running RSMP site and supervisor.

Instance Method Summary collapse

Instance Method Details

#siteObject



66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/rsmp/cli.rb', line 66

def site
  settings, log_settings = load_site_configuration
  apply_site_options(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
  puts "Uncaught error: #{e}"
  puts caller.join("\n")
end

#supervisorObject



89
90
91
92
93
94
95
# File 'lib/rsmp/cli.rb', line 89

def supervisor
  settings, log_settings = load_supervisor_configuration
  apply_supervisor_options(settings, log_settings)
  run_supervisor(settings, log_settings)
rescue Interrupt
  # ctrl-c
end

#versionObject



52
53
54
# File 'lib/rsmp/cli.rb', line 52

def version
  puts RSMP::VERSION
end