Class: Specinfra::Backend::BeakerDispatch

Inherits:
BeakerBase
  • Object
show all
Defined in:
lib/beaker-rspec/helpers/serverspec.rb

Instance Attribute Summary

Attributes inherited from BeakerBase

#example

Instance Method Summary collapse

Methods inherited from BeakerBase

#ssh_exec!

Instance Method Details

#add_pre_command(cmd) ⇒ Object



202
203
204
# File 'lib/beaker-rspec/helpers/serverspec.rb', line 202

def add_pre_command(cmd)
  dispatch_method('add_pre_command', cmd)
end

#build_command(cmd) ⇒ Object



198
199
200
# File 'lib/beaker-rspec/helpers/serverspec.rb', line 198

def build_command(cmd)
  dispatch_method('build_command', cmd)
end

#dispatch_method(meth, *args) ⇒ Object



186
187
188
189
190
191
192
# File 'lib/beaker-rspec/helpers/serverspec.rb', line 186

def dispatch_method(meth, *args)
  if get_working_node['platform'].include?('windows')
    cygwin_backend.send(meth, *args)
  else
    exec_backend.send(meth, *args)
  end
end

#run_command(cmd, opts = {}) ⇒ Object



194
195
196
# File 'lib/beaker-rspec/helpers/serverspec.rb', line 194

def run_command(cmd, opts = {})
  dispatch_method('run_command', cmd, opts)
end