pact-mock_service 2.6.4 → 2.7.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 +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +10 -6
- data/lib/pact/mock_service/app.rb +1 -1
- data/lib/pact/mock_service/version.rb +1 -1
- data/lib/pact/stub_service/cli.rb +6 -4
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a983f436b468fd2f527a129750823d49276141e1246817da7124225a12d2b6e
|
4
|
+
data.tar.gz: ebf7bee8331a4f26e127adcbe8d79f36b6fad80c0f22963753d265990f735369
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de5168f4ba6c88f9e7ea3dd7f03b64e105a37f94a33975d4f20c03b58af328ae18f57ee96c6919bf520325bb850c37be48effa99b877de2e6e95ad17ffd666b2
|
7
|
+
data.tar.gz: 5b0fd099ed6d5ac6f905e8e0ba148b1ea37757e02657ea3db56889bd5f03077ab1844c9348ade2af94b0ef3e42cfb58185a402cb7d1c5677056fd93e5567f461
|
data/CHANGELOG.md
CHANGED
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
|
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).
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
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(
|
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
|
@@ -10,17 +10,19 @@ module Pact
|
|
10
10
|
module StubService
|
11
11
|
class CLI < Pact::MockService::CLI::CustomThor
|
12
12
|
|
13
|
-
desc '
|
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.
|
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-
|
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:
|
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:
|
190
|
+
version: '3.4'
|
191
191
|
- !ruby/object:Gem::Dependency
|
192
192
|
name: pry
|
193
193
|
requirement: !ruby/object:Gem::Requirement
|