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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ccd9af83fa9ba1a3d2171550929317fbfa97678c
4
- data.tar.gz: 6eaa5e73f166c832a419b9e1e723e433bb10903b
3
+ metadata.gz: 2f08c3f242d549648001e7294df45094bf80bdfe
4
+ data.tar.gz: 84c7976f630dcaee652d7c10eb8d6a2bcd9c64a4
5
5
  SHA512:
6
- metadata.gz: 76f38cb8c1fadd053fb68c46246bb188a610fa9296ddc6b959bf9f55ce56fa7348620219362c252a2d1bf2e95baa97848d6b64a5241eb7200097fc54056d59d2
7
- data.tar.gz: 04d8b7f57d254b2f95bf711903866fc24b02c7e551e9886988ff83621cfa9320e1f70d987df98a3ee6eee0adfb2d25c0fbecac90faa7cc196285ff949af0ec49
6
+ metadata.gz: d844246c78be90a05be79a69901b9d57c27d5f31b6ea4b2ef79160e2b9524b7e56788ba3b5308815e0108dec02c1f977be528af6f69f1f4c3c5debfda60277fa
7
+ data.tar.gz: 508f3d6b351a05dc480122ddca8c4ea86fc7c4169d58e309649ae0e39a07bf7e8ac0960d8bbd12c381cba25bf8fdd4ed5ad2642b2286210af97ce8033e4beff2
@@ -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
 
@@ -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
@@ -1,3 +1,5 @@
1
+ require 'erb'
2
+
1
3
  module Pact
2
4
  module Doc
3
5
  module Markdown
@@ -32,7 +34,7 @@ module Pact
32
34
  end
33
35
 
34
36
  def item title, file_name
35
- "* [#{title}](#{file_name})"
37
+ "* [#{title}](#{ERB::Util.url_encode(file_name)})"
36
38
  end
37
39
 
38
40
  end
@@ -62,21 +62,7 @@ module Pact
62
62
  config.output_stream = Pact.configuration.output_stream
63
63
  end
64
64
 
65
- Pact::RSpec.with_rspec_3 do
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
 
@@ -1,4 +1,4 @@
1
1
  # Remember to bump pact-provider-proxy when this changes major version
2
2
  module Pact
3
- VERSION = "1.22.2"
3
+ VERSION = "1.23.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.22.2
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-03-24 00:00:00.000000000 Z
15
+ date: 2018-04-15 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: randexp