class PactBroker::Api::Decorators::PactWebhooksStatusDecorator
Public Instance Methods
fake_consumer(context)
click to toggle source
# File lib/pact_broker/api/decorators/pact_webhooks_status_decorator.rb, line 87 def fake_consumer context OpenStruct.new(name: context[:consumer_name]) end
fake_provider(context)
click to toggle source
# File lib/pact_broker/api/decorators/pact_webhooks_status_decorator.rb, line 91 def fake_provider context OpenStruct.new(name: context[:provider_name]) end
pact()
click to toggle source
# File lib/pact_broker/api/decorators/pact_webhooks_status_decorator.rb, line 83 def pact represented.any? ? represented.first.pact_publication : nil end
summary()
click to toggle source
# File lib/pact_broker/api/decorators/pact_webhooks_status_decorator.rb, line 72 def summary counts = represented.group_by(&:status).each_with_object({}) do | (status, triggered_webhooks), count | count[status] = triggered_webhooks.count end OpenStruct.new(counts) end
triggered_webhooks_with_error_logs()
click to toggle source
# File lib/pact_broker/api/decorators/pact_webhooks_status_decorator.rb, line 79 def triggered_webhooks_with_error_logs represented.select{|w| w.failure? || w.retrying? } end