class YSI::Executor
Public Instance Methods
http_delete(url)
click to toggle source
# File lib/yes_ship_it/executor.rb, line 29 def http_delete(url) begin RestClient.delete(url) rescue RestClient::Exception => e raise YSI::AssertionError.new(e.message) end end
http_post(url, data)
click to toggle source
# File lib/yes_ship_it/executor.rb, line 13 def http_post(url, data) begin RestClient.post(url, data) rescue RestClient::Exception => e raise YSI::AssertionError.new(e.message) end end
http_put(url, data, options)
click to toggle source
# File lib/yes_ship_it/executor.rb, line 21 def http_put(url, data, options) begin RestClient.put(url, data, options) rescue RestClient::Exception => e raise YSI::AssertionError.new(e.message) end end
run_command(args, working_directory: Dir.pwd)
click to toggle source
# File lib/yes_ship_it/executor.rb, line 3 def run_command(args, working_directory: Dir.pwd) begin Dir.chdir(working_directory) do Cheetah.run(args, stdout: :capture) end rescue Cheetah::ExecutionFailed => e raise YSI::AssertionError.new(e.message) end end