pact-mock_service 2.5.4 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +3 -0
- data/lib/pact/mock_service/cli.rb +2 -0
- data/lib/pact/mock_service/run.rb +6 -0
- data/lib/pact/mock_service/version.rb +1 -1
- data/lib/pact/stub_service/cli.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 185bbdec16689a5ee71ed57adc6a160c649e59ffa337c76e6d436aaa18363fba
|
4
|
+
data.tar.gz: 66ed5da45fb0e775b0a8f23161f98a1e0f20b0d280cbdfe10622e1d0f05a79e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 117edde92e78dc18194847a966b2d79b356d2f96d7c9e0c8914847772a2d4e2be13a5704e1f2c3534d04dac09a44cdd74674a2211432ce4d688929ef36d47af7
|
7
|
+
data.tar.gz: 921796fad565db6b4111226cd80fdc2a43362fecf4a7331854c7edcb1f41cbc6c0710c6d14c7201efebd56b2c340cdeeee7f5d9c2fab8416344df328865fa055
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,9 @@ Do this to generate your change history
|
|
2
2
|
|
3
3
|
git log --pretty=format:' * %h - %s (%an, %ad)' vX.Y.Z..HEAD
|
4
4
|
|
5
|
+
### 2.6.0 (2017-11-07)
|
6
|
+
* cad84fd - feat(monkeypatch): allow a monkeypatch file to be loaded before starting the mock service (Beth Skurrie, Tue Nov 7 13:30:05 2017 +1100)
|
7
|
+
|
5
8
|
### 2.5.4 (2017-10-30)
|
6
9
|
* 799b822 - fix: change rack-test to development dependency (Beth Skurrie, Mon Oct 30 10:05:11 2017 +1100)
|
7
10
|
|
@@ -26,6 +26,7 @@ module Pact
|
|
26
26
|
method_option :ssl, desc: "Use a self-signed SSL cert to run the service over HTTPS", type: :boolean, default: false
|
27
27
|
method_option :sslcert, desc: "Specify the path to the SSL cert to use when running the service over HTTPS"
|
28
28
|
method_option :sslkey, desc: "Specify the path to the SSL key to use when running the service over HTTPS"
|
29
|
+
method_option :monkeypatch, hide: true
|
29
30
|
|
30
31
|
def service
|
31
32
|
require 'pact/mock_service/run'
|
@@ -63,6 +64,7 @@ module Pact
|
|
63
64
|
method_option :ssl, desc: "Use a self-signed SSL cert to run the service over HTTPS", type: :boolean, default: false
|
64
65
|
method_option :sslcert, desc: "Specify the path to the SSL cert to use when running the service over HTTPS"
|
65
66
|
method_option :sslkey, desc: "Specify the path to the SSL key to use when running the service over HTTPS"
|
67
|
+
method_option :monkeypatch, hide: true
|
66
68
|
|
67
69
|
def start
|
68
70
|
start_server(mock_service_pidfile) do
|
@@ -21,6 +21,8 @@ module Pact
|
|
21
21
|
trap(:INT) { call_shutdown_hooks }
|
22
22
|
trap(:TERM) { call_shutdown_hooks }
|
23
23
|
|
24
|
+
require_monkeypatch
|
25
|
+
|
24
26
|
Rack::Handler::WEBrick.run(mock_service, webbrick_opts)
|
25
27
|
end
|
26
28
|
|
@@ -101,6 +103,10 @@ module Pact
|
|
101
103
|
def base_url
|
102
104
|
options[:ssl] ? "https://#{host}:#{port}" : "http://#{host}:#{port}"
|
103
105
|
end
|
106
|
+
|
107
|
+
def require_monkeypatch
|
108
|
+
require options[:monkeypatch] if options[:monkeypatch]
|
109
|
+
end
|
104
110
|
end
|
105
111
|
end
|
106
112
|
end
|
@@ -29,6 +29,7 @@ module Pact
|
|
29
29
|
method_option :sslcert, desc: "Specify the path to the SSL cert to use when running the service over HTTPS"
|
30
30
|
method_option :sslkey, desc: "Specify the path to the SSL key to use when running the service over HTTPS"
|
31
31
|
method_option :stub_pactfile_paths, hide: true
|
32
|
+
method_option :monkeypatch, hide: true
|
32
33
|
|
33
34
|
def service(*pactfiles)
|
34
35
|
raise Thor::Error.new("Please provide an existing pact file to load") if pactfiles.empty?
|
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.6.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: 2017-
|
15
|
+
date: 2017-11-07 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rack
|
@@ -370,7 +370,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
370
370
|
version: '0'
|
371
371
|
requirements: []
|
372
372
|
rubyforge_project:
|
373
|
-
rubygems_version: 2.
|
373
|
+
rubygems_version: 2.7.1
|
374
374
|
signing_key:
|
375
375
|
specification_version: 4
|
376
376
|
summary: Provides a mock service for use with Pact
|