pact-provider-verifier 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b43ff3b5b20e388373c13ea48743bdd78a24e6d
4
- data.tar.gz: 73378cfd5da336900a6bc5b4ccf231287eef90e8
3
+ metadata.gz: 33b7a1e5844f5e9cc469f8fb86e3c3cffd6666a8
4
+ data.tar.gz: c717b51a619226af098202ca5fd3ced93557800b
5
5
  SHA512:
6
- metadata.gz: 2200801d7a18443487d7954d6eb68df0a74751332377ffdbd046638e3358ec66270144eafff2cd7499c9b347380f7494711d43ffe17cba094c672d1ca5969333
7
- data.tar.gz: 0e5995e8176546921343631e1d5b7dcec3f18236d279073038941432bb26269b04eecbda45ed1411ffd055d7ad737ecc63665286dff2889eb45aeb125ceb172e
6
+ metadata.gz: 137627401c24bc920031b61e53c34cb8a5ffb58acc477b9600401599303dd51082c924b5312239e4f3b3aedd30d1f97031c9757378c7467101d0a4f883970ac8
7
+ data.tar.gz: a3aca7c4aa96211d052306a3fe1b6c0c51162b207720b805276bd65992cf6124042d316ce1e6c8718ad5d35fb2cab3ec31315f0bccd4f4437441153b923483cd
@@ -1,4 +1,12 @@
1
- <a name="1.3.0-1"></a>
1
+ <a name="v1.3.1"></a>
2
+ ### v1.3.1 (2017-08-08)
3
+
4
+ #### Bug Fixes
5
+
6
+ * **windows**
7
+ * Add retries for flakiness demonstrated on windows builds for pact-go ([198efef](/../../commit/198efef))
8
+
9
+ <a name="v1.3.0-1"></a>
2
10
  # v1.3.0 (2017-08-08)
3
11
 
4
12
  #### Features
data/README.md CHANGED
@@ -49,6 +49,12 @@ bundle install
49
49
  * `--provider_base_url` - the base url of the pact provider (i.e. your API)
50
50
  1.
51
51
 
52
+ ### Setting a custom Authentication header
53
+
54
+ If you need to set a valid Authentication header for your replayed requests and provider state setup calls, specify `--custom-provider-header "Authentication: Type VALUE"` in the command line options.
55
+
56
+ Modification of the request headers is sometimes necessary, but be aware that any modification of the request before it is replayed lessens your confidence that the consumer and provider will work correctly in real life, so do it with caution.
57
+
52
58
  ### API with Provider States
53
59
 
54
60
  Execute pact provider verification against a provider which implements the following:
@@ -89,7 +89,7 @@ module Pact
89
89
 
90
90
  def print_deprecation_note
91
91
  if @options.provider_states_url
92
- $stderr.puts "The --provider-states-url option is deprecated and the URL endpoint can be removed from the application"
92
+ $stderr.puts "WARN: The --provider-states-url option is deprecated and the URL endpoint can be removed from the application"
93
93
  end
94
94
  end
95
95
  end
@@ -33,7 +33,23 @@ module Pact
33
33
  attr_reader :provider_state, :consumer
34
34
 
35
35
  def post_to_provider_state
36
- connection = Faraday.new(:url => provider_states_setup_url)
36
+ verbose = verbose?
37
+ connection = Faraday.new(:url => provider_states_setup_url) do | faraday |
38
+ # Have encountered flakiness on windows build for pact-go
39
+ # Using retries as a hacky solution to try and get around this
40
+ # until/if we can work out what the underlying cause is.
41
+ # https://github.com/pact-foundation/pact-go/issues/42
42
+ # eg. https://ci.appveyor.com/project/mefellows/pact-go/build/25#L1202
43
+
44
+ faraday.request :retry, max: 2, interval: 0.05,
45
+ interval_randomness: 0.5, backoff_factor: 2,
46
+ methods:[:post],
47
+ exceptions: [Faraday::ConnectionFailed]
48
+
49
+ faraday.response :logger if verbose
50
+ faraday.adapter Faraday.default_adapter
51
+ end
52
+
37
53
  connection.post do |req|
38
54
  req.headers["Content-Type"] = "application/json"
39
55
  add_custom_provider_header req
@@ -1,5 +1,5 @@
1
1
  module Pact
2
2
  module ProviderVerifier
3
- VERSION = "1.3.0"
3
+ VERSION = "1.3.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact-provider-verifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Fellows