pact-mock_service 3.12.0 → 3.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/README.md +1 -1
- data/lib/pact/consumer/mock_service/rack_request_helper.rb +1 -1
- data/lib/pact/consumer/server.rb +1 -5
- data/lib/pact/mock_service/control_server/run.rb +1 -0
- data/lib/pact/mock_service/request_handlers/interactions_put.rb +1 -1
- data/lib/pact/mock_service/request_handlers/pact_post.rb +1 -1
- data/lib/pact/mock_service/run.rb +1 -0
- data/lib/pact/mock_service/version.rb +1 -1
- data/lib/rack/handler/webbrick.rb +12 -0
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08233bef28db9357360423a4752f559c5c90dacb46fedbb0c04fa28d6c3ada69'
|
4
|
+
data.tar.gz: bcacff5aec9f076deaa872526118ceb87e4a2316d50929e7095998d0aa568664
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 364ea60f0b35a35cd4f0f26786bda252ac5a99d7dc102df2e6019da9c36bfba7f23eb1d6929f4233fefbc93de524d6f7d745e4170507d87ac0f841a5c75478f9
|
7
|
+
data.tar.gz: f40eb93146e58ffb7169889ac1baecd7ed35276ae3bb65742192559409ffa7fd5607951a413b913a520477acabe8c71c7848cd7a3eb8020a5df0b61c41b375b6
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
<a name="v3.12.2"></a>
|
2
|
+
### v3.12.2 (2024-06-15)
|
3
|
+
|
4
|
+
#### Bug Fixes
|
5
|
+
|
6
|
+
* Fix Rack 3 support ([f6b1869](/../../commit/f6b1869))
|
7
|
+
* Fix Rack > 3.0.0 support ([fab4a8f](/../../commit/fab4a8f))
|
8
|
+
|
9
|
+
<a name="v3.12.1"></a>
|
10
|
+
### v3.12.1 (2023-10-19)
|
11
|
+
|
12
|
+
#### Bug Fixes
|
13
|
+
|
14
|
+
* use .read instead of .string for reading stream from rack.input ([000e3fd](/../../commit/000e3fd))
|
15
|
+
|
1
16
|
<a name="v3.12.0"></a>
|
2
17
|
### v3.12.0 (2023-10-18)
|
3
18
|
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
# Pact Mock and Stub Service
|
3
3
|
|
4
|
-
[![Build Status](https://
|
4
|
+
[![Build Status](https://github.com/pact-foundation/pact-mock_service/actions/workflows/test.yml/badge.svg)](https://github.com/pact-foundation/pact-mock_service/actions/workflows/test.yml)
|
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
|
|
data/lib/pact/consumer/server.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'uri'
|
2
2
|
require 'net/http'
|
3
3
|
require 'rack'
|
4
|
+
require 'rack/handler/webbrick'
|
4
5
|
|
5
6
|
# Copied shamelessly from Capybara
|
6
7
|
# Used to run a mock service in a new thread when started by the AppManager or the ControlServer
|
@@ -66,11 +67,6 @@ module Pact
|
|
66
67
|
end
|
67
68
|
|
68
69
|
def run_default_server(app, port)
|
69
|
-
begin
|
70
|
-
require 'rack/handler/webrick'
|
71
|
-
rescue LoadError
|
72
|
-
require 'rackup/handler/webrick'
|
73
|
-
end
|
74
70
|
Rack::Handler::WEBrick.run(app, **webrick_opts) do |server|
|
75
71
|
@port = server[:Port]
|
76
72
|
end
|
@@ -23,7 +23,7 @@ module Pact
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def respond env
|
26
|
-
request_body = JSON.load(env['rack.input'].
|
26
|
+
request_body = JSON.load(env['rack.input'].read)
|
27
27
|
parsing_options = { pact_specification_version: pact_specification_version }
|
28
28
|
interactions = request_body['interactions'].collect { | hash | Interaction.from_hash(hash, parsing_options) }
|
29
29
|
begin
|
@@ -25,7 +25,7 @@ module Pact
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def respond env
|
28
|
-
body = env['rack.input'].
|
28
|
+
body = env['rack.input'].read
|
29
29
|
consumer_contract_details = body.size > 0 ? JSON.parse(body, symbolize_names: true) : {}
|
30
30
|
consumer_contract_params = default_options.merge(consumer_contract_details.merge(interactions: verified_interactions))
|
31
31
|
consumer_contract_writer = ConsumerContractWriter.new(consumer_contract_params, logger)
|
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.12.
|
4
|
+
version: 3.12.2
|
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:
|
15
|
+
date: 2024-06-15 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rack
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: '
|
23
|
+
version: '3.0'
|
24
24
|
- - "<"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '4.0'
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '3.0'
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: '4.0'
|
@@ -391,6 +391,7 @@ files:
|
|
391
391
|
- lib/pact/stub_service/cli.rb
|
392
392
|
- lib/pact/support/expand_file_list.rb
|
393
393
|
- lib/pact/support/metrics.rb
|
394
|
+
- lib/rack/handler/webbrick.rb
|
394
395
|
homepage: https://github.com/bethesque/pact-mock_service
|
395
396
|
licenses:
|
396
397
|
- MIT
|
@@ -410,7 +411,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
410
411
|
- !ruby/object:Gem::Version
|
411
412
|
version: '0'
|
412
413
|
requirements: []
|
413
|
-
rubygems_version: 3.
|
414
|
+
rubygems_version: 3.5.13
|
414
415
|
signing_key:
|
415
416
|
specification_version: 4
|
416
417
|
summary: Provides a mock service for use with Pact
|