|
1 | 1 | require 'pact_broker/repositories/helpers'
|
2 | 2 | require 'pact_broker/webhooks/latest_triggered_webhook'
|
3 | 3 | require 'pact_broker/tags/latest_verification_tag'
|
| 4 | +require 'pact_broker/tags/tag_with_latest_flag' |
4 | 5 |
|
5 | 6 | module PactBroker
|
6 | 7 | module Matrix
|
7 | 8 | class Row < Sequel::Model(:matrix)
|
8 | 9 |
|
9 |
| - |
10 | 10 | associate(:one_to_many, :latest_triggered_webhooks, :class => "PactBroker::Webhooks::LatestTriggeredWebhook", primary_key: :pact_publication_id, key: :pact_publication_id)
|
11 |
| - |
12 |
| - # already have this |
13 |
| - # associate(:many_to_one, :latest_verification, :class => "PactBroker::Verifications::Repository::LatestVerificationsByConsumerVersion", primary_key: :pact_version_id, key: :pact_version_id) |
14 |
| - # TODO modify this to work with single pacticipant webhooks |
15 | 11 | associate(:one_to_many, :webhooks, :class => "PactBroker::Webhooks::Webhook", primary_key: [:consumer_id, :provider_id], key: [:consumer_id, :provider_id])
|
16 |
| - associate(:one_to_many, :consumer_version_tags, :class => "PactBroker::Domain::Tag", primary_key: :consumer_version_id, key: :version_id) |
17 |
| - associate(:one_to_many, :latest_verification_tags, :class => "PactBroker::Tags::LatestVerificationTag", primary_key: :verification_id, key: :verification_id) |
| 12 | + associate(:one_to_many, :consumer_version_tags, :class => "PactBroker::Tags::TagWithLatestFlag", primary_key: :consumer_version_id, key: :version_id) |
| 13 | + associate(:one_to_many, :provider_version_tags, :class => "PactBroker::Tags::TagWithLatestFlag", primary_key: :provider_version_id, key: :version_id) |
18 | 14 |
|
19 | 15 | dataset_module do
|
20 | 16 | include PactBroker::Repositories::Helpers
|
@@ -71,9 +67,9 @@ def consumer_head_tag_names= consumer_head_tag_names
|
71 | 67 | @consumer_head_tag_names = consumer_head_tag_names
|
72 | 68 | end
|
73 | 69 |
|
74 |
| - def latest_triggered_webhooks |
75 |
| - @latest_triggered_webhooks ||= [] |
76 |
| - end |
| 70 | + # def latest_triggered_webhooks |
| 71 | + # @latest_triggered_webhooks ||= [] |
| 72 | + # end |
77 | 73 |
|
78 | 74 | def summary
|
79 | 75 | "#{consumer_name}#{consumer_version_number} #{provider_name}#{provider_version_number || '?'} (r#{pact_revision_number}n#{verification_number || '?'})"
|
|
0 commit comments