Class: RunUtils

Inherits:
Object
  • Object
show all
Defined in:
lib/saucelabs_adapter/run_utils.rb

Class Method Summary collapse

Class Method Details

.run(command, options = {}) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
# File 'lib/saucelabs_adapter/run_utils.rb', line 2

def self.run(command, options = {})
  default_options = {
    :raise_on_fail => true
  }
  options = default_options.merge(options)
  puts "Executing: #{command}"
  success = system(command)
  if !success && options[:raise_on_fail]
    raise "Command failed: #{command}"
  end
  success
end