pact_broker 2.23.4 → 2.24.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/lib/pact_broker/api.rb +4 -0
  4. data/lib/pact_broker/api/decorators/pact_collection_decorator.rb +19 -0
  5. data/lib/pact_broker/api/decorators/pact_decorator.rb +10 -2
  6. data/lib/pact_broker/api/decorators/version_decorator.rb +1 -1
  7. data/lib/pact_broker/api/pact_broker_urls.rb +5 -1
  8. data/lib/pact_broker/api/resources/index.rb +81 -71
  9. data/lib/pact_broker/api/resources/wip_provider_pacts.rb +21 -0
  10. data/lib/pact_broker/doc/controllers/app.rb +12 -8
  11. data/lib/pact_broker/doc/views/consumer-version.markdown +5 -0
  12. data/lib/pact_broker/doc/views/{latest-pact-versions.markdown → index/latest-pact-versions.markdown} +0 -0
  13. data/lib/pact_broker/doc/views/index/latest-provider-pacts-with-tag.markdown +5 -0
  14. data/lib/pact_broker/doc/views/index/latest-provider-pacts.markdown +5 -0
  15. data/lib/pact_broker/doc/views/index/latest-tagged-version.markdown +5 -0
  16. data/lib/pact_broker/doc/views/index/latest-version.markdown +7 -0
  17. data/lib/pact_broker/doc/views/{pacticipants.markdown → index/pacticipants.markdown} +0 -0
  18. data/lib/pact_broker/doc/views/index/provider-pacts-with-tag.markdown +5 -0
  19. data/lib/pact_broker/doc/views/index/provider-pacts.markdown +5 -0
  20. data/lib/pact_broker/doc/views/{publish-pact.markdown → index/publish-pact.markdown} +0 -0
  21. data/lib/pact_broker/doc/views/{self.markdown → index/self.markdown} +0 -0
  22. data/lib/pact_broker/doc/views/not_found.markdown +1 -0
  23. data/lib/pact_broker/doc/views/{diff-previous-distinct.markdown → pact/diff-previous-distinct.markdown} +1 -1
  24. data/lib/pact_broker/doc/views/pact/diff.markdown +5 -0
  25. data/lib/pact_broker/doc/views/{latest-pact-version.markdown → pact/latest-pact-version.markdown} +0 -0
  26. data/lib/pact_broker/doc/views/{pact-webhooks.markdown → pact/pact-webhooks.markdown} +0 -0
  27. data/lib/pact_broker/doc/views/{publish-verification-results.markdown → pact/publish-verification-results.markdown} +2 -2
  28. data/lib/pact_broker/doc/views/pact/tag-prod-version.markdown +7 -0
  29. data/lib/pact_broker/doc/views/pact/tag-version.markdown +5 -0
  30. data/lib/pact_broker/doc/views/provider.markdown +1 -1
  31. data/lib/pact_broker/doc/views/{latest-verifications.markdown → version/latest-verification-results-where-pacticipant-is-consumer.markdown} +0 -0
  32. data/lib/pact_broker/pacts/pact_publication.rb +6 -2
  33. data/lib/pact_broker/pacts/repository.rb +8 -0
  34. data/lib/pact_broker/pacts/service.rb +4 -0
  35. data/lib/pact_broker/version.rb +1 -1
  36. data/script/prod/migrate-latest-pacts.sh +29 -0
  37. data/spec/features/get_wip_provider_pacts_spec.rb +26 -0
  38. data/spec/lib/pact_broker/api/decorators/pact_decorator_spec.rb +9 -5
  39. data/spec/lib/pact_broker/api/pact_broker_urls_spec.rb +10 -1
  40. data/spec/lib/pact_broker/api/resources/wip_provider_pacts_spec.rb +34 -0
  41. data/spec/lib/pact_broker/doc/controllers/app_spec.rb +21 -4
  42. data/spec/lib/pact_broker/doc/coverage_spec.rb +33 -0
  43. data/spec/lib/pact_broker/pacts/repository_find_wip_pact_versions_for_provider_spec.rb +94 -0
  44. data/spec/lib/pact_broker/pacts/repository_spec.rb +0 -1
  45. metadata +32 -13
  46. data/lib/pact_broker/doc/views/tag-prod-version.markdown +0 -7
  47. data/lib/pact_broker/doc/views/tag-version.markdown +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7bd5ebfd2122389ceccb3515386666e4152c57a4
4
- data.tar.gz: fb9817503a5f8762b7d79092abc6a7b34cf10027
3
+ metadata.gz: 221e35de8afb505b63a3bd3eb76ccc8a332e9c99
4
+ data.tar.gz: 985e0d73ff17ad8d6a7d9cd044863576a53b1ce9
5
5
  SHA512:
6
- metadata.gz: a4a893b1fc19db8c348e700f2d267828c39ee8eaba41ce8e9d97101f8b7e1f7e0a1d6c5269a53ccf34737cb14b0fe5dcd450c1a02a788bad77cbdcd3ecb47a83
7
- data.tar.gz: 0c575437f3cb2ab677a22ca8d6d29849fc5033ea2028b887c8fe6a151a06222909d81fa22146ce8fba225230fb440cae381d3845900dd1cf120db11d4cf87242
6
+ metadata.gz: 21b9b6aee402ff56fdaf1149867f2ff729a5ca350c3a60c82b0b2c2df9b3788ac2db15b185113fc9108f80e52cb0430340c04f66a473bdef536b5323c6e09275
7
+ data.tar.gz: 22b9cc5f105543a9a7fd359cf7616c78c6e4e168f9f315ed90944133c97b4a9bd6dc7cf6c4a7c1346a888b4243e468cfe6361edfbbf2c9ffedf902662353ad0f
@@ -1,3 +1,18 @@
1
+ <a name="v2.24.0"></a>
2
+ ### v2.24.0 (2018-07-08)
3
+
4
+
5
+ #### Features
6
+
7
+ * disable wip-provider-pacts in production until the feature is passed alpha testing ([3f9a1c7](/../../commit/3f9a1c7))
8
+ * allow HAL docs to specify a context so that two relations with the same name in different resources don't clash ([fe85b0b](/../../commit/fe85b0b))
9
+ * add pb:diff relation to pact resource to view a diff with an arbitrary pact version ([3eaa79c](/../../commit/3eaa79c))
10
+ * add HAL documentation for the relations that were missing documentation ([6b04d70](/../../commit/6b04d70))
11
+ * add resource for "work in progress" pacts for a provider ([50c003b](/../../commit/50c003b))
12
+ * deprecate pacts relation in favour of pb:pacts in latest pacts resource ([ccdd46f](/../../commit/ccdd46f))
13
+ * add bash script to migrate pacts from one broker to another ([7d587d9](/../../commit/7d587d9))
14
+
15
+
1
16
  <a name="v2.23.4"></a>
2
17
  ### v2.23.4 (2018-07-04)
3
18
 
@@ -40,6 +40,10 @@ module PactBroker
40
40
  add ['pacts', 'provider', :provider_name, 'latest', :tag], Api::Resources::LatestProviderPacts, {resource_name: "latest_tagged_provider_pact_publications"}
41
41
  add ['pacts', 'latest'], Api::Resources::LatestPacts, {resource_name: "latest_pacts"}
42
42
 
43
+ if ENV['RACK_ENV'] != 'production'
44
+ add ['pacts', 'provider', :provider_name, 'wip'], Api::Resources::WipProviderPacts, {resource_name: "wip_provider_pact_publications"}
45
+ end
46
+
43
47
  # Deprecated pact
44
48
  add ['pact', 'provider', :provider_name, 'consumer', :consumer_name, 'version', :consumer_version_number], Api::Resources::Pact, {resource_name: "pact_publications", deprecated: "true"} # Deprecate, singular /pact
45
49
  add ['pact', 'provider', :provider_name, 'consumer', :consumer_name, 'latest'], Api::Resources::LatestPact, {resource_name: "latest_pact_publications", deprecated: "true"}
@@ -24,15 +24,34 @@ module PactBroker
24
24
  latest_pacts_url(options[:base_url])
25
25
  end
26
26
 
27
+ # This is the LATEST pact URL
28
+ links :'pb:pacts' do | options |
29
+ represented.collect do | pact |
30
+ {
31
+ :href => latest_pact_url(options[:base_url], pact),
32
+ :title => "Latest pact between #{pact.consumer.name} and #{pact.provider.name}",
33
+ }
34
+ end
35
+ end
36
+
27
37
  # This is the LATEST pact URL
28
38
  links :pacts do | options |
29
39
  represented.collect do | pact |
30
40
  {
31
41
  :href => latest_pact_url(options[:base_url], pact),
32
42
  :title => "Latest pact between #{pact.consumer.name} and #{pact.provider.name}",
43
+ :name => "DEPRECATED - please use the pb:pacts relation"
33
44
  }
34
45
  end
35
46
  end
47
+
48
+ curies do | options |
49
+ [{
50
+ name: :pb,
51
+ href: options[:base_url] + '/doc/{rel}?context=pacts',
52
+ templated: true
53
+ }]
54
+ end
36
55
  end
37
56
  end
38
57
  end
@@ -99,6 +99,15 @@ module PactBroker
99
99
  }
100
100
  end
101
101
 
102
+ link :'pb:diff' do | options |
103
+ {
104
+ title: "Diff with another specified version of this pact",
105
+ href: templated_diff_url(represented, options.fetch(:base_url)),
106
+ templated: true
107
+
108
+ }
109
+ end
110
+
102
111
  link :'pb:pact-webhooks' do | options |
103
112
  {
104
113
  title: "Webhooks for the pact between #{represented.consumer.name} and #{represented.provider.name}",
@@ -151,11 +160,10 @@ module PactBroker
151
160
  curies do | options |
152
161
  [{
153
162
  name: :pb,
154
- href: options[:base_url] + '/doc/{rel}',
163
+ href: options[:base_url] + '/doc/{rel}?context=pact',
155
164
  templated: true
156
165
  }]
157
166
  end
158
-
159
167
  end
160
168
  end
161
169
  end
@@ -46,7 +46,7 @@ module PactBroker
46
46
  curies do | options |
47
47
  [{
48
48
  name: :pb,
49
- href: options.fetch(:base_url) + '/doc/{rel}',
49
+ href: options.fetch(:base_url) + '/doc/{rel}?context=version',
50
50
  templated: true
51
51
  }]
52
52
  end
@@ -51,7 +51,7 @@ module PactBroker
51
51
  end
52
52
 
53
53
  def pact_version_url pact, base_url
54
- "#{pactigration_base_url(base_url, path)}/pact-version/#{pact.sha}"
54
+ "#{pactigration_base_url(base_url, pact)}/pact-version/#{pact.pact_version_sha}"
55
55
  end
56
56
 
57
57
  def pact_url_from_params base_url, params
@@ -81,6 +81,10 @@ module PactBroker
81
81
  pact_url(base_url, pact) + "/diff/previous-distinct"
82
82
  end
83
83
 
84
+ def templated_diff_url pact, base_url = ''
85
+ pact_version_url(pact, base_url) + "/diff/pact-version/{pactVersion}"
86
+ end
87
+
84
88
  def previous_distinct_pact_version_url pact, base_url
85
89
  pact_url(base_url, pact) + "/previous-distinct"
86
90
  end
@@ -16,78 +16,88 @@ module PactBroker
16
16
  end
17
17
 
18
18
  def to_json
19
+ { _links: links }.to_json
20
+ end
21
+
22
+ def links
19
23
  {
20
- _links: {
21
- 'self' =>
22
- {
23
- href: base_url,
24
- title: 'Index',
25
- templated: false
26
- },
27
- 'pb:publish-pact' => {
28
- href: base_url + '/pacts/provider/{provider}/consumer/{consumer}/version/{consumerApplicationVersion}',
29
- title: 'Publish a pact',
30
- templated: true
31
- },
32
- 'pb:latest-pact-versions' =>
33
- {
34
- href: base_url + '/pacts/latest',
35
- title: 'Latest pact versions',
36
- templated: false
37
- },
38
- 'pb:pacticipants' =>
39
- {
40
- href: base_url + '/pacticipants',
41
- title: 'Pacticipants',
42
- templated: false
43
- },
44
- 'pb:latest-provider-pacts' =>
45
- {
46
- href: base_url + '/pacts/provider/{provider}/latest',
47
- title: 'Latest pacts by provider',
48
- templated: true
49
- },
50
- 'pb:latest-provider-pacts-with-tag' =>
51
- {
52
- href: base_url + '/pacts/provider/{provider}/latest/{tag}',
53
- title: 'Latest pacts for provider with the specified tag',
54
- templated: true
55
- },
56
- 'pb:provider-pacts-with-tag' =>
57
- {
58
- href: base_url + '/pacts/provider/{provider}/tag/{tag}',
59
- title: 'All pact versions for the provider with the specified consumer version tag',
60
- templated: true
61
- },
62
- 'pb:provider-pacts' =>
63
- {
64
- href: base_url + '/pacts/provider/{provider}',
65
- title: 'All pact versions for the specified provider',
66
- templated: true
67
- },
68
- 'pb:latest-version' => {
69
- href: base_url + '/pacticipants/{pacticipant}/latest-version',
70
- title: 'Latest pacticipant version',
71
- templated: true
72
- },
73
- 'pb:latest-tagged-version' => {
74
- href: base_url + '/pacticipants/{pacticipant}/latest-version/{tag}',
75
- title: 'Latest pacticipant version with the specified tag',
76
- templated: true
77
- },
78
- 'pb:webhooks' => {
79
- href: base_url + '/webhooks',
80
- title: 'Webhooks',
81
- templated: false
82
- },
83
- 'curies' =>
84
- [{
85
- name: 'pb',
86
- href: base_url + '/doc/{rel}',
87
- templated: true
88
- }]
89
- }
90
- }.to_json
24
+ 'self' =>
25
+ {
26
+ href: base_url,
27
+ title: 'Index',
28
+ templated: false
29
+ },
30
+ 'pb:publish-pact' => {
31
+ href: base_url + '/pacts/provider/{provider}/consumer/{consumer}/version/{consumerApplicationVersion}',
32
+ title: 'Publish a pact',
33
+ templated: true
34
+ },
35
+ 'pb:latest-pact-versions' =>
36
+ {
37
+ href: base_url + '/pacts/latest',
38
+ title: 'Latest pact versions',
39
+ templated: false
40
+ },
41
+ 'pb:pacticipants' =>
42
+ {
43
+ href: base_url + '/pacticipants',
44
+ title: 'Pacticipants',
45
+ templated: false
46
+ },
47
+ 'pb:latest-provider-pacts' =>
48
+ {
49
+ href: base_url + '/pacts/provider/{provider}/latest',
50
+ title: 'Latest pacts by provider',
51
+ templated: true
52
+ },
53
+ 'pb:latest-provider-pacts-with-tag' =>
54
+ {
55
+ href: base_url + '/pacts/provider/{provider}/latest/{tag}',
56
+ title: 'Latest pacts for provider with the specified tag',
57
+ templated: true
58
+ },
59
+ 'pb:provider-pacts-with-tag' =>
60
+ {
61
+ href: base_url + '/pacts/provider/{provider}/tag/{tag}',
62
+ title: 'All pact versions for the provider with the specified consumer version tag',
63
+ templated: true
64
+ },
65
+ 'pb:provider-pacts' =>
66
+ {
67
+ href: base_url + '/pacts/provider/{provider}',
68
+ title: 'All pact versions for the specified provider',
69
+ templated: true
70
+ },
71
+ 'pb:wip-provider-pacts' =>
72
+ {
73
+ href: base_url + '/pacts/provider/{provider}/wip',
74
+ title: 'WIP pact versions for the specified provider',
75
+ templated: true
76
+ },
77
+ 'pb:latest-version' => {
78
+ href: base_url + '/pacticipants/{pacticipant}/latest-version',
79
+ title: 'Latest pacticipant version',
80
+ templated: true
81
+ },
82
+ 'pb:latest-tagged-version' => {
83
+ href: base_url + '/pacticipants/{pacticipant}/latest-version/{tag}',
84
+ title: 'Latest pacticipant version with the specified tag',
85
+ templated: true
86
+ },
87
+ 'pb:webhooks' => {
88
+ href: base_url + '/webhooks',
89
+ title: 'Webhooks',
90
+ templated: false
91
+ },
92
+ 'curies' =>
93
+ [{
94
+ name: 'pb',
95
+ href: base_url + '/doc/{rel}?context=index',
96
+ templated: true
97
+ }]
98
+ }.tap do | it |
99
+ it.delete('pb:wip-provider-pacts') if ENV['RACK_ENV'] == 'production'
100
+ end
91
101
  end
92
102
  end
93
103
  end
@@ -0,0 +1,21 @@
1
+ require 'pact_broker/api/resources/provider_pacts'
2
+ require 'pact_broker/configuration'
3
+ require 'pact_broker/api/decorators/provider_pacts_decorator'
4
+
5
+ module PactBroker
6
+ module Api
7
+ module Resources
8
+ class WipProviderPacts < ProviderPacts
9
+ private
10
+
11
+ def pacts
12
+ pact_service.find_wip_pact_versions_for_provider provider_name
13
+ end
14
+
15
+ def resource_title
16
+ "WIP pact versions for the provider #{provider_name}"
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -17,24 +17,28 @@ module PactBroker
17
17
  }.freeze
18
18
 
19
19
  helpers do
20
- def view_name_for rel_name
21
- MAPPINGS[rel_name] || rel_name
20
+ def view_name_for rel_name, context = nil
21
+ view_name = MAPPINGS[rel_name] || rel_name
22
+ context ? "#{context}/#{view_name}" : view_name
22
23
  end
23
24
 
24
- def resource_exists? rel_name
25
- File.exist? File.join(self.class.root, 'views', "#{view_name_for(rel_name)}.markdown")
25
+ def resource_exists? rel_name, context = nil
26
+ File.exist? File.join(self.class.root, 'views', "#{view_name_for(rel_name, context)}.markdown")
26
27
  end
27
28
  end
28
29
 
29
30
  get ":rel_name" do
30
31
  rel_name = params[:rel_name]
31
- if resource_exists? rel_name
32
- markdown view_name_for(rel_name).to_sym, {:layout_engine => :haml, layout: :'layouts/main'}, {}
32
+ context = params[:context]
33
+ view_params = {:layout_engine => :haml, layout: :'layouts/main'}
34
+ if resource_exists? rel_name, context
35
+ markdown view_name_for(rel_name, context).to_sym, view_params, {}
36
+ elsif resource_exists? rel_name
37
+ markdown view_name_for(rel_name).to_sym, view_params, {}
33
38
  else
34
- response.status = 404
39
+ markdown :not_found, view_params, {}
35
40
  end
36
41
  end
37
-
38
42
  end
39
43
  end
40
44
  end
@@ -0,0 +1,5 @@
1
+ # Consumer version
2
+
3
+ Allowed method: `GET`, `PUT`, `DELETE`
4
+
5
+ The pacticipant (application) version of the consumer that this resource belongs to. Deleting this resource will delete all child resources.
@@ -0,0 +1,5 @@
1
+ # Latest pacts for provider with the specified tag
2
+
3
+ Allowed methods: `GET`
4
+
5
+ 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,5 @@
1
+ # Latest pacts by provider
2
+
3
+ Allowed methods: `GET`
4
+
5
+ Given a provider name, this resource returns the latest pact for each consumer.
@@ -0,0 +1,5 @@
1
+ # Latest pacticipant version with the specified tag
2
+
3
+ Allowed methods: `GET`
4
+
5
+ Given a pacticipant name and a pacticipant version tag name, this resource returns the latest pacticipant version with the specified tag. Note that the "latest" is determined by the creation date of the pacticipant version resource (or the semantic order if `order_versions_by_date` is false), not by the creation date of the tag.
@@ -0,0 +1,7 @@
1
+ # Latest pacticipant version
2
+
3
+ Allowed methods: `GET`
4
+
5
+ Given a pacticipant name, this resource returns the latest pacticipant version according to the configured ordering scheme. Ordering will be by creation date of the version resource if `order_versions_by_date` is true, and will be by semantic order if `order_versions_by_date` is false.
6
+
7
+ Note that this resource represents a pacticipant (application) version, not a pact version.
@@ -0,0 +1,5 @@
1
+ # Provider pacts
2
+
3
+ Allowed methods: `GET`
4
+
5
+ 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.
@@ -0,0 +1,5 @@
1
+ # Provider pacts
2
+
3
+ Allowed methods: `GET`
4
+
5
+ Given a pacticipant name, this resource returns all the pact versions for all consumers.
@@ -0,0 +1 @@
1
+ No documentation exists for this relation yet.
@@ -1,5 +1,5 @@
1
1
  # Diff with previous distinct version
2
2
 
3
- Allowed methods: GET
3
+ Allowed methods: `GET`
4
4
 
5
5
  This resource displays the difference between the current pact, and the previous "distinct" version. Given that the pact file does not change every time it is published, the previous distinct version is the most recent version published before the current one where the content is actually different.
@@ -0,0 +1,5 @@
1
+ # Diff between two pact versions
2
+
3
+ Allowed methods: `GET`
4
+
5
+ This resource displays the difference between the current pact version, and the specified pact version. Note that the pact version in the URL is the pact version content sha, not the consumer version number.
@@ -1,9 +1,9 @@
1
1
  # Publish pact verification result
2
2
 
3
- Allowed methods: POST
3
+ Allowed methods: `POST`
4
4
 
5
5
  Use a `POST` request to the `pb:publish-verification-results` link (`$['_links']['pb:publish-verification-results']['href']`) in the pact resource to publish the result (either success or failure) of a pact verification. The body of the request must include the success (true or false) and the provider application version that the pact was verified against. It may also include the build URL to facilitate debugging when failures occur.
6
-
6
+
7
7
  {
8
8
  "success": true,
9
9
  "providerApplicationVersion": "4.5.6",
@@ -0,0 +1,7 @@
1
+ # Tag Production Version
2
+
3
+ Allowed methods: `PUT`
4
+
5
+ Add the "prod" tag to this consumer version. This allows you to retrieve the latest version production version using the following URL.
6
+
7
+ http://pact-broker/pacts/provider/{provider}/consumer/{consumer}/latest/prod
@@ -0,0 +1,5 @@
1
+ # Add Tag to Consumer Version
2
+
3
+ Allowed methods: `PUT`
4
+
5
+ Add a tag with the specified name to this consumer version.
@@ -2,6 +2,6 @@
2
2
 
3
3
  Allowed methods: GET, PATCH, DELETE
4
4
 
5
- The application that initiates the HTTP request.
5
+ The application that responds to the HTTP request.
6
6
 
7
7
  See [Pacticipant](/doc/pacticipants) for more information.
@@ -1,9 +1,9 @@
1
1
  require 'pact_broker/domain/pact'
2
2
  require 'pact_broker/pacts/pact_version'
3
+ require 'pact_broker/repositories/helpers'
3
4
 
4
5
  module PactBroker
5
6
  module Pacts
6
-
7
7
  class PactPublication < Sequel::Model(:pact_publications)
8
8
 
9
9
  extend Forwardable
@@ -15,7 +15,9 @@ module PactBroker
15
15
  associate(:many_to_one, :consumer_version, :class => "PactBroker::Domain::Version", :key => :consumer_version_id, :primary_key => :id)
16
16
  associate(:many_to_one, :pact_version, class: "PactBroker::Pacts::PactVersion", :key => :pact_version_id, :primary_key => :id)
17
17
 
18
- PactPublication.plugin :timestamps, :update_on_create=>true
18
+ dataset_module do
19
+ include PactBroker::Repositories::Helpers
20
+ end
19
21
 
20
22
  def before_create
21
23
  super
@@ -55,5 +57,7 @@ module PactBroker
55
57
  @domain_object ||= to_domain
56
58
  end
57
59
  end
60
+
61
+ PactPublication.plugin :timestamps, update_on_create: true
58
62
  end
59
63
  end
@@ -10,12 +10,14 @@ require 'pact_broker/pacts/latest_tagged_pact_publications'
10
10
  require 'pact/shared/json_differ'
11
11
  require 'pact_broker/domain'
12
12
  require 'pact_broker/pacts/parse'
13
+ require 'pact_broker/matrix/head_row'
13
14
 
14
15
  module PactBroker
15
16
  module Pacts
16
17
  class Repository
17
18
 
18
19
  include PactBroker::Logging
20
+ include PactBroker::Repositories
19
21
 
20
22
  def create params
21
23
  PactPublication.new(
@@ -71,6 +73,12 @@ module PactBroker
71
73
  end
72
74
  end
73
75
 
76
+ def find_wip_pact_versions_for_provider provider_name
77
+ provider_id = pacticipant_repository.find_by_name(provider_name).id
78
+ pact_publication_ids = PactBroker::Matrix::HeadRow.where(provider_id: provider_id).exclude(success: true).select_for_subquery(:pact_publication_id)
79
+ AllPactPublications.where(id: pact_publication_ids).order_ignore_case(:consumer_name).order_append(:consumer_version_order).collect(&:to_domain)
80
+ end
81
+
74
82
  def find_pact_versions_for_provider provider_name, tag = nil
75
83
  if tag
76
84
  LatestPactPublicationsByConsumerVersion
@@ -72,6 +72,10 @@ module PactBroker
72
72
  pact_repository.find_latest_pact_versions_for_provider provider_name, options[:tag]
73
73
  end
74
74
 
75
+ def find_wip_pact_versions_for_provider provider_name
76
+ pact_repository.find_wip_pact_versions_for_provider provider_name
77
+ end
78
+
75
79
  def find_pact_versions_for_provider provider_name, options = {}
76
80
  pact_repository.find_pact_versions_for_provider provider_name, options[:tag]
77
81
  end
@@ -1,3 +1,3 @@
1
1
  module PactBroker
2
- VERSION = '2.23.4'
2
+ VERSION = '2.24.0'
3
3
  end
@@ -0,0 +1,29 @@
1
+ #!/bin/bash
2
+ #
3
+ # Usage: migrate-latest-pacts.sh SOURCE_BROKER_BASE_URL DEST_BROKER_BASE_URL
4
+ #
5
+
6
+ set -e
7
+
8
+ function cleanup() {
9
+ rm -rf /tmp/pact
10
+ }
11
+
12
+ trap cleanup EXIT
13
+
14
+ source_broker_base_url=${1:?Usage: ${BASH_SOURCE[0]} SOURCE_BROKER_BASE_URL DEST_BROKER_BASE_URL}
15
+ dest_broker_base_url=${2:?Usage: ${BASH_SOURCE[0]} SOURCE_BROKER_BASE_URL DEST_BROKER_BASE_URL}
16
+
17
+ latest_pacts=$(curl -s ${source_broker_base_url}/pacts/latest)
18
+ latest_pact_urls=$(echo "${latest_pacts}" | jq "[.pacts[]._links.self[1:][].href]" | jq 'join("\n")' --raw-output)
19
+
20
+ for url in ${latest_pact_urls}
21
+ do
22
+ source_pact_content=$(curl -s $url)
23
+ source_pact_url=$(echo ${source_pact_content} | jq "._links.self.href" --raw-output)
24
+ dest_pact_url=$(echo "${source_pact_url}" | sed "s~${source_broker_base_url}~${dest_broker_base_url}~")
25
+ dest_pact_content=$(echo "${source_pact_content}" | jq -r '{consumer: .consumer, provider: .provider, interactions: .interactions, metadata: .metadata}')
26
+ echo "${source_pact_content}" > /tmp/pact
27
+ echo "Migrating ${source_pact_url} to ${dest_pact_url}"
28
+ curl -s -XPUT "${dest_pact_url}" -d @/tmp/pact -H "Content-Type: application/json" -H "Accept: application/hal+json" > /dev/null
29
+ done
@@ -0,0 +1,26 @@
1
+ describe "Get WIP provider pacts" do
2
+ subject { get path; last_response }
3
+
4
+ let(:last_response_body) { JSON.parse(subject.body, symbolize_names: true) }
5
+ let(:pact_links) { last_response_body[:_links][:'pb:pacts'] }
6
+
7
+ context "when the provider exists" do
8
+ before do
9
+ TestDataBuilder.new
10
+ .create_provider("Provider")
11
+ .create_consumer("Consumer")
12
+ .create_consumer_version("0.0.1")
13
+ .create_pact
14
+ end
15
+
16
+ let(:path) { "/pacts/provider/Provider/wip" }
17
+
18
+ it "returns a 200 HAL JSON response" do
19
+ expect(subject).to be_a_hal_json_success_response
20
+ end
21
+
22
+ it "returns a list of links to the pacts" do
23
+ expect(pact_links.size).to eq 1
24
+ end
25
+ end
26
+ end
@@ -2,13 +2,13 @@ require 'spec_helper'
2
2
  require 'pact_broker/api/decorators/pact_decorator'
3
3
 
4
4
  module PactBroker
5
-
6
5
  module Api
7
-
8
6
  module Decorators
9
-
10
7
  describe PactDecorator do
11
8
 
9
+ before do
10
+ allow_any_instance_of(PactDecorator).to receive(:templated_diff_url).and_return('templated-diff-url')
11
+ end
12
12
  let(:content_hash) {
13
13
  {
14
14
  'consumer' => {'name' => 'Consumer'},
@@ -105,8 +105,13 @@ module PactBroker
105
105
  expect(subject[:_links][:'pb:publish-verification-results'][:href]).to match %r{http://example.org/.*/verification-results}
106
106
  end
107
107
 
108
+ it "includes a link to diff this pact version with another pact version" do
109
+ expect(subject[:_links][:'pb:diff'][:href]).to eq 'templated-diff-url'
110
+ expect(subject[:_links][:'pb:diff'][:templated]).to eq true
111
+ end
112
+
108
113
  it "includes a curie" do
109
- expect(subject[:_links][:curies]).to eq [{ name: "pb", href: "http://example.org/doc/{rel}", templated: true }]
114
+ expect(subject[:_links][:curies]).to eq [{ name: "pb", href: "http://example.org/doc/{rel}?context=pact", templated: true }]
110
115
  end
111
116
 
112
117
  context "when the json_content is not a Hash" do
@@ -116,7 +121,6 @@ module PactBroker
116
121
  end
117
122
  end
118
123
  end
119
-
120
124
  end
121
125
  end
122
126
  end
@@ -4,8 +4,11 @@ module PactBroker
4
4
  module Api
5
5
  describe PactBrokerUrls do
6
6
 
7
+ # Regex find all the URL parameter names
8
+ # \/\{[^\}\s\[\(\.]+\}
9
+
7
10
  let(:base_url) { "http://example.org" }
8
- let(:pact) { double('pact', consumer: consumer, provider: provider, consumer_version_number: "123") }
11
+ let(:pact) { double('pact', consumer: consumer, provider: provider, consumer_version_number: "123", pact_version_sha: "5hbfu") }
9
12
  let(:consumer) { double('pacticipant', name: "Foo") }
10
13
  let(:provider) { double('pacticipant', name: "Bar") }
11
14
  let(:verification) do
@@ -33,6 +36,12 @@ module PactBroker
33
36
 
34
37
  it { is_expected.to eq "http://example.org/pacts/provider/Bar/consumer/Foo/pact-version/1234/verification-results/1/triggered-webhooks" }
35
38
  end
39
+
40
+ describe "templated_diff_url" do
41
+ subject { PactBrokerUrls.templated_diff_url(pact, base_url) }
42
+
43
+ it { is_expected.to eq "http://example.org/pacts/provider/Bar/consumer/Foo/pact-version/5hbfu/diff/pact-version/{pactVersion}" }
44
+ end
36
45
  end
37
46
  end
38
47
  end
@@ -0,0 +1,34 @@
1
+ require 'pact_broker/api/resources/latest_provider_pacts'
2
+
3
+ module PactBroker
4
+ module Api
5
+ module Resources
6
+ describe WipProviderPacts do
7
+ before do
8
+ allow(PactBroker::Pacts::Service).to receive(:find_wip_pact_versions_for_provider).and_return(pacts)
9
+ allow(PactBroker::Api::Decorators::ProviderPactsDecorator).to receive(:new).and_return(decorator)
10
+ allow_any_instance_of(WipProviderPacts).to receive(:resource_exists?).and_return(provider)
11
+ end
12
+
13
+ let(:provider) { double('provider') }
14
+ let(:pacts) { double('pacts') }
15
+ let(:path) { '/pacts/provider/Bar/wip' }
16
+ let(:decorator) { instance_double('PactBroker::Api::Decorators::ProviderPactsDecorator') }
17
+
18
+ subject { get path; last_response }
19
+
20
+ it "finds the wip pacts for the provider" do
21
+ expect(PactBroker::Pacts::Service).to receive(:find_wip_pact_versions_for_provider).with("Bar")
22
+ subject
23
+ end
24
+
25
+ it "sets the correct resource title" do
26
+ expect(decorator).to receive(:to_json) do | options |
27
+ expect(options[:user_options][:title]).to eq "WIP pact versions for the provider Bar"
28
+ end
29
+ subject
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -1,4 +1,3 @@
1
- require 'spec_helper'
2
1
  require 'pact_broker/doc/controllers/app'
3
2
 
4
3
  module PactBroker
@@ -32,9 +31,9 @@ module PactBroker
32
31
  context "when the resource does not exist" do
33
32
  subject { get "/blah" }
34
33
 
35
- it "returns a 404 status" do
34
+ it "returns a 200 status, because otherwise, the Rack cascade will make it return a 404 from the webmachine API" do
36
35
  subject
37
- expect(last_response.status).to eq 404
36
+ expect(last_response.status).to eq 200
38
37
  end
39
38
 
40
39
  it "returns a html content type" do
@@ -42,9 +41,27 @@ module PactBroker
42
41
  expect(last_response.headers['Content-Type']).to eq "text/html;charset=utf-8"
43
42
  end
44
43
 
44
+ it "returns a custom error page" do
45
+ subject
46
+ expect(last_response.body).to include "No documentation exists"
47
+ end
45
48
  end
46
- end
47
49
 
50
+ context "when the resource has a context and there is a folder with a matching name" do
51
+ subject { get "/diff?context=pact" }
52
+
53
+ it "returns documentation in a folder of the matching name" do
54
+ subject
55
+ expect(last_response.status).to eq 200
56
+ expect(last_response.body).to include "Diff"
57
+ end
58
+
59
+ it "returns a html content type" do
60
+ subject
61
+ expect(last_response.headers['Content-Type']).to eq "text/html;charset=utf-8"
62
+ end
63
+ end
64
+ end
48
65
  end
49
66
  end
50
67
  end
@@ -0,0 +1,33 @@
1
+ require 'pact_broker/doc/controllers/app'
2
+
3
+ RSpec.describe "the HAL docs for the index" do
4
+
5
+ let(:app) do
6
+ Rack::Builder.new do
7
+ map "/docs" do
8
+ run PactBroker::Doc::Controllers::App
9
+ end
10
+ map "/" do
11
+ run PactBroker::API
12
+ end
13
+ end
14
+ end
15
+
16
+ let(:index_response) { get "/", {}, { 'HTTP_ACCEPT' => 'application/hal+json' } }
17
+ let(:index_body) { JSON.parse(index_response.body) }
18
+
19
+ it "has a document for each relation" do
20
+ relations_that_should_have_docs = index_body['_links'].keys - ['self', 'curies']
21
+ relations_without_docs = {}
22
+
23
+ relations_that_should_have_docs.each do | relation |
24
+ path = "/docs/#{relation.split(":", 2).last}?context=index"
25
+ get path, {}, { 'HTTP_ACCEPT' => 'text/html' }
26
+ if last_response.status != 200
27
+ relations_without_docs[relation] = last_response.status
28
+ end
29
+ end
30
+
31
+ expect(relations_without_docs).to eq({})
32
+ end
33
+ end
@@ -0,0 +1,94 @@
1
+ require 'pact_broker/pacts/repository'
2
+
3
+ module PactBroker
4
+ module Pacts
5
+ describe Repository do
6
+ let(:td) { TestDataBuilder.new }
7
+
8
+ describe "find_wip_pact_versions_for_provider" do
9
+ subject { Repository.new.find_wip_pact_versions_for_provider("bar") }
10
+
11
+ context "when the latest pact for a tag has been successfully verified" do
12
+ before do
13
+ td.create_pact_with_hierarchy("foo", "1", "bar")
14
+ .comment("above not included because it's not the latest prod")
15
+ .create_consumer_version("2")
16
+ .create_consumer_version_tag("prod")
17
+ .create_pact
18
+ .create_verification(provider_version: "3", comment: "not included because already verified")
19
+ end
20
+
21
+ it "is not included" do
22
+ expect(subject.size).to be 0
23
+ end
24
+ end
25
+
26
+ context "when the latest pact without a tag has failed verification" do
27
+ before do
28
+ td.create_pact_with_hierarchy("foo", "1", "bar")
29
+ .create_verification(provider_version: "3", success: false)
30
+ end
31
+
32
+ it "is included" do
33
+ expect(subject.size).to be 1
34
+ end
35
+ end
36
+
37
+ context "when the latest pact without a tag has not been verified" do
38
+ before do
39
+ td.create_pact_with_hierarchy("foo", "1", "bar")
40
+ .create_consumer_version("2")
41
+ .create_pact
42
+ end
43
+
44
+ it "is included" do
45
+ expect(subject.first.consumer_version_number).to eq "2"
46
+ expect(subject.size).to be 1
47
+ end
48
+ end
49
+
50
+ context "when the latest pact for a tag has failed verification" do
51
+ before do
52
+ td.create_pact_with_hierarchy("foo", "1", "bar")
53
+ .create_consumer_version_tag("prod")
54
+ .create_verification(provider_version: "3", success: true)
55
+ .create_consumer_version("2", tag_names: ["prod"])
56
+ .create_pact
57
+ .create_verification(provider_version: "5", success: false)
58
+ end
59
+
60
+ it "is included" do
61
+ expect(subject.first.consumer_version_number).to eq "2"
62
+ expect(subject.size).to be 1
63
+ end
64
+ end
65
+
66
+ context "when the latest pact for a tag has not been verified" do
67
+ before do
68
+ td.create_pact_with_hierarchy("foo", "1", "bar")
69
+ .create_consumer_version_tag("prod")
70
+ .create_verification(provider_version: "5")
71
+ .create_consumer_version("2", tag_names: ["prod"])
72
+ .create_pact
73
+ end
74
+
75
+ it "is included" do
76
+ expect(subject.first.consumer_version_number).to eq "2"
77
+ expect(subject.size).to be 1
78
+ end
79
+ end
80
+
81
+ context "when the provider name does not match the given provider name" do
82
+ before do
83
+ td.create_pact_with_hierarchy("foo", "1", "baz")
84
+ .create_provider("bar")
85
+ end
86
+
87
+ it "is not included" do
88
+ expect(subject.size).to be 0
89
+ end
90
+ end
91
+ end
92
+ end
93
+ end
94
+ end
@@ -1,7 +1,6 @@
1
1
  # Yes, I know this file is too bug, but cmd+shift+t is too useful!
2
2
 
3
3
  require 'pact_broker/pacts/repository'
4
- require 'spec/support/test_data_builder'
5
4
  require 'pact_broker/pacts/pact_params'
6
5
  require 'pact_broker/versions/repository'
7
6
  require 'pact_broker/pacticipants/repository'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact_broker
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.23.4
4
+ version: 2.24.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: 2018-07-04 00:00:00.000000000 Z
13
+ date: 2018-07-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty
@@ -762,6 +762,7 @@ files:
762
762
  - lib/pact_broker/api/resources/webhook_execution.rb
763
763
  - lib/pact_broker/api/resources/webhook_resource_methods.rb
764
764
  - lib/pact_broker/api/resources/webhooks.rb
765
+ - lib/pact_broker/api/resources/wip_provider_pacts.rb
765
766
  - lib/pact_broker/app.rb
766
767
  - lib/pact_broker/badges/service.rb
767
768
  - lib/pact_broker/build_http_options.rb
@@ -785,21 +786,30 @@ files:
785
786
  - lib/pact_broker/diagnostic/resources/dependencies.rb
786
787
  - lib/pact_broker/diagnostic/resources/heartbeat.rb
787
788
  - lib/pact_broker/doc/controllers/app.rb
789
+ - lib/pact_broker/doc/views/consumer-version.markdown
788
790
  - lib/pact_broker/doc/views/consumer.markdown
789
- - lib/pact_broker/doc/views/diff-previous-distinct.markdown
790
- - lib/pact_broker/doc/views/latest-pact-version.markdown
791
- - lib/pact_broker/doc/views/latest-pact-versions.markdown
792
- - lib/pact_broker/doc/views/latest-verifications.markdown
791
+ - lib/pact_broker/doc/views/index/latest-pact-versions.markdown
792
+ - lib/pact_broker/doc/views/index/latest-provider-pacts-with-tag.markdown
793
+ - lib/pact_broker/doc/views/index/latest-provider-pacts.markdown
794
+ - lib/pact_broker/doc/views/index/latest-tagged-version.markdown
795
+ - lib/pact_broker/doc/views/index/latest-version.markdown
796
+ - lib/pact_broker/doc/views/index/pacticipants.markdown
797
+ - lib/pact_broker/doc/views/index/provider-pacts-with-tag.markdown
798
+ - lib/pact_broker/doc/views/index/provider-pacts.markdown
799
+ - lib/pact_broker/doc/views/index/publish-pact.markdown
800
+ - lib/pact_broker/doc/views/index/self.markdown
793
801
  - lib/pact_broker/doc/views/layouts/main.haml
802
+ - lib/pact_broker/doc/views/not_found.markdown
794
803
  - lib/pact_broker/doc/views/pact-versions.markdown
795
- - lib/pact_broker/doc/views/pact-webhooks.markdown
796
- - lib/pact_broker/doc/views/pacticipants.markdown
804
+ - lib/pact_broker/doc/views/pact/diff-previous-distinct.markdown
805
+ - lib/pact_broker/doc/views/pact/diff.markdown
806
+ - lib/pact_broker/doc/views/pact/latest-pact-version.markdown
807
+ - lib/pact_broker/doc/views/pact/pact-webhooks.markdown
808
+ - lib/pact_broker/doc/views/pact/publish-verification-results.markdown
809
+ - lib/pact_broker/doc/views/pact/tag-prod-version.markdown
810
+ - lib/pact_broker/doc/views/pact/tag-version.markdown
797
811
  - lib/pact_broker/doc/views/provider.markdown
798
- - lib/pact_broker/doc/views/publish-pact.markdown
799
- - lib/pact_broker/doc/views/publish-verification-results.markdown
800
- - lib/pact_broker/doc/views/self.markdown
801
- - lib/pact_broker/doc/views/tag-prod-version.markdown
802
- - lib/pact_broker/doc/views/tag-version.markdown
812
+ - lib/pact_broker/doc/views/version/latest-verification-results-where-pacticipant-is-consumer.markdown
803
813
  - lib/pact_broker/doc/views/webhooks.markdown
804
814
  - lib/pact_broker/domain.rb
805
815
  - lib/pact_broker/domain/group.rb
@@ -969,6 +979,7 @@ files:
969
979
  - script/foo-bar.json
970
980
  - script/generate-certificates-for-webooks-certificate-spec.rb
971
981
  - script/insert-self-signed-certificate-from-url.rb
982
+ - script/prod/migrate-latest-pacts.sh
972
983
  - script/publish-2.sh
973
984
  - script/publish-new.sh
974
985
  - script/publish-not-a-pact.sh
@@ -1016,6 +1027,7 @@ files:
1016
1027
  - spec/features/get_verifications_for_consumer_version_spec.rb
1017
1028
  - spec/features/get_version_spec.rb
1018
1029
  - spec/features/get_versions_spec.rb
1030
+ - spec/features/get_wip_provider_pacts_spec.rb
1019
1031
  - spec/features/label_pacticipant_spec.rb
1020
1032
  - spec/features/merge_pact_spec.rb
1021
1033
  - spec/features/publish_not_a_pact_spec.rb
@@ -1107,6 +1119,7 @@ files:
1107
1119
  - spec/lib/pact_broker/api/resources/webhook_execution_spec.rb
1108
1120
  - spec/lib/pact_broker/api/resources/webhook_spec.rb
1109
1121
  - spec/lib/pact_broker/api/resources/webhooks_spec.rb
1122
+ - spec/lib/pact_broker/api/resources/wip_provider_pacts_spec.rb
1110
1123
  - spec/lib/pact_broker/app_spec.rb
1111
1124
  - spec/lib/pact_broker/badges/service_spec.rb
1112
1125
  - spec/lib/pact_broker/build_http_options_spec.rb
@@ -1121,6 +1134,7 @@ files:
1121
1134
  - spec/lib/pact_broker/diagnostic/resources/dependencies_spec.rb
1122
1135
  - spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
1123
1136
  - spec/lib/pact_broker/doc/controllers/app_spec.rb
1137
+ - spec/lib/pact_broker/doc/coverage_spec.rb
1124
1138
  - spec/lib/pact_broker/domain/group_spec.rb
1125
1139
  - spec/lib/pact_broker/domain/index_item_spec.rb
1126
1140
  - spec/lib/pact_broker/domain/order_versions_spec.rb
@@ -1153,6 +1167,7 @@ files:
1153
1167
  - spec/lib/pact_broker/pacts/pact_params_spec.rb
1154
1168
  - spec/lib/pact_broker/pacts/pact_publication_spec.rb
1155
1169
  - spec/lib/pact_broker/pacts/pact_version_spec.rb
1170
+ - spec/lib/pact_broker/pacts/repository_find_wip_pact_versions_for_provider_spec.rb
1156
1171
  - spec/lib/pact_broker/pacts/repository_spec.rb
1157
1172
  - spec/lib/pact_broker/pacts/service_spec.rb
1158
1173
  - spec/lib/pact_broker/pacts/sort_content_spec.rb
@@ -1319,6 +1334,7 @@ test_files:
1319
1334
  - spec/features/get_verifications_for_consumer_version_spec.rb
1320
1335
  - spec/features/get_version_spec.rb
1321
1336
  - spec/features/get_versions_spec.rb
1337
+ - spec/features/get_wip_provider_pacts_spec.rb
1322
1338
  - spec/features/label_pacticipant_spec.rb
1323
1339
  - spec/features/merge_pact_spec.rb
1324
1340
  - spec/features/publish_not_a_pact_spec.rb
@@ -1410,6 +1426,7 @@ test_files:
1410
1426
  - spec/lib/pact_broker/api/resources/webhook_execution_spec.rb
1411
1427
  - spec/lib/pact_broker/api/resources/webhook_spec.rb
1412
1428
  - spec/lib/pact_broker/api/resources/webhooks_spec.rb
1429
+ - spec/lib/pact_broker/api/resources/wip_provider_pacts_spec.rb
1413
1430
  - spec/lib/pact_broker/app_spec.rb
1414
1431
  - spec/lib/pact_broker/badges/service_spec.rb
1415
1432
  - spec/lib/pact_broker/build_http_options_spec.rb
@@ -1424,6 +1441,7 @@ test_files:
1424
1441
  - spec/lib/pact_broker/diagnostic/resources/dependencies_spec.rb
1425
1442
  - spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
1426
1443
  - spec/lib/pact_broker/doc/controllers/app_spec.rb
1444
+ - spec/lib/pact_broker/doc/coverage_spec.rb
1427
1445
  - spec/lib/pact_broker/domain/group_spec.rb
1428
1446
  - spec/lib/pact_broker/domain/index_item_spec.rb
1429
1447
  - spec/lib/pact_broker/domain/order_versions_spec.rb
@@ -1456,6 +1474,7 @@ test_files:
1456
1474
  - spec/lib/pact_broker/pacts/pact_params_spec.rb
1457
1475
  - spec/lib/pact_broker/pacts/pact_publication_spec.rb
1458
1476
  - spec/lib/pact_broker/pacts/pact_version_spec.rb
1477
+ - spec/lib/pact_broker/pacts/repository_find_wip_pact_versions_for_provider_spec.rb
1459
1478
  - spec/lib/pact_broker/pacts/repository_spec.rb
1460
1479
  - spec/lib/pact_broker/pacts/service_spec.rb
1461
1480
  - spec/lib/pact_broker/pacts/sort_content_spec.rb
@@ -1,7 +0,0 @@
1
- # Tag Production Version
2
-
3
- Allowed methods: PUT
4
-
5
- Add the "prod" tag to this version. This allows you to retrieve the latest version production version using the following URL.
6
-
7
- http://pact-broker/pacts/provider/{provider}/consumer/{consumer}/latest/prod
@@ -1,4 +0,0 @@
1
- # Add Tag to Version
2
-
3
- Allowed methods: PUT
4
-