From c94a9923b73ca4b2b2caca099ae47b90e6ba5833 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Sat, 26 May 2018 20:47:24 +1000 Subject: [PATCH] chore: use pact_version_sha instead of pact_version_id in index item - revert to it's previous logic --- lib/pact_broker/domain/index_item.rb | 2 +- lib/pact_broker/index/service.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pact_broker/domain/index_item.rb b/lib/pact_broker/domain/index_item.rb index 3a010fab6..f1eb5a7d1 100644 --- a/lib/pact_broker/domain/index_item.rb +++ b/lib/pact_broker/domain/index_item.rb @@ -102,7 +102,7 @@ def latest_verification_successful? end def pact_changed_since_last_verification? - latest_verification.pact_version_id != latest_pact.pact_version_id + latest_verification.pact_version_sha != latest_pact.pact_version_sha end def latest_verification_provider_version_number diff --git a/lib/pact_broker/index/service.rb b/lib/pact_broker/index/service.rb index 71eb77a23..6176ea4e0 100644 --- a/lib/pact_broker/index/service.rb +++ b/lib/pact_broker/index/service.rb @@ -32,7 +32,7 @@ def self.find_index_items options = {} rows = rows.all.group_by(&:pact_publication_id).values.collect{ | rows| Matrix::AggregatedRow.new(rows) } rows.sort.collect do | row | - # TODO simplify + # TODO simplify. Do we really need 3 layers of abstraction? PactBroker::Domain::IndexItem.create( row.consumer, row.provider,