pact-provider-verifier 1.14.7 → 1.15.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 68a5df8078a6d2408f6afadb8f956365f673ceed3736cdfbceb33bbebf1e89e9
|
|
4
|
+
data.tar.gz: e992a96f7b210b0b7cef7020e2c6fa5b31d7247f4ad45e932cd4489f2b7537fe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f6526309c0ad113f6c5c6c80d086143387a45b36e3fe77a96bf2da0b2494120b3c7cae13a7fdbf07a70a0794d62b7eceee506932333f9fb248f38697fee923de
|
|
7
|
+
data.tar.gz: 5d6ec539e538572eebd3648a64f83beed3325d823214ac4d26b69ce0b879030119198a2b2a91fd43e7fa8e633b3200b9dff1d92be0b09ec5e23847795abe36a2
|
data/CHANGELOG.md
CHANGED
|
@@ -40,6 +40,7 @@ module Pact
|
|
|
40
40
|
def setup
|
|
41
41
|
print_deprecation_note
|
|
42
42
|
set_environment_variables
|
|
43
|
+
require_rspec_monkeypatch_for_jsonl
|
|
43
44
|
require_pact_project_pact_helper # Beth: not sure if this is needed, hangover from pact-provider-proxy?
|
|
44
45
|
end
|
|
45
46
|
|
|
@@ -127,6 +128,12 @@ module Pact
|
|
|
127
128
|
require ENV['PACT_PROJECT_PACT_HELPER'] if ENV.fetch('PACT_PROJECT_PACT_HELPER','') != ''
|
|
128
129
|
end
|
|
129
130
|
|
|
131
|
+
def require_rspec_monkeypatch_for_jsonl
|
|
132
|
+
if options.format == 'json'
|
|
133
|
+
require 'pact/provider_verifier/rspec_json_formatter_monkeypatch'
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
|
|
130
137
|
def custom_provider_headers_for_env_var
|
|
131
138
|
if options.custom_provider_header && options.custom_provider_header.any?
|
|
132
139
|
options.custom_provider_header.join("\n")
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
require 'rspec'
|
|
2
|
+
|
|
3
|
+
begin
|
|
4
|
+
require 'rspec/core/formatters/json_formatter'
|
|
5
|
+
|
|
6
|
+
RSpec::Core::Formatters::JsonFormatter
|
|
7
|
+
|
|
8
|
+
# This looks dodgy, but it's actually safer than inheriting from
|
|
9
|
+
# RSpec::Core::Formatters::JsonFormatter and using a custom class,
|
|
10
|
+
# because if the JsonFormatter class gets refactored,
|
|
11
|
+
# the --format json option will still work, but the inheritance will break.
|
|
12
|
+
|
|
13
|
+
module RSpec
|
|
14
|
+
module Core
|
|
15
|
+
module Formatters
|
|
16
|
+
class JsonFormatter
|
|
17
|
+
alias_method :old_close, :close
|
|
18
|
+
|
|
19
|
+
def close(*args)
|
|
20
|
+
# Append a new line so that the output stream can be split at
|
|
21
|
+
# the new lines, and each JSON document parsed separately
|
|
22
|
+
old_close(*args)
|
|
23
|
+
output.write("\n")
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
rescue NameError
|
|
31
|
+
Pact.configuration.error_stream.puts "WARN: Could not find RSpec::Core::Formatters::JsonFormatter to modify it to put a new line between JSON result documents."
|
|
32
|
+
rescue LoadError
|
|
33
|
+
Pact.configuration.error_stream.puts "WARN: Could not load rspec/core/formatters/json_formatter to modify it to put a new line between JSON result documents."
|
|
34
|
+
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.
|
|
4
|
+
version: 1.15.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matt Fellows
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2018-07-
|
|
12
|
+
date: 2018-07-12 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rspec
|
|
@@ -303,6 +303,7 @@ files:
|
|
|
303
303
|
- lib/pact/provider_verifier/cli/custom_thor.rb
|
|
304
304
|
- lib/pact/provider_verifier/cli/verify.rb
|
|
305
305
|
- lib/pact/provider_verifier/pact_helper.rb
|
|
306
|
+
- lib/pact/provider_verifier/rspec_json_formatter_monkeypatch.rb
|
|
306
307
|
- lib/pact/provider_verifier/set_up_provider_state.rb
|
|
307
308
|
- lib/pact/provider_verifier/underscored_headers_monkeypatch.rb
|
|
308
309
|
- lib/pact/provider_verifier/version.rb
|