Class: RSMP::CLI

Inherits:
Thor
  • Object
show all
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

#siteObject



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
  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
  warn "Uncaught error: #{e.class}: #{e.message}"
  warn e.full_message(highlight: false, order: :top)
  exit 1
end

#supervisorObject



180
181
182
183
184
185
186
# File 'lib/rsmp/cli.rb', line 180

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



140
141
142
# File 'lib/rsmp/cli.rb', line 140

def version
  puts RSMP::VERSION
end