pact-mock_service 2.6.4 → 2.7.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
  SHA256:
3
- metadata.gz: d09a52e010b09d1a4500bf4562c446accf5b87e2ea62275040895fc707a916d3
4
- data.tar.gz: a1055e74617cc213375618e71c99a7fae61b5e4c87204732c3439fba4e8c7935
3
+ metadata.gz: 5a983f436b468fd2f527a129750823d49276141e1246817da7124225a12d2b6e
4
+ data.tar.gz: ebf7bee8331a4f26e127adcbe8d79f36b6fad80c0f22963753d265990f735369
5
5
  SHA512:
6
- metadata.gz: f866bc895e0bca3870808409c1b8fed2acc31372d3bba3db16d3bba371ccad209b7a628d66e2c588a15f90eebda2d7bf0f3b35b4e33a28603cdeaceda493952c
7
- data.tar.gz: 51480cd67bdc8d87e12a119133537b4bb115ff828885e5f51723383e7081106f1d7da13f5b017417d069ac14636afe85131ff549f190ce0e25428c0ccf77e0be
6
+ metadata.gz: de5168f4ba6c88f9e7ea3dd7f03b64e105a37f94a33975d4f20c03b58af328ae18f57ee96c6919bf520325bb850c37be48effa99b877de2e6e95ad17ffd666b2
7
+ data.tar.gz: 5b0fd099ed6d5ac6f905e8e0ba148b1ea37757e02657ea3db56889bd5f03077ab1844c9348ade2af94b0ef3e42cfb58185a402cb7d1c5677056fd93e5567f461
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ <a name="v2.7.0"></a>
2
+ ### v2.7.0 (2018-05-04)
3
+
4
+
5
+ #### Features
6
+
7
+ * allow pact-stub-server to read pact from an http uri ([5cce3b2](/../../commit/5cce3b2))
8
+
9
+
1
10
  <a name="v2.6.4"></a>
2
11
  ### v2.6.4 (2018-02-22)
3
12
 
data/README.md CHANGED
@@ -102,7 +102,7 @@ Unlike the mock service, which has a Ruby DSL for managing its lifecycle, the mo
102
102
 
103
103
  ```
104
104
  Usage:
105
- pact-stub-service PACT ...
105
+ pact-stub-service PACT_URI ...
106
106
 
107
107
  Options:
108
108
  -p, [--port=PORT] # Port on which to run the service
@@ -115,11 +115,15 @@ Options:
115
115
  [--sslkey=SSLKEY] # Specify the path to the SSL key to use when running the service over HTTPS
116
116
 
117
117
  Description:
118
- Start a stub service with the given pact file(s). Where multiple matching interactions are found, the
119
- interactions will be sorted by response status, and the first one will be returned. This may lead to some
120
- non-deterministic behaviour. If you are having problems with this, please raise it on the pact-dev google
121
- group, and we can discuss some potential enhancements. Note that only versions 1 and 2 of the pact
122
- specification are currently supported.
118
+ Start a stub service with the given pact file(s). Pact URIs may be local file paths or HTTP.
119
+ Include any basic auth details in the URL using the format https://USERNAME:PASSWORD@URI.
120
+ Where multiple matching interactions are found, the interactions will be sorted by
121
+ response status, and the first one will be returned. This may lead to some non-deterministic
122
+ behaviour. If you are having problems with this, please raise it on the pact-dev google group,
123
+ and we can discuss some potential enhancements.
124
+ Note that only versions 1 and 2 of the pact specification are currently fully supported.
125
+ Pacts using the v3 format may be used, however, any matching features added in v4 will
126
+ currently be ignored.
123
127
  ```
124
128
 
125
129
  ## Contributing
@@ -40,7 +40,7 @@ module Pact
40
40
  def setup_stub stub_pactfile_paths
41
41
  interactions = stub_pactfile_paths.collect do | pactfile_path |
42
42
  $stdout.puts "INFO: Loading interactions from #{pactfile_path}"
43
- hash_interactions = JSON.parse(File.read(pactfile_path))['interactions']
43
+ hash_interactions = JSON.parse(Pact::PactFile.read(pactfile_path))['interactions']
44
44
  hash_interactions.collect { | hash | Interaction.from_hash(hash) }
45
45
  end.flatten
46
46
  @session.set_expected_interactions interactions
@@ -1,5 +1,5 @@
1
1
  module Pact
2
2
  module MockService
3
- VERSION = "2.6.4"
3
+ VERSION = "2.7.0"
4
4
  end
5
5
  end
@@ -10,17 +10,19 @@ module Pact
10
10
  module StubService
11
11
  class CLI < Pact::MockService::CLI::CustomThor
12
12
 
13
- desc 'PACT ...', "Start a stub service with the given pact file(s)."
13
+ desc 'PACT_URI ...', "Start a stub service with the given pact file(s)."
14
14
  long_desc <<-DOC
15
- Start a stub service with the given pact file(s).
15
+ Start a stub service with the given pact file(s). Pact URIs may be local file paths or HTTP.
16
+ Include any basic auth details in the URL using the format https://USERNAME:PASSWORD@URI.
16
17
  Where multiple matching interactions are found, the interactions will be sorted by
17
18
  response status, and the first one will be returned. This may lead to some non-deterministic
18
19
  behaviour. If you are having problems with this, please raise it on the pact-dev google group,
19
20
  and we can discuss some potential enhancements.
20
- Note that only versions 1 and 2 of the pact specification are currently supported.
21
+ Note that only versions 1 and 2 of the pact specification are currently fully supported.
22
+ Pacts using the v3 format may be used, however, any matching features added in v4 will
23
+ currently be ignored.
21
24
  DOC
22
25
 
23
-
24
26
  method_option :port, aliases: "-p", desc: "Port on which to run the service"
25
27
  method_option :host, aliases: "-h", desc: "Host on which to bind the service", default: 'localhost'
26
28
  method_option :log, aliases: "-l", desc: "File to which to log output"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact-mock_service
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.4
4
+ version: 2.7.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-02-22 00:00:00.000000000 Z
15
+ date: 2018-05-04 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rack
@@ -180,14 +180,14 @@ dependencies:
180
180
  requirements:
181
181
  - - "~>"
182
182
  - !ruby/object:Gem::Version
183
- version: 1.18.0
183
+ version: '3.4'
184
184
  type: :development
185
185
  prerelease: false
186
186
  version_requirements: !ruby/object:Gem::Requirement
187
187
  requirements:
188
188
  - - "~>"
189
189
  - !ruby/object:Gem::Version
190
- version: 1.18.0
190
+ version: '3.4'
191
191
  - !ruby/object:Gem::Dependency
192
192
  name: pry
193
193
  requirement: !ruby/object:Gem::Requirement