Top Level Namespace

Defined Under Namespace

Classes: Vmth, VmthError

Instance Method Summary collapse

Instance Method Details

#f_apply(service, file) ⇒ Object

Write out the output of the ‘apply’ stage to a file.



36
37
38
39
40
# File 'lib/virb.rb', line 36

def f_apply(service,file)
  File.open(file,'w') do |f|
    f.puts $y['tests'][service]['apply']
  end
end

#helpmeObject



41
42
43
44
45
46
47
48
49
50
51
# File 'lib/virb.rb', line 41

def helpme()
  use = [] 
  use << "Usage:"
  use << ""
  use << "load_obj 'filename' # Load the output of your vmth run"    
  use << "p_apply 'scenario' # Shows output of apply step"
  use << "p_test 'scenario' # Shows output of test step"
  use << "f_apply 'scenario','filename' # Write out a scenario's output to a file"
  use << "helpme() # This help message"
  return use.join("\n")
end

#load_obj(filename) ⇒ Object



22
23
24
25
# File 'lib/virb.rb', line 22

def load_obj(filename)
  $y = YAML.load_file(filename)
  true
end

#p_apply(service) ⇒ Object



26
27
28
29
# File 'lib/virb.rb', line 26

def p_apply(service)
  puts $y['tests'][service]['apply']
  true
end

#p_test(service) ⇒ Object



30
31
32
33
34
# File 'lib/virb.rb', line 30

def p_test(service)
  puts $y['tests'][service]['test']
  true

end