Sha256: 58d3d4b9f39c778f921cbe879f08dc3258826e87794f77fec72998649a0875bf
Contents?: true
Size: 743 Bytes
Versions: 109
Compression:
Stored size: 743 Bytes
Contents
module PactBroker module Webhooks class Status def initialize pact, webhooks, latest_triggered_webhooks @webhooks = webhooks @latest_triggered_webhooks = latest_triggered_webhooks end def to_s to_sym.to_s end def to_sym return :none if webhooks.empty? return :not_run if latest_triggered_webhooks.empty? || latest_triggered_webhooks.all?{|w| w.status == "not_run"} if latest_triggered_webhooks.any?{|w| w.status == "retrying" } return :retrying end latest_triggered_webhooks.all?{|w| w.status == "success"} ? :success : :failure end private attr_reader :webhooks, :latest_triggered_webhooks end end end
Version data entries
109 entries across 109 versions & 1 rubygems