pact_broker 2.103.0 → 2.104.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/pact_broker/configuration.rb +0 -1
- data/lib/pact_broker/integrations/integration.rb +8 -1
- data/lib/pact_broker/version.rb +1 -1
- data/lib/pact_broker/webhooks/repository.rb +2 -2
- data/lib/pact_broker/webhooks/triggered_webhook.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2a928f323706d303796168aed1ec181dbf44be8156fc54010357a26771cffd2
|
4
|
+
data.tar.gz: b6e9ab38c908cd2263e51e16816f1b4ad8950151cf033ce5009c33022bd1ca59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e43a6235c4a0a1cfdb8dacd8b83eca7f11e76c1ec40510207b7a904b72d2d1895878fdbbc1e249454c1b3fa5a814bb764bf747ae76b0f0f0f180da096f1d056
|
7
|
+
data.tar.gz: 77c95170acc6e136e177d27baaa65f2f668b5085789ebfafde5552983d83a3c42e25b21ee558faf19263d364ae9526350424d32312fb3a6db5d9dcb38e7521a4
|
data/CHANGELOG.md
CHANGED
@@ -106,7 +106,6 @@ module PactBroker
|
|
106
106
|
|
107
107
|
def logger_from_runtime_configuration
|
108
108
|
@logger_from_runtime_configuration ||= begin
|
109
|
-
runtime_configuration.validate_logging_attributes!
|
110
109
|
SemanticLogger.default_level = runtime_configuration.log_level
|
111
110
|
if runtime_configuration.log_stream == :file
|
112
111
|
path = runtime_configuration.log_dir + "/pact_broker.log"
|
@@ -12,7 +12,14 @@ module PactBroker
|
|
12
12
|
associate(:many_to_one, :consumer, :class => "PactBroker::Domain::Pacticipant", :key => :consumer_id, :primary_key => :id)
|
13
13
|
associate(:many_to_one, :provider, :class => "PactBroker::Domain::Pacticipant", :key => :provider_id, :primary_key => :id)
|
14
14
|
associate(:one_to_one, :latest_verification, :class => "PactBroker::Verifications::LatestVerificationForConsumerAndProvider", key: [:consumer_id, :provider_id], primary_key: [:consumer_id, :provider_id])
|
15
|
-
|
15
|
+
|
16
|
+
one_to_many(:latest_triggered_webhooks,
|
17
|
+
:class => PactBroker::Webhooks::TriggeredWebhook,
|
18
|
+
key: [:consumer_id, :provider_id],
|
19
|
+
allow_eager: true,
|
20
|
+
primary_key: [:consumer_id, :provider_id]) do | ds |
|
21
|
+
ds.latest_triggered_webhooks
|
22
|
+
end
|
16
23
|
|
17
24
|
# When viewing the index, every latest_pact in the database will match at least one of the rows, so
|
18
25
|
# it makes sense to load the entire table and match each pact to the appropriate row.
|
data/lib/pact_broker/version.rb
CHANGED
@@ -159,9 +159,9 @@ module PactBroker
|
|
159
159
|
|
160
160
|
def find_latest_triggered_webhooks consumer, provider
|
161
161
|
# policy already applied to pact
|
162
|
-
deliberately_unscoped(
|
162
|
+
deliberately_unscoped(TriggeredWebhook)
|
163
163
|
.where(consumer: consumer, provider: provider)
|
164
|
-
.
|
164
|
+
.latest_triggered_webhooks
|
165
165
|
.all
|
166
166
|
end
|
167
167
|
|
@@ -45,6 +45,13 @@ module PactBroker
|
|
45
45
|
def not_run
|
46
46
|
where(status: STATUS_NOT_RUN)
|
47
47
|
end
|
48
|
+
|
49
|
+
# Return the dataset for the latest triggered webhooks grouped by
|
50
|
+
# consumer, provider, webhook and event.
|
51
|
+
# Excludes the deleted webhooks
|
52
|
+
def latest_triggered_webhooks
|
53
|
+
exclude(webhook_id: nil).max_group_by(:id, [:consumer_id, :provider_id, :webhook_uuid, :event_name]).order(:id)
|
54
|
+
end
|
48
55
|
end
|
49
56
|
|
50
57
|
associate(:one_to_many, :webhook_executions, :class => "PactBroker::Webhooks::Execution", :key => :triggered_webhook_id, :primary_key => :id, :order => :id)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pact_broker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.104.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bethany Skurrie
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-09-
|
13
|
+
date: 2022-09-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: json
|