pact 1.22.2 → 1.23.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/lib/pact/cli.rb +1 -0
- data/lib/pact/cli/run_pact_verification.rb +2 -3
- data/lib/pact/doc/markdown/index_renderer.rb +3 -1
- data/lib/pact/provider/pact_spec_runner.rb +23 -15
- data/lib/pact/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f08c3f242d549648001e7294df45094bf80bdfe
|
4
|
+
data.tar.gz: 84c7976f630dcaee652d7c10eb8d6a2bcd9c64a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d844246c78be90a05be79a69901b9d57c27d5f31b6ea4b2ef79160e2b9524b7e56788ba3b5308815e0108dec02c1f977be528af6f69f1f4c3c5debfda60277fa
|
7
|
+
data.tar.gz: 508f3d6b351a05dc480122ddca8c4ea86fc7c4169d58e309649ae0e39a07bf7e8ac0960d8bbd12c381cba25bf8fdd4ed5ad2642b2286210af97ce8033e4beff2
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
<a name="v1.23.0"></a>
|
2
|
+
### v1.23.0 (2018-04-16)
|
3
|
+
|
4
|
+
|
5
|
+
#### Features
|
6
|
+
|
7
|
+
* allow --out FILE to be specified for the output from pact verify ([ca19aa8](/../../commit/ca19aa8))
|
8
|
+
|
9
|
+
|
10
|
+
#### Bug Fixes
|
11
|
+
|
12
|
+
* URL escape file paths in index of generated markdown ([6af19d5](/../../commit/6af19d5))
|
13
|
+
|
14
|
+
|
1
15
|
<a name="v1.22.2"></a>
|
2
16
|
### v1.22.2 (2018-03-24)
|
3
17
|
|
data/lib/pact/cli.rb
CHANGED
@@ -17,6 +17,7 @@ module Pact
|
|
17
17
|
method_option :description, aliases: "-d", desc: "Interaction description filter"
|
18
18
|
method_option :provider_state, aliases: "-s", desc: "Provider state filter"
|
19
19
|
method_option :format, aliases: "-f", banner: "FORMATTER", desc: "RSpec formatter. Defaults to custom Pact formatter. [j]son may also be used."
|
20
|
+
method_option :out, aliases: "-o", banner: "FILE", desc: "Write output to a file instead of $stdout."
|
20
21
|
|
21
22
|
def verify
|
22
23
|
require 'pact/cli/run_pact_verification'
|
@@ -14,7 +14,6 @@ module Pact
|
|
14
14
|
new(options).call
|
15
15
|
end
|
16
16
|
|
17
|
-
|
18
17
|
def call
|
19
18
|
initialize_rspec
|
20
19
|
setup_load_path
|
@@ -71,10 +70,10 @@ module Pact
|
|
71
70
|
{
|
72
71
|
full_backtrace: options[:backtrace],
|
73
72
|
criteria: SpecCriteria.call(options),
|
74
|
-
format: options[:format]
|
73
|
+
format: options[:format],
|
74
|
+
out: options[:out]
|
75
75
|
}
|
76
76
|
end
|
77
|
-
|
78
77
|
end
|
79
78
|
end
|
80
79
|
end
|
@@ -62,21 +62,7 @@ module Pact
|
|
62
62
|
config.output_stream = Pact.configuration.output_stream
|
63
63
|
end
|
64
64
|
|
65
|
-
|
66
|
-
::RSpec.configuration.add_formatter Pact::Provider::RSpec::PactBrokerFormatter, StringIO.new
|
67
|
-
end
|
68
|
-
|
69
|
-
if options[:format]
|
70
|
-
::RSpec.configuration.add_formatter options[:format]
|
71
|
-
# Don't want to mess up the JSON parsing with messages to stdout, so send it to stderr
|
72
|
-
Pact.configuration.output_stream = Pact.configuration.error_stream
|
73
|
-
else
|
74
|
-
# Sometimes the formatter set in the cli.rb get set with an output of StringIO.. don't know why
|
75
|
-
formatter_class = Pact::RSpec.formatter_class
|
76
|
-
pact_formatter = ::RSpec.configuration.formatters.find {|f| f.class == formatter_class && f.output == ::RSpec.configuration.output_stream}
|
77
|
-
::RSpec.configuration.add_formatter formatter_class unless pact_formatter
|
78
|
-
end
|
79
|
-
::RSpec.configuration.full_backtrace = @options[:full_backtrace]
|
65
|
+
configure_output
|
80
66
|
|
81
67
|
config.before(:suite) do
|
82
68
|
# Preload app before suite so the classes loaded in memory are consistent for
|
@@ -138,6 +124,28 @@ module Pact
|
|
138
124
|
end
|
139
125
|
end
|
140
126
|
|
127
|
+
def configure_output
|
128
|
+
Pact::RSpec.with_rspec_3 do
|
129
|
+
::RSpec.configuration.add_formatter Pact::Provider::RSpec::PactBrokerFormatter, StringIO.new
|
130
|
+
end
|
131
|
+
|
132
|
+
output = options[:out] || Pact.configuration.output_stream
|
133
|
+
if options[:format]
|
134
|
+
::RSpec.configuration.add_formatter options[:format], output
|
135
|
+
if !options[:out]
|
136
|
+
# Don't want to mess up the JSON parsing with messages to stdout, so send it to stderr
|
137
|
+
Pact.configuration.output_stream = Pact.configuration.error_stream
|
138
|
+
end
|
139
|
+
else
|
140
|
+
# Sometimes the formatter set in the cli.rb get set with an output of StringIO.. don't know why
|
141
|
+
formatter_class = Pact::RSpec.formatter_class
|
142
|
+
pact_formatter = ::RSpec.configuration.formatters.find {|f| f.class == formatter_class && f.output == ::RSpec.configuration.output_stream}
|
143
|
+
::RSpec.configuration.add_formatter(formatter_class, output) unless pact_formatter
|
144
|
+
end
|
145
|
+
|
146
|
+
::RSpec.configuration.full_backtrace = @options[:full_backtrace]
|
147
|
+
end
|
148
|
+
|
141
149
|
def ordered_pact_json(pact_json)
|
142
150
|
return pact_json if Pact.configuration.interactions_replay_order == :recorded
|
143
151
|
|
data/lib/pact/version.rb
CHANGED
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.
|
4
|
+
version: 1.23.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: 2018-
|
15
|
+
date: 2018-04-15 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: randexp
|