Module: EyeManager

Defined in:
lib/eyemanager.rb,
lib/eyemanager/version.rb

Constant Summary collapse

EyeLoadFailed =
Class.new(StandardError)
VERSION =
"0.6.1"

Class Method Summary collapse

Class Method Details

.destroyObject



24
25
26
27
28
29
30
# File 'lib/eyemanager.rb', line 24

def destroy
  cmd = "eye q -s"
  output = `#{cmd}`
  raise "Eye destroy failed. " +
            "Command: #{cmd}. Output: #{output}." unless
      /^Eye quit|socket\(.+\) not found/.match(output)
end

.list_appsObject



32
33
34
# File 'lib/eyemanager.rb', line 32

def list_apps
  eye_status_apps_filtered_by.map{|a| a['name']}
end

.start(params = {}) ⇒ Object



8
9
10
11
12
# File 'lib/eyemanager.rb', line 8

def start params={}
  validate_start_params params
  load_config_and_verify params[:config] if params[:config]
  start_and_verify params[:application]
end

.status(params = {}) ⇒ Object



19
20
21
22
# File 'lib/eyemanager.rb', line 19

def status params={}
  validate_status_params params
  eye_status_filtered_by params
end

.stop(params = {}) ⇒ Object



14
15
16
17
# File 'lib/eyemanager.rb', line 14

def stop params={}
  validate_stop_params params
  stop_and_verify params
end