pact_broker 2.23.0 → 2.23.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/lib/pact_broker/api/resources/all_webhooks.rb +1 -1
- data/lib/pact_broker/api/resources/badge.rb +1 -1
- data/lib/pact_broker/api/resources/base_resource.rb +4 -0
- data/lib/pact_broker/api/resources/dashboard.rb +1 -1
- data/lib/pact_broker/api/resources/error_test.rb +1 -1
- data/lib/pact_broker/api/resources/group.rb +1 -1
- data/lib/pact_broker/api/resources/index.rb +1 -1
- data/lib/pact_broker/api/resources/label.rb +1 -1
- data/lib/pact_broker/api/resources/latest_pact.rb +1 -1
- data/lib/pact_broker/api/resources/latest_pacts.rb +1 -1
- data/lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb +1 -1
- data/lib/pact_broker/api/resources/matrix.rb +1 -1
- data/lib/pact_broker/api/resources/matrix_for_consumer_and_provider.rb +1 -1
- data/lib/pact_broker/api/resources/pact.rb +1 -1
- data/lib/pact_broker/api/resources/pact_content_diff.rb +1 -1
- data/lib/pact_broker/api/resources/pact_triggered_webhooks.rb +2 -1
- data/lib/pact_broker/api/resources/pact_version.rb +1 -1
- data/lib/pact_broker/api/resources/pact_versions.rb +1 -1
- data/lib/pact_broker/api/resources/pact_webhooks.rb +1 -1
- data/lib/pact_broker/api/resources/pact_webhooks_status.rb +1 -1
- data/lib/pact_broker/api/resources/pacticipant.rb +1 -1
- data/lib/pact_broker/api/resources/pacticipants.rb +1 -1
- data/lib/pact_broker/api/resources/pacticipants_for_label.rb +1 -1
- data/lib/pact_broker/api/resources/previous_distinct_pact_version.rb +1 -1
- data/lib/pact_broker/api/resources/provider_pacts.rb +1 -1
- data/lib/pact_broker/api/resources/relationships.rb +1 -1
- data/lib/pact_broker/api/resources/tag.rb +1 -1
- data/lib/pact_broker/api/resources/triggered_webhook_logs.rb +1 -1
- data/lib/pact_broker/api/resources/verification.rb +1 -1
- data/lib/pact_broker/api/resources/verification_triggered_webhooks.rb +1 -1
- data/lib/pact_broker/api/resources/verifications.rb +1 -1
- data/lib/pact_broker/api/resources/version.rb +1 -1
- data/lib/pact_broker/api/resources/versions.rb +1 -1
- data/lib/pact_broker/api/resources/webhook.rb +1 -1
- data/lib/pact_broker/api/resources/webhook_execution.rb +1 -1
- data/lib/pact_broker/api/resources/webhooks.rb +1 -1
- data/lib/pact_broker/doc/views/webhooks.markdown +1 -1
- data/lib/pact_broker/version.rb +1 -1
- data/spec/lib/pact_broker/api/resources/base_resource_spec.rb +21 -0
- data/spec/service_consumers/hal_relation_proxy_app.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af5e56af0fcb01af75c45a0f2d0377795c2d57b8
|
4
|
+
data.tar.gz: 90dd47be6e7aa273e7f5f7d50e381f3968bde7b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3aca8efd6e49da134e00322211e084ebb9696db70c7dc92cfdb6f09b342a8d48e1e7a6d5831315c2463dddd5b53b873576a527f57195495b3e2c78cb46e613f2
|
7
|
+
data.tar.gz: 84feaf4b1641bab2293d9b2f332ba8b5e9a92e9fe6afbd8270ad9618de90e58d5e34b5f2496c7ade4d91451ce8049c0df17e269468ab631ac08e3a38d74405b3
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
<a name="v2.23.1"></a>
|
2
|
+
### v2.23.1 (2018-06-23)
|
3
|
+
|
4
|
+
|
5
|
+
#### Features
|
6
|
+
|
7
|
+
* respond correctly to OPTIONS requests ([c5d3937](/../../commit/c5d3937))
|
8
|
+
|
9
|
+
|
10
|
+
#### Bug Fixes
|
11
|
+
|
12
|
+
* add missing require to pact_triggered_webhooks ([aaf1755](/../../commit/aaf1755))
|
13
|
+
|
14
|
+
|
1
15
|
<a name="v2.23.0"></a>
|
2
16
|
### v2.23.0 (2018-06-20)
|
3
17
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'pact_broker/api/resources/base_resource'
|
1
2
|
require 'pact_broker/api/decorators/triggered_webhooks_decorator'
|
2
3
|
|
3
4
|
module PactBroker
|
@@ -5,7 +6,7 @@ module PactBroker
|
|
5
6
|
module Resources
|
6
7
|
class PactTriggeredWebhooks < BaseResource
|
7
8
|
def allowed_methods
|
8
|
-
["GET"]
|
9
|
+
["GET", "OPTIONS"]
|
9
10
|
end
|
10
11
|
|
11
12
|
def content_types_provided
|
@@ -112,7 +112,7 @@ Example usage:
|
|
112
112
|
<a name="whitelist"></a>
|
113
113
|
### Webhook Whitelist
|
114
114
|
|
115
|
-
To ensure that webhooks cannot be used maliciously to expose either data about your contracts or your internal network, the following validation rules are applied to webhooks via the Pact Broker configuration settings.
|
115
|
+
To ensure that webhooks cannot be used maliciously to expose either data about your contracts or your internal network, the following validation rules are applied to webhooks via the Pact Broker [webhook whitelist configuration settings](https://github.com/pact-foundation/pact_broker/wiki/Configuration#webhook-whitelists) .
|
116
116
|
|
117
117
|
* **Scheme**: Must be included in the `webhook_scheme_whitelist`, which by default only includes `https`. You can change this to include `http` if absolutely necessary, however, keep in mind that the body of any http traffic is visible to the network. You can load a self signed certificate into the Pact Broker to be used for https connections using [script/insert-self-signed-certificate-from-url.rb](https://github.com/pact-foundation/pact_broker/blob/master/script/insert-self-signed-certificate-from-url.rb) in the
|
118
118
|
Pact Broker Github repository.
|
data/lib/pact_broker/version.rb
CHANGED
@@ -11,6 +11,27 @@ module PactBroker
|
|
11
11
|
subject { BaseResource.new(request, response) }
|
12
12
|
|
13
13
|
its(:resource_url) { is_expected.to eq 'http://example.org/path' }
|
14
|
+
|
15
|
+
describe "options" do
|
16
|
+
subject { options "/"; last_response }
|
17
|
+
|
18
|
+
it "returns a list of allowed methods" do
|
19
|
+
expect(subject.headers['Access-Control-Allow-Methods']).to eq "GET, OPTIONS"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
ALL_RESOURCES = ObjectSpace.each_object(::Class).select {|klass| klass < BaseResource }
|
25
|
+
|
26
|
+
ALL_RESOURCES.each do | resource |
|
27
|
+
describe resource do
|
28
|
+
let(:request) { double('request', uri: URI("http://example.org")) }
|
29
|
+
let(:response) { double('response') }
|
30
|
+
|
31
|
+
it "includes OPTIONS in the list of allowed_methods" do
|
32
|
+
expect(resource.new(request, response).allowed_methods).to include "OPTIONS"
|
33
|
+
end
|
34
|
+
end
|
14
35
|
end
|
15
36
|
end
|
16
37
|
end
|
@@ -7,7 +7,9 @@ class HalRelationProxyApp
|
|
7
7
|
'/HAL-REL-PLACEHOLDER-INDEX-PB-LATEST-TAGGED-VERSION-Condor-production' =>
|
8
8
|
'/pacticipants/Condor/latest-version/production',
|
9
9
|
'/HAL-REL-PLACEHOLDER-INDEX-PB-LATEST-VERSION-Condor' =>
|
10
|
-
'/pacticipants/Condor/latest-version'
|
10
|
+
'/pacticipants/Condor/latest-version',
|
11
|
+
'/HAL-REL-PLACEHOLDER-PB-WEBHOOKS' =>
|
12
|
+
'/webhooks'
|
11
13
|
}
|
12
14
|
|
13
15
|
RESPONSE_BODY_REPLACEMENTS = {
|
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.23.
|
4
|
+
version: 2.23.1
|
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: 2018-06-
|
13
|
+
date: 2018-06-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|