class PactBroker::Integrations::Integration

Constants

LATEST_PACT_EAGER_LOADER

When viewing the index, every latest_pact in the database will match at least one of the rows, so it makes sense to load the entire table and match each pact to the appropriate row. Update: now we have pagination, we should probably filter the pacts by consumer/provider id.

Public Instance Methods

<=>(other) click to toggle source
# File lib/pact_broker/integrations/integration.rb, line 68
def <=>(other)
  [consumer.name.downcase, provider.name.downcase] <=> [other.consumer.name.downcase, other.provider.name.downcase]
end
latest_pact_or_verification_publication_date() click to toggle source
# File lib/pact_broker/integrations/integration.rb, line 60
def latest_pact_or_verification_publication_date
  [latest_pact.created_at, latest_verification_publication_date].compact.max
end
latest_verification_publication_date() click to toggle source
# File lib/pact_broker/integrations/integration.rb, line 64
def latest_verification_publication_date
  latest_verification&.execution_date
end
verification_status_for_latest_pact() click to toggle source
# File lib/pact_broker/integrations/integration.rb, line 56
def verification_status_for_latest_pact
  @verification_status_for_latest_pact ||= PactBroker::Verifications::PseudoBranchStatus.new(latest_pact, latest_pact&.latest_verification)
end