pact_broker 2.76.0 → 2.78.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +12 -0
  3. data/.github/workflows/test-ruby-3.yml +19 -0
  4. data/.github/workflows/test.yml +19 -4
  5. data/.gitignore +3 -1
  6. data/CHANGELOG.md +47 -0
  7. data/DEVELOPER_SETUP.md +62 -3
  8. data/Dockerfile +1 -0
  9. data/ISSUES.md +12 -4
  10. data/README.md +1 -1
  11. data/config.ru +1 -0
  12. data/db/ddl_statements/head_pact_tags.rb +24 -1
  13. data/db/ddl_statements/latest_tagged_pact_consumer_version_orders.rb +11 -0
  14. data/db/ddl_statements/latest_tagged_pact_publications.rb +6 -0
  15. data/db/ddl_statements/latest_verification_ids_for_consumer_version_tags.rb +13 -0
  16. data/db/migrations/20210117_add_branch_to_version.rb +9 -0
  17. data/db/migrations/20210202_add_created_at_to_head_pact_tags.rb +14 -0
  18. data/db/migrations/20210205_add_pacticipant_id_to_tag.rb +17 -0
  19. data/db/migrations/20210206_add_index_to_tags_and_versions.rb +27 -0
  20. data/db/migrations/20210207_optimise_latest_verification_ids_for_consumer_version_tags.rb +13 -0
  21. data/db/migrations/20210208_optimise_latest_tagged_pact_cv_orders.rb +13 -0
  22. data/db/migrations/20210210_create_environments_table.rb +16 -0
  23. data/docker-compose-issue-repro-with-pact-broker-docker-image.yml +16 -5
  24. data/lib/pact_broker/api.rb +7 -2
  25. data/lib/pact_broker/api/contracts/dry_validation_predicates.rb +8 -0
  26. data/lib/pact_broker/api/contracts/environment_schema.rb +49 -0
  27. data/lib/pact_broker/api/decorators/base_decorator.rb +11 -0
  28. data/lib/pact_broker/api/decorators/dashboard_decorator.rb +5 -1
  29. data/lib/pact_broker/api/decorators/environment_decorator.rb +30 -0
  30. data/lib/pact_broker/api/decorators/environments_decorator.rb +21 -0
  31. data/lib/pact_broker/api/decorators/matrix_decorator.rb +8 -2
  32. data/lib/pact_broker/api/decorators/reason_decorator.rb +2 -2
  33. data/lib/pact_broker/api/decorators/verifiable_pacts_query_decorator.rb +2 -0
  34. data/lib/pact_broker/api/decorators/version_decorator.rb +15 -2
  35. data/lib/pact_broker/api/pact_broker_urls.rb +8 -0
  36. data/lib/pact_broker/api/resources/default_base_resource.rb +13 -0
  37. data/lib/pact_broker/api/resources/environment.rb +76 -0
  38. data/lib/pact_broker/api/resources/environments.rb +75 -0
  39. data/lib/pact_broker/api/resources/index.rb +20 -0
  40. data/lib/pact_broker/api/resources/latest_version.rb +27 -0
  41. data/lib/pact_broker/api/resources/provider_pacts_for_verification.rb +1 -0
  42. data/lib/pact_broker/api/resources/verifications.rb +5 -2
  43. data/lib/pact_broker/api/resources/version.rb +15 -9
  44. data/lib/pact_broker/api/resources/webhook_execution.rb +1 -1
  45. data/lib/pact_broker/app.rb +0 -2
  46. data/lib/pact_broker/certificates/certificate.rb +1 -1
  47. data/lib/pact_broker/config/setting.rb +1 -1
  48. data/lib/pact_broker/config/space_delimited_integer_list.rb +25 -0
  49. data/lib/pact_broker/configuration.rb +18 -1
  50. data/lib/pact_broker/db/data_migrations/helpers.rb +4 -0
  51. data/lib/pact_broker/db/data_migrations/set_extra_columns_for_tags.rb +29 -0
  52. data/lib/pact_broker/db/migrate_data.rb +1 -0
  53. data/lib/pact_broker/db/seed_example_data.rb +13 -13
  54. data/lib/pact_broker/deployments/environment.rb +15 -0
  55. data/lib/pact_broker/deployments/environment_service.rb +39 -0
  56. data/lib/pact_broker/doc/views/index/environment.markdown +37 -0
  57. data/lib/pact_broker/doc/views/index/environments.markdown +53 -0
  58. data/lib/pact_broker/doc/views/index/latest-pact-versions.markdown +1 -1
  59. data/lib/pact_broker/doc/views/index/pacticipant-version-tag.markdown +1 -0
  60. data/lib/pact_broker/doc/views/index/pacticipant-version.markdown +13 -0
  61. data/lib/pact_broker/domain/index_item.rb +18 -4
  62. data/lib/pact_broker/domain/pacticipant.rb +9 -5
  63. data/lib/pact_broker/domain/tag.rb +131 -71
  64. data/lib/pact_broker/domain/verification.rb +3 -2
  65. data/lib/pact_broker/domain/version.rb +58 -23
  66. data/lib/pact_broker/domain/webhook.rb +12 -9
  67. data/lib/pact_broker/hash_refinements.rb +4 -0
  68. data/lib/pact_broker/index/service.rb +55 -49
  69. data/lib/pact_broker/locale/en.yml +3 -1
  70. data/lib/pact_broker/matrix/quick_row.rb +8 -0
  71. data/lib/pact_broker/metrics/service.rb +1 -1
  72. data/lib/pact_broker/pacts/eager_loaders.rb +52 -0
  73. data/lib/pact_broker/pacts/latest_pact_publication_id_for_consumer_version.rb +18 -13
  74. data/lib/pact_broker/pacts/lazy_loaders.rb +14 -0
  75. data/lib/pact_broker/pacts/pact_publication.rb +38 -84
  76. data/lib/pact_broker/pacts/pact_publication_dataset_module.rb +297 -0
  77. data/lib/pact_broker/pacts/pact_version.rb +1 -2
  78. data/lib/pact_broker/pacts/pacts_for_verification_repository.rb +286 -0
  79. data/lib/pact_broker/pacts/repository.rb +5 -231
  80. data/lib/pact_broker/pacts/selected_pact.rb +4 -0
  81. data/lib/pact_broker/pacts/selector.rb +56 -1
  82. data/lib/pact_broker/pacts/selectors.rb +16 -0
  83. data/lib/pact_broker/pacts/service.rb +6 -8
  84. data/lib/pact_broker/pacts/squash_pacts_for_verification.rb +1 -4
  85. data/lib/pact_broker/pacts/verifiable_pact.rb +45 -2
  86. data/lib/pact_broker/pacts/verifiable_pact_messages.rb +56 -16
  87. data/lib/pact_broker/repositories/helpers.rb +4 -0
  88. data/lib/pact_broker/services.rb +9 -0
  89. data/lib/pact_broker/tags/eager_loaders.rb +47 -0
  90. data/lib/pact_broker/tags/repository.rb +3 -1
  91. data/lib/pact_broker/tags/service.rb +0 -3
  92. data/lib/pact_broker/tags/tag_with_latest_flag.rb +1 -0
  93. data/lib/pact_broker/test/http_test_data_builder.rb +92 -26
  94. data/lib/pact_broker/test/test_data_builder.rb +50 -3
  95. data/lib/pact_broker/ui/app.rb +6 -0
  96. data/lib/pact_broker/ui/controllers/base_controller.rb +5 -1
  97. data/lib/pact_broker/ui/controllers/pacts.rb +18 -0
  98. data/lib/pact_broker/ui/view_models/index_item.rb +9 -0
  99. data/lib/pact_broker/ui/view_models/matrix_line.rb +36 -0
  100. data/lib/pact_broker/ui/views/index/show-with-tags.haml +8 -0
  101. data/lib/pact_broker/ui/views/matrix/show.haml +10 -0
  102. data/lib/pact_broker/verifications/latest_verification_id_for_pact_version_and_provider_version.rb +7 -5
  103. data/lib/pact_broker/verifications/service.rb +2 -1
  104. data/lib/pact_broker/version.rb +1 -1
  105. data/lib/pact_broker/versions/eager_loaders.rb +71 -0
  106. data/lib/pact_broker/versions/lazy_loaders.rb +13 -0
  107. data/lib/pact_broker/versions/repository.rb +22 -2
  108. data/lib/pact_broker/versions/service.rb +5 -1
  109. data/lib/pact_broker/webhooks/execution.rb +3 -2
  110. data/lib/pact_broker/webhooks/latest_triggered_webhook.rb +2 -0
  111. data/lib/pact_broker/webhooks/pact_and_verification_parameters.rb +10 -3
  112. data/lib/pact_broker/webhooks/service.rb +8 -7
  113. data/lib/pact_broker/webhooks/trigger_service.rb +56 -23
  114. data/lib/pact_broker/webhooks/triggered_webhook.rb +14 -5
  115. data/lib/pact_broker/webhooks/webhook.rb +1 -1
  116. data/lib/pact_broker/webhooks/webhook_event.rb +1 -1
  117. data/lib/pact_broker/webhooks/webhook_execution_result.rb +6 -1
  118. data/lib/pact_broker/webhooks/webhook_request_logger.rb +7 -1
  119. data/lib/sequel/plugins/upsert.rb +18 -4
  120. data/public/stylesheets/index.css +22 -1
  121. data/public/stylesheets/matrix.css +0 -21
  122. data/regression/can_i_deploy_spec.rb +5 -4
  123. data/regression/index_spec.rb +26 -0
  124. data/regression/regression_helper.rb +29 -3
  125. data/regression/script/clear.sh +3 -0
  126. data/regression/script/run.sh +3 -0
  127. data/script/demonstrate-version-branches.rb +33 -0
  128. data/script/pry.rb +2 -2
  129. data/script/reproduce-issue-starting-up.rb +13 -23
  130. data/script/reproduce-issue.rb +2 -1
  131. data/script/trigger-release.sh +1 -1
  132. data/script/webhook-server.ru +5 -5
  133. data/spec/features/create_environment_spec.rb +47 -0
  134. data/spec/features/create_tag_spec.rb +32 -0
  135. data/spec/features/create_version_spec.rb +70 -0
  136. data/spec/features/delete_environment_spec.rb +16 -0
  137. data/spec/features/end_deployment_spec.rb +29 -0
  138. data/spec/features/get_environment_spec.rb +19 -0
  139. data/spec/features/get_environments_spec.rb +20 -0
  140. data/spec/features/record_deployment_spec.rb +28 -0
  141. data/spec/features/update_environment_spec.rb +44 -0
  142. data/spec/fixtures/approvals/modifiable_resources.approved.json +6 -0
  143. data/spec/fixtures/dashboard.json +4 -2
  144. data/spec/integration/ui/index_spec.rb +4 -4
  145. data/spec/lib/pact_broker/api/contracts/environment_schema_spec.rb +83 -0
  146. data/spec/lib/pact_broker/api/decorators/dashboard_decorator_spec.rb +4 -2
  147. data/spec/lib/pact_broker/api/decorators/matrix_decorator_spec.rb +11 -6
  148. data/spec/lib/pact_broker/api/decorators/reason_decorator_spec.rb +6 -6
  149. data/spec/lib/pact_broker/api/decorators/verifiable_pacts_query_decorator_spec.rb +6 -0
  150. data/spec/lib/pact_broker/api/decorators/version_decorator_spec.rb +18 -0
  151. data/spec/lib/pact_broker/api/resources/default_base_resource_approval_spec.rb +1 -1
  152. data/spec/lib/pact_broker/api/resources/provider_pacts_for_verification_spec.rb +4 -0
  153. data/spec/lib/pact_broker/api/resources/verifications_spec.rb +2 -5
  154. data/spec/lib/pact_broker/api/resources/webhook_execution_result_spec.rb +56 -0
  155. data/spec/lib/pact_broker/api/resources/webhook_execution_spec.rb +3 -2
  156. data/spec/lib/pact_broker/config/space_delimited_integer_list_spec.rb +47 -0
  157. data/spec/lib/pact_broker/configuration_spec.rb +12 -0
  158. data/spec/lib/pact_broker/domain/tag_spec.rb +101 -27
  159. data/spec/lib/pact_broker/domain/version_spec.rb +103 -15
  160. data/spec/lib/pact_broker/domain/webhook_spec.rb +7 -7
  161. data/spec/lib/pact_broker/index/service_spec.rb +89 -15
  162. data/spec/lib/pact_broker/pacts/pact_publication_dataset_module_spec.rb +400 -0
  163. data/spec/lib/pact_broker/pacts/pact_publication_spec.rb +434 -14
  164. data/spec/lib/pact_broker/pacts/repository_find_for_verification_fallback_spec.rb +1 -1
  165. data/spec/lib/pact_broker/pacts/repository_find_for_verification_spec.rb +1 -1
  166. data/spec/lib/pact_broker/pacts/repository_find_wip_pact_versions_for_provider_branch_spec.rb +224 -0
  167. data/spec/lib/pact_broker/pacts/repository_find_wip_pact_versions_for_provider_spec.rb +46 -7
  168. data/spec/lib/pact_broker/pacts/selector_spec.rb +3 -2
  169. data/spec/lib/pact_broker/pacts/service_find_for_verification_spec.rb +2 -3
  170. data/spec/lib/pact_broker/pacts/service_spec.rb +9 -7
  171. data/spec/lib/pact_broker/pacts/verifiable_pact_messages_spec.rb +57 -10
  172. data/spec/lib/pact_broker/tags/repository_spec.rb +2 -0
  173. data/spec/lib/pact_broker/verifications/service_spec.rb +4 -1
  174. data/spec/lib/pact_broker/versions/repository_spec.rb +54 -0
  175. data/spec/lib/pact_broker/webhooks/render_spec.rb +6 -5
  176. data/spec/lib/pact_broker/webhooks/service_spec.rb +13 -9
  177. data/spec/lib/pact_broker/webhooks/trigger_service_spec.rb +60 -18
  178. data/spec/lib/pact_broker/webhooks/webhook_request_logger_spec.rb +8 -0
  179. data/spec/lib/sequel/plugins/upsert_spec.rb +31 -3
  180. data/spec/service_consumers/hal_relation_proxy_app.rb +3 -1
  181. data/spec/service_consumers/provider_states_for_pact_broker_client.rb +16 -0
  182. data/spec/spec_helper.rb +17 -5
  183. data/spec/support/approvals.rb +24 -0
  184. data/spec/support/shared_examples_for_responses.rb +11 -0
  185. data/tasks/db.rake +1 -0
  186. data/tasks/rspec.rake +1 -1
  187. metadata +67 -7
  188. data/docker-compose-issue-repro.yml +0 -22
  189. data/lib/rack/pact_broker/hal_browser_redirect.rb +0 -42
  190. data/spec/lib/rack/pact_broker/hal_browser_redirect_spec.rb +0 -27
@@ -255,4 +255,20 @@ Pact.provider_states_for "Pact Broker Client" do
255
255
  .create_consumer("Foo")
256
256
  end
257
257
  end
258
+
259
+ provider_state "the pb:pacticipant-version relation exists in the index resource" do
260
+ no_op
261
+ end
262
+
263
+ provider_state "version 26f353580936ad3b9baddb17b00e84f33c69e7cb of pacticipant Foo does not exist" do
264
+ no_op
265
+ end
266
+
267
+ provider_state "version 26f353580936ad3b9baddb17b00e84f33c69e7cb of pacticipant Foo does exist" do
268
+ set_up do
269
+ TestDataBuilder.new
270
+ .create_consumer("Foo")
271
+ .create_consumer_version("26f353580936ad3b9baddb17b00e84f33c69e7cb")
272
+ end
273
+ end
258
274
  end
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,7 @@
1
+ # Can't stop the gression tests loading the spec_helper becaues of the .rspec file
2
+ # At least we can avoid executing it.
3
+ return if ENV["REGRESSION"] == "true"
4
+
1
5
  $: << File.expand_path("../../", __FILE__)
2
6
 
3
7
  RACK_ENV = ENV['RACK_ENV'] = 'test'
@@ -12,7 +16,6 @@ require 'rspec/pact/matchers'
12
16
  require 'sucker_punch/testing/inline'
13
17
  require 'webmock/rspec'
14
18
  require 'pact_broker/policies'
15
- require 'approvals/rspec'
16
19
 
17
20
  Dir.glob("./spec/support/**/*.rb") { |file| require file }
18
21
 
@@ -20,10 +23,6 @@ WebMock.disable_net_connect!(allow_localhost: true)
20
23
 
21
24
  I18n.config.enforce_available_locales = false
22
25
 
23
- Approvals.configure do |c|
24
- c.approvals_path = 'spec/fixtures/approvals/'
25
- end
26
-
27
26
  RSpec.configure do | config |
28
27
  config.before :each do
29
28
  PactBroker.reset_configuration
@@ -53,6 +52,19 @@ RSpec.configure do | config |
53
52
  config.example_status_persistence_file_path = "./spec/examples.txt"
54
53
  config.filter_run_excluding skip: true
55
54
 
55
+ config.after(:each) do | example, something |
56
+ if example.exception.is_a?(Approvals::ApprovalError)
57
+ require "pact/support"
58
+ parts = example.exception.message.split('"')
59
+ received_file = parts[1]
60
+ approved_file = parts[3]
61
+ received_hash = JSON.parse(File.read(received_file))
62
+ approved_hash = JSON.parse(File.read(approved_file))
63
+ diff = Pact::Matchers.diff(approved_hash, received_hash)
64
+ puts Pact::Matchers::UnixDiffFormatter.call(diff)
65
+ end
66
+ end
67
+
56
68
  def app
57
69
  PactBroker::API
58
70
  end
@@ -0,0 +1,24 @@
1
+ require 'approvals/rspec'
2
+ require 'pact/support'
3
+
4
+ Approvals.configure do |c|
5
+ c.approvals_path = 'spec/fixtures/approvals/'
6
+ end
7
+
8
+ def print_diff(exception)
9
+ parts = exception.message.split('"')
10
+ received_file = parts[1]
11
+ approved_file = parts[3]
12
+ received_hash = JSON.parse(File.read(received_file))
13
+ approved_hash = JSON.parse(File.read(approved_file))
14
+ diff = Pact::Matchers.diff(approved_hash, received_hash)
15
+ puts Pact::Matchers::UnixDiffFormatter.call(diff)
16
+ end
17
+
18
+ RSpec.configure do | config |
19
+ config.after(:each) do | example |
20
+ if example.exception.is_a?(Approvals::ApprovalError)
21
+ print_diff(example.exception)
22
+ end
23
+ end
24
+ end
@@ -22,6 +22,17 @@ RSpec::Matchers.define :be_a_hal_json_success_response do
22
22
  end
23
23
  end
24
24
 
25
+ RSpec::Matchers.define :be_a_hal_json_created_response do
26
+ match do | actual |
27
+ expect(actual.status).to be 201
28
+ expect(actual.headers['Content-Type']).to eq 'application/hal+json;charset=utf-8'
29
+ end
30
+
31
+ failure_message do
32
+ "Expected creation successful json response, got #{actual.status} #{actual.headers['Content-Type']} with body #{actual.body}"
33
+ end
34
+ end
35
+
25
36
  RSpec::Matchers.define :be_a_json_response do
26
37
  match do | actual |
27
38
  expect(actual.headers['Content-Type']).to eq 'application/hal+json;charset=utf-8'
data/tasks/db.rake CHANGED
@@ -98,6 +98,7 @@ namespace :db do
98
98
  desc 'Annotate the Sequel domain classes with schema information'
99
99
  task :annotate do
100
100
  begin
101
+ raise "Need to set INSTALL_PG=true" unless ENV["INSTALL_PG"] == "true"
101
102
  ENV['RACK_ENV'] = 'test'
102
103
  ENV['DATABASE_ADAPTER'] = 'docker_postgres'
103
104
  load 'tasks/docker_database.rb'
data/tasks/rspec.rake CHANGED
@@ -11,7 +11,7 @@ end
11
11
 
12
12
  RSpec::Core::RakeTask.new('regression') do |task|
13
13
  task.pattern = 'regression/**{,/*/**}/*_spec.rb'
14
- task.rspec_opts = '--require regression/regression_helper.rb'
14
+ task.rspec_opts = '--require ./regression/regression_helper.rb'
15
15
  end
16
16
 
17
17
  RSpec::Core::RakeTask.new('spec:slow') do |task|
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.76.0
4
+ version: 2.78.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: 2021-01-21 00:00:00.000000000 Z
13
+ date: 2021-02-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty
@@ -373,6 +373,7 @@ files:
373
373
  - ".github/ISSUE_TEMPLATE.md"
374
374
  - ".github/PULL_REQUEST_TEMPLATE.md"
375
375
  - ".github/workflows/release_gem.yml"
376
+ - ".github/workflows/test-ruby-3.yml"
376
377
  - ".github/workflows/test.yml"
377
378
  - ".gitignore"
378
379
  - ".optic/.gitignore"
@@ -407,6 +408,7 @@ files:
407
408
  - db/ddl_statements/latest_pact_consumer_version_orders.rb
408
409
  - db/ddl_statements/latest_pact_publications_by_consumer_versions.rb
409
410
  - db/ddl_statements/latest_tagged_pact_consumer_version_orders.rb
411
+ - db/ddl_statements/latest_tagged_pact_publications.rb
410
412
  - db/ddl_statements/latest_triggered_webhooks.rb
411
413
  - db/ddl_statements/latest_verification_ids_for_consumer_and_provider.rb
412
414
  - db/ddl_statements/latest_verification_ids_for_consumer_version_tags.rb
@@ -532,6 +534,13 @@ files:
532
534
  - db/migrations/20201026_update_latest_verification_ids_for_consumer_and_provider.rb
533
535
  - db/migrations/20210115_add_webhook_foreign_key_indexes.rb
534
536
  - db/migrations/20210116_add_context_to_triggered_webhook.rb
537
+ - db/migrations/20210117_add_branch_to_version.rb
538
+ - db/migrations/20210202_add_created_at_to_head_pact_tags.rb
539
+ - db/migrations/20210205_add_pacticipant_id_to_tag.rb
540
+ - db/migrations/20210206_add_index_to_tags_and_versions.rb
541
+ - db/migrations/20210207_optimise_latest_verification_ids_for_consumer_version_tags.rb
542
+ - db/migrations/20210208_optimise_latest_tagged_pact_cv_orders.rb
543
+ - db/migrations/20210210_create_environments_table.rb
535
544
  - db/migrations/migration_helper.rb
536
545
  - db/test/backwards_compatibility/.rspec
537
546
  - db/test/backwards_compatibility/Appraisals
@@ -566,7 +575,6 @@ files:
566
575
  - docker-compose-ci-mysql.yml
567
576
  - docker-compose-dev-postgres.yml
568
577
  - docker-compose-issue-repro-with-pact-broker-docker-image.yml
569
- - docker-compose-issue-repro.yml
570
578
  - docker-compose-test.yml
571
579
  - docs/images/Pactflow logo - black small.png
572
580
  - example/Gemfile
@@ -595,6 +603,7 @@ files:
595
603
  - lib/pact_broker/api/contracts/base_contract.rb
596
604
  - lib/pact_broker/api/contracts/dry_validation_predicates.rb
597
605
  - lib/pact_broker/api/contracts/dry_validation_workarounds.rb
606
+ - lib/pact_broker/api/contracts/environment_schema.rb
598
607
  - lib/pact_broker/api/contracts/pacticipant_name_contract.rb
599
608
  - lib/pact_broker/api/contracts/pacticipant_name_validation.rb
600
609
  - lib/pact_broker/api/contracts/put_pact_params_contract.rb
@@ -614,6 +623,8 @@ files:
614
623
  - lib/pact_broker/api/decorators/embedded_label_decorator.rb
615
624
  - lib/pact_broker/api/decorators/embedded_tag_decorator.rb
616
625
  - lib/pact_broker/api/decorators/embedded_version_decorator.rb
626
+ - lib/pact_broker/api/decorators/environment_decorator.rb
627
+ - lib/pact_broker/api/decorators/environments_decorator.rb
617
628
  - lib/pact_broker/api/decorators/extended_pact_decorator.rb
618
629
  - lib/pact_broker/api/decorators/extended_verification_decorator.rb
619
630
  - lib/pact_broker/api/decorators/format_date_time.rb
@@ -668,6 +679,8 @@ files:
668
679
  - lib/pact_broker/api/resources/clean.rb
669
680
  - lib/pact_broker/api/resources/dashboard.rb
670
681
  - lib/pact_broker/api/resources/default_base_resource.rb
682
+ - lib/pact_broker/api/resources/environment.rb
683
+ - lib/pact_broker/api/resources/environments.rb
671
684
  - lib/pact_broker/api/resources/error_handler.rb
672
685
  - lib/pact_broker/api/resources/error_response_body_generator.rb
673
686
  - lib/pact_broker/api/resources/error_test.rb
@@ -682,6 +695,7 @@ files:
682
695
  - lib/pact_broker/api/resources/latest_verification_for_latest_pact.rb
683
696
  - lib/pact_broker/api/resources/latest_verification_for_pact.rb
684
697
  - lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb
698
+ - lib/pact_broker/api/resources/latest_version.rb
685
699
  - lib/pact_broker/api/resources/matrix.rb
686
700
  - lib/pact_broker/api/resources/matrix_badge.rb
687
701
  - lib/pact_broker/api/resources/matrix_for_consumer_and_provider.rb
@@ -726,6 +740,7 @@ files:
726
740
  - lib/pact_broker/config/repository.rb
727
741
  - lib/pact_broker/config/save.rb
728
742
  - lib/pact_broker/config/setting.rb
743
+ - lib/pact_broker/config/space_delimited_integer_list.rb
729
744
  - lib/pact_broker/config/space_delimited_string_list.rb
730
745
  - lib/pact_broker/configuration.rb
731
746
  - lib/pact_broker/constants.rb
@@ -740,6 +755,7 @@ files:
740
755
  - lib/pact_broker/db/data_migrations/set_consumer_ids_for_pact_publications.rb
741
756
  - lib/pact_broker/db/data_migrations/set_created_at_for_latest_pact_publications.rb
742
757
  - lib/pact_broker/db/data_migrations/set_created_at_for_latest_verifications.rb
758
+ - lib/pact_broker/db/data_migrations/set_extra_columns_for_tags.rb
743
759
  - lib/pact_broker/db/data_migrations/set_latest_version_sequence_value.rb
744
760
  - lib/pact_broker/db/data_migrations/set_pacticipant_ids_for_verifications.rb
745
761
  - lib/pact_broker/db/data_migrations/set_webhooks_enabled.rb
@@ -755,6 +771,8 @@ files:
755
771
  - lib/pact_broker/db/table_dependency_calculator.rb
756
772
  - lib/pact_broker/db/validate_encoding.rb
757
773
  - lib/pact_broker/db/version.rb
774
+ - lib/pact_broker/deployments/environment.rb
775
+ - lib/pact_broker/deployments/environment_service.rb
758
776
  - lib/pact_broker/diagnostic/app.rb
759
777
  - lib/pact_broker/diagnostic/resources/base_resource.rb
760
778
  - lib/pact_broker/diagnostic/resources/dependencies.rb
@@ -763,12 +781,15 @@ files:
763
781
  - lib/pact_broker/doc/views/can-i-deploy.markdown
764
782
  - lib/pact_broker/doc/views/consumer-version.markdown
765
783
  - lib/pact_broker/doc/views/consumer.markdown
784
+ - lib/pact_broker/doc/views/index/environment.markdown
785
+ - lib/pact_broker/doc/views/index/environments.markdown
766
786
  - lib/pact_broker/doc/views/index/latest-pact-versions.markdown
767
787
  - lib/pact_broker/doc/views/index/latest-provider-pacts-with-tag.markdown
768
788
  - lib/pact_broker/doc/views/index/latest-provider-pacts.markdown
769
789
  - lib/pact_broker/doc/views/index/latest-tagged-version.markdown
770
790
  - lib/pact_broker/doc/views/index/latest-version.markdown
771
791
  - lib/pact_broker/doc/views/index/pacticipant-version-tag.markdown
792
+ - lib/pact_broker/doc/views/index/pacticipant-version.markdown
772
793
  - lib/pact_broker/doc/views/index/pacticipants.markdown
773
794
  - lib/pact_broker/doc/views/index/provider-pacts-with-tag.markdown
774
795
  - lib/pact_broker/doc/views/index/provider-pacts.markdown
@@ -855,6 +876,7 @@ files:
855
876
  - lib/pact_broker/pacts/content.rb
856
877
  - lib/pact_broker/pacts/create_formatted_diff.rb
857
878
  - lib/pact_broker/pacts/diff.rb
879
+ - lib/pact_broker/pacts/eager_loaders.rb
858
880
  - lib/pact_broker/pacts/generate_interaction_sha.rb
859
881
  - lib/pact_broker/pacts/generate_sha.rb
860
882
  - lib/pact_broker/pacts/head_pact.rb
@@ -862,12 +884,15 @@ files:
862
884
  - lib/pact_broker/pacts/latest_pact_publications.rb
863
885
  - lib/pact_broker/pacts/latest_pact_publications_by_consumer_version.rb
864
886
  - lib/pact_broker/pacts/latest_tagged_pact_publications.rb
887
+ - lib/pact_broker/pacts/lazy_loaders.rb
865
888
  - lib/pact_broker/pacts/merger.rb
866
889
  - lib/pact_broker/pacts/metadata.rb
867
890
  - lib/pact_broker/pacts/order_hash_keys.rb
868
891
  - lib/pact_broker/pacts/pact_params.rb
869
892
  - lib/pact_broker/pacts/pact_publication.rb
893
+ - lib/pact_broker/pacts/pact_publication_dataset_module.rb
870
894
  - lib/pact_broker/pacts/pact_version.rb
895
+ - lib/pact_broker/pacts/pacts_for_verification_repository.rb
871
896
  - lib/pact_broker/pacts/parse.rb
872
897
  - lib/pact_broker/pacts/placeholder_pact.rb
873
898
  - lib/pact_broker/pacts/repository.rb
@@ -886,6 +911,7 @@ files:
886
911
  - lib/pact_broker/repositories/helpers.rb
887
912
  - lib/pact_broker/services.rb
888
913
  - lib/pact_broker/string_refinements.rb
914
+ - lib/pact_broker/tags/eager_loaders.rb
889
915
  - lib/pact_broker/tags/head_pact_tags.rb
890
916
  - lib/pact_broker/tags/repository.rb
891
917
  - lib/pact_broker/tags/service.rb
@@ -907,6 +933,7 @@ files:
907
933
  - lib/pact_broker/ui/controllers/groups.rb
908
934
  - lib/pact_broker/ui/controllers/index.rb
909
935
  - lib/pact_broker/ui/controllers/matrix.rb
936
+ - lib/pact_broker/ui/controllers/pacts.rb
910
937
  - lib/pact_broker/ui/helpers/matrix_helper.rb
911
938
  - lib/pact_broker/ui/helpers/url_helper.rb
912
939
  - lib/pact_broker/ui/view_models/clusters.rb
@@ -937,7 +964,9 @@ files:
937
964
  - lib/pact_broker/verifications/summary_for_consumer_version.rb
938
965
  - lib/pact_broker/version.rb
939
966
  - lib/pact_broker/versions/abbreviate_number.rb
967
+ - lib/pact_broker/versions/eager_loaders.rb
940
968
  - lib/pact_broker/versions/latest_version.rb
969
+ - lib/pact_broker/versions/lazy_loaders.rb
941
970
  - lib/pact_broker/versions/parse_semantic_version.rb
942
971
  - lib/pact_broker/versions/repository.rb
943
972
  - lib/pact_broker/versions/sequence.rb
@@ -971,7 +1000,6 @@ files:
971
1000
  - lib/rack/pact_broker/convert_404_to_hal.rb
972
1001
  - lib/rack/pact_broker/convert_file_extension_to_accept_header.rb
973
1002
  - lib/rack/pact_broker/database_transaction.rb
974
- - lib/rack/pact_broker/hal_browser_redirect.rb
975
1003
  - lib/rack/pact_broker/invalid_uri_protection.rb
976
1004
  - lib/rack/pact_broker/no_auth.rb
977
1005
  - lib/rack/pact_broker/request_target.rb
@@ -1056,9 +1084,13 @@ files:
1056
1084
  - public/stylesheets/pact.css
1057
1085
  - regression/.gitignore
1058
1086
  - regression/can_i_deploy_spec.rb
1087
+ - regression/index_spec.rb
1059
1088
  - regression/regression_helper.rb
1060
1089
  - regression/script/approval-all.sh
1090
+ - regression/script/clear.sh
1091
+ - regression/script/run.sh
1061
1092
  - script/db-spec.sh
1093
+ - script/demonstrate-version-branches.rb
1062
1094
  - script/docker-container/test.sh
1063
1095
  - script/docker/db-execute-sql-file.sh
1064
1096
  - script/docker/db-psql.sh
@@ -1107,8 +1139,12 @@ files:
1107
1139
  - script/webhook-server.ru
1108
1140
  - spec/features/base_equality_only_on_content_that_affects_verification_results_spec.rb
1109
1141
  - spec/features/can_i_deploy_spec.rb
1142
+ - spec/features/create_environment_spec.rb
1110
1143
  - spec/features/create_pacticipant_spec.rb
1144
+ - spec/features/create_tag_spec.rb
1145
+ - spec/features/create_version_spec.rb
1111
1146
  - spec/features/create_webhook_spec.rb
1147
+ - spec/features/delete_environment_spec.rb
1112
1148
  - spec/features/delete_integration_spec.rb
1113
1149
  - spec/features/delete_label_spec.rb
1114
1150
  - spec/features/delete_pact_spec.rb
@@ -1118,11 +1154,14 @@ files:
1118
1154
  - spec/features/delete_version_spec.rb
1119
1155
  - spec/features/delete_webhook_spec.rb
1120
1156
  - spec/features/edit_webhook_spec.rb
1157
+ - spec/features/end_deployment_spec.rb
1121
1158
  - spec/features/execute_unsaved_webhook_spec.rb
1122
1159
  - spec/features/execute_webhook_spec.rb
1123
1160
  - spec/features/get_can_i_deploy_badge_spec.rb
1124
1161
  - spec/features/get_dashboard_spec.rb
1125
1162
  - spec/features/get_diff_spec.rb
1163
+ - spec/features/get_environment_spec.rb
1164
+ - spec/features/get_environments_spec.rb
1126
1165
  - spec/features/get_integrations_dot_file_spec.rb
1127
1166
  - spec/features/get_integrations_spec.rb
1128
1167
  - spec/features/get_label_spec.rb
@@ -1155,7 +1194,9 @@ files:
1155
1194
  - spec/features/publish_not_a_pact_spec.rb
1156
1195
  - spec/features/publish_pact_spec.rb
1157
1196
  - spec/features/publish_verification_spec.rb
1197
+ - spec/features/record_deployment_spec.rb
1158
1198
  - spec/features/tag_version_spec.rb
1199
+ - spec/features/update_environment_spec.rb
1159
1200
  - spec/features/update_matrix_spec.rb
1160
1201
  - spec/features/update_pacticipant_spec.rb
1161
1202
  - spec/features/update_webhook_spec.rb
@@ -1192,6 +1233,7 @@ files:
1192
1233
  - spec/lib/pact/doc/interaction_view_model_spec.rb
1193
1234
  - spec/lib/pact/doc/markdown/consumer_contract_renderer_spec.rb
1194
1235
  - spec/lib/pact/doc/markdown/index_renderer_spec.rb
1236
+ - spec/lib/pact_broker/api/contracts/environment_schema_spec.rb
1195
1237
  - spec/lib/pact_broker/api/contracts/put_pact_params_contract_spec.rb
1196
1238
  - spec/lib/pact_broker/api/contracts/verifiable_pacts_json_query_schema_spec.rb
1197
1239
  - spec/lib/pact_broker/api/contracts/verifiable_pacts_query_schema_spec.rb
@@ -1262,6 +1304,7 @@ files:
1262
1304
  - spec/lib/pact_broker/api/resources/verification_spec.rb
1263
1305
  - spec/lib/pact_broker/api/resources/verification_triggered_webhooks_spec.rb
1264
1306
  - spec/lib/pact_broker/api/resources/verifications_spec.rb
1307
+ - spec/lib/pact_broker/api/resources/webhook_execution_result_spec.rb
1265
1308
  - spec/lib/pact_broker/api/resources/webhook_execution_spec.rb
1266
1309
  - spec/lib/pact_broker/api/resources/webhook_spec.rb
1267
1310
  - spec/lib/pact_broker/api/resources/webhooks_spec.rb
@@ -1272,6 +1315,7 @@ files:
1272
1315
  - spec/lib/pact_broker/config/load_spec.rb
1273
1316
  - spec/lib/pact_broker/config/save_and_load_spec.rb
1274
1317
  - spec/lib/pact_broker/config/save_spec.rb
1318
+ - spec/lib/pact_broker/config/space_delimited_integer_list_spec.rb
1275
1319
  - spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
1276
1320
  - spec/lib/pact_broker/configuration_spec.rb
1277
1321
  - spec/lib/pact_broker/db/clean_incremental_spec.rb
@@ -1334,10 +1378,12 @@ files:
1334
1378
  - spec/lib/pact_broker/pacts/merger_spec.rb
1335
1379
  - spec/lib/pact_broker/pacts/metadata_spec.rb
1336
1380
  - spec/lib/pact_broker/pacts/pact_params_spec.rb
1381
+ - spec/lib/pact_broker/pacts/pact_publication_dataset_module_spec.rb
1337
1382
  - spec/lib/pact_broker/pacts/pact_publication_spec.rb
1338
1383
  - spec/lib/pact_broker/pacts/pact_version_spec.rb
1339
1384
  - spec/lib/pact_broker/pacts/repository_find_for_verification_fallback_spec.rb
1340
1385
  - spec/lib/pact_broker/pacts/repository_find_for_verification_spec.rb
1386
+ - spec/lib/pact_broker/pacts/repository_find_wip_pact_versions_for_provider_branch_spec.rb
1341
1387
  - spec/lib/pact_broker/pacts/repository_find_wip_pact_versions_for_provider_spec.rb
1342
1388
  - spec/lib/pact_broker/pacts/repository_spec.rb
1343
1389
  - spec/lib/pact_broker/pacts/selected_pact_spec.rb
@@ -1383,7 +1429,6 @@ files:
1383
1429
  - spec/lib/rack/hal_browser/redirect_spec.rb
1384
1430
  - spec/lib/rack/pact_broker/add_pact_broker_version_header_spec.rb
1385
1431
  - spec/lib/rack/pact_broker/database_transaction_spec.rb
1386
- - spec/lib/rack/pact_broker/hal_browser_redirect_spec.rb
1387
1432
  - spec/lib/rack/pact_broker/invalid_uri_protection_spec.rb
1388
1433
  - spec/lib/rack/pact_broker/request_target_spec.rb
1389
1434
  - spec/lib/rack/pact_broker/use_when_spec.rb
@@ -1406,6 +1451,7 @@ files:
1406
1451
  - spec/service_consumers/provider_states_for_pact_broker_client.rb
1407
1452
  - spec/service_consumers/provider_states_for_pact_ruby.rb
1408
1453
  - spec/spec_helper.rb
1454
+ - spec/support/approvals.rb
1409
1455
  - spec/support/database.rb
1410
1456
  - spec/support/database_cleaner.rb
1411
1457
  - spec/support/fixture_helpers.rb
@@ -1503,15 +1549,19 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1503
1549
  - !ruby/object:Gem::Version
1504
1550
  version: '0'
1505
1551
  requirements: []
1506
- rubygems_version: 3.2.6
1552
+ rubygems_version: 3.2.11
1507
1553
  signing_key:
1508
1554
  specification_version: 4
1509
1555
  summary: See description
1510
1556
  test_files:
1511
1557
  - spec/features/base_equality_only_on_content_that_affects_verification_results_spec.rb
1512
1558
  - spec/features/can_i_deploy_spec.rb
1559
+ - spec/features/create_environment_spec.rb
1513
1560
  - spec/features/create_pacticipant_spec.rb
1561
+ - spec/features/create_tag_spec.rb
1562
+ - spec/features/create_version_spec.rb
1514
1563
  - spec/features/create_webhook_spec.rb
1564
+ - spec/features/delete_environment_spec.rb
1515
1565
  - spec/features/delete_integration_spec.rb
1516
1566
  - spec/features/delete_label_spec.rb
1517
1567
  - spec/features/delete_pact_spec.rb
@@ -1521,11 +1571,14 @@ test_files:
1521
1571
  - spec/features/delete_version_spec.rb
1522
1572
  - spec/features/delete_webhook_spec.rb
1523
1573
  - spec/features/edit_webhook_spec.rb
1574
+ - spec/features/end_deployment_spec.rb
1524
1575
  - spec/features/execute_unsaved_webhook_spec.rb
1525
1576
  - spec/features/execute_webhook_spec.rb
1526
1577
  - spec/features/get_can_i_deploy_badge_spec.rb
1527
1578
  - spec/features/get_dashboard_spec.rb
1528
1579
  - spec/features/get_diff_spec.rb
1580
+ - spec/features/get_environment_spec.rb
1581
+ - spec/features/get_environments_spec.rb
1529
1582
  - spec/features/get_integrations_dot_file_spec.rb
1530
1583
  - spec/features/get_integrations_spec.rb
1531
1584
  - spec/features/get_label_spec.rb
@@ -1558,7 +1611,9 @@ test_files:
1558
1611
  - spec/features/publish_not_a_pact_spec.rb
1559
1612
  - spec/features/publish_pact_spec.rb
1560
1613
  - spec/features/publish_verification_spec.rb
1614
+ - spec/features/record_deployment_spec.rb
1561
1615
  - spec/features/tag_version_spec.rb
1616
+ - spec/features/update_environment_spec.rb
1562
1617
  - spec/features/update_matrix_spec.rb
1563
1618
  - spec/features/update_pacticipant_spec.rb
1564
1619
  - spec/features/update_webhook_spec.rb
@@ -1595,6 +1650,7 @@ test_files:
1595
1650
  - spec/lib/pact/doc/interaction_view_model_spec.rb
1596
1651
  - spec/lib/pact/doc/markdown/consumer_contract_renderer_spec.rb
1597
1652
  - spec/lib/pact/doc/markdown/index_renderer_spec.rb
1653
+ - spec/lib/pact_broker/api/contracts/environment_schema_spec.rb
1598
1654
  - spec/lib/pact_broker/api/contracts/put_pact_params_contract_spec.rb
1599
1655
  - spec/lib/pact_broker/api/contracts/verifiable_pacts_json_query_schema_spec.rb
1600
1656
  - spec/lib/pact_broker/api/contracts/verifiable_pacts_query_schema_spec.rb
@@ -1665,6 +1721,7 @@ test_files:
1665
1721
  - spec/lib/pact_broker/api/resources/verification_spec.rb
1666
1722
  - spec/lib/pact_broker/api/resources/verification_triggered_webhooks_spec.rb
1667
1723
  - spec/lib/pact_broker/api/resources/verifications_spec.rb
1724
+ - spec/lib/pact_broker/api/resources/webhook_execution_result_spec.rb
1668
1725
  - spec/lib/pact_broker/api/resources/webhook_execution_spec.rb
1669
1726
  - spec/lib/pact_broker/api/resources/webhook_spec.rb
1670
1727
  - spec/lib/pact_broker/api/resources/webhooks_spec.rb
@@ -1675,6 +1732,7 @@ test_files:
1675
1732
  - spec/lib/pact_broker/config/load_spec.rb
1676
1733
  - spec/lib/pact_broker/config/save_and_load_spec.rb
1677
1734
  - spec/lib/pact_broker/config/save_spec.rb
1735
+ - spec/lib/pact_broker/config/space_delimited_integer_list_spec.rb
1678
1736
  - spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
1679
1737
  - spec/lib/pact_broker/configuration_spec.rb
1680
1738
  - spec/lib/pact_broker/db/clean_incremental_spec.rb
@@ -1737,10 +1795,12 @@ test_files:
1737
1795
  - spec/lib/pact_broker/pacts/merger_spec.rb
1738
1796
  - spec/lib/pact_broker/pacts/metadata_spec.rb
1739
1797
  - spec/lib/pact_broker/pacts/pact_params_spec.rb
1798
+ - spec/lib/pact_broker/pacts/pact_publication_dataset_module_spec.rb
1740
1799
  - spec/lib/pact_broker/pacts/pact_publication_spec.rb
1741
1800
  - spec/lib/pact_broker/pacts/pact_version_spec.rb
1742
1801
  - spec/lib/pact_broker/pacts/repository_find_for_verification_fallback_spec.rb
1743
1802
  - spec/lib/pact_broker/pacts/repository_find_for_verification_spec.rb
1803
+ - spec/lib/pact_broker/pacts/repository_find_wip_pact_versions_for_provider_branch_spec.rb
1744
1804
  - spec/lib/pact_broker/pacts/repository_find_wip_pact_versions_for_provider_spec.rb
1745
1805
  - spec/lib/pact_broker/pacts/repository_spec.rb
1746
1806
  - spec/lib/pact_broker/pacts/selected_pact_spec.rb
@@ -1786,7 +1846,6 @@ test_files:
1786
1846
  - spec/lib/rack/hal_browser/redirect_spec.rb
1787
1847
  - spec/lib/rack/pact_broker/add_pact_broker_version_header_spec.rb
1788
1848
  - spec/lib/rack/pact_broker/database_transaction_spec.rb
1789
- - spec/lib/rack/pact_broker/hal_browser_redirect_spec.rb
1790
1849
  - spec/lib/rack/pact_broker/invalid_uri_protection_spec.rb
1791
1850
  - spec/lib/rack/pact_broker/request_target_spec.rb
1792
1851
  - spec/lib/rack/pact_broker/use_when_spec.rb
@@ -1809,6 +1868,7 @@ test_files:
1809
1868
  - spec/service_consumers/provider_states_for_pact_broker_client.rb
1810
1869
  - spec/service_consumers/provider_states_for_pact_ruby.rb
1811
1870
  - spec/spec_helper.rb
1871
+ - spec/support/approvals.rb
1812
1872
  - spec/support/database.rb
1813
1873
  - spec/support/database_cleaner.rb
1814
1874
  - spec/support/fixture_helpers.rb