pact_broker 2.84.0 → 2.87.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/trigger_pact_docs_update.yml +22 -0
  3. data/CHANGELOG.md +63 -0
  4. data/DEVELOPER_DOCUMENTATION.md +0 -2
  5. data/db/migrations/20210913_add_pending_to_verifications.rb +7 -0
  6. data/db/migrations/20210914_add_labels_to_webhooks.rb +14 -0
  7. data/db/migrations/20210915_add_verified_by_to_verification.rb +6 -0
  8. data/db/migrations/20210929_increase_event_context_column_size.rb +14 -0
  9. data/docker-compose-ci-mysql.yml +1 -0
  10. data/docker-compose-test.yml +2 -0
  11. data/docs/CONFIGURATION.md +255 -66
  12. data/docs/configuration.yml +166 -101
  13. data/lib/db.rb +0 -1
  14. data/lib/pact/doc/interaction_view_model.rb +2 -2
  15. data/lib/pact/doc/markdown/consumer_contract_renderer.rb +4 -4
  16. data/lib/pact_broker/api/contracts/configuration.rb +33 -0
  17. data/lib/pact_broker/api/contracts/publish_contracts_schema.rb +35 -16
  18. data/lib/pact_broker/api/contracts/webhook_contract.rb +24 -2
  19. data/lib/pact_broker/api/decorators/matrix_decorator.rb +3 -1
  20. data/lib/pact_broker/api/decorators/reason_decorator.rb +2 -2
  21. data/lib/pact_broker/api/decorators/verification_decorator.rb +9 -3
  22. data/lib/pact_broker/api/decorators/verification_summary_decorator.rb +1 -2
  23. data/lib/pact_broker/api/decorators/webhook_decorator.rb +27 -4
  24. data/lib/pact_broker/api/middleware/configuration.rb +33 -0
  25. data/lib/pact_broker/api/pact_broker_urls.rb +35 -7
  26. data/lib/pact_broker/api/renderers/html_pact_renderer.rb +15 -11
  27. data/lib/pact_broker/api/resources/all_webhooks.rb +2 -2
  28. data/lib/pact_broker/api/resources/default_base_resource.rb +4 -0
  29. data/lib/pact_broker/api/resources/environment.rb +1 -1
  30. data/lib/pact_broker/api/resources/environments.rb +1 -1
  31. data/lib/pact_broker/api/resources/index.rb +7 -1
  32. data/lib/pact_broker/api/resources/pact_versions_for_branch.rb +40 -0
  33. data/lib/pact_broker/api/resources/publish_contracts.rb +1 -1
  34. data/lib/pact_broker/api/resources/verification.rb +5 -2
  35. data/lib/pact_broker/api/resources/verifications.rb +5 -1
  36. data/lib/pact_broker/api/resources/webhook_execution_methods.rb +23 -17
  37. data/lib/pact_broker/api.rb +2 -0
  38. data/lib/pact_broker/app.rb +2 -0
  39. data/lib/pact_broker/application_context.rb +5 -0
  40. data/lib/pact_broker/badges/service.rb +3 -1
  41. data/lib/pact_broker/config/runtime_configuration.rb +4 -0
  42. data/lib/pact_broker/config/runtime_configuration_database_methods.rb +1 -1
  43. data/lib/pact_broker/configuration.rb +33 -29
  44. data/lib/pact_broker/db/clean.rb +1 -2
  45. data/lib/pact_broker/db/delete_overwritten_data.rb +41 -23
  46. data/lib/pact_broker/deployments/deployed_version.rb +1 -0
  47. data/lib/pact_broker/deployments/deployed_version_service.rb +1 -0
  48. data/lib/pact_broker/deployments/environment_service.rb +4 -1
  49. data/lib/pact_broker/deployments/released_version_service.rb +1 -0
  50. data/lib/pact_broker/doc/controllers/app.rb +1 -0
  51. data/lib/pact_broker/doc/views/can-i-deploy.markdown +2 -1
  52. data/lib/pact_broker/doc/views/index/publish-contracts.markdown +38 -9
  53. data/lib/pact_broker/doc/views/pacticipant/label.markdown +12 -0
  54. data/lib/pact_broker/doc/views/webhooks.markdown +17 -0
  55. data/lib/pact_broker/domain/index_item.rb +9 -0
  56. data/lib/pact_broker/domain/pacticipant.rb +4 -0
  57. data/lib/pact_broker/domain/verification.rb +28 -4
  58. data/lib/pact_broker/domain/webhook.rb +27 -15
  59. data/lib/pact_broker/domain/webhook_pacticipant.rb +6 -0
  60. data/lib/pact_broker/domain/webhook_request.rb +2 -2
  61. data/lib/pact_broker/index/service.rb +77 -26
  62. data/lib/pact_broker/locale/en.yml +6 -1
  63. data/lib/pact_broker/matrix/head_row.rb +1 -1
  64. data/lib/pact_broker/matrix/parse_can_i_deploy_query.rb +5 -3
  65. data/lib/pact_broker/matrix/quick_row.rb +0 -1
  66. data/lib/pact_broker/matrix/repository.rb +0 -1
  67. data/lib/pact_broker/matrix/row.rb +2 -2
  68. data/lib/pact_broker/pacticipants/repository.rb +1 -1
  69. data/lib/pact_broker/pacts/latest_pact_publication_id_for_consumer_version.rb +0 -1
  70. data/lib/pact_broker/pacts/metadata.rb +11 -3
  71. data/lib/pact_broker/pacts/pact_publication.rb +44 -0
  72. data/lib/pact_broker/pacts/pact_publication_clean_selector_dataset_module.rb +19 -0
  73. data/lib/pact_broker/pacts/pact_publication_dataset_module.rb +68 -1
  74. data/lib/pact_broker/pacts/pact_version.rb +24 -1
  75. data/lib/pact_broker/pacts/pacts_for_verification_repository.rb +5 -4
  76. data/lib/pact_broker/pacts/repository.rb +52 -48
  77. data/lib/pact_broker/pacts/service.rb +5 -5
  78. data/lib/pact_broker/string_refinements.rb +1 -1
  79. data/lib/pact_broker/test/http_test_data_builder.rb +40 -11
  80. data/lib/pact_broker/test/test_data_builder.rb +27 -6
  81. data/lib/pact_broker/ui/app.rb +7 -1
  82. data/lib/pact_broker/ui/controllers/dashboard.rb +80 -0
  83. data/lib/pact_broker/ui/controllers/groups.rb +23 -8
  84. data/lib/pact_broker/ui/helpers/url_helper.rb +17 -1
  85. data/lib/pact_broker/ui/view_models/index_item.rb +64 -8
  86. data/lib/pact_broker/ui/view_models/index_item_branch_head.rb +39 -0
  87. data/lib/pact_broker/ui/view_models/index_item_provider_branch_head.rb +39 -0
  88. data/lib/pact_broker/ui/view_models/matrix_branch.rb +1 -1
  89. data/lib/pact_broker/ui/view_models/matrix_tag.rb +0 -1
  90. data/lib/pact_broker/ui/views/dashboard/show.haml +202 -0
  91. data/lib/pact_broker/ui/views/groups/show.html.erb +60 -14
  92. data/lib/pact_broker/ui/views/index/_dashboard_navbar.haml +7 -0
  93. data/lib/pact_broker/ui/views/index/_navbar.haml +0 -7
  94. data/lib/pact_broker/ui/views/index/show-with-tags.haml +3 -1
  95. data/lib/pact_broker/ui/views/index/show.haml +35 -13
  96. data/lib/pact_broker/ui/views/matrix/show.haml +7 -3
  97. data/lib/pact_broker/verifications/pseudo_branch_status.rb +2 -0
  98. data/lib/pact_broker/verifications/repository.rb +5 -2
  99. data/lib/pact_broker/verifications/service.rb +8 -4
  100. data/lib/pact_broker/version.rb +1 -1
  101. data/lib/pact_broker/versions/branch_head.rb +0 -2
  102. data/lib/pact_broker/versions/branch_version.rb +1 -0
  103. data/lib/pact_broker/versions/repository.rb +0 -1
  104. data/lib/pact_broker/webhooks/event_listener.rb +7 -5
  105. data/lib/pact_broker/webhooks/execution_configuration.rb +16 -0
  106. data/lib/pact_broker/webhooks/execution_configuration_creator.rb +3 -0
  107. data/lib/pact_broker/webhooks/job.rb +1 -1
  108. data/lib/pact_broker/webhooks/pact_and_verification_parameters.rb +18 -3
  109. data/lib/pact_broker/webhooks/repository.rb +10 -4
  110. data/lib/pact_broker/webhooks/trigger_service.rb +3 -3
  111. data/lib/pact_broker/webhooks/webhook.rb +71 -8
  112. data/lib/pact_broker/webhooks/webhook_execution_result.rb +3 -7
  113. data/lib/pact_broker/webhooks/webhook_request_logger.rb +4 -12
  114. data/lib/pact_broker/webhooks/webhook_request_template.rb +6 -8
  115. data/pact_broker.gemspec +4 -0
  116. data/public/javascripts/index.js +75 -68
  117. data/public/javascripts/pact.js +14 -14
  118. data/public/stylesheets/index.css +6 -2
  119. data/public/stylesheets/pact.css +11 -0
  120. data/script/data/auto-create-things-for-tags.rb +3 -0
  121. data/script/data/branches.rb +2 -2
  122. data/script/data/contract-published-requiring-verification.rb +0 -1
  123. data/script/data/environments.rb +0 -0
  124. data/script/data/pending.rb +26 -0
  125. data/script/data/tags.rb +35 -0
  126. data/script/data/verify-pact-for-multiple-selectors.rb +30 -0
  127. data/script/data/webhook.rb +22 -0
  128. data/script/docs/generate-configuration-docs.rb +24 -3
  129. data/script/generate-erd +55 -0
  130. data/script/seed.rb +50 -89
  131. data/spec/features/create_webhook_spec.rb +55 -10
  132. data/spec/features/delete_pact_versions_for_branch_spec.rb +34 -0
  133. data/spec/features/get_pact_spec.rb +2 -3
  134. data/spec/fixtures/approvals/modifiable_resources.approved.json +4 -0
  135. data/spec/fixtures/invalid-publish-contract-body.json +38 -0
  136. data/spec/fixtures/verification.json +4 -0
  137. data/spec/integration/app_spec.rb +6 -6
  138. data/spec/integration/webhooks/contract_publication_spec.rb +68 -0
  139. data/spec/integration/webhooks/contract_requiring_verification_published_spec.rb +67 -0
  140. data/spec/integration/webhooks/pact_publication_spec.rb +51 -0
  141. data/spec/lib/pact/doc/markdown/consumer_contract_renderer_spec.rb +2 -2
  142. data/spec/lib/pact_broker/api/contracts/publish_contracts_schema_spec.rb +13 -0
  143. data/spec/lib/pact_broker/api/contracts/webhook_contract_spec.rb +50 -0
  144. data/spec/lib/pact_broker/api/decorators/matrix_decorator_spec.rb +1 -1
  145. data/spec/lib/pact_broker/api/decorators/reason_decorator_spec.rb +2 -2
  146. data/spec/lib/pact_broker/api/decorators/verification_decorator_spec.rb +15 -7
  147. data/spec/lib/pact_broker/api/decorators/verification_summary_decorator_spec.rb +6 -2
  148. data/spec/lib/pact_broker/api/decorators/webhook_decorator_spec.rb +4 -4
  149. data/spec/lib/pact_broker/api/decorators/webhook_execution_result_decorator_spec.rb +1 -1
  150. data/spec/lib/pact_broker/api/middleware/configuration_spec.rb +43 -0
  151. data/spec/lib/pact_broker/api/pact_broker_urls_spec.rb +18 -0
  152. data/spec/lib/pact_broker/api/resources/triggered_webhook_logs_spec.rb +6 -5
  153. data/spec/lib/pact_broker/api/resources/verifications_spec.rb +2 -3
  154. data/spec/lib/pact_broker/api/resources/webhook_execution_spec.rb +1 -1
  155. data/spec/lib/pact_broker/badges/service_spec.rb +22 -0
  156. data/spec/lib/pact_broker/config/runtime_configuration_documentation_spec.rb +30 -0
  157. data/spec/lib/pact_broker/deployments/environment_service_spec.rb +1 -1
  158. data/spec/lib/pact_broker/domain/webhook_request_spec.rb +2 -1
  159. data/spec/lib/pact_broker/domain/webhook_spec.rb +15 -5
  160. data/spec/lib/pact_broker/index/service_spec.rb +1 -5
  161. data/spec/lib/pact_broker/index/service_view_spec.rb +144 -0
  162. data/spec/lib/pact_broker/matrix/head_row_spec.rb +9 -5
  163. data/spec/lib/pact_broker/matrix/parse_can_i_deploy_query_spec.rb +13 -0
  164. data/spec/lib/pact_broker/pacts/metadata_spec.rb +11 -2
  165. data/spec/lib/pact_broker/pacts/{latest_tagged_pact_publications_spec.rb → pact_publication_clean_selector_dataset_module_spec.rb} +7 -9
  166. data/spec/lib/pact_broker/pacts/pact_publication_latest_verification_spec.rb +29 -0
  167. data/spec/lib/pact_broker/pacts/pact_version_spec.rb +32 -0
  168. data/spec/lib/pact_broker/pacts/repository_find_for_verification_spec.rb +4 -5
  169. data/spec/lib/pact_broker/pacts/repository_spec.rb +48 -2
  170. data/spec/lib/pact_broker/ui/view_models/index_item_spec.rb +12 -9
  171. data/spec/lib/pact_broker/verifications/pseudo_branch_status_spec.rb +9 -1
  172. data/spec/lib/pact_broker/verifications/service_spec.rb +24 -8
  173. data/spec/lib/pact_broker/webhooks/job_spec.rb +4 -4
  174. data/spec/lib/pact_broker/webhooks/render_spec.rb +3 -2
  175. data/spec/lib/pact_broker/webhooks/repository_spec.rb +158 -15
  176. data/spec/lib/pact_broker/webhooks/trigger_service_spec.rb +9 -5
  177. data/spec/lib/pact_broker/webhooks/webhook_request_logger_spec.rb +6 -12
  178. data/spec/lib/pact_broker/webhooks/webhook_request_template_spec.rb +3 -2
  179. data/spec/lib/pact_broker/webhooks/webhook_spec.rb +8 -5
  180. data/spec/support/generated_markdown.md +3 -3
  181. data/tasks/db.rake +4 -1
  182. metadata +72 -14
  183. data/lib/pact_broker/pacts/all_pact_publications.rb +0 -158
  184. data/lib/pact_broker/pacts/latest_pact_publications.rb +0 -48
  185. data/lib/pact_broker/pacts/latest_pact_publications_by_consumer_version.rb +0 -26
  186. data/lib/pact_broker/pacts/latest_tagged_pact_publications.rb +0 -45
  187. data/lib/pact_broker/verifications/latest_verification_for_pact_version.rb +0 -39
  188. data/spec/lib/pact_broker/api/resources/webhook_execution_result_spec.rb +0 -56
  189. data/spec/lib/pact_broker/verifications/latest_verification_for_pact_version_spec.rb +0 -18
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.84.0
4
+ version: 2.87.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: 2021-09-10 00:00:00.000000000 Z
13
+ date: 2021-10-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty
@@ -82,6 +82,20 @@ dependencies:
82
82
  - - "~>"
83
83
  - !ruby/object:Gem::Version
84
84
  version: 0.10.5
85
+ - !ruby/object:Gem::Dependency
86
+ name: dry-configurable
87
+ requirement: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - '='
90
+ - !ruby/object:Gem::Version
91
+ version: 0.12.1
92
+ type: :runtime
93
+ prerelease: false
94
+ version_requirements: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - '='
97
+ - !ruby/object:Gem::Version
98
+ version: 0.12.1
85
99
  - !ruby/object:Gem::Dependency
86
100
  name: sequel
87
101
  requirement: !ruby/object:Gem::Requirement
@@ -376,6 +390,20 @@ dependencies:
376
390
  - - "~>"
377
391
  - !ruby/object:Gem::Version
378
392
  version: '2.1'
393
+ - !ruby/object:Gem::Dependency
394
+ name: request_store
395
+ requirement: !ruby/object:Gem::Requirement
396
+ requirements:
397
+ - - "~>"
398
+ - !ruby/object:Gem::Version
399
+ version: '1.5'
400
+ type: :runtime
401
+ prerelease: false
402
+ version_requirements: !ruby/object:Gem::Requirement
403
+ requirements:
404
+ - - "~>"
405
+ - !ruby/object:Gem::Version
406
+ version: '1.5'
379
407
  description: A server that stores and returns pact files generated by the pact gem.
380
408
  It enables head/prod cross testing of the consumer and provider projects.
381
409
  email:
@@ -397,6 +425,7 @@ files:
397
425
  - ".github/workflows/release_gem.yml"
398
426
  - ".github/workflows/test-ruby-3.yml"
399
427
  - ".github/workflows/test.yml"
428
+ - ".github/workflows/trigger_pact_docs_update.yml"
400
429
  - ".gitignore"
401
430
  - ".optic/.gitignore"
402
431
  - ".optic/api/specification.json"
@@ -582,6 +611,10 @@ files:
582
611
  - db/migrations/20210818_add_consumer_version_selectors_to_verification.rb
583
612
  - db/migrations/20210831_add_index_to_pact_publications.rb
584
613
  - db/migrations/20210908_add_auto_created.rb
614
+ - db/migrations/20210913_add_pending_to_verifications.rb
615
+ - db/migrations/20210914_add_labels_to_webhooks.rb
616
+ - db/migrations/20210915_add_verified_by_to_verification.rb
617
+ - db/migrations/20210929_increase_event_context_column_size.rb
585
618
  - db/migrations/migration_helper.rb
586
619
  - db/test/backwards_compatibility/.rspec
587
620
  - db/test/backwards_compatibility/Appraisals
@@ -643,6 +676,7 @@ files:
643
676
  - lib/pact_broker/api/authorization/resource_access_policy.rb
644
677
  - lib/pact_broker/api/authorization/resource_access_rules.rb
645
678
  - lib/pact_broker/api/contracts/base_contract.rb
679
+ - lib/pact_broker/api/contracts/configuration.rb
646
680
  - lib/pact_broker/api/contracts/dry_validation_predicates.rb
647
681
  - lib/pact_broker/api/contracts/dry_validation_workarounds.rb
648
682
  - lib/pact_broker/api/contracts/environment_schema.rb
@@ -719,6 +753,7 @@ files:
719
753
  - lib/pact_broker/api/decorators/webhook_request_template_decorator.rb
720
754
  - lib/pact_broker/api/decorators/webhooks_decorator.rb
721
755
  - lib/pact_broker/api/middleware/basic_auth.rb
756
+ - lib/pact_broker/api/middleware/configuration.rb
722
757
  - lib/pact_broker/api/pact_broker_urls.rb
723
758
  - lib/pact_broker/api/paths.rb
724
759
  - lib/pact_broker/api/renderers/html_pact_renderer.rb
@@ -768,6 +803,7 @@ files:
768
803
  - lib/pact_broker/api/resources/pact_triggered_webhooks.rb
769
804
  - lib/pact_broker/api/resources/pact_version.rb
770
805
  - lib/pact_broker/api/resources/pact_versions.rb
806
+ - lib/pact_broker/api/resources/pact_versions_for_branch.rb
771
807
  - lib/pact_broker/api/resources/pact_webhooks.rb
772
808
  - lib/pact_broker/api/resources/pact_webhooks_status.rb
773
809
  - lib/pact_broker/api/resources/pacticipant.rb
@@ -901,6 +937,7 @@ files:
901
937
  - lib/pact_broker/doc/views/pact/tag-prod-version.markdown
902
938
  - lib/pact_broker/doc/views/pact/tag-version.markdown
903
939
  - lib/pact_broker/doc/views/pacticipant/can-i-deploy-badge.markdown
940
+ - lib/pact_broker/doc/views/pacticipant/label.markdown
904
941
  - lib/pact_broker/doc/views/pacticipant/versions.markdown
905
942
  - lib/pact_broker/doc/views/pending-provider-pacts.markdown
906
943
  - lib/pact_broker/doc/views/provider-pacts-for-verification.markdown
@@ -918,6 +955,7 @@ files:
918
955
  - lib/pact_broker/domain/verification.rb
919
956
  - lib/pact_broker/domain/version.rb
920
957
  - lib/pact_broker/domain/webhook.rb
958
+ - lib/pact_broker/domain/webhook_pacticipant.rb
921
959
  - lib/pact_broker/domain/webhook_request.rb
922
960
  - lib/pact_broker/error.rb
923
961
  - lib/pact_broker/errors.rb
@@ -964,7 +1002,6 @@ files:
964
1002
  - lib/pact_broker/pacticipants/generate_display_name.rb
965
1003
  - lib/pact_broker/pacticipants/repository.rb
966
1004
  - lib/pact_broker/pacticipants/service.rb
967
- - lib/pact_broker/pacts/all_pact_publications.rb
968
1005
  - lib/pact_broker/pacts/build_verifiable_pact_notices.rb
969
1006
  - lib/pact_broker/pacts/content.rb
970
1007
  - lib/pact_broker/pacts/create_formatted_diff.rb
@@ -974,15 +1011,13 @@ files:
974
1011
  - lib/pact_broker/pacts/generate_sha.rb
975
1012
  - lib/pact_broker/pacts/head_pact.rb
976
1013
  - lib/pact_broker/pacts/latest_pact_publication_id_for_consumer_version.rb
977
- - lib/pact_broker/pacts/latest_pact_publications.rb
978
- - lib/pact_broker/pacts/latest_pact_publications_by_consumer_version.rb
979
- - lib/pact_broker/pacts/latest_tagged_pact_publications.rb
980
1014
  - lib/pact_broker/pacts/lazy_loaders.rb
981
1015
  - lib/pact_broker/pacts/merger.rb
982
1016
  - lib/pact_broker/pacts/metadata.rb
983
1017
  - lib/pact_broker/pacts/order_hash_keys.rb
984
1018
  - lib/pact_broker/pacts/pact_params.rb
985
1019
  - lib/pact_broker/pacts/pact_publication.rb
1020
+ - lib/pact_broker/pacts/pact_publication_clean_selector_dataset_module.rb
986
1021
  - lib/pact_broker/pacts/pact_publication_dataset_module.rb
987
1022
  - lib/pact_broker/pacts/pact_publication_selector_dataset_module.rb
988
1023
  - lib/pact_broker/pacts/pact_publication_wip_dataset_module.rb
@@ -1025,6 +1060,7 @@ files:
1025
1060
  - lib/pact_broker/ui/controllers/base_controller.rb
1026
1061
  - lib/pact_broker/ui/controllers/can_i_deploy.rb
1027
1062
  - lib/pact_broker/ui/controllers/clusters.rb
1063
+ - lib/pact_broker/ui/controllers/dashboard.rb
1028
1064
  - lib/pact_broker/ui/controllers/error_test.rb
1029
1065
  - lib/pact_broker/ui/controllers/groups.rb
1030
1066
  - lib/pact_broker/ui/controllers/index.rb
@@ -1034,6 +1070,8 @@ files:
1034
1070
  - lib/pact_broker/ui/helpers/url_helper.rb
1035
1071
  - lib/pact_broker/ui/view_models/clusters.rb
1036
1072
  - lib/pact_broker/ui/view_models/index_item.rb
1073
+ - lib/pact_broker/ui/view_models/index_item_branch_head.rb
1074
+ - lib/pact_broker/ui/view_models/index_item_provider_branch_head.rb
1037
1075
  - lib/pact_broker/ui/view_models/index_items.rb
1038
1076
  - lib/pact_broker/ui/view_models/matrix_branch.rb
1039
1077
  - lib/pact_broker/ui/view_models/matrix_deployed_version.rb
@@ -1042,8 +1080,10 @@ files:
1042
1080
  - lib/pact_broker/ui/view_models/matrix_released_version.rb
1043
1081
  - lib/pact_broker/ui/view_models/matrix_tag.rb
1044
1082
  - lib/pact_broker/ui/views/clusters/show.haml
1083
+ - lib/pact_broker/ui/views/dashboard/show.haml
1045
1084
  - lib/pact_broker/ui/views/groups/show.html.erb
1046
1085
  - lib/pact_broker/ui/views/index/_css_and_js.haml
1086
+ - lib/pact_broker/ui/views/index/_dashboard_navbar.haml
1047
1087
  - lib/pact_broker/ui/views/index/_getting-started.haml
1048
1088
  - lib/pact_broker/ui/views/index/_navbar.haml
1049
1089
  - lib/pact_broker/ui/views/index/_pagination.haml
@@ -1053,7 +1093,6 @@ files:
1053
1093
  - lib/pact_broker/ui/views/matrix/show.haml
1054
1094
  - lib/pact_broker/verifications/latest_verification_for_consumer_and_provider.rb
1055
1095
  - lib/pact_broker/verifications/latest_verification_for_consumer_version_tag.rb
1056
- - lib/pact_broker/verifications/latest_verification_for_pact_version.rb
1057
1096
  - lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb
1058
1097
  - lib/pact_broker/verifications/placeholder_verification.rb
1059
1098
  - lib/pact_broker/verifications/pseudo_branch_status.rb
@@ -1212,6 +1251,10 @@ files:
1212
1251
  - script/data/environments.rb
1213
1252
  - script/data/expand-currently-deployed.rb
1214
1253
  - script/data/issue-494.rb
1254
+ - script/data/pending.rb
1255
+ - script/data/tags.rb
1256
+ - script/data/verify-pact-for-multiple-selectors.rb
1257
+ - script/data/webhook.rb
1215
1258
  - script/db-spec.sh
1216
1259
  - script/demonstrate-version-branches.rb
1217
1260
  - script/dev/rubocop-modified-files.sh
@@ -1229,6 +1272,7 @@ files:
1229
1272
  - script/foo-bar-verification.json
1230
1273
  - script/foo-bar.json
1231
1274
  - script/generate-certificates-for-webooks-certificate-spec.rb
1275
+ - script/generate-erd
1232
1276
  - script/import-pg-database.sh
1233
1277
  - script/insert-self-signed-certificate-from-url.rb
1234
1278
  - script/issues/consumer-version-selectors-docs/issue-text.txt
@@ -1277,6 +1321,7 @@ files:
1277
1321
  - spec/features/delete_integration_spec.rb
1278
1322
  - spec/features/delete_label_spec.rb
1279
1323
  - spec/features/delete_pact_spec.rb
1324
+ - spec/features/delete_pact_versions_for_branch_spec.rb
1280
1325
  - spec/features/delete_pact_versions_spec.rb
1281
1326
  - spec/features/delete_tagged_pact_versions_spec.rb
1282
1327
  - spec/features/delete_verification_spec.rb
@@ -1372,6 +1417,7 @@ files:
1372
1417
  - spec/fixtures/dashboard.json
1373
1418
  - spec/fixtures/expected.gv
1374
1419
  - spec/fixtures/foo-bar.json
1420
+ - spec/fixtures/invalid-publish-contract-body.json
1375
1421
  - spec/fixtures/renderer_pact.json
1376
1422
  - spec/fixtures/update_pacticipant.json
1377
1423
  - spec/fixtures/updated_pacticipant.json
@@ -1383,6 +1429,9 @@ files:
1383
1429
  - spec/integration/ui/index_spec.rb
1384
1430
  - spec/integration/ui/matrix_spec.rb
1385
1431
  - spec/integration/webhooks/certificate_spec.rb
1432
+ - spec/integration/webhooks/contract_publication_spec.rb
1433
+ - spec/integration/webhooks/contract_requiring_verification_published_spec.rb
1434
+ - spec/integration/webhooks/pact_publication_spec.rb
1386
1435
  - spec/lib/pact/doc/generator_spec.rb
1387
1436
  - spec/lib/pact/doc/interaction_view_model_spec.rb
1388
1437
  - spec/lib/pact/doc/markdown/consumer_contract_renderer_spec.rb
@@ -1433,6 +1482,7 @@ files:
1433
1482
  - spec/lib/pact_broker/api/decorators/webhook_request_template_decorator_spec.rb
1434
1483
  - spec/lib/pact_broker/api/decorators/webhooks_decorator_spec.rb
1435
1484
  - spec/lib/pact_broker/api/middleware/basic_auth_spec.rb
1485
+ - spec/lib/pact_broker/api/middleware/configuration_spec.rb
1436
1486
  - spec/lib/pact_broker/api/pact_broker_urls_spec.rb
1437
1487
  - spec/lib/pact_broker/api/renderers/html_pact_renderer_spec.rb
1438
1488
  - spec/lib/pact_broker/api/renderers/integrations_dot_renderer_spec.rb
@@ -1465,7 +1515,6 @@ files:
1465
1515
  - spec/lib/pact_broker/api/resources/verification_spec.rb
1466
1516
  - spec/lib/pact_broker/api/resources/verification_triggered_webhooks_spec.rb
1467
1517
  - spec/lib/pact_broker/api/resources/verifications_spec.rb
1468
- - spec/lib/pact_broker/api/resources/webhook_execution_result_spec.rb
1469
1518
  - spec/lib/pact_broker/api/resources/webhook_execution_spec.rb
1470
1519
  - spec/lib/pact_broker/api/resources/webhook_spec.rb
1471
1520
  - spec/lib/pact_broker/app_basic_auth_spec.rb
@@ -1474,6 +1523,7 @@ files:
1474
1523
  - spec/lib/pact_broker/build_http_options_spec.rb
1475
1524
  - spec/lib/pact_broker/certificates/service_spec.rb
1476
1525
  - spec/lib/pact_broker/config/load_spec.rb
1526
+ - spec/lib/pact_broker/config/runtime_configuration_documentation_spec.rb
1477
1527
  - spec/lib/pact_broker/config/runtime_configuration_logging_methods_spec.rb
1478
1528
  - spec/lib/pact_broker/config/runtime_configuration_spec.rb
1479
1529
  - spec/lib/pact_broker/config/save_spec.rb
@@ -1517,6 +1567,7 @@ files:
1517
1567
  - spec/lib/pact_broker/groups/service_spec.rb
1518
1568
  - spec/lib/pact_broker/hash_refinements_spec.rb
1519
1569
  - spec/lib/pact_broker/index/service_spec.rb
1570
+ - spec/lib/pact_broker/index/service_view_spec.rb
1520
1571
  - spec/lib/pact_broker/integrations/integration_spec.rb
1521
1572
  - spec/lib/pact_broker/integrations/service_spec.rb
1522
1573
  - spec/lib/pact_broker/labels/repository_spec.rb
@@ -1549,11 +1600,12 @@ files:
1549
1600
  - spec/lib/pact_broker/pacts/diff_spec.rb
1550
1601
  - spec/lib/pact_broker/pacts/generate_interaction_sha_spec.rb
1551
1602
  - spec/lib/pact_broker/pacts/generate_sha_spec.rb
1552
- - spec/lib/pact_broker/pacts/latest_tagged_pact_publications_spec.rb
1553
1603
  - spec/lib/pact_broker/pacts/merger_spec.rb
1554
1604
  - spec/lib/pact_broker/pacts/metadata_spec.rb
1555
1605
  - spec/lib/pact_broker/pacts/pact_params_spec.rb
1606
+ - spec/lib/pact_broker/pacts/pact_publication_clean_selector_dataset_module_spec.rb
1556
1607
  - spec/lib/pact_broker/pacts/pact_publication_dataset_module_spec.rb
1608
+ - spec/lib/pact_broker/pacts/pact_publication_latest_verification_spec.rb
1557
1609
  - spec/lib/pact_broker/pacts/pact_publication_selector_dataset_module_spec.rb
1558
1610
  - spec/lib/pact_broker/pacts/pact_publication_spec.rb
1559
1611
  - spec/lib/pact_broker/pacts/pact_version_spec.rb
@@ -1582,7 +1634,6 @@ files:
1582
1634
  - spec/lib/pact_broker/ui/view_models/index_items_spec.rb
1583
1635
  - spec/lib/pact_broker/ui/view_models/matrix_deployed_version_spec.rb
1584
1636
  - spec/lib/pact_broker/ui/view_models/matrix_line_spec.rb
1585
- - spec/lib/pact_broker/verifications/latest_verification_for_pact_version_spec.rb
1586
1637
  - spec/lib/pact_broker/verifications/pseudo_branch_status_spec.rb
1587
1638
  - spec/lib/pact_broker/verifications/repository_spec.rb
1588
1639
  - spec/lib/pact_broker/verifications/sequence_spec.rb
@@ -1735,7 +1786,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1735
1786
  - !ruby/object:Gem::Version
1736
1787
  version: '0'
1737
1788
  requirements: []
1738
- rubygems_version: 3.2.27
1789
+ rubygems_version: 3.2.28
1739
1790
  signing_key:
1740
1791
  specification_version: 4
1741
1792
  summary: See description
@@ -1752,6 +1803,7 @@ test_files:
1752
1803
  - spec/features/delete_integration_spec.rb
1753
1804
  - spec/features/delete_label_spec.rb
1754
1805
  - spec/features/delete_pact_spec.rb
1806
+ - spec/features/delete_pact_versions_for_branch_spec.rb
1755
1807
  - spec/features/delete_pact_versions_spec.rb
1756
1808
  - spec/features/delete_tagged_pact_versions_spec.rb
1757
1809
  - spec/features/delete_verification_spec.rb
@@ -1847,6 +1899,7 @@ test_files:
1847
1899
  - spec/fixtures/dashboard.json
1848
1900
  - spec/fixtures/expected.gv
1849
1901
  - spec/fixtures/foo-bar.json
1902
+ - spec/fixtures/invalid-publish-contract-body.json
1850
1903
  - spec/fixtures/renderer_pact.json
1851
1904
  - spec/fixtures/update_pacticipant.json
1852
1905
  - spec/fixtures/updated_pacticipant.json
@@ -1858,6 +1911,9 @@ test_files:
1858
1911
  - spec/integration/ui/index_spec.rb
1859
1912
  - spec/integration/ui/matrix_spec.rb
1860
1913
  - spec/integration/webhooks/certificate_spec.rb
1914
+ - spec/integration/webhooks/contract_publication_spec.rb
1915
+ - spec/integration/webhooks/contract_requiring_verification_published_spec.rb
1916
+ - spec/integration/webhooks/pact_publication_spec.rb
1861
1917
  - spec/lib/pact/doc/generator_spec.rb
1862
1918
  - spec/lib/pact/doc/interaction_view_model_spec.rb
1863
1919
  - spec/lib/pact/doc/markdown/consumer_contract_renderer_spec.rb
@@ -1908,6 +1964,7 @@ test_files:
1908
1964
  - spec/lib/pact_broker/api/decorators/webhook_request_template_decorator_spec.rb
1909
1965
  - spec/lib/pact_broker/api/decorators/webhooks_decorator_spec.rb
1910
1966
  - spec/lib/pact_broker/api/middleware/basic_auth_spec.rb
1967
+ - spec/lib/pact_broker/api/middleware/configuration_spec.rb
1911
1968
  - spec/lib/pact_broker/api/pact_broker_urls_spec.rb
1912
1969
  - spec/lib/pact_broker/api/renderers/html_pact_renderer_spec.rb
1913
1970
  - spec/lib/pact_broker/api/renderers/integrations_dot_renderer_spec.rb
@@ -1940,7 +1997,6 @@ test_files:
1940
1997
  - spec/lib/pact_broker/api/resources/verification_spec.rb
1941
1998
  - spec/lib/pact_broker/api/resources/verification_triggered_webhooks_spec.rb
1942
1999
  - spec/lib/pact_broker/api/resources/verifications_spec.rb
1943
- - spec/lib/pact_broker/api/resources/webhook_execution_result_spec.rb
1944
2000
  - spec/lib/pact_broker/api/resources/webhook_execution_spec.rb
1945
2001
  - spec/lib/pact_broker/api/resources/webhook_spec.rb
1946
2002
  - spec/lib/pact_broker/app_basic_auth_spec.rb
@@ -1949,6 +2005,7 @@ test_files:
1949
2005
  - spec/lib/pact_broker/build_http_options_spec.rb
1950
2006
  - spec/lib/pact_broker/certificates/service_spec.rb
1951
2007
  - spec/lib/pact_broker/config/load_spec.rb
2008
+ - spec/lib/pact_broker/config/runtime_configuration_documentation_spec.rb
1952
2009
  - spec/lib/pact_broker/config/runtime_configuration_logging_methods_spec.rb
1953
2010
  - spec/lib/pact_broker/config/runtime_configuration_spec.rb
1954
2011
  - spec/lib/pact_broker/config/save_spec.rb
@@ -1992,6 +2049,7 @@ test_files:
1992
2049
  - spec/lib/pact_broker/groups/service_spec.rb
1993
2050
  - spec/lib/pact_broker/hash_refinements_spec.rb
1994
2051
  - spec/lib/pact_broker/index/service_spec.rb
2052
+ - spec/lib/pact_broker/index/service_view_spec.rb
1995
2053
  - spec/lib/pact_broker/integrations/integration_spec.rb
1996
2054
  - spec/lib/pact_broker/integrations/service_spec.rb
1997
2055
  - spec/lib/pact_broker/labels/repository_spec.rb
@@ -2024,11 +2082,12 @@ test_files:
2024
2082
  - spec/lib/pact_broker/pacts/diff_spec.rb
2025
2083
  - spec/lib/pact_broker/pacts/generate_interaction_sha_spec.rb
2026
2084
  - spec/lib/pact_broker/pacts/generate_sha_spec.rb
2027
- - spec/lib/pact_broker/pacts/latest_tagged_pact_publications_spec.rb
2028
2085
  - spec/lib/pact_broker/pacts/merger_spec.rb
2029
2086
  - spec/lib/pact_broker/pacts/metadata_spec.rb
2030
2087
  - spec/lib/pact_broker/pacts/pact_params_spec.rb
2088
+ - spec/lib/pact_broker/pacts/pact_publication_clean_selector_dataset_module_spec.rb
2031
2089
  - spec/lib/pact_broker/pacts/pact_publication_dataset_module_spec.rb
2090
+ - spec/lib/pact_broker/pacts/pact_publication_latest_verification_spec.rb
2032
2091
  - spec/lib/pact_broker/pacts/pact_publication_selector_dataset_module_spec.rb
2033
2092
  - spec/lib/pact_broker/pacts/pact_publication_spec.rb
2034
2093
  - spec/lib/pact_broker/pacts/pact_version_spec.rb
@@ -2057,7 +2116,6 @@ test_files:
2057
2116
  - spec/lib/pact_broker/ui/view_models/index_items_spec.rb
2058
2117
  - spec/lib/pact_broker/ui/view_models/matrix_deployed_version_spec.rb
2059
2118
  - spec/lib/pact_broker/ui/view_models/matrix_line_spec.rb
2060
- - spec/lib/pact_broker/verifications/latest_verification_for_pact_version_spec.rb
2061
2119
  - spec/lib/pact_broker/verifications/pseudo_branch_status_spec.rb
2062
2120
  - spec/lib/pact_broker/verifications/repository_spec.rb
2063
2121
  - spec/lib/pact_broker/verifications/sequence_spec.rb
@@ -1,158 +0,0 @@
1
- require "forwardable"
2
- require "pact_broker/domain/tag"
3
- require "pact_broker/domain/pacticipant"
4
- require "pact_broker/domain/version"
5
- require "pact_broker/pacts/pact_version"
6
- require "pact_broker/repositories/helpers"
7
-
8
- module PactBroker
9
- module Pacts
10
- class AllPactPublications < Sequel::Model(:all_pact_publications)
11
-
12
- extend Forwardable
13
-
14
- def_delegators :cached_domain, :name
15
-
16
- set_primary_key :id
17
- associate(:one_to_many, :tags, :class => "PactBroker::Domain::Tag", :reciprocal => :version, :key => :version_id, :primary_key => :consumer_version_id)
18
- associate(:many_to_one, :pact_version, :key => :pact_version_id, :primary_key => :id)
19
- associate(:many_to_one, :latest_verification, :class => "PactBroker::Verifications::LatestVerificationForPactVersion", key: :pact_version_id, primary_key: :pact_version_id)
20
- associate(:many_to_one, :consumer_version, :class => "PactBroker::Domain::Version", :key => :consumer_version_id, :primary_key => :id)
21
-
22
- dataset_module do
23
- include PactBroker::Repositories::Helpers
24
-
25
- def consumer consumer_name
26
- where(name_like(:consumer_name, consumer_name))
27
- end
28
-
29
- def provider provider_name
30
- where(name_like(:provider_name, provider_name))
31
- end
32
-
33
- # must be exactly correct names
34
- def pacticipants pacticipant_1, pacticipant_2
35
- where(
36
- consumer_name: pacticipant_1,
37
- provider_name: pacticipant_2
38
- ).or(
39
- consumer_name: pacticipant_2,
40
- provider_name: pacticipant_1
41
- )
42
- end
43
-
44
- def tag tag_name
45
- filter = name_like(Sequel.qualify(:tags, :name), tag_name)
46
- join(:tags, {version_id: :consumer_version_id}).where(filter)
47
- end
48
-
49
- def untagged
50
- left_outer_join(:tags, {version_id: :consumer_version_id})
51
- .where(Sequel.qualify(:tags, :name) => nil)
52
- end
53
-
54
- def consumer_version_number number
55
- where(name_like(:consumer_version_number, number))
56
- end
57
-
58
- def maybe_consumer_version_number number
59
- if number
60
- where(name_like(:consumer_version_number, number))
61
- else
62
- self
63
- end
64
- end
65
-
66
- def revision_number number
67
- where(revision_number: number)
68
- end
69
-
70
- def pact_version_sha sha
71
- where(pact_version_sha: sha)
72
- end
73
-
74
- def consumer_version_order_before order
75
- where(Sequel.lit("consumer_version_order < ?", order))
76
- end
77
-
78
- def consumer_version_order_after order
79
- where(Sequel.lit("consumer_version_order > ?", order))
80
- end
81
-
82
- def latest
83
- reverse_order(:consumer_version_order).limit(1)
84
- end
85
-
86
- def earliest
87
- order(:consumer_version_order).limit(1)
88
- end
89
- end
90
-
91
- def to_domain
92
- domain = to_domain_without_tags
93
- domain.consumer_version.tags = tags.sort
94
- domain
95
- end
96
-
97
- def to_domain_without_tags
98
- consumer = Domain::Pacticipant.new(name: consumer_name)
99
- consumer.id = consumer_id
100
- provider = Domain::Pacticipant.new(name: provider_name)
101
- provider.id = provider_id
102
- consumer_version_struct = OpenStruct.new(
103
- id: consumer_version_id,
104
- number: consumer_version_number,
105
- order: consumer_version_order,
106
- pacticipant: consumer,
107
- tags: nil
108
- )
109
- Domain::Pact.new(
110
- id: id,
111
- consumer: consumer,
112
- consumer_version: consumer_version_struct,
113
- provider: provider,
114
- consumer_version_number: consumer_version_number,
115
- revision_number: revision_number,
116
- pact_version_sha: pact_version_sha,
117
- created_at: created_at,
118
- head_tag_names: head_tag_names,
119
- latest_verification: pact_version.latest_verification,
120
- db_model: self
121
- )
122
- end
123
-
124
- def head_tag_names
125
- @head_tag_names ||= PactBroker::Domain::Tag.head_tags_for_pact_publication(self).collect(&:name)
126
- end
127
-
128
- def to_domain_with_content
129
- to_domain.tap do | pact |
130
- pact.json_content = pact_version.content
131
- end
132
- end
133
-
134
- private
135
-
136
- def cached_domain
137
- @cached_domain ||= to_domain
138
- end
139
-
140
- end
141
-
142
- end
143
- end
144
-
145
- # Table: all_pact_publications
146
- # Columns:
147
- # id | integer |
148
- # consumer_id | integer |
149
- # consumer_name | text |
150
- # consumer_version_id | integer |
151
- # consumer_version_number | text |
152
- # consumer_version_order | integer |
153
- # provider_id | integer |
154
- # provider_name | text |
155
- # revision_number | integer |
156
- # pact_version_id | integer |
157
- # pact_version_sha | text |
158
- # created_at | timestamp without time zone |
@@ -1,48 +0,0 @@
1
- require "pact_broker/pacts/latest_pact_publications_by_consumer_version"
2
- require "pact_broker/pacts/head_pact"
3
-
4
- module PactBroker
5
- module Pacts
6
-
7
- # latest pact for each consumer/provider pair
8
- class LatestPactPublications < LatestPactPublicationsByConsumerVersion
9
- set_dataset(:latest_pact_publications)
10
-
11
- # def dataset_module
12
- # def where_age_less_than(days)
13
- # start_date = Date.today - days
14
- # where{ latest_pact_publications[:created_at] >= start_date }
15
- # end
16
-
17
- # def for_selector(selector)
18
- # query = self
19
- # query = query.where(consumer_name: selector.pacticipant_name) if selector.pacticipant_name
20
- # query = query.where(tag_name: selector.tag) if selector.tag && selector.tag.is_a?(String)
21
- # query = query.where_age_less_than(selector.max_age) if selector.max_age
22
- # query
23
- # end
24
- # end
25
-
26
- # This pact may well be the latest for certain tags, but in this query
27
- # we don't know what they are
28
- def to_domain
29
- HeadPact.new(super, consumer_version_number, nil)
30
- end
31
- end
32
- end
33
- end
34
-
35
- # Table: latest_pact_publications
36
- # Columns:
37
- # id | integer |
38
- # consumer_id | integer |
39
- # consumer_name | text |
40
- # consumer_version_id | integer |
41
- # consumer_version_number | text |
42
- # consumer_version_order | integer |
43
- # provider_id | integer |
44
- # provider_name | text |
45
- # revision_number | integer |
46
- # pact_version_id | integer |
47
- # pact_version_sha | text |
48
- # created_at | timestamp without time zone |
@@ -1,26 +0,0 @@
1
- require "pact_broker/pacts/all_pact_publications"
2
-
3
- module PactBroker
4
- module Pacts
5
-
6
- class LatestPactPublicationsByConsumerVersion < AllPactPublications
7
- set_dataset(:latest_pact_publications_by_consumer_versions)
8
- end
9
-
10
- end
11
- end
12
-
13
- # Table: latest_pact_publications_by_consumer_versions
14
- # Columns:
15
- # id | integer |
16
- # consumer_id | integer |
17
- # consumer_name | text |
18
- # consumer_version_id | integer |
19
- # consumer_version_number | text |
20
- # consumer_version_order | integer |
21
- # provider_id | integer |
22
- # provider_name | text |
23
- # revision_number | integer |
24
- # pact_version_id | integer |
25
- # pact_version_sha | text |
26
- # created_at | timestamp without time zone |
@@ -1,45 +0,0 @@
1
- require "pact_broker/pacts/latest_pact_publications_by_consumer_version"
2
- require "pact_broker/pacts/head_pact"
3
-
4
- module PactBroker
5
- module Pacts
6
- class LatestTaggedPactPublications < LatestPactPublicationsByConsumerVersion
7
- set_dataset(:latest_tagged_pact_publications)
8
-
9
- dataset_module do
10
- def where_age_less_than(days)
11
- start_date = Date.today - days
12
- where{ latest_tagged_pact_publications[:created_at] >= start_date }
13
- end
14
-
15
- def for_selector(selector)
16
- query = self
17
- query = query.where(consumer_name: selector.pacticipant_name) if selector.pacticipant_name
18
- query = query.where(tag_name: selector.tag) if selector.tag && selector.tag.is_a?(String)
19
- query = query.where_age_less_than(selector.max_age) if selector.max_age
20
- query
21
- end
22
- end
23
-
24
- def to_domain
25
- HeadPact.new(super, consumer_version_number, tag_name)
26
- end
27
- end
28
- end
29
- end
30
-
31
- # Table: latest_tagged_pact_publications
32
- # Columns:
33
- # id | integer |
34
- # consumer_id | integer |
35
- # consumer_name | text |
36
- # consumer_version_id | integer |
37
- # consumer_version_number | text |
38
- # consumer_version_order | integer |
39
- # provider_id | integer |
40
- # provider_name | text |
41
- # revision_number | integer |
42
- # pact_version_id | integer |
43
- # pact_version_sha | text |
44
- # created_at | timestamp without time zone |
45
- # tag_name | text |
@@ -1,39 +0,0 @@
1
- require "pact_broker/domain/verification"
2
-
3
- # TODO delete this when AllPactPublications is deleted
4
-
5
- module PactBroker
6
- module Verifications
7
- class LatestVerificationForPactVersion < PactBroker::Domain::Verification
8
- set_dataset(:latest_verifications_for_pact_versions)
9
-
10
- # this view doesn't have a consumer_id
11
- def consumer
12
- PactBroker::Domain::Pacticipant.find(id: PactBroker::Pacts::AllPactPublications
13
- .where(pact_version_id: pact_version_id)
14
- .limit(1).select(:consumer_id))
15
- end
16
-
17
- # this view doesn't have a provider_id
18
- def provider
19
- PactBroker::Domain::Pacticipant.find(id: PactBroker::Pacts::AllPactPublications
20
- .where(pact_version_id: pact_version_id)
21
- .limit(1).select(:provider_id))
22
- end
23
- end
24
- end
25
- end
26
-
27
- # Table: latest_verifications_for_pact_versions
28
- # Columns:
29
- # id | integer |
30
- # number | integer |
31
- # success | boolean |
32
- # build_url | text |
33
- # pact_version_id | integer |
34
- # execution_date | timestamp without time zone |
35
- # created_at | timestamp without time zone |
36
- # provider_version_id | integer |
37
- # provider_version_number | text |
38
- # provider_version_order | integer |
39
- # test_results | text |