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



40
41
42
43
44
45
46
47
48
49
50
# File 'lib/rsmp/cli.rb', line 40

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 StandardError => e
  puts "Uncaught error: #{e}"
  puts caller.join("\n")
end

#supervisorObject



60
61
62
63
64
65
66
# File 'lib/rsmp/cli.rb', line 60

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



26
27
28
# File 'lib/rsmp/cli.rb', line 26

def version
  puts RSMP::VERSION
end