pact_broker 2.115.0 → 2.117.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +41 -0
  3. data/Gemfile +4 -3
  4. data/lib/pact/doc/interaction_view_model.rb +25 -5
  5. data/lib/pact/doc/markdown/interaction_async.erb +10 -0
  6. data/lib/pact/doc/markdown/interaction_renderer.rb +5 -1
  7. data/lib/pact_broker/api/contracts/dry_validation_errors_formatter.rb +3 -0
  8. data/lib/pact_broker/api/decorators/integration_decorator.rb +7 -0
  9. data/lib/pact_broker/api/decorators/pacticipant_decorator.rb +11 -0
  10. data/lib/pact_broker/api/decorators/version_decorator.rb +16 -0
  11. data/lib/pact_broker/api/pact_broker_urls.rb +4 -0
  12. data/lib/pact_broker/api/renderers/html_pact_renderer.rb +55 -1
  13. data/lib/pact_broker/api/resources/branch_versions.rb +5 -1
  14. data/lib/pact_broker/api/resources/index.rb +48 -0
  15. data/lib/pact_broker/api/resources/latest_provider_pacts_for_branch.rb +26 -0
  16. data/lib/pact_broker/api/resources/pact_versions_for_branch.rb +15 -1
  17. data/lib/pact_broker/api/resources/pacticipant.rb +6 -1
  18. data/lib/pact_broker/api/resources/provider_pacts_for_consumer_branch.rb +47 -0
  19. data/lib/pact_broker/api/resources/provider_states.rb +9 -3
  20. data/lib/pact_broker/api/resources/tag_versions.rb +58 -0
  21. data/lib/pact_broker/api/resources/version.rb +5 -1
  22. data/lib/pact_broker/api/resources/versions.rb +5 -1
  23. data/lib/pact_broker/api.rb +11 -0
  24. data/lib/pact_broker/deployments/deployed_version_service.rb +21 -0
  25. data/lib/pact_broker/doc/views/index/branch-pact-versions.markdown +7 -0
  26. data/lib/pact_broker/doc/views/index/latest-branch-pact-versions.markdown +7 -0
  27. data/lib/pact_broker/doc/views/index/latest-main-branch-pact-versions.markdown +7 -0
  28. data/lib/pact_broker/doc/views/index/latest-provider-pacts-with-branch.markdown +7 -0
  29. data/lib/pact_broker/doc/views/index/latest-provider-pacts-with-main-branch.markdown +7 -0
  30. data/lib/pact_broker/doc/views/index/latest-provider-pacts-with-tag.markdown +3 -1
  31. data/lib/pact_broker/doc/views/index/main-branch-pact-versions.markdown +7 -0
  32. data/lib/pact_broker/doc/views/index/provider-pacts-with-branch.markdown +7 -0
  33. data/lib/pact_broker/doc/views/index/provider-pacts-with-main-branch.markdown +7 -0
  34. data/lib/pact_broker/doc/views/index/provider-pacts-with-tag.markdown +2 -0
  35. data/lib/pact_broker/doc/views/integrations.markdown +8 -2
  36. data/lib/pact_broker/doc/views/pact/provider-states.markdown +10 -3
  37. data/lib/pact_broker/integrations/integration.rb +3 -3
  38. data/lib/pact_broker/integrations/repository.rb +1 -0
  39. data/lib/pact_broker/json.rb +4 -1
  40. data/lib/pact_broker/pacts/pact_publication_selector_dataset_module.rb +8 -0
  41. data/lib/pact_broker/pacts/provider_state_service.rb +10 -2
  42. data/lib/pact_broker/pacts/repository.rb +30 -0
  43. data/lib/pact_broker/pacts/service.rb +20 -0
  44. data/lib/pact_broker/tags/repository.rb +11 -0
  45. data/lib/pact_broker/tags/service.rb +4 -0
  46. data/lib/pact_broker/test/test_data_builder.rb +3 -2
  47. data/lib/pact_broker/version.rb +1 -1
  48. data/lib/pact_broker/versions/repository.rb +9 -0
  49. data/lib/pact_broker/versions/service.rb +5 -0
  50. data/pact_broker.gemspec +8 -2
  51. metadata +74 -12
@@ -33,6 +33,9 @@ module PactBroker
33
33
  add ["pacts", "provider", :provider_name, "consumer", :consumer_name, "versions"], Api::Resources::PactVersions, {resource_name: "pact_publications"}
34
34
  add ["pacts", "provider", :provider_name, "consumer", :consumer_name, "versions", :consumer_version_number], Api::Resources::Pact, {resource_name: "pact_publication", deprecated: true} # Not the standard URL, but keep for backwards compatibility
35
35
  add ["pacts", "provider", :provider_name, "consumer", :consumer_name, "tag", :tag], Api::Resources::TaggedPactVersions, {resource_name: "tagged_pact_publications"}
36
+ add ["pacts", "provider", :provider_name, "consumer", :consumer_name, "branch"], Api::Resources::PactVersionsForBranch, {resource_name: "pact_publications_for_main_branch"}
37
+ add ["pacts", "provider", :provider_name, "consumer", :consumer_name, "branch", "latest"], Api::Resources::PactVersionsForBranch, {resource_name: "latest_pact_publications_for_main_branch"}
38
+ add ["pacts", "provider", :provider_name, "consumer", :consumer_name, "branch", :branch_name, "latest"], Api::Resources::PactVersionsForBranch, {resource_name: "latest_pact_publications_for_branch"}
36
39
  add ["pacts", "provider", :provider_name, "consumer", :consumer_name, "branch", :branch_name], Api::Resources::PactVersionsForBranch, {resource_name: "pact_publications_for_branch"}
37
40
 
38
41
  # Pacts
@@ -43,10 +46,16 @@ module PactBroker
43
46
  add ["pacts", "provider", :provider_name, "consumer", :consumer_name, "version", :consumer_version_number, "diff", "previous-distinct"], Api::Resources::PactContentDiff, {resource_name: "previous_distinct_pact_version_diff"}
44
47
  add ["pacts", "provider", :provider_name, "consumer", :consumer_name, "version", :consumer_version_number, "diff", "version", :comparison_consumer_version], Api::Resources::PactContentDiff, {resource_name: "pact_version_diff_by_consumer_version"}
45
48
  add ["pacts", "provider", :provider_name, "consumer", :consumer_name, "pact-version", :pact_version_sha, "diff", "pact-version", :comparison_pact_version_sha], Api::Resources::PactContentDiff, {resource_name: "pact_version_diff_by_pact_version_sha"}
49
+ add ["pacts", "provider", :provider_name, "branch", "latest"], Api::Resources::LatestProviderPactsForBranch, {resource_name: "latest_main_branch_provider_pact_publications"}
50
+ add ["pacts", "provider", :provider_name, "branch", :branch_name, "latest"], Api::Resources::LatestProviderPactsForBranch, {resource_name: "latest_branch_provider_pact_publications"}
51
+ add ["pacts", "provider", :provider_name, "branch", :branch_name], Api::Resources::ProviderPactsForConsumerBranch, {resource_name: "branch_provider_pact_publications"}
52
+ add ["pacts", "provider", :provider_name, "branch"], Api::Resources::ProviderPactsForConsumerBranch, {resource_name: "main_branch_provider_pact_publications"}
46
53
 
47
54
  # Provider states
48
55
 
49
56
  add ["pacts", "provider", :provider_name, "provider-states"], Api::Resources::ProviderStates, { resource_name: "provider_states" }
57
+ add ["pacts", "provider", :provider_name, "provider-states", "branch", :branch_name], Api::Resources::ProviderStates, { resource_name: "provider_states_for_branch" }
58
+ add ["pacts", "provider", :provider_name, "provider-states", "environment", :environment_uuid], Api::Resources::ProviderStates, { resource_name: "provider_states_for_environment" }
50
59
 
51
60
 
52
61
  # Verifications
@@ -152,6 +161,8 @@ module PactBroker
152
161
  add ["integrations", "provider", :provider_name, "consumer", :consumer_name], Api::Resources::Integration, {resource_name: "integration"}
153
162
  add ["metrics"], Api::Resources::Metrics, {resource_name: "metrics"}
154
163
  add [], Api::Resources::Index, {resource_name: "index"}
164
+
165
+ add ["pacticipants", :pacticipant_name, "tags", :tag_name, "versions"], Api::Resources::TagVersions, {resource_name: "pacticipant_tag_versions"}
155
166
  end
156
167
  end
157
168
  end
@@ -44,6 +44,20 @@ module PactBroker
44
44
  .all
45
45
  end
46
46
 
47
+ def self.find_deployed_versions_for_version(version)
48
+ scope_for(DeployedVersion)
49
+ .where(version_id: version.id)
50
+ .eager(:environment)
51
+ .all
52
+ end
53
+
54
+ def self.find_deployed_versions_for_versions(versions_array)
55
+ scope_for(DeployedVersion)
56
+ .where(version_id: versions_array.map(&:id))
57
+ .eager(:environment)
58
+ .to_hash_groups(:version_id)
59
+ end
60
+
47
61
  # Policy applied at resource level to Version
48
62
  def self.find_currently_deployed_version_for_version_and_environment_and_target(version, environment, target)
49
63
  DeployedVersion
@@ -52,6 +66,13 @@ module PactBroker
52
66
  .single_record
53
67
  end
54
68
 
69
+ def self.find_all_deployed_versions_for_pacticipant(pacticipant)
70
+ scope_for(DeployedVersion)
71
+ .where(pacticipant_id: pacticipant.id)
72
+ .eager(:environment)
73
+ .all
74
+ end
75
+
55
76
  def self.find_currently_deployed_versions_for_environment(environment, pacticipant_name: nil, target: :unspecified)
56
77
  query = scope_for(DeployedVersion)
57
78
  .currently_deployed
@@ -0,0 +1,7 @@
1
+ # Branch pact versions
2
+
3
+ Allowed methods: `GET`
4
+
5
+ Path: `/pacts/provider/{provider}/consumer/{consumer}/branch/{branch}`
6
+
7
+ Lists all the pact versions with the specified consumer, provider and consumer version branch.
@@ -0,0 +1,7 @@
1
+ # Latest Branch pact versions
2
+
3
+ Allowed methods: `GET`
4
+
5
+ Path: `/pacts/provider/{provider}/consumer/{consumer}/branch/{branch}/latest`
6
+
7
+ Returns the latest pact version with the specified consumer, provider and consumer version branch.
@@ -0,0 +1,7 @@
1
+ # Latest main branch pact versions
2
+
3
+ Allowed methods: `GET`
4
+
5
+ Path: `/pacts/provider/{provider}/consumer/{consumer}/branch/latest`
6
+
7
+ Lists all latest pact version with the specified consumer, provider and the consumers main branch.
@@ -0,0 +1,7 @@
1
+ # Latest pacts for provider with the specified consumer branch
2
+
3
+ Allowed methods: `GET`
4
+
5
+ Path: `/pacts/provider/{provider}/branch/{branch}/latest`
6
+
7
+ Given a provider name and a consumer version branch name, this resource returns the latest pact for each consumer that has the specified branch.
@@ -0,0 +1,7 @@
1
+ # Latest pacts for provider with the consumer main branch
2
+
3
+ Allowed methods: `GET`
4
+
5
+ Path: `/pacts/provider/{provider}/branch/latest`
6
+
7
+ Given a provider name, this resource returns the latest pact for each consumers specified main branch.
@@ -1,5 +1,7 @@
1
- # Latest pacts for provider with the specified tag
1
+ # Latest pacts for provider with the specified consumer version tag
2
2
 
3
3
  Allowed methods: `GET`
4
4
 
5
+ Path: `/pacts/provider/{provider}/latest/{tag}`
6
+
5
7
  Given a provider name and a consumer version tag name, this resource returns the latest pact for each consumer that has the specified tag.
@@ -0,0 +1,7 @@
1
+ # Main Branch pact versions
2
+
3
+ Allowed methods: `GET`
4
+
5
+ Path: `/pacts/provider/{provider}/consumer/{consumer}/branch`
6
+
7
+ Lists all the pact versions with the specified consumer, provider and the consumers main branch.
@@ -0,0 +1,7 @@
1
+ # Provider pacts with consumer branch
2
+
3
+ Allowed methods: `GET`
4
+
5
+ Path: `/pacts/provider/{provider}/branch/{branch}`
6
+
7
+ Given a pacticipant name and a consumer branch, this resource returns all the pact versions for all consumers of this provider with the specified consumer branch. For most use cases, the `latest-provider-pacts-with-branch` relation will better serve consumer needs by only returning the latest pact version for specified consumer branches.
@@ -0,0 +1,7 @@
1
+ # All pacts for provider with the consumer main branch
2
+
3
+ Allowed methods: `GET`
4
+
5
+ Path: `/pacts/provider/{provider}/branch`
6
+
7
+ Given a provider name, this resource returns the latest pact for each consumers specified main branch.
@@ -2,4 +2,6 @@
2
2
 
3
3
  Allowed methods: `GET`
4
4
 
5
+ Path: `/pacts/provider/{provider}/tag/{tag}`
6
+
5
7
  Given a pacticipant name and a consumer version tag, this resource returns all the pact versions for all consumers of this provider with the specified tag. The most common use of this resource is to find all the `production` pact versions for the mobile consumers of an API, so that backwards compatibility can be maintained.
@@ -1,11 +1,17 @@
1
1
  # Integrations
2
2
 
3
- Allowed methods: `GET`, `DELETE`
4
-
5
3
  Path: `/integrations`
6
4
 
5
+ Allowed methods: `GET`, `DELETE`
6
+
7
7
  Content types: `text/vnd.graphviz`, `application/hal+json`
8
8
 
9
9
  A list of all the integrations (consumer/provider pairs) stored in the Pact Broker.
10
10
 
11
11
  Sending a `DELETE` request to this endpoint will remove all data irretrievably from the Pact Broker.
12
+
13
+ Path: `/integrations/provider/{providerName}/consumer/{consumerName}`
14
+
15
+ Allowed methods: `DELETE`
16
+
17
+ Sending a `DELETE` request to this endpoint will remove all data irretrievably from the Pact Broker for the specified integration.
@@ -2,12 +2,20 @@
2
2
 
3
3
  Allowed methods: `GET`
4
4
 
5
- Path: `/pacts/provider/{provider}/provider-states`
6
-
7
5
  This resource returns a aggregated de-duplicated list of all provider states for a given provider.
8
6
 
7
+ Path: `/pacts/provider/{provider}/provider-states`
8
+
9
9
  Provider states are collected from the latest pact on the main branch for any dependant consumers.
10
10
 
11
+ Path: `/pacts/provider/{provider}/provider-states/branch/{branch_name}`
12
+
13
+ Provider states are collected from the latest pacts on the specified branch for any dependant consumers.
14
+
15
+ Path: `/pacts/provider/{provider}/provider-states/environment/{environment_name}`
16
+
17
+ Provider states are collected from the latest pacts in the specified environment for any dependant consumers.
18
+
11
19
  Example response
12
20
 
13
21
  ```json
@@ -25,4 +33,3 @@ Example response
25
33
  ]
26
34
  }
27
35
  ```
28
-
@@ -89,9 +89,9 @@ module PactBroker
89
89
  include PactBroker::Dataset
90
90
 
91
91
  def filter_by_pacticipant(query_string)
92
- matching_pacticipants = PactBroker::Domain::Pacticipant.filter(:name, query_string)
93
- pacticipants_join = Sequel.|({ Sequel[:integrations][:consumer_id] => Sequel[:p][:id] }, { Sequel[:integrations][:provider_id] => Sequel[:p][:id] })
94
- join(matching_pacticipants, pacticipants_join, table_alias: :p)
92
+ matching_pacticipant_ids = PactBroker::Domain::Pacticipant.filter(:name, query_string).select(:id).all.collect(&:id)
93
+ return nil if matching_pacticipant_ids.empty?
94
+ including_pacticipant_id(matching_pacticipant_ids)
95
95
  end
96
96
 
97
97
  def including_pacticipant_id(pacticipant_id)
@@ -10,6 +10,7 @@ module PactBroker
10
10
  def find(filter_options = {}, pagination_options = {}, eager_load_associations = [])
11
11
  query = scope_for(PactBroker::Integrations::Integration).select_all_qualified
12
12
  query = query.filter_by_pacticipant(filter_options[:query_string]) if filter_options[:query_string]
13
+ return [] if query.nil?
13
14
  query
14
15
  .eager(*eager_load_associations)
15
16
  .order(Sequel.desc(:contract_data_updated_at, nulls: :last))
@@ -1,4 +1,7 @@
1
1
 
2
2
  module PactBroker
3
- PACT_PARSING_OPTIONS = { max_nesting: 50 }
3
+ PACT_PARSING_OPTIONS = {
4
+ max_nesting: 50,
5
+ create_additions: false
6
+ }
4
7
  end
@@ -44,6 +44,14 @@ module PactBroker
44
44
  .remove_overridden_revisions_from_complete_query
45
45
  end
46
46
 
47
+ def for_main_branches
48
+ consumers_join = { Sequel[:pact_publications][:consumer_id] => Sequel[:consumers][:id] }
49
+ query = self
50
+ query
51
+ .join(:pacticipants, consumers_join, { table_alias: :consumers })
52
+ .remove_overridden_revisions_from_complete_query
53
+ end
54
+
47
55
  def for_currently_deployed_versions(environment_name)
48
56
  deployed_versions_join = {
49
57
  Sequel[:pact_publications][:consumer_version_id] => Sequel[:deployed_versions][:version_id]
@@ -11,8 +11,16 @@ module PactBroker
11
11
  extend PactBroker::Services
12
12
  extend PactBroker::Repositories::Scopes
13
13
 
14
- def self.list_provider_states(provider)
15
- query = scope_for(PactPublication).eager_for_domain_with_content.for_provider_and_consumer_version_selector(provider, PactBroker::Pacts::Selector.latest_for_main_branch)
14
+ def self.list_provider_states(provider, branch_name = nil, environment_name = nil)
15
+ selector =
16
+ if branch_name
17
+ PactBroker::Pacts::Selector.latest_for_branch(branch_name)
18
+ elsif environment_name
19
+ PactBroker::Pacts::Selector.for_environment(environment_name)
20
+ else
21
+ PactBroker::Pacts::Selector.latest_for_main_branch
22
+ end
23
+ query = scope_for(PactPublication).eager_for_domain_with_content.for_provider_and_consumer_version_selector(provider, selector)
16
24
  query.all.flat_map do | pact_publication |
17
25
  { "providerStates" => pact_publication.to_domain.content_object.provider_states, "consumer" => pact_publication.to_domain.consumer.name }
18
26
  end
@@ -151,6 +151,36 @@ module PactBroker
151
151
  query.all.sort_by{ | p| p.consumer_name.downcase }.collect(&:to_head_pact)
152
152
  end
153
153
 
154
+ def find_pacts_by_consumer_branch(provider_name, options = {})
155
+ consumer_name = options[:consumer]
156
+ latest = options.fetch(:latest, false)
157
+ branch = options[:branch_name]
158
+ main_branch = options.fetch(:main_branch, false)
159
+
160
+ query = scope_for(PactPublication)
161
+ .eager_for_domain_with_content
162
+ .for_provider_name(provider_name)
163
+
164
+ if consumer_name
165
+ query = query.for_consumer_name(consumer_name)
166
+ end
167
+
168
+ if main_branch
169
+ if latest
170
+ query = query.latest_for_main_branches
171
+ else
172
+ query = query.for_main_branches
173
+ end
174
+ else
175
+ if latest
176
+ query = query.latest_for_consumer_branch(branch)
177
+ else
178
+ query = query.for_branch_name(branch)
179
+ end
180
+ end
181
+ query.all.sort_by{ | p| p.consumer_name.downcase }.collect(&:to_head_pact)
182
+ end
183
+
154
184
  def find_for_verification(provider_name, consumer_version_selectors)
155
185
  PactsForVerificationRepository.new.find(provider_name, consumer_version_selectors)
156
186
  end
@@ -95,6 +95,26 @@ module PactBroker
95
95
  pact_repository.find_latest_pacts_for_provider provider_name, options[:tag]
96
96
  end
97
97
 
98
+ def find_latest_pacts_for_provider_by_consumer_branch provider_name, options = {}
99
+ options[:latest] = true
100
+ pact_repository.find_pacts_by_consumer_branch provider_name, options
101
+ end
102
+
103
+ def find_pacts_for_provider_by_consumer_branch provider_name, options = {}
104
+ pact_repository.find_pacts_by_consumer_branch provider_name, options
105
+ end
106
+
107
+ def find_pacts_for_provider_and_consumer_by_consumer_branch provider_name, consumer, options = {}
108
+ options[:consumer] = consumer
109
+ pact_repository.find_pacts_by_consumer_branch provider_name, options
110
+ end
111
+
112
+ def find_latest_pacts_for_provider_and_consumer_by_consumer_branch provider_name, consumer, options = {}
113
+ options[:consumer] = consumer
114
+ options[:latest] = true
115
+ pact_repository.find_pacts_by_consumer_branch provider_name, options
116
+ end
117
+
98
118
  def find_pact_versions_for_provider provider_name, options = {}
99
119
  pact_repository.find_pact_versions_for_provider provider_name, options[:tag]
100
120
  end
@@ -1,8 +1,11 @@
1
1
  require "pact_broker/domain/tag"
2
+ require "pact_broker/repositories"
2
3
 
3
4
  module PactBroker
4
5
  module Tags
5
6
  class Repository
7
+ include PactBroker::Repositories
8
+
6
9
  def create args
7
10
  params = {
8
11
  name: args.fetch(:name),
@@ -37,6 +40,14 @@ module PactBroker
37
40
  .distinct
38
41
  .collect{ |tag| tag[:name] }.sort
39
42
  end
43
+
44
+ def find_all_by_pacticipant_name_and_tag(pacticipant_name, tag_name)
45
+ pacticipant = pacticipant_repository.find_by_name(pacticipant_name)
46
+ return PactBroker::Domain::Tag.where(pacticipant_id: pacticipant.id, name: tag_name) if pacticipant
47
+
48
+ []
49
+ end
50
+
40
51
  end
41
52
  end
42
53
  end
@@ -32,6 +32,10 @@ module PactBroker
32
32
  def find_all_tag_names_for_pacticipant pacticipant_name
33
33
  tag_repository.find_all_tag_names_for_pacticipant pacticipant_name
34
34
  end
35
+
36
+ def find_all_by_pacticipant_name_and_tag pacticipant_name:, tag_name:
37
+ tag_repository.find_all_by_pacticipant_name_and_tag pacticipant_name, tag_name
38
+ end
35
39
  end
36
40
  end
37
41
  end
@@ -670,15 +670,16 @@ module PactBroker
670
670
  version
671
671
  end
672
672
 
673
- private
674
-
675
673
  def create_deployed_version(uuid: , currently_deployed: , version:, environment_name: , target: nil, created_at: nil)
676
674
  env = find_environment(environment_name)
677
675
  @deployed_version = PactBroker::Deployments::DeployedVersionService.find_or_create(uuid, version, env, target)
678
676
  PactBroker::Deployments::DeployedVersionService.record_version_undeployed(deployed_version) unless currently_deployed
679
677
  set_created_at_if_set(created_at, :deployed_versions, id: deployed_version.id)
678
+ self
680
679
  end
681
680
 
681
+ private
682
+
682
683
  def create_released_version(uuid: , currently_supported: true, version:, environment_name: , created_at: nil)
683
684
  env = find_environment(environment_name)
684
685
  @released_version = PactBroker::Deployments::ReleasedVersionService.create_or_update(uuid, version, env)
@@ -1,3 +1,3 @@
1
1
  module PactBroker
2
- VERSION = "2.115.0"
2
+ VERSION = "2.117.0"
3
3
  end
@@ -174,6 +174,15 @@ module PactBroker
174
174
  latest_from_main_branch || find_by_pacticipant_name_and_latest_tag(pacticipant.name, pacticipant.main_branch)
175
175
  end
176
176
  end
177
+
178
+ def find_by_ids_in_reverse_order version_ids, pagination_options = {}, eager_load_associations =[]
179
+ query = PactBroker::Domain::Version
180
+ .where(id: version_ids)
181
+ .eager(*eager_load_associations)
182
+ .reverse_order(:order)
183
+
184
+ query.all_with_pagination_options(pagination_options)
185
+ end
177
186
  end
178
187
  end
179
188
  end
@@ -66,6 +66,11 @@ module PactBroker
66
66
  PactBroker.configuration.use_first_tag_as_branch &&
67
67
  ((now - version.created_at.to_datetime) * 24 * 60 * 60) <= PactBroker.configuration.use_first_tag_as_branch_time_limit
68
68
  end
69
+
70
+ def self.find_by_ids_in_reverse_order version_ids, pagination_options = {}, eager_load_associations = []
71
+ version_repository.find_by_ids_in_reverse_order version_ids, pagination_options, eager_load_associations
72
+ end
73
+
69
74
  private_class_method :use_tag_as_branch?
70
75
 
71
76
  def self.now
data/pact_broker.gemspec CHANGED
@@ -54,10 +54,10 @@ Gem::Specification.new do |gem|
54
54
  gem.add_runtime_dependency "roar", "~> 1.1"
55
55
  gem.add_runtime_dependency "dry-validation", "~> 1.8"
56
56
  gem.add_runtime_dependency "reform", "~> 2.6"
57
- gem.add_runtime_dependency "sequel", "~> 5.28"
57
+ gem.add_runtime_dependency "sequel", "~> 5.90"
58
58
  gem.add_runtime_dependency "webmachine", ">= 2.0.0.beta", "< 3.0"
59
59
  gem.add_runtime_dependency "semver2", "~> 3.4.2"
60
- gem.add_runtime_dependency "rack", "~> 3.1", ">= 3.1.11"
60
+ gem.add_runtime_dependency "rack", "~> 3.2"
61
61
  gem.add_runtime_dependency "redcarpet", ">= 3.5.1", "~>3.5"
62
62
  gem.add_runtime_dependency "pact-support" , ">= 1.21.2", "~> 1.21"
63
63
  gem.add_runtime_dependency "haml", "~>5.0"
@@ -70,4 +70,10 @@ Gem::Specification.new do |gem|
70
70
  gem.add_runtime_dependency "anyway_config", "~> 2.1"
71
71
  gem.add_runtime_dependency "request_store", "~> 1.5"
72
72
  gem.add_runtime_dependency "moments", "~> 0.2"
73
+ # dropped in ruby 3.4 stdlib
74
+ gem.add_runtime_dependency "mutex_m", "~> 0.3" # until as-notifications -> webmachine requires it
75
+ gem.add_runtime_dependency "csv", "~> 3.0" # lib/pact_broker/api/decorators/relationships_csv_decorator.rb
76
+ # dropped in ruby 3.5 stdlib
77
+ gem.add_runtime_dependency "ostruct", "~> 0.5"
78
+ gem.add_development_dependency "pstore", "~> 0.1" # until webmachine requires it
73
79
  end
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.115.0
4
+ version: 2.117.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bethany Skurrie
@@ -87,14 +87,14 @@ dependencies:
87
87
  requirements:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: '5.28'
90
+ version: '5.90'
91
91
  type: :runtime
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - "~>"
96
96
  - !ruby/object:Gem::Version
97
- version: '5.28'
97
+ version: '5.90'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: webmachine
100
100
  requirement: !ruby/object:Gem::Requirement
@@ -135,20 +135,14 @@ dependencies:
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '3.1'
139
- - - ">="
140
- - !ruby/object:Gem::Version
141
- version: 3.1.11
138
+ version: '3.2'
142
139
  type: :runtime
143
140
  prerelease: false
144
141
  version_requirements: !ruby/object:Gem::Requirement
145
142
  requirements:
146
143
  - - "~>"
147
144
  - !ruby/object:Gem::Version
148
- version: '3.1'
149
- - - ">="
150
- - !ruby/object:Gem::Version
151
- version: 3.1.11
145
+ version: '3.2'
152
146
  - !ruby/object:Gem::Dependency
153
147
  name: redcarpet
154
148
  requirement: !ruby/object:Gem::Requirement
@@ -329,6 +323,62 @@ dependencies:
329
323
  - - "~>"
330
324
  - !ruby/object:Gem::Version
331
325
  version: '0.2'
326
+ - !ruby/object:Gem::Dependency
327
+ name: mutex_m
328
+ requirement: !ruby/object:Gem::Requirement
329
+ requirements:
330
+ - - "~>"
331
+ - !ruby/object:Gem::Version
332
+ version: '0.3'
333
+ type: :runtime
334
+ prerelease: false
335
+ version_requirements: !ruby/object:Gem::Requirement
336
+ requirements:
337
+ - - "~>"
338
+ - !ruby/object:Gem::Version
339
+ version: '0.3'
340
+ - !ruby/object:Gem::Dependency
341
+ name: csv
342
+ requirement: !ruby/object:Gem::Requirement
343
+ requirements:
344
+ - - "~>"
345
+ - !ruby/object:Gem::Version
346
+ version: '3.0'
347
+ type: :runtime
348
+ prerelease: false
349
+ version_requirements: !ruby/object:Gem::Requirement
350
+ requirements:
351
+ - - "~>"
352
+ - !ruby/object:Gem::Version
353
+ version: '3.0'
354
+ - !ruby/object:Gem::Dependency
355
+ name: ostruct
356
+ requirement: !ruby/object:Gem::Requirement
357
+ requirements:
358
+ - - "~>"
359
+ - !ruby/object:Gem::Version
360
+ version: '0.5'
361
+ type: :runtime
362
+ prerelease: false
363
+ version_requirements: !ruby/object:Gem::Requirement
364
+ requirements:
365
+ - - "~>"
366
+ - !ruby/object:Gem::Version
367
+ version: '0.5'
368
+ - !ruby/object:Gem::Dependency
369
+ name: pstore
370
+ requirement: !ruby/object:Gem::Requirement
371
+ requirements:
372
+ - - "~>"
373
+ - !ruby/object:Gem::Version
374
+ version: '0.1'
375
+ type: :development
376
+ prerelease: false
377
+ version_requirements: !ruby/object:Gem::Requirement
378
+ requirements:
379
+ - - "~>"
380
+ - !ruby/object:Gem::Version
381
+ version: '0.1'
332
382
  description: A server that stores and returns pact files generated by the pact gem.
333
383
  It enables head/prod cross testing of the consumer and provider projects.
334
384
  email:
@@ -546,6 +596,7 @@ files:
546
596
  - lib/pact/doc/markdown/generator.rb
547
597
  - lib/pact/doc/markdown/index_renderer.rb
548
598
  - lib/pact/doc/markdown/interaction.erb
599
+ - lib/pact/doc/markdown/interaction_async.erb
549
600
  - lib/pact/doc/markdown/interaction_renderer.rb
550
601
  - lib/pact/doc/sort_interactions.rb
551
602
  - lib/pact_broker.rb
@@ -700,6 +751,7 @@ files:
700
751
  - lib/pact_broker/api/resources/latest_pact.rb
701
752
  - lib/pact_broker/api/resources/latest_pacts.rb
702
753
  - lib/pact_broker/api/resources/latest_provider_pacts.rb
754
+ - lib/pact_broker/api/resources/latest_provider_pacts_for_branch.rb
703
755
  - lib/pact_broker/api/resources/latest_verification_for_latest_pact.rb
704
756
  - lib/pact_broker/api/resources/latest_verification_for_pact.rb
705
757
  - lib/pact_broker/api/resources/latest_verifications_for_consumer_version.rb
@@ -727,6 +779,7 @@ files:
727
779
  - lib/pact_broker/api/resources/pagination_methods.rb
728
780
  - lib/pact_broker/api/resources/previous_distinct_pact_version.rb
729
781
  - lib/pact_broker/api/resources/provider_pacts.rb
782
+ - lib/pact_broker/api/resources/provider_pacts_for_consumer_branch.rb
730
783
  - lib/pact_broker/api/resources/provider_pacts_for_verification.rb
731
784
  - lib/pact_broker/api/resources/provider_states.rb
732
785
  - lib/pact_broker/api/resources/publish_contracts.rb
@@ -734,6 +787,7 @@ files:
734
787
  - lib/pact_broker/api/resources/released_version.rb
735
788
  - lib/pact_broker/api/resources/released_versions_for_version_and_environment.rb
736
789
  - lib/pact_broker/api/resources/tag.rb
790
+ - lib/pact_broker/api/resources/tag_versions.rb
737
791
  - lib/pact_broker/api/resources/tagged_pact_versions.rb
738
792
  - lib/pact_broker/api/resources/triggered_webhook_logs.rb
739
793
  - lib/pact_broker/api/resources/verification.rb
@@ -824,18 +878,26 @@ files:
824
878
  - lib/pact_broker/doc/views/can-i-deploy.markdown
825
879
  - lib/pact_broker/doc/views/consumer-version.markdown
826
880
  - lib/pact_broker/doc/views/consumer.markdown
881
+ - lib/pact_broker/doc/views/index/branch-pact-versions.markdown
827
882
  - lib/pact_broker/doc/views/index/environment.markdown
828
883
  - lib/pact_broker/doc/views/index/environments.markdown
884
+ - lib/pact_broker/doc/views/index/latest-branch-pact-versions.markdown
885
+ - lib/pact_broker/doc/views/index/latest-main-branch-pact-versions.markdown
829
886
  - lib/pact_broker/doc/views/index/latest-pact-versions.markdown
887
+ - lib/pact_broker/doc/views/index/latest-provider-pacts-with-branch.markdown
888
+ - lib/pact_broker/doc/views/index/latest-provider-pacts-with-main-branch.markdown
830
889
  - lib/pact_broker/doc/views/index/latest-provider-pacts-with-tag.markdown
831
890
  - lib/pact_broker/doc/views/index/latest-provider-pacts.markdown
832
891
  - lib/pact_broker/doc/views/index/latest-tagged-version.markdown
833
892
  - lib/pact_broker/doc/views/index/latest-version.markdown
893
+ - lib/pact_broker/doc/views/index/main-branch-pact-versions.markdown
834
894
  - lib/pact_broker/doc/views/index/pacticipant-branch-version.markdown
835
895
  - lib/pact_broker/doc/views/index/pacticipant-branch.markdown
836
896
  - lib/pact_broker/doc/views/index/pacticipant-version-tag.markdown
837
897
  - lib/pact_broker/doc/views/index/pacticipant-version.markdown
838
898
  - lib/pact_broker/doc/views/index/pacticipants.markdown
899
+ - lib/pact_broker/doc/views/index/provider-pacts-with-branch.markdown
900
+ - lib/pact_broker/doc/views/index/provider-pacts-with-main-branch.markdown
839
901
  - lib/pact_broker/doc/views/index/provider-pacts-with-tag.markdown
840
902
  - lib/pact_broker/doc/views/index/provider-pacts.markdown
841
903
  - lib/pact_broker/doc/views/index/publish-contracts.markdown
@@ -1227,7 +1289,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1227
1289
  - !ruby/object:Gem::Version
1228
1290
  version: '0'
1229
1291
  requirements: []
1230
- rubygems_version: 3.6.7
1292
+ rubygems_version: 3.7.2
1231
1293
  specification_version: 4
1232
1294
  summary: See description
1233
1295
  test_files: []