Sha256: e54a01a0b6b946089c48c100d1e6ad6752e171527cf77b3eb00796a48f1e3658

Contents?: true

Size: 332 Bytes

Versions: 6

Compression:

Stored size: 332 Bytes

Contents

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
saucelabs-adapter-0.8.3 lib/saucelabs_adapter/run_utils.rb
saucelabs-adapter-0.8.2 lib/saucelabs_adapter/run_utils.rb
saucelabs-adapter-0.8.1 lib/saucelabs_adapter/run_utils.rb
saucelabs-adapter-0.8.0 lib/saucelabs_adapter/run_utils.rb
saucelabs-adapter-0.7.7 lib/saucelabs_adapter/run_utils.rb
saucelabs-adapter-0.7.6 lib/saucelabs_adapter/run_utils.rb