pact_broker 1.18.0 → 2.0.0.beta.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 +12 -9
- data/DEVELOPER_DOCUMENTATION.md +53 -0
- data/README.md +13 -13
- data/db/migrations/23_create_pact_contents_table.rb +19 -0
- data/db/migrations/24_populate_pact_contents.rb +9 -0
- data/db/migrations/25_populate_pact_contents_pacticipants.rb +7 -0
- data/db/migrations/26_make_pc_pacticipants_mandatory.rb +8 -0
- data/db/migrations/27_create_pact_publications.rb +18 -0
- data/db/migrations/28_populate_pact_publications.rb +13 -0
- data/db/migrations/29_recreate_all_pacts.rb +16 -0
- data/db/migrations/30_drop_pacts.rb +8 -0
- data/db/migrations/31_drop_pact_version_contents.rb +5 -0
- data/db/migrations/32_rename_pact_contents.rb +5 -0
- data/db/migrations/33_recreate_all_pacts.rb +52 -0
- data/db/migrations/34_recreate_latest_tagged_pacts.rb +23 -0
- data/db/migrations/35_create_verifications.rb +15 -0
- data/db/migrations/36_create_latest_verifications.rb +14 -0
- data/db/pact_broker_database.sqlite3 +0 -0
- data/lib/pact_broker/api.rb +25 -10
- data/lib/pact_broker/api/contracts/verification_contract.rb +41 -0
- data/lib/pact_broker/api/decorators/pact_decorator.rb +7 -0
- data/lib/pact_broker/api/decorators/pact_version_decorator.rb +0 -1
- data/lib/pact_broker/api/decorators/representable_pact.rb +4 -3
- data/lib/pact_broker/api/decorators/timestamps.rb +1 -1
- data/lib/pact_broker/api/decorators/verification_decorator.rb +30 -0
- data/lib/pact_broker/api/decorators/verifications_decorator.rb +21 -0
- data/lib/pact_broker/api/decorators/version_decorator.rb +14 -0
- data/lib/pact_broker/api/decorators/versions_decorator.rb +1 -1
- data/lib/pact_broker/api/pact_broker_urls.rb +41 -2
- data/lib/pact_broker/api/renderers/html_pact_renderer.rb +1 -1
- data/lib/pact_broker/api/resources/base_resource.rb +11 -2
- data/lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb +39 -0
- data/lib/pact_broker/api/resources/pacticipants.rb +1 -1
- data/lib/pact_broker/api/resources/previous_distinct_pact_version.rb +1 -1
- data/lib/pact_broker/api/resources/verifications.rb +67 -0
- data/lib/pact_broker/api/resources/versions.rb +1 -1
- data/lib/pact_broker/api/resources/webhooks.rb +1 -1
- data/lib/pact_broker/app.rb +0 -2
- data/lib/pact_broker/configuration.rb +1 -4
- data/lib/pact_broker/doc/views/latest-verifications.markdown +7 -0
- data/lib/pact_broker/doc/views/publish-verification.markdown +14 -0
- data/lib/pact_broker/domain.rb +1 -1
- data/lib/pact_broker/domain/order_versions.rb +5 -15
- data/lib/pact_broker/domain/pact.rb +10 -2
- data/lib/pact_broker/domain/relationship.rb +31 -4
- data/lib/pact_broker/domain/verification.rb +77 -0
- data/lib/pact_broker/domain/version.rb +6 -1
- data/lib/pact_broker/domain/webhook.rb +1 -0
- data/lib/pact_broker/domain/webhook_request.rb +4 -6
- data/lib/pact_broker/locale/en.yml +2 -1
- data/lib/pact_broker/logging.rb +0 -4
- data/lib/pact_broker/pacticipants/repository.rb +1 -2
- data/lib/pact_broker/pacticipants/service.rb +11 -5
- data/lib/pact_broker/pacts/all_pact_publications.rb +96 -0
- data/lib/pact_broker/pacts/all_pacts.rb +4 -89
- data/lib/pact_broker/pacts/diff.rb +2 -2
- data/lib/pact_broker/pacts/latest_pact_publications.rb +11 -0
- data/lib/pact_broker/pacts/latest_pact_publications_by_consumer_version.rb +11 -0
- data/lib/pact_broker/pacts/latest_pacts.rb +1 -0
- data/lib/pact_broker/pacts/latest_tagged_pact_publications.rb +11 -0
- data/lib/pact_broker/pacts/pact_params.rb +11 -1
- data/lib/pact_broker/pacts/pact_publication.rb +50 -0
- data/lib/pact_broker/pacts/pact_version.rb +39 -0
- data/lib/pact_broker/pacts/repository.rb +46 -36
- data/lib/pact_broker/pacts/service.rb +2 -2
- data/lib/pact_broker/repositories.rb +5 -0
- data/lib/pact_broker/services.rb +5 -0
- data/lib/pact_broker/ui/view_models/relationship.rb +38 -0
- data/lib/pact_broker/ui/views/relationships/show.haml +9 -0
- data/lib/pact_broker/verifications/repository.rb +45 -0
- data/lib/pact_broker/verifications/service.rb +40 -0
- data/lib/pact_broker/version.rb +1 -1
- data/lib/pact_broker/versions/parse_semantic_version.rb +9 -6
- data/lib/pact_broker/webhooks/service.rb +8 -9
- data/lib/pact_broker/webhooks/webhook.rb +1 -1
- data/pact_broker.gemspec +3 -4
- data/pact_broker_client-pact_broker.json +4 -4
- data/script/publish.sh +2 -2
- data/script/record_verification.sh +3 -0
- data/spec/features/delete_pact_spec.rb +1 -1
- data/spec/features/get_verifications_for_consumer_version_spec.rb +33 -0
- data/spec/features/publish_verification_spec.rb +28 -0
- data/spec/fixtures/a_consumer-a_provider-2.json +1 -1
- data/spec/fixtures/a_consumer-a_provider-3.json +1 -1
- data/spec/fixtures/a_consumer-a_provider-conflict.json +1 -1
- data/spec/fixtures/a_consumer-a_provider-merged.json +2 -2
- data/spec/fixtures/a_consumer-a_provider.json +1 -1
- data/spec/fixtures/consumer-provider.json +1 -1
- data/spec/fixtures/renderer_pact.json +1 -1
- data/spec/fixtures/verification.json +4 -0
- data/spec/lib/pact_broker/api/contracts/verification_contract_spec.rb +91 -0
- data/spec/lib/pact_broker/api/decorators/latest_pact_decorator_spec.rb +0 -18
- data/spec/lib/pact_broker/api/decorators/pact_decorator_spec.rb +6 -2
- data/spec/lib/pact_broker/api/decorators/pact_version_decorator_spec.rb +0 -3
- data/spec/lib/pact_broker/api/decorators/verification_decorator_spec.rb +61 -0
- data/spec/lib/pact_broker/api/decorators/verifications_decorator_spec.rb +42 -0
- data/spec/lib/pact_broker/api/decorators/version_decorator_spec.rb +4 -0
- data/spec/lib/pact_broker/api/renderers/html_pact_renderer_spec.rb +1 -1
- data/spec/lib/pact_broker/api/resources/latest_verifications_for_consumer_version_spec.rb +68 -0
- data/spec/lib/pact_broker/api/resources/pact_spec.rb +1 -1
- data/spec/lib/pact_broker/api/resources/pacticipants_spec.rb +1 -1
- data/spec/lib/pact_broker/api/resources/verifications_spec.rb +92 -0
- data/spec/lib/pact_broker/api/resources/webhooks_spec.rb +1 -1
- data/spec/lib/pact_broker/domain/order_versions_spec.rb +10 -30
- data/spec/lib/pact_broker/domain/verification_spec.rb +41 -0
- data/spec/lib/pact_broker/domain/version_spec.rb +26 -0
- data/spec/lib/pact_broker/domain/webhook_request_spec.rb +1 -3
- data/spec/lib/pact_broker/pacticipants/repository_spec.rb +0 -16
- data/spec/lib/pact_broker/pacticipants/service_spec.rb +4 -3
- data/spec/lib/pact_broker/pacts/pact_params_spec.rb +14 -1
- data/spec/lib/pact_broker/pacts/pact_version_spec.rb +50 -0
- data/spec/lib/pact_broker/pacts/repository_spec.rb +85 -36
- data/spec/lib/pact_broker/ui/view_models/relationship_spec.rb +48 -2
- data/spec/lib/pact_broker/verifications/repository_spec.rb +92 -0
- data/spec/lib/pact_broker/verifications/service_spec.rb +61 -0
- data/spec/lib/pact_broker/versions/parse_semantic_version_spec.rb +39 -0
- data/spec/lib/pact_broker/webhooks/service_spec.rb +3 -40
- data/spec/migrations/23_pact_versions_spec.rb +95 -0
- data/spec/migrations/24_populate_pact_contents_spec.rb +48 -0
- data/spec/migrations/34_latest_tagged_pacts_spec.rb +108 -0
- data/spec/migrations/34_pact_revisions_spec.rb +106 -0
- data/spec/support/database_cleaner.rb +8 -4
- data/spec/support/provider_state_builder.rb +22 -8
- metadata +81 -36
- data/lib/pact_broker/pacts/database_model.rb +0 -35
- data/lib/pact_broker/pacts/latest_tagged_pacts.rb +0 -11
- data/lib/pact_broker/pacts/pact_version_content.rb +0 -11
- data/lib/pact_broker/webhooks/job.rb +0 -46
- data/script/foo-bar.json +0 -22
- data/script/publish-new.sh +0 -7
- data/script/recreate-pg-db.sh +0 -7
- data/spec/lib/pact_broker/webhooks/job_spec.rb +0 -67
@@ -0,0 +1,108 @@
|
|
1
|
+
require 'tasks/database'
|
2
|
+
|
3
|
+
describe 'using pact publications (migrate 31-32)', no_db_clean: :true do
|
4
|
+
|
5
|
+
def create table_name, params, id_column_name = :id
|
6
|
+
database[table_name].insert(params);
|
7
|
+
database[table_name].order(id_column_name).last
|
8
|
+
end
|
9
|
+
|
10
|
+
def new_connection
|
11
|
+
DB.connection_for_env 'test'
|
12
|
+
end
|
13
|
+
|
14
|
+
let(:database) { new_connection }
|
15
|
+
|
16
|
+
before do
|
17
|
+
PactBroker::Database.delete_database_file
|
18
|
+
PactBroker::Database.ensure_database_dir_exists
|
19
|
+
database = new_connection
|
20
|
+
PactBroker::Database.migrate(34)
|
21
|
+
end
|
22
|
+
|
23
|
+
let(:now) { DateTime.new(2017, 1, 1) }
|
24
|
+
let!(:consumer_1) { create(:pacticipants, {name: 'Consumer 1', created_at: now, updated_at: now}) }
|
25
|
+
let!(:provider_1) { create(:pacticipants, {name: 'Provider 1', created_at: now, updated_at: now}) }
|
26
|
+
let!(:consumer_version_1) { create(:versions, {number: '1.2.3', order: 1, pacticipant_id: consumer_1[:id], created_at: now, updated_at: now}) }
|
27
|
+
let!(:consumer_version_2) { create(:versions, {number: '4.5.6', order: 2, pacticipant_id: consumer_1[:id], created_at: now, updated_at: now}) }
|
28
|
+
let!(:pact_version_content_1) { create(:pact_versions, {content: {some: 'json'}.to_json, sha: '1234', consumer_id: consumer_1[:id], provider_id: provider_1[:id], created_at: now}) }
|
29
|
+
let!(:pact_version_1_revision_1) { create(:pact_publications, {consumer_version_id: consumer_version_1[:id], provider_id: provider_1[:id], pact_version_id: pact_version_content_1[:id], created_at: now, revision_number: 1}) }
|
30
|
+
let!(:pact_version_2_revision_1) { create(:pact_publications, {consumer_version_id: consumer_version_2[:id], provider_id: provider_1[:id], pact_version_id: pact_version_content_1[:id], created_at: now, revision_number: 1}) }
|
31
|
+
let!(:pact_version_2_revision_2) { create(:pact_publications, {consumer_version_id: consumer_version_2[:id], provider_id: provider_1[:id], pact_version_id: pact_version_content_1[:id], created_at: now, revision_number: 2}) }
|
32
|
+
|
33
|
+
let!(:consumer_2) { create(:pacticipants, {name: 'Consumer 2', created_at: now, updated_at: now}) }
|
34
|
+
let!(:provider_2) { create(:pacticipants, {name: 'Provider 2', created_at: now, updated_at: now}) }
|
35
|
+
let!(:consumer_version_3) { create(:versions, {number: '7.8.9', order: 1, pacticipant_id: consumer_2[:id], created_at: now, updated_at: now}) }
|
36
|
+
let!(:pact_version_content_2) { create(:pact_versions, {content: {some: 'json'}.to_json, sha: '4567', consumer_id: consumer_2[:id], provider_id: provider_2[:id], created_at: now}) }
|
37
|
+
let!(:pact_version_3_revision_1) { create(:pact_publications, {consumer_version_id: consumer_version_3[:id], provider_id: provider_2[:id], pact_version_id: pact_version_content_2[:id], created_at: now, revision_number: 1}) }
|
38
|
+
|
39
|
+
# Consumer 1/Provider 1 version 1.2.3
|
40
|
+
let!(:tag_1) { create(:tags, {version_id: consumer_version_1[:id], name: 'master', created_at: now, updated_at: now}, :created_at) } #not included
|
41
|
+
|
42
|
+
# Consumer 1/Provider 1 version 4.5.6
|
43
|
+
let!(:tag_2) { create(:tags, {version_id: consumer_version_2[:id], name: 'master', created_at: now, updated_at: now}, :created_at) } #included
|
44
|
+
let!(:tag_3) { create(:tags, {version_id: consumer_version_2[:id], name: 'prod', created_at: now, updated_at: now}, :created_at) } #included
|
45
|
+
|
46
|
+
# Consumer 2/Provider 2 version 7.8.9
|
47
|
+
let!(:tag_4) { create(:tags, {version_id: consumer_version_3[:id], name: 'prod', created_at: now, updated_at: now}, :created_at) } #included
|
48
|
+
|
49
|
+
describe "latest_tagged_pact_consumer_version_orders" do
|
50
|
+
it "contains a row with the latest consumer version order for each consumer/provider/tag combination" do
|
51
|
+
expect(database[:latest_tagged_pact_consumer_version_orders].where(
|
52
|
+
provider_id: provider_1[:id], consumer_id: consumer_1[:id], tag_name: 'master'
|
53
|
+
).count
|
54
|
+
).to eq 1
|
55
|
+
|
56
|
+
expect(database[:latest_tagged_pact_consumer_version_orders].where(
|
57
|
+
provider_id: provider_1[:id], consumer_id: consumer_1[:id], tag_name: 'prod'
|
58
|
+
).count
|
59
|
+
).to eq 1
|
60
|
+
|
61
|
+
expect(database[:latest_tagged_pact_consumer_version_orders].where(
|
62
|
+
provider_id: provider_2[:id], consumer_id: consumer_2[:id], tag_name: 'prod'
|
63
|
+
).count
|
64
|
+
).to eq 1
|
65
|
+
|
66
|
+
expect(database[:latest_tagged_pact_consumer_version_orders].count).to eq 3
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
describe "latest_tagged_pact_publications" do
|
71
|
+
it "only contains the latest revision of the pact for the latest consumer version with each tag" do
|
72
|
+
expect(database[:latest_tagged_pact_publications].where(
|
73
|
+
provider_name: 'Provider 1', consumer_name: 'Consumer 1',
|
74
|
+
consumer_version_number: '4.5.6', revision_number: 2, tag_name: 'prod'
|
75
|
+
).count
|
76
|
+
).to eq 1
|
77
|
+
|
78
|
+
expect(database[:latest_tagged_pact_publications].where(
|
79
|
+
provider_name: 'Provider 1', consumer_name: 'Consumer 1',
|
80
|
+
consumer_version_number: '4.5.6', revision_number: 2, tag_name: 'master'
|
81
|
+
).count
|
82
|
+
).to eq 1
|
83
|
+
|
84
|
+
expect(database[:latest_tagged_pact_publications].where(
|
85
|
+
provider_name: 'Provider 2', consumer_name: 'Consumer 2',
|
86
|
+
consumer_version_number: '7.8.9', revision_number: 1, tag_name: 'prod'
|
87
|
+
).count
|
88
|
+
).to eq 1
|
89
|
+
|
90
|
+
expect(database[:latest_tagged_pact_publications].count).to eq 3
|
91
|
+
end
|
92
|
+
|
93
|
+
it "has a created_at column" do
|
94
|
+
expect(database[:latest_tagged_pact_publications].order(:id).first).to have_key(:created_at)
|
95
|
+
end
|
96
|
+
|
97
|
+
it "doesn't have an updated_at column" do
|
98
|
+
expect(database[:latest_tagged_pact_publications].order(:id).first).to_not have_key(:updated_at)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
after do
|
103
|
+
PactBroker::Database.delete_database_file
|
104
|
+
PactBroker::Database.ensure_database_dir_exists
|
105
|
+
database = new_connection
|
106
|
+
PactBroker::Database.migrate
|
107
|
+
end
|
108
|
+
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
require 'tasks/database'
|
2
|
+
|
3
|
+
describe 'using pact publications (migrate 31-32)', no_db_clean: :true do
|
4
|
+
|
5
|
+
def create table_name, params, id_column_name = :id
|
6
|
+
database[table_name].insert(params);
|
7
|
+
database[table_name].order(id_column_name).last
|
8
|
+
end
|
9
|
+
|
10
|
+
def new_connection
|
11
|
+
DB.connection_for_env 'test'
|
12
|
+
end
|
13
|
+
|
14
|
+
let(:database) { new_connection }
|
15
|
+
|
16
|
+
before do
|
17
|
+
PactBroker::Database.delete_database_file
|
18
|
+
PactBroker::Database.ensure_database_dir_exists
|
19
|
+
database = new_connection
|
20
|
+
PactBroker::Database.migrate(33)
|
21
|
+
end
|
22
|
+
|
23
|
+
let(:now) { DateTime.new(2017, 1, 1) }
|
24
|
+
let!(:consumer_1) { create(:pacticipants, {name: 'Consumer 1', created_at: now, updated_at: now}) }
|
25
|
+
let!(:provider_1) { create(:pacticipants, {name: 'Provider 1', created_at: now, updated_at: now}) }
|
26
|
+
let!(:consumer_version_1) { create(:versions, {number: '1.2.3', order: 1, pacticipant_id: consumer_1[:id], created_at: now, updated_at: now}) }
|
27
|
+
let!(:consumer_version_2) { create(:versions, {number: '4.5.6', order: 2, pacticipant_id: consumer_1[:id], created_at: now, updated_at: now}) }
|
28
|
+
let!(:pact_version_content_1) { create(:pact_versions, {content: {some: 'json'}.to_json, sha: '1234', consumer_id: consumer_1[:id], provider_id: provider_1[:id], created_at: now}) }
|
29
|
+
let!(:pact_version_1_revision_1) { create(:pact_publications, {consumer_version_id: consumer_version_1[:id], provider_id: provider_1[:id], pact_version_id: pact_version_content_1[:id], created_at: now, revision_number: 1}) }
|
30
|
+
let!(:pact_version_2_revision_1) { create(:pact_publications, {consumer_version_id: consumer_version_2[:id], provider_id: provider_1[:id], pact_version_id: pact_version_content_1[:id], created_at: now, revision_number: 1}) }
|
31
|
+
let!(:pact_version_2_revision_2) { create(:pact_publications, {consumer_version_id: consumer_version_2[:id], provider_id: provider_1[:id], pact_version_id: pact_version_content_1[:id], created_at: now, revision_number: 2}) }
|
32
|
+
|
33
|
+
let!(:consumer_2) { create(:pacticipants, {name: 'Consumer 2', created_at: now, updated_at: now}) }
|
34
|
+
let!(:provider_2) { create(:pacticipants, {name: 'Provider 2', created_at: now, updated_at: now}) }
|
35
|
+
let!(:consumer_version_3) { create(:versions, {number: '4.5.6', order: 1, pacticipant_id: consumer_2[:id], created_at: now, updated_at: now}) }
|
36
|
+
let!(:pact_version_content_2) { create(:pact_versions, {content: {some: 'json'}.to_json, sha: '4567', consumer_id: consumer_2[:id], provider_id: provider_2[:id], created_at: now}) }
|
37
|
+
let!(:pact_version_3_revision_1) { create(:pact_publications, {consumer_version_id: consumer_version_3[:id], provider_id: provider_2[:id], pact_version_id: pact_version_content_2[:id], created_at: now, revision_number: 1}) }
|
38
|
+
|
39
|
+
let(:do_migration) do
|
40
|
+
PactBroker::Database.migrate(34)
|
41
|
+
database.schema(:latest_pact_publication_revision_numbers, reload: true)
|
42
|
+
end
|
43
|
+
|
44
|
+
describe "all_pact_publications" do
|
45
|
+
it "has a row for every revision" do
|
46
|
+
do_migration
|
47
|
+
expect(database[:all_pact_publications].count).to eq 4
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
describe "latest_pact_publications_by_consumer_versions" do
|
52
|
+
it "has a row for every pact" do
|
53
|
+
do_migration
|
54
|
+
expect(database[:latest_pact_publications_by_consumer_versions].count).to eq 3
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
describe "latest_pact_publication_revision_numbers" do
|
59
|
+
it "contains the latest revision number for each consumer version" do
|
60
|
+
do_migration
|
61
|
+
expect(database[:latest_pact_publication_revision_numbers].where(
|
62
|
+
provider_id: provider_1[:id], consumer_id: consumer_1[:id],
|
63
|
+
consumer_version_order: 1, latest_revision_number: 1
|
64
|
+
).count
|
65
|
+
).to eq 1
|
66
|
+
expect(database[:latest_pact_publication_revision_numbers].where(
|
67
|
+
provider_id: provider_1[:id], consumer_id: consumer_1[:id],
|
68
|
+
consumer_version_order: 2, latest_revision_number: 2
|
69
|
+
).count
|
70
|
+
).to eq 1
|
71
|
+
expect(database[:latest_pact_publication_revision_numbers].where(
|
72
|
+
provider_id: provider_2[:id], consumer_id: consumer_2[:id],
|
73
|
+
consumer_version_order: 1, latest_revision_number: 1
|
74
|
+
).count
|
75
|
+
).to eq 1
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
describe "latest_pact_consumer_version_orders" do
|
80
|
+
it "contains the latest consumer version for each consumer/provider pair" do
|
81
|
+
do_migration
|
82
|
+
expect(database[:latest_pact_consumer_version_orders].count).to eq 2
|
83
|
+
expect(database[:latest_pact_consumer_version_orders].where(
|
84
|
+
provider_id: provider_1[:id], consumer_id: consumer_1[:id],
|
85
|
+
latest_consumer_version_order: 2
|
86
|
+
).count
|
87
|
+
).to eq 1
|
88
|
+
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
describe "latest_pact_publications" do
|
93
|
+
it "only contains the latest revision of the pact for the latest consumer version" do
|
94
|
+
do_migration
|
95
|
+
expect(database[:latest_pact_publications].count).to eq 2
|
96
|
+
expect(database[:latest_pact_publications].where(provider_id: provider_1[:id], consumer_id: consumer_1[:id]).count).to eq 1
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
after do
|
101
|
+
PactBroker::Database.delete_database_file
|
102
|
+
PactBroker::Database.ensure_database_dir_exists
|
103
|
+
database = new_connection
|
104
|
+
PactBroker::Database.migrate
|
105
|
+
end
|
106
|
+
end
|
@@ -8,11 +8,15 @@ RSpec.configure do |config|
|
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
11
|
-
config.before(:each) do
|
12
|
-
|
11
|
+
config.before(:each) do | example |
|
12
|
+
unless example.metadata[:no_db_clean]
|
13
|
+
DatabaseCleaner.start if defined?(::DB)
|
14
|
+
end
|
13
15
|
end
|
14
16
|
|
15
|
-
config.after(:each) do
|
16
|
-
|
17
|
+
config.after(:each) do | example |
|
18
|
+
unless example.metadata[:no_db_clean]
|
19
|
+
DatabaseCleaner.clean if defined?(::DB)
|
20
|
+
end
|
17
21
|
end
|
18
22
|
end
|
@@ -14,6 +14,8 @@ require 'json'
|
|
14
14
|
require 'pact_broker/versions/repository'
|
15
15
|
require 'pact_broker/pacts/repository'
|
16
16
|
require 'pact_broker/pacticipants/repository'
|
17
|
+
require 'pact_broker/verifications/repository'
|
18
|
+
require 'pact_broker/verifications/service'
|
17
19
|
require 'pact_broker/tags/repository'
|
18
20
|
require 'pact_broker/webhooks/repository'
|
19
21
|
|
@@ -52,7 +54,7 @@ class ProviderStateBuilder
|
|
52
54
|
end
|
53
55
|
|
54
56
|
def create_ces_cps_pact
|
55
|
-
@pact_id = pact_repository.create(version_id: @contract_email_service_version_id, provider_id: @contract_proposal_service_id, json_content: default_json_content).id
|
57
|
+
@pact_id = pact_repository.create(version_id: @contract_email_service_version_id, consumer_id: @contract_email_service_id, provider_id: @contract_proposal_service_id, json_content: default_json_content).id
|
56
58
|
self
|
57
59
|
end
|
58
60
|
|
@@ -72,15 +74,15 @@ class ProviderStateBuilder
|
|
72
74
|
end
|
73
75
|
|
74
76
|
def create_condor_pricing_service_pact
|
75
|
-
@pact_id = pact_repository.create(version_id: @condor_version_id, provider_id: @pricing_service_id, json_content: default_json_content).id
|
77
|
+
@pact_id = pact_repository.create(version_id: @condor_version_id, consumer_id: @condor_id, provider_id: @pricing_service_id, json_content: default_json_content).id
|
76
78
|
self
|
77
79
|
end
|
78
80
|
|
79
|
-
def create_pact_with_hierarchy consumer_name, consumer_version, provider_name, json_content = default_json_content
|
81
|
+
def create_pact_with_hierarchy consumer_name = "Consumer", consumer_version = "1.2.3", provider_name = "Provider", json_content = default_json_content
|
80
82
|
provider = PactBroker::Domain::Pacticipant.create(:name => provider_name)
|
81
83
|
consumer = PactBroker::Domain::Pacticipant.create(:name => consumer_name)
|
82
84
|
version = PactBroker::Domain::Version.create(:number => consumer_version, :pacticipant => consumer)
|
83
|
-
PactBroker::Pacts::Repository.new.create(version_id: version.id, provider_id: provider.id, json_content: json_content)
|
85
|
+
PactBroker::Pacts::Repository.new.create(version_id: version.id, consumer_id: consumer.id, provider_id: provider.id, json_content: json_content)
|
84
86
|
end
|
85
87
|
|
86
88
|
def create_version_with_hierarchy pacticipant_name, pacticipant_version
|
@@ -132,17 +134,29 @@ class ProviderStateBuilder
|
|
132
134
|
end
|
133
135
|
|
134
136
|
def create_pact json_content = default_json_content
|
135
|
-
@pact = PactBroker::Pacts::Repository.new.create(version_id: @consumer_version.id, provider_id: @provider.id, json_content: json_content)
|
137
|
+
@pact = PactBroker::Pacts::Repository.new.create(version_id: @consumer_version.id, consumer_id: @consumer.id, provider_id: @provider.id, json_content: json_content)
|
136
138
|
self
|
137
139
|
end
|
138
140
|
|
139
|
-
def
|
140
|
-
|
141
|
-
|
141
|
+
def revise_pact json_content = nil
|
142
|
+
json_content = json_content ? json_content : {random: rand}.to_json
|
143
|
+
@pact = PactBroker::Pacts::Repository.new.update(@pact.id, json_content: json_content)
|
144
|
+
self
|
145
|
+
end
|
146
|
+
|
147
|
+
def create_webhook
|
148
|
+
request = PactBroker::Domain::WebhookRequest.new(method: 'POST', url: 'http://example.org', headers: {'Content-Type' => 'application/json'})
|
142
149
|
@webhook = PactBroker::Webhooks::Repository.new.create PactBroker::Webhooks::Service.next_uuid, PactBroker::Domain::Webhook.new(request: request), @consumer, @provider
|
143
150
|
self
|
144
151
|
end
|
145
152
|
|
153
|
+
def create_verification parameters = {}
|
154
|
+
default_parameters = {success: true, provider_version: '4.5.6', number: 1}
|
155
|
+
verification = PactBroker::Domain::Verification.new(default_parameters.merge(parameters))
|
156
|
+
@verification = PactBroker::Verifications::Repository.new.create(verification, @pact)
|
157
|
+
self
|
158
|
+
end
|
159
|
+
|
146
160
|
def model_counter
|
147
161
|
@@model_counter ||= 0
|
148
162
|
@@model_counter += 1
|
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:
|
4
|
+
version: 2.0.0.beta.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: 2017-
|
13
|
+
date: 2017-04-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|
@@ -117,19 +117,19 @@ dependencies:
|
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: 1.4.0
|
119
119
|
- !ruby/object:Gem::Dependency
|
120
|
-
name:
|
120
|
+
name: semver2
|
121
121
|
requirement: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version:
|
125
|
+
version: 3.4.2
|
126
126
|
type: :runtime
|
127
127
|
prerelease: false
|
128
128
|
version_requirements: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
130
|
- - "~>"
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version:
|
132
|
+
version: 3.4.2
|
133
133
|
- !ruby/object:Gem::Dependency
|
134
134
|
name: rack
|
135
135
|
requirement: !ruby/object:Gem::Requirement
|
@@ -220,36 +220,22 @@ dependencies:
|
|
220
220
|
- - "~>"
|
221
221
|
- !ruby/object:Gem::Version
|
222
222
|
version: '4.0'
|
223
|
-
- !ruby/object:Gem::Dependency
|
224
|
-
name: sucker_punch
|
225
|
-
requirement: !ruby/object:Gem::Requirement
|
226
|
-
requirements:
|
227
|
-
- - "~>"
|
228
|
-
- !ruby/object:Gem::Version
|
229
|
-
version: '2.0'
|
230
|
-
type: :runtime
|
231
|
-
prerelease: false
|
232
|
-
version_requirements: !ruby/object:Gem::Requirement
|
233
|
-
requirements:
|
234
|
-
- - "~>"
|
235
|
-
- !ruby/object:Gem::Version
|
236
|
-
version: '2.0'
|
237
223
|
- !ruby/object:Gem::Dependency
|
238
224
|
name: sqlite3
|
239
225
|
requirement: !ruby/object:Gem::Requirement
|
240
226
|
requirements:
|
241
|
-
- - "
|
227
|
+
- - "~>"
|
242
228
|
- !ruby/object:Gem::Version
|
243
|
-
version: '
|
229
|
+
version: '1.3'
|
244
230
|
type: :development
|
245
231
|
prerelease: false
|
246
232
|
version_requirements: !ruby/object:Gem::Requirement
|
247
233
|
requirements:
|
248
|
-
- - "
|
234
|
+
- - "~>"
|
249
235
|
- !ruby/object:Gem::Version
|
250
|
-
version: '
|
236
|
+
version: '1.3'
|
251
237
|
- !ruby/object:Gem::Dependency
|
252
|
-
name: pry
|
238
|
+
name: pry
|
253
239
|
requirement: !ruby/object:Gem::Requirement
|
254
240
|
requirements:
|
255
241
|
- - ">="
|
@@ -375,6 +361,7 @@ files:
|
|
375
361
|
- ".ruby-version"
|
376
362
|
- ".travis.yml"
|
377
363
|
- CHANGELOG.md
|
364
|
+
- DEVELOPER_DOCUMENTATION.md
|
378
365
|
- Gemfile
|
379
366
|
- LICENSE.txt
|
380
367
|
- README.md
|
@@ -406,6 +393,20 @@ files:
|
|
406
393
|
- db/migrations/20_add_pact_version_content_sha_to_all_pacts_view.rb
|
407
394
|
- db/migrations/21_recreate_latest_pacts_view.rb
|
408
395
|
- db/migrations/22_create_latest_tagged_pacts_view.rb
|
396
|
+
- db/migrations/23_create_pact_contents_table.rb
|
397
|
+
- db/migrations/24_populate_pact_contents.rb
|
398
|
+
- db/migrations/25_populate_pact_contents_pacticipants.rb
|
399
|
+
- db/migrations/26_make_pc_pacticipants_mandatory.rb
|
400
|
+
- db/migrations/27_create_pact_publications.rb
|
401
|
+
- db/migrations/28_populate_pact_publications.rb
|
402
|
+
- db/migrations/29_recreate_all_pacts.rb
|
403
|
+
- db/migrations/30_drop_pacts.rb
|
404
|
+
- db/migrations/31_drop_pact_version_contents.rb
|
405
|
+
- db/migrations/32_rename_pact_contents.rb
|
406
|
+
- db/migrations/33_recreate_all_pacts.rb
|
407
|
+
- db/migrations/34_recreate_latest_tagged_pacts.rb
|
408
|
+
- db/migrations/35_create_verifications.rb
|
409
|
+
- db/migrations/36_create_latest_verifications.rb
|
409
410
|
- db/migrations/migration_helper.rb
|
410
411
|
- db/pact_broker_database.sqlite3
|
411
412
|
- example/Gemfile
|
@@ -423,6 +424,7 @@ files:
|
|
423
424
|
- lib/pact_broker/api/contracts/pacticipant_name_validation.rb
|
424
425
|
- lib/pact_broker/api/contracts/put_pact_params_contract.rb
|
425
426
|
- lib/pact_broker/api/contracts/request_validations.rb
|
427
|
+
- lib/pact_broker/api/contracts/verification_contract.rb
|
426
428
|
- lib/pact_broker/api/contracts/webhook_contract.rb
|
427
429
|
- lib/pact_broker/api/decorators.rb
|
428
430
|
- lib/pact_broker/api/decorators/base_decorator.rb
|
@@ -444,6 +446,8 @@ files:
|
|
444
446
|
- lib/pact_broker/api/decorators/representable_pact.rb
|
445
447
|
- lib/pact_broker/api/decorators/tag_decorator.rb
|
446
448
|
- lib/pact_broker/api/decorators/timestamps.rb
|
449
|
+
- lib/pact_broker/api/decorators/verification_decorator.rb
|
450
|
+
- lib/pact_broker/api/decorators/verifications_decorator.rb
|
447
451
|
- lib/pact_broker/api/decorators/version_decorator.rb
|
448
452
|
- lib/pact_broker/api/decorators/versions_decorator.rb
|
449
453
|
- lib/pact_broker/api/decorators/webhook_decorator.rb
|
@@ -458,6 +462,7 @@ files:
|
|
458
462
|
- lib/pact_broker/api/resources/latest_pact.rb
|
459
463
|
- lib/pact_broker/api/resources/latest_pacts.rb
|
460
464
|
- lib/pact_broker/api/resources/latest_provider_pacts.rb
|
465
|
+
- lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb
|
461
466
|
- lib/pact_broker/api/resources/pact.rb
|
462
467
|
- lib/pact_broker/api/resources/pact_content_diff.rb
|
463
468
|
- lib/pact_broker/api/resources/pact_versions.rb
|
@@ -468,6 +473,7 @@ files:
|
|
468
473
|
- lib/pact_broker/api/resources/previous_distinct_pact_version.rb
|
469
474
|
- lib/pact_broker/api/resources/relationships.rb
|
470
475
|
- lib/pact_broker/api/resources/tag.rb
|
476
|
+
- lib/pact_broker/api/resources/verifications.rb
|
471
477
|
- lib/pact_broker/api/resources/version.rb
|
472
478
|
- lib/pact_broker/api/resources/versions.rb
|
473
479
|
- lib/pact_broker/api/resources/webhook.rb
|
@@ -488,12 +494,14 @@ files:
|
|
488
494
|
- lib/pact_broker/doc/views/diff-previous-distinct.markdown
|
489
495
|
- lib/pact_broker/doc/views/latest-pact-version.markdown
|
490
496
|
- lib/pact_broker/doc/views/latest-pact-versions.markdown
|
497
|
+
- lib/pact_broker/doc/views/latest-verifications.markdown
|
491
498
|
- lib/pact_broker/doc/views/layouts/main.haml
|
492
499
|
- lib/pact_broker/doc/views/pact-versions.markdown
|
493
500
|
- lib/pact_broker/doc/views/pact-webhooks.markdown
|
494
501
|
- lib/pact_broker/doc/views/pacticipants.markdown
|
495
502
|
- lib/pact_broker/doc/views/provider.markdown
|
496
503
|
- lib/pact_broker/doc/views/publish-pact.markdown
|
504
|
+
- lib/pact_broker/doc/views/publish-verification.markdown
|
497
505
|
- lib/pact_broker/doc/views/self.markdown
|
498
506
|
- lib/pact_broker/doc/views/tag-prod-version.markdown
|
499
507
|
- lib/pact_broker/doc/views/tag-version.markdown
|
@@ -505,6 +513,7 @@ files:
|
|
505
513
|
- lib/pact_broker/domain/pacticipant.rb
|
506
514
|
- lib/pact_broker/domain/relationship.rb
|
507
515
|
- lib/pact_broker/domain/tag.rb
|
516
|
+
- lib/pact_broker/domain/verification.rb
|
508
517
|
- lib/pact_broker/domain/version.rb
|
509
518
|
- lib/pact_broker/domain/webhook.rb
|
510
519
|
- lib/pact_broker/domain/webhook_execution_result.rb
|
@@ -518,15 +527,18 @@ files:
|
|
518
527
|
- lib/pact_broker/pacticipants/find_potential_duplicate_pacticipant_names.rb
|
519
528
|
- lib/pact_broker/pacticipants/repository.rb
|
520
529
|
- lib/pact_broker/pacticipants/service.rb
|
530
|
+
- lib/pact_broker/pacts/all_pact_publications.rb
|
521
531
|
- lib/pact_broker/pacts/all_pacts.rb
|
522
532
|
- lib/pact_broker/pacts/create_formatted_diff.rb
|
523
|
-
- lib/pact_broker/pacts/database_model.rb
|
524
533
|
- lib/pact_broker/pacts/diff.rb
|
534
|
+
- lib/pact_broker/pacts/latest_pact_publications.rb
|
535
|
+
- lib/pact_broker/pacts/latest_pact_publications_by_consumer_version.rb
|
525
536
|
- lib/pact_broker/pacts/latest_pacts.rb
|
526
|
-
- lib/pact_broker/pacts/
|
537
|
+
- lib/pact_broker/pacts/latest_tagged_pact_publications.rb
|
527
538
|
- lib/pact_broker/pacts/merger.rb
|
528
539
|
- lib/pact_broker/pacts/pact_params.rb
|
529
|
-
- lib/pact_broker/pacts/
|
540
|
+
- lib/pact_broker/pacts/pact_publication.rb
|
541
|
+
- lib/pact_broker/pacts/pact_version.rb
|
530
542
|
- lib/pact_broker/pacts/repository.rb
|
531
543
|
- lib/pact_broker/pacts/service.rb
|
532
544
|
- lib/pact_broker/project_root.rb
|
@@ -552,11 +564,12 @@ files:
|
|
552
564
|
- lib/pact_broker/ui/views/groups/show.html.erb
|
553
565
|
- lib/pact_broker/ui/views/layouts/main.haml
|
554
566
|
- lib/pact_broker/ui/views/relationships/show.haml
|
567
|
+
- lib/pact_broker/verifications/repository.rb
|
568
|
+
- lib/pact_broker/verifications/service.rb
|
555
569
|
- lib/pact_broker/version.rb
|
556
570
|
- lib/pact_broker/versions/parse_semantic_version.rb
|
557
571
|
- lib/pact_broker/versions/repository.rb
|
558
572
|
- lib/pact_broker/versions/service.rb
|
559
|
-
- lib/pact_broker/webhooks/job.rb
|
560
573
|
- lib/pact_broker/webhooks/repository.rb
|
561
574
|
- lib/pact_broker/webhooks/service.rb
|
562
575
|
- lib/pact_broker/webhooks/webhook.rb
|
@@ -589,12 +602,10 @@ files:
|
|
589
602
|
- public/stylesheets/github.css
|
590
603
|
- public/stylesheets/pact.css
|
591
604
|
- public/stylesheets/relationships.css
|
592
|
-
- script/foo-bar.json
|
593
605
|
- script/publish-2.sh
|
594
|
-
- script/publish-new.sh
|
595
606
|
- script/publish-not-a-pact.sh
|
596
607
|
- script/publish.sh
|
597
|
-
- script/
|
608
|
+
- script/record_verification.sh
|
598
609
|
- script/update-hal-browser
|
599
610
|
- spec/features/create_webhook_spec.rb
|
600
611
|
- spec/features/delete_pact_spec.rb
|
@@ -603,11 +614,13 @@ files:
|
|
603
614
|
- spec/features/get_pact_versions_spec.rb
|
604
615
|
- spec/features/get_previous_distinct_version.rb
|
605
616
|
- spec/features/get_provider_pacts_spec.rb
|
617
|
+
- spec/features/get_verifications_for_consumer_version_spec.rb
|
606
618
|
- spec/features/get_version_spec.rb
|
607
619
|
- spec/features/get_versions_spec.rb
|
608
620
|
- spec/features/merge_pact_spec.rb
|
609
621
|
- spec/features/publish_not_a_pact_spec.rb
|
610
622
|
- spec/features/publish_pact_spec.rb
|
623
|
+
- spec/features/publish_verification_spec.rb
|
611
624
|
- spec/features/update_pacticipant_spec.rb
|
612
625
|
- spec/fixtures/a_consumer-a_provider-2.json
|
613
626
|
- spec/fixtures/a_consumer-a_provider-3.json
|
@@ -618,10 +631,12 @@ files:
|
|
618
631
|
- spec/fixtures/renderer_pact.json
|
619
632
|
- spec/fixtures/update_pacticipant.json
|
620
633
|
- spec/fixtures/updated_pacticipant.json
|
634
|
+
- spec/fixtures/verification.json
|
621
635
|
- spec/fixtures/webhook_valid.json
|
622
636
|
- spec/integration/app_spec.rb
|
623
637
|
- spec/integration/endpoints/group.rb
|
624
638
|
- spec/lib/pact_broker/api/contracts/put_pact_params_contract_spec.rb
|
639
|
+
- spec/lib/pact_broker/api/contracts/verification_contract_spec.rb
|
625
640
|
- spec/lib/pact_broker/api/contracts/webhook_contract_spec.rb
|
626
641
|
- spec/lib/pact_broker/api/decorators/embedded_tag_decorator_spec.rb
|
627
642
|
- spec/lib/pact_broker/api/decorators/embedded_version_decorator_spec.rb
|
@@ -634,6 +649,8 @@ files:
|
|
634
649
|
- spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb
|
635
650
|
- spec/lib/pact_broker/api/decorators/representable_pact_spec.rb
|
636
651
|
- spec/lib/pact_broker/api/decorators/tag_decorator_spec.rb
|
652
|
+
- spec/lib/pact_broker/api/decorators/verification_decorator_spec.rb
|
653
|
+
- spec/lib/pact_broker/api/decorators/verifications_decorator_spec.rb
|
637
654
|
- spec/lib/pact_broker/api/decorators/version_decorator_spec.rb
|
638
655
|
- spec/lib/pact_broker/api/decorators/versions_decorator_spec.rb
|
639
656
|
- spec/lib/pact_broker/api/decorators/webhook_decorator_spec.rb
|
@@ -643,11 +660,13 @@ files:
|
|
643
660
|
- spec/lib/pact_broker/api/renderers/html_pact_renderer_spec.rb
|
644
661
|
- spec/lib/pact_broker/api/resources/group_spec.rb
|
645
662
|
- spec/lib/pact_broker/api/resources/latest_pact_spec.rb
|
663
|
+
- spec/lib/pact_broker/api/resources/latest_verifications_for_consumer_version_spec.rb
|
646
664
|
- spec/lib/pact_broker/api/resources/pact_spec.rb
|
647
665
|
- spec/lib/pact_broker/api/resources/pact_webhooks_spec.rb
|
648
666
|
- spec/lib/pact_broker/api/resources/pacticipant_spec.rb
|
649
667
|
- spec/lib/pact_broker/api/resources/pacticipants_spec.rb
|
650
668
|
- spec/lib/pact_broker/api/resources/tag_spec.rb
|
669
|
+
- spec/lib/pact_broker/api/resources/verifications_spec.rb
|
651
670
|
- spec/lib/pact_broker/api/resources/webhook_execution_spec.rb
|
652
671
|
- spec/lib/pact_broker/api/resources/webhook_spec.rb
|
653
672
|
- spec/lib/pact_broker/api/resources/webhooks_spec.rb
|
@@ -659,6 +678,8 @@ files:
|
|
659
678
|
- spec/lib/pact_broker/domain/group_spec.rb
|
660
679
|
- spec/lib/pact_broker/domain/order_versions_spec.rb
|
661
680
|
- spec/lib/pact_broker/domain/pacticipant_spec.rb
|
681
|
+
- spec/lib/pact_broker/domain/verification_spec.rb
|
682
|
+
- spec/lib/pact_broker/domain/version_spec.rb
|
662
683
|
- spec/lib/pact_broker/domain/webhook_request_spec.rb
|
663
684
|
- spec/lib/pact_broker/domain/webhook_spec.rb
|
664
685
|
- spec/lib/pact_broker/groups/service_spec.rb
|
@@ -670,6 +691,7 @@ files:
|
|
670
691
|
- spec/lib/pact_broker/pacts/diff_spec.rb
|
671
692
|
- spec/lib/pact_broker/pacts/merger_spec.rb
|
672
693
|
- spec/lib/pact_broker/pacts/pact_params_spec.rb
|
694
|
+
- spec/lib/pact_broker/pacts/pact_version_spec.rb
|
673
695
|
- spec/lib/pact_broker/pacts/repository_spec.rb
|
674
696
|
- spec/lib/pact_broker/pacts/service_spec.rb
|
675
697
|
- spec/lib/pact_broker/relationships/groupify_spec.rb
|
@@ -679,11 +701,17 @@ files:
|
|
679
701
|
- spec/lib/pact_broker/ui/controllers/relationships_spec.rb
|
680
702
|
- spec/lib/pact_broker/ui/view_models/relationship_spec.rb
|
681
703
|
- spec/lib/pact_broker/ui/view_models/relationships_spec.rb
|
704
|
+
- spec/lib/pact_broker/verifications/repository_spec.rb
|
705
|
+
- spec/lib/pact_broker/verifications/service_spec.rb
|
706
|
+
- spec/lib/pact_broker/versions/parse_semantic_version_spec.rb
|
682
707
|
- spec/lib/pact_broker/versions/repository_spec.rb
|
683
|
-
- spec/lib/pact_broker/webhooks/job_spec.rb
|
684
708
|
- spec/lib/pact_broker/webhooks/repository_spec.rb
|
685
709
|
- spec/lib/pact_broker/webhooks/service_spec.rb
|
686
710
|
- spec/lib/rack/hal_browser/redirect_spec.rb
|
711
|
+
- spec/migrations/23_pact_versions_spec.rb
|
712
|
+
- spec/migrations/24_populate_pact_contents_spec.rb
|
713
|
+
- spec/migrations/34_latest_tagged_pacts_spec.rb
|
714
|
+
- spec/migrations/34_pact_revisions_spec.rb
|
687
715
|
- spec/service_consumers/pact_helper.rb
|
688
716
|
- spec/service_consumers/provider_states_for_pact_broker_client.rb
|
689
717
|
- spec/spec_helper.rb
|
@@ -749,12 +777,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
749
777
|
version: 2.2.0
|
750
778
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
751
779
|
requirements:
|
752
|
-
- - "
|
780
|
+
- - ">"
|
753
781
|
- !ruby/object:Gem::Version
|
754
|
-
version:
|
782
|
+
version: 1.3.1
|
755
783
|
requirements: []
|
756
784
|
rubyforge_project:
|
757
|
-
rubygems_version: 2.
|
785
|
+
rubygems_version: 2.4.5
|
758
786
|
signing_key:
|
759
787
|
specification_version: 4
|
760
788
|
summary: See description
|
@@ -766,11 +794,13 @@ test_files:
|
|
766
794
|
- spec/features/get_pact_versions_spec.rb
|
767
795
|
- spec/features/get_previous_distinct_version.rb
|
768
796
|
- spec/features/get_provider_pacts_spec.rb
|
797
|
+
- spec/features/get_verifications_for_consumer_version_spec.rb
|
769
798
|
- spec/features/get_version_spec.rb
|
770
799
|
- spec/features/get_versions_spec.rb
|
771
800
|
- spec/features/merge_pact_spec.rb
|
772
801
|
- spec/features/publish_not_a_pact_spec.rb
|
773
802
|
- spec/features/publish_pact_spec.rb
|
803
|
+
- spec/features/publish_verification_spec.rb
|
774
804
|
- spec/features/update_pacticipant_spec.rb
|
775
805
|
- spec/fixtures/a_consumer-a_provider-2.json
|
776
806
|
- spec/fixtures/a_consumer-a_provider-3.json
|
@@ -781,10 +811,12 @@ test_files:
|
|
781
811
|
- spec/fixtures/renderer_pact.json
|
782
812
|
- spec/fixtures/update_pacticipant.json
|
783
813
|
- spec/fixtures/updated_pacticipant.json
|
814
|
+
- spec/fixtures/verification.json
|
784
815
|
- spec/fixtures/webhook_valid.json
|
785
816
|
- spec/integration/app_spec.rb
|
786
817
|
- spec/integration/endpoints/group.rb
|
787
818
|
- spec/lib/pact_broker/api/contracts/put_pact_params_contract_spec.rb
|
819
|
+
- spec/lib/pact_broker/api/contracts/verification_contract_spec.rb
|
788
820
|
- spec/lib/pact_broker/api/contracts/webhook_contract_spec.rb
|
789
821
|
- spec/lib/pact_broker/api/decorators/embedded_tag_decorator_spec.rb
|
790
822
|
- spec/lib/pact_broker/api/decorators/embedded_version_decorator_spec.rb
|
@@ -797,6 +829,8 @@ test_files:
|
|
797
829
|
- spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb
|
798
830
|
- spec/lib/pact_broker/api/decorators/representable_pact_spec.rb
|
799
831
|
- spec/lib/pact_broker/api/decorators/tag_decorator_spec.rb
|
832
|
+
- spec/lib/pact_broker/api/decorators/verification_decorator_spec.rb
|
833
|
+
- spec/lib/pact_broker/api/decorators/verifications_decorator_spec.rb
|
800
834
|
- spec/lib/pact_broker/api/decorators/version_decorator_spec.rb
|
801
835
|
- spec/lib/pact_broker/api/decorators/versions_decorator_spec.rb
|
802
836
|
- spec/lib/pact_broker/api/decorators/webhook_decorator_spec.rb
|
@@ -806,11 +840,13 @@ test_files:
|
|
806
840
|
- spec/lib/pact_broker/api/renderers/html_pact_renderer_spec.rb
|
807
841
|
- spec/lib/pact_broker/api/resources/group_spec.rb
|
808
842
|
- spec/lib/pact_broker/api/resources/latest_pact_spec.rb
|
843
|
+
- spec/lib/pact_broker/api/resources/latest_verifications_for_consumer_version_spec.rb
|
809
844
|
- spec/lib/pact_broker/api/resources/pact_spec.rb
|
810
845
|
- spec/lib/pact_broker/api/resources/pact_webhooks_spec.rb
|
811
846
|
- spec/lib/pact_broker/api/resources/pacticipant_spec.rb
|
812
847
|
- spec/lib/pact_broker/api/resources/pacticipants_spec.rb
|
813
848
|
- spec/lib/pact_broker/api/resources/tag_spec.rb
|
849
|
+
- spec/lib/pact_broker/api/resources/verifications_spec.rb
|
814
850
|
- spec/lib/pact_broker/api/resources/webhook_execution_spec.rb
|
815
851
|
- spec/lib/pact_broker/api/resources/webhook_spec.rb
|
816
852
|
- spec/lib/pact_broker/api/resources/webhooks_spec.rb
|
@@ -822,6 +858,8 @@ test_files:
|
|
822
858
|
- spec/lib/pact_broker/domain/group_spec.rb
|
823
859
|
- spec/lib/pact_broker/domain/order_versions_spec.rb
|
824
860
|
- spec/lib/pact_broker/domain/pacticipant_spec.rb
|
861
|
+
- spec/lib/pact_broker/domain/verification_spec.rb
|
862
|
+
- spec/lib/pact_broker/domain/version_spec.rb
|
825
863
|
- spec/lib/pact_broker/domain/webhook_request_spec.rb
|
826
864
|
- spec/lib/pact_broker/domain/webhook_spec.rb
|
827
865
|
- spec/lib/pact_broker/groups/service_spec.rb
|
@@ -833,6 +871,7 @@ test_files:
|
|
833
871
|
- spec/lib/pact_broker/pacts/diff_spec.rb
|
834
872
|
- spec/lib/pact_broker/pacts/merger_spec.rb
|
835
873
|
- spec/lib/pact_broker/pacts/pact_params_spec.rb
|
874
|
+
- spec/lib/pact_broker/pacts/pact_version_spec.rb
|
836
875
|
- spec/lib/pact_broker/pacts/repository_spec.rb
|
837
876
|
- spec/lib/pact_broker/pacts/service_spec.rb
|
838
877
|
- spec/lib/pact_broker/relationships/groupify_spec.rb
|
@@ -842,11 +881,17 @@ test_files:
|
|
842
881
|
- spec/lib/pact_broker/ui/controllers/relationships_spec.rb
|
843
882
|
- spec/lib/pact_broker/ui/view_models/relationship_spec.rb
|
844
883
|
- spec/lib/pact_broker/ui/view_models/relationships_spec.rb
|
884
|
+
- spec/lib/pact_broker/verifications/repository_spec.rb
|
885
|
+
- spec/lib/pact_broker/verifications/service_spec.rb
|
886
|
+
- spec/lib/pact_broker/versions/parse_semantic_version_spec.rb
|
845
887
|
- spec/lib/pact_broker/versions/repository_spec.rb
|
846
|
-
- spec/lib/pact_broker/webhooks/job_spec.rb
|
847
888
|
- spec/lib/pact_broker/webhooks/repository_spec.rb
|
848
889
|
- spec/lib/pact_broker/webhooks/service_spec.rb
|
849
890
|
- spec/lib/rack/hal_browser/redirect_spec.rb
|
891
|
+
- spec/migrations/23_pact_versions_spec.rb
|
892
|
+
- spec/migrations/24_populate_pact_contents_spec.rb
|
893
|
+
- spec/migrations/34_latest_tagged_pacts_spec.rb
|
894
|
+
- spec/migrations/34_pact_revisions_spec.rb
|
850
895
|
- spec/service_consumers/pact_helper.rb
|
851
896
|
- spec/service_consumers/provider_states_for_pact_broker_client.rb
|
852
897
|
- spec/spec_helper.rb
|