pact 1.52.0 → 1.54.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9cfa158c1bfe5e29903a33e219b080a26a5fe89983197703f4b41776c5c9308d
4
- data.tar.gz: 03d4a346421f6aefee8cc1e17c1466233f795ab12d4824c8a0643230e80a914a
3
+ metadata.gz: 668b177b7d244716ded4b592c37be8788ce6d0e1fd4036becdf5025a73e40022
4
+ data.tar.gz: 3185c5eeca1d02878e916b1feb6eddc4888a139374548987fc295d90b38d67c6
5
5
  SHA512:
6
- metadata.gz: bb71d3477f275efd899a8fd0bf6fac7bf840d2ea39c1e550e38e78b5f7e6479872e8833d005e893d5c7084eea42ce9aac94039ec7aa9edd8acdfcf3cc4a4a9f6
7
- data.tar.gz: 28bf0a523d3024cd06b48a71a85bef70471679f9c78951b3c04391c91be7f948458b3acde5dbe060ff6e58ead6a1949f5965f51f944b5815dbeb578968959400
6
+ metadata.gz: 217392c245364ea7df2e75851d211760a57cb5ec19285d8a5f7cd1f770ff85211115d4137d8b60a2c6c7b75ccb7a2fceb85c17ba00f4ef727f452f11e09e2d67
7
+ data.tar.gz: 111d4ddd772e5367485f716c19d9a8e64f8ce3e3045c273b48535dade001913bb6af2e552f6cc9f7e767b0f14d9111f62d7f114dd7b5318cdfcaade3a1ecab0f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ <a name="v1.54.0"></a>
2
+ ### v1.54.0 (2020-09-12)
3
+
4
+ #### Features
5
+
6
+ * use pb relation in preference to beta relation when fetching pacts for verification ([7563fcf](/../../commit/7563fcf))
7
+ * allow include_wip_pacts_since to use a Date, DateTime or Time ([dd35366](/../../commit/dd35366))
8
+ * add support for include_wip_pacts_since ([f2247b8](/../../commit/f2247b8))
9
+
10
+ <a name="v1.53.0"></a>
11
+ ### v1.53.0 (2020-09-11)
12
+
13
+ #### Features
14
+
15
+ * add support for the enable_pending flag ([16866f4](/../../commit/16866f4))
16
+
1
17
  <a name="v1.52.0"></a>
2
18
  ### v1.52.0 (2020-09-10)
3
19
 
@@ -12,7 +12,8 @@ module Pact
12
12
  include PactSelectionDescription
13
13
  attr_reader :provider, :consumer_version_selectors, :provider_version_tags, :broker_base_url, :http_client_options, :http_client, :options
14
14
 
15
- PACTS_FOR_VERIFICATION_RELATION = 'beta:provider-pacts-for-verification'.freeze
15
+ PACTS_FOR_VERIFICATION_RELATION = 'pb:provider-pacts-for-verification'.freeze
16
+ PACTS_FOR_VERIFICATION_RELATION_BETA = 'beta:provider-pacts-for-verification'.freeze
16
17
  PACTS = 'pacts'.freeze
17
18
  HREF = 'href'.freeze
18
19
  LINKS = '_links'.freeze
@@ -22,7 +23,7 @@ module Pact
22
23
  def initialize(provider, consumer_version_selectors, provider_version_tags, broker_base_url, http_client_options, options = {})
23
24
  @provider = provider
24
25
  @consumer_version_selectors = consumer_version_selectors || []
25
- @provider_version_tags = provider_version_tags || []
26
+ @provider_version_tags = [*provider_version_tags]
26
27
  @http_client_options = http_client_options
27
28
  @broker_base_url = broker_base_url
28
29
  @http_client = Pact::Hal::HttpClient.new(http_client_options)
@@ -34,7 +35,7 @@ module Pact
34
35
  end
35
36
 
36
37
  def call
37
- if index.can?(PACTS_FOR_VERIFICATION_RELATION)
38
+ if index.can?(PACTS_FOR_VERIFICATION_RELATION) || index.can?(PACTS_FOR_VERIFICATION_RELATION_BETA)
38
39
  log_message
39
40
  pacts_for_verification
40
41
  else
@@ -63,7 +64,7 @@ module Pact
63
64
 
64
65
  def pacts_for_verification_entity
65
66
  index
66
- ._link(PACTS_FOR_VERIFICATION_RELATION)
67
+ ._link(PACTS_FOR_VERIFICATION_RELATION, PACTS_FOR_VERIFICATION_RELATION_BETA)
67
68
  .expand(provider: provider)
68
69
  .post!(query)
69
70
  end
@@ -14,12 +14,14 @@ module Pact
14
14
  # in parent scope, it will clash with these ones,
15
15
  # so put an underscore in front of the name to be safer.
16
16
 
17
- attr_accessor :_provider_name, :_pact_broker_base_url, :_consumer_version_tags, :_provider_version_tags, :_basic_auth_options, :_verbose
17
+ attr_accessor :_provider_name, :_pact_broker_base_url, :_consumer_version_tags, :_provider_version_tags, :_basic_auth_options, :_enable_pending, :_include_wip_pacts_since, :_verbose
18
18
 
19
19
  def initialize(provider_name, provider_version_tags)
20
20
  @_provider_name = provider_name
21
21
  @_provider_version_tags = provider_version_tags
22
22
  @_consumer_version_tags = []
23
+ @_enable_pending = false
24
+ @_include_wip_pacts_since = nil
23
25
  @_verbose = false
24
26
  end
25
27
 
@@ -33,6 +35,18 @@ module Pact
33
35
  self._consumer_version_tags = *consumer_version_tags
34
36
  end
35
37
 
38
+ def enable_pending enable_pending
39
+ self._enable_pending = enable_pending
40
+ end
41
+
42
+ def include_wip_pacts_since since
43
+ self._include_wip_pacts_since = if since.respond_to?(:xmlschema)
44
+ since.xmlschema
45
+ else
46
+ since
47
+ end
48
+ end
49
+
36
50
  def verbose verbose
37
51
  self._verbose = verbose
38
52
  end
@@ -51,7 +65,8 @@ module Pact
51
65
  consumer_version_selectors,
52
66
  _provider_version_tags,
53
67
  _pact_broker_base_url,
54
- _basic_auth_options.merge(verbose: _verbose)
68
+ _basic_auth_options.merge(verbose: _verbose),
69
+ { include_pending_status: _enable_pending, include_wip_pacts_since: _include_wip_pacts_since }
55
70
  )
56
71
 
57
72
  Pact.provider_world.add_pact_uri_source fetch_pacts
data/lib/pact/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # Remember to bump pact-provider-proxy when this changes major version
2
2
  module Pact
3
- VERSION = "1.52.0"
3
+ VERSION = "1.54.0"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.52.0
4
+ version: 1.54.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Fraser
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2020-09-10 00:00:00.000000000 Z
15
+ date: 2020-09-12 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rspec