pact-mock_service 3.6.2 → 3.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: 73c7073ed6b327f9f0a747b47555fcb6ef9206b6c57a41a7c3b951d11ac5e1e5
4
- data.tar.gz: f46face2860458edbdc0282acb0a29737a71adec3010bbc4602af6c38c615c6b
3
+ metadata.gz: 9c3129a847616f140d536b6123ab116f691ca5cfd4ded15918d481896a48349f
4
+ data.tar.gz: ddd7f7761c5f0e49e553047387a0bb90a909de764d317c0dd78ebb1935461656
5
5
  SHA512:
6
- metadata.gz: 1491d288d1862ab6bddb50914353b2ed1b51c56cd244dde48db639df8d4ac89e6dd096fb8b52822e78038fdbb0c3eddf893544bc5d38d79f70dee6775d4860de
7
- data.tar.gz: 6e6eebe7ff8017e8682961540730fd851a20a41e75719d662265ab6a8fdf3954fe74dcd3891efaf91e8d476bbaa9f214e74fb2c999aeae95a79e37f7fd693cda
6
+ metadata.gz: 1dc4daeac63353379b94f0a4ba9be811b14cf90d14c37de74d6922aecfc765407270df3cc843907817a54570415f72a26d4fac17f9fd726d0aede35e5fb47168
7
+ data.tar.gz: 5c311e4d4cd99f18aca430e0cfd7d1f9255eec52145843edc84da8c8d72eb39a86ea66aa4fd2c572a7581548bbcf1f4620ca6e75d641f2431afd3ac04f5d553d
@@ -1,3 +1,11 @@
1
+ <a name="v3.7.0"></a>
2
+ ### v3.7.0 (2020-11-13)
3
+
4
+ #### Features
5
+
6
+ * use Pact::Query.parse_string to parse query string ([6cd0733](/../../commit/6cd0733))
7
+ * do not require files until command is executing ([ad54d0b](/../../commit/ad54d0b))
8
+
1
9
  <a name="v3.6.2"></a>
2
10
  ### v3.6.2 (2020-08-10)
3
11
 
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  # Pact Mock and Stub Service
3
3
 
4
- [![Build Status](https://travis-ci.org/pact-foundation/pact-mock_service.svg?branch=master)](https://travis-ci.org/pact-foundation/pact-mock_service)
4
+ [![Build Status](https://travis-ci.com/pact-foundation/pact-mock_service.svg?branch=master)](https://travis-ci.com/pact-foundation/pact-mock_service)
5
5
 
6
6
  This codebase provides the HTTP mock and stub service used by implementations of [Pact][pact]. It is packaged as a gem, and as a standalone executable for Mac OSX and Linux and Windows.
7
7
 
@@ -1,4 +1,6 @@
1
1
  require 'cgi/core'
2
+ require 'pact/consumer_contract/query'
3
+
2
4
  module Pact
3
5
  module Consumer
4
6
 
@@ -11,7 +13,7 @@ module Pact
11
13
  }
12
14
 
13
15
  def params_hash env
14
- CGI::parse env["QUERY_STRING"]
16
+ Pact::Query.parse_string(env["QUERY_STRING"])
15
17
  end
16
18
 
17
19
  def request_as_hash_from env
@@ -1,10 +1,4 @@
1
1
  require 'thor'
2
- require 'webrick/https'
3
- require 'rack/handler/webrick'
4
- require 'fileutils'
5
- require 'pact/mock_service/server/wait_for_server_up'
6
- require 'pact/mock_service/cli/pidfile'
7
- require 'socket'
8
2
 
9
3
  module Pact
10
4
  module MockService
@@ -33,6 +27,7 @@ module Pact
33
27
  method_option :monkeypatch, hide: true
34
28
 
35
29
  def service
30
+ require_common_dependencies
36
31
  require 'pact/mock_service/run'
37
32
  Run.(options)
38
33
  end
@@ -51,6 +46,7 @@ module Pact
51
46
  method_option :sslkey, desc: "Specify the path to the SSL key to use when running the service over HTTPS"
52
47
 
53
48
  def control
49
+ require_common_dependencies
54
50
  require 'pact/mock_service/control_server/run'
55
51
  ControlServer::Run.(options)
56
52
  end
@@ -73,6 +69,7 @@ module Pact
73
69
  method_option :monkeypatch, hide: true
74
70
 
75
71
  def start
72
+ require_common_dependencies
76
73
  start_server(mock_service_pidfile) do
77
74
  service
78
75
  end
@@ -83,6 +80,7 @@ module Pact
83
80
  method_option :pid_dir, desc: "PID dir, defaults to tmp/pids", default: "tmp/pids"
84
81
 
85
82
  def stop
83
+ require_common_dependencies
86
84
  mock_service_pidfile.kill_process
87
85
  end
88
86
 
@@ -103,6 +101,7 @@ module Pact
103
101
  method_option :sslkey, desc: "Specify the path to the SSL key to use when running the service over HTTPS"
104
102
 
105
103
  def restart
104
+ require_common_dependencies
106
105
  restart_server(mock_service_pidfile) do
107
106
  service
108
107
  end
@@ -123,6 +122,7 @@ module Pact
123
122
  method_option :pact_dir, aliases: "-d", desc: "Directory to which the pacts will be written", default: "."
124
123
 
125
124
  def control_start
125
+ require_common_dependencies
126
126
  start_server(control_server_pidfile) do
127
127
  control
128
128
  end
@@ -133,6 +133,7 @@ module Pact
133
133
  method_option :pid_dir, desc: "PID dir, defaults to tmp/pids", default: "tmp/pids"
134
134
 
135
135
  def control_stop
136
+ require_common_dependencies
136
137
  control_server_pidfile.kill_process
137
138
  end
138
139
 
@@ -151,6 +152,7 @@ module Pact
151
152
  method_option :sslkey, desc: "Specify the path to the SSL key to use when running the service over HTTPS"
152
153
 
153
154
  def control_restart
155
+ require_common_dependencies
154
156
  restart_server(control_server_pidfile) do
155
157
  control
156
158
  end
@@ -167,6 +169,15 @@ module Pact
167
169
 
168
170
  no_commands do
169
171
 
172
+ def require_common_dependencies
173
+ require 'webrick/https'
174
+ require 'rack/handler/webrick'
175
+ require 'fileutils'
176
+ require 'pact/mock_service/server/wait_for_server_up'
177
+ require 'pact/mock_service/cli/pidfile'
178
+ require 'socket'
179
+ end
180
+
170
181
  def control_server_pidfile
171
182
  Pidfile.new(pid_dir: options[:pid_dir], name: control_pidfile_name)
172
183
  end
@@ -1,5 +1,5 @@
1
1
  module Pact
2
2
  module MockService
3
- VERSION = "3.6.2"
3
+ VERSION = "3.7.0"
4
4
  end
5
5
  end
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: 3.6.2
4
+ version: 3.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: 2020-08-10 00:00:00.000000000 Z
15
+ date: 2020-11-13 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rack
@@ -124,20 +124,20 @@ dependencies:
124
124
  requirements:
125
125
  - - "~>"
126
126
  - !ruby/object:Gem::Version
127
- version: '1.12'
127
+ version: '1.16'
128
128
  - - ">="
129
129
  - !ruby/object:Gem::Version
130
- version: 1.12.0
130
+ version: 1.16.4
131
131
  type: :runtime
132
132
  prerelease: false
133
133
  version_requirements: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: '1.12'
137
+ version: '1.16'
138
138
  - - ">="
139
139
  - !ruby/object:Gem::Version
140
- version: 1.12.0
140
+ version: 1.16.4
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: filelock
143
143
  requirement: !ruby/object:Gem::Requirement
@@ -172,14 +172,20 @@ dependencies:
172
172
  requirements:
173
173
  - - "~>"
174
174
  - !ruby/object:Gem::Version
175
- version: 10.0.3
175
+ version: '13.0'
176
+ - - ">="
177
+ - !ruby/object:Gem::Version
178
+ version: 13.0.1
176
179
  type: :development
177
180
  prerelease: false
178
181
  version_requirements: !ruby/object:Gem::Requirement
179
182
  requirements:
180
183
  - - "~>"
181
184
  - !ruby/object:Gem::Version
182
- version: 10.0.3
185
+ version: '13.0'
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ version: 13.0.1
183
189
  - !ruby/object:Gem::Dependency
184
190
  name: webmock
185
191
  requirement: !ruby/object:Gem::Requirement