Class: PactBroker::Client::Webhooks::Test

Inherits:
Object
  • Object
show all
Defined in:
lib/pact_broker/client/webhooks/test.rb

Class Method Summary collapse

Class Method Details

.call(options, pact_broker_client_options) ⇒ Object



8
9
10
11
12
# File 'lib/pact_broker/client/webhooks/test.rb', line 8

def self.call(options, pact_broker_client_options)
  http_client = PactBroker::Client::Hal::HttpClient.new(pact_broker_client_options.merge(pact_broker_client_options[:basic_auth] || {}))
  execution_result = PactBroker::Client::Hal::EntryPoint.new(options.broker_base_url, http_client).get!._link!('pb:webhook').expand('uuid' => options.uuid).get!.post('pb:execute')
  PactBroker::Client::CommandResult.new(true, execution_result.response.body['logs'])
end