pact-mock_service 3.12.1 → 3.12.2

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: 64862fa7aeff31038543176f65e51a7e54872db833afd6088509670f622a7001
4
- data.tar.gz: dd20947a6c2e06ebf6e4141053241ef0fc42bbcc49a07dd7ede18961f107425f
3
+ metadata.gz: '08233bef28db9357360423a4752f559c5c90dacb46fedbb0c04fa28d6c3ada69'
4
+ data.tar.gz: bcacff5aec9f076deaa872526118ceb87e4a2316d50929e7095998d0aa568664
5
5
  SHA512:
6
- metadata.gz: 473d51cd8704266332cdae9af9888343a08db864f8761758a367d5d70a096ccb67b29facbae67fd5544ee793270bb50a4a745500a089c04162b5ba4255ed2b25
7
- data.tar.gz: 32e94ebf4a2c84a67b3fe1ea7fad869237fbdcb84ac6824360385ba3689b5db3476ae2c33382089c4f39e9cb786cfbe8f2917614790d6b561fca7418b791f527
6
+ metadata.gz: 364ea60f0b35a35cd4f0f26786bda252ac5a99d7dc102df2e6019da9c36bfba7f23eb1d6929f4233fefbc93de524d6f7d745e4170507d87ac0f841a5c75478f9
7
+ data.tar.gz: f40eb93146e58ffb7169889ac1baecd7ed35276ae3bb65742192559409ffa7fd5607951a413b913a520477acabe8c71c7848cd7a3eb8020a5df0b61c41b375b6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
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
+
1
9
  <a name="v3.12.1"></a>
2
10
  ### v3.12.1 (2023-10-19)
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.com/pact-foundation/pact-mock_service.svg?branch=master)](https://travis-ci.com/pact-foundation/pact-mock_service)
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
 
@@ -24,7 +24,7 @@ module Pact
24
24
  end
25
25
 
26
26
  request[:headers] = headers_from env
27
- body_string = request[:body].read
27
+ body_string = request[:body]&.read || ""
28
28
 
29
29
  if body_string.empty?
30
30
  request.delete :body
@@ -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
@@ -1,5 +1,6 @@
1
1
  require 'pact/mock_service/control_server/app'
2
2
  require 'pact/mock_service/server/webrick_request_monkeypatch'
3
+ require 'rack/handler/webbrick'
3
4
 
4
5
  module Pact
5
6
  module MockService
@@ -5,6 +5,7 @@ require 'pact/mock_service/run'
5
5
  require 'pact/mock_service/server/webrick_request_monkeypatch'
6
6
  require 'pact/specification_version'
7
7
  require 'pact/support/metrics'
8
+ require 'rack/handler/webbrick'
8
9
 
9
10
  module Pact
10
11
  module MockService
@@ -1,5 +1,5 @@
1
1
  module Pact
2
2
  module MockService
3
- VERSION = "3.12.1"
3
+ VERSION = "3.12.2"
4
4
  end
5
5
  end
@@ -0,0 +1,12 @@
1
+ module Rack
2
+ module Handler
3
+ begin
4
+ require 'rack/handler/webrick'
5
+ WEBrick = Class.new(Rack::Handler::WEBrick)
6
+ rescue LoadError
7
+ require 'rackup/handler/webrick'
8
+ WEBrick = Class.new(Rackup::Handler::WEBrick)
9
+ end
10
+ end
11
+ end
12
+
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.1
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: 2023-10-19 00:00:00.000000000 Z
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: '2.0'
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: '2.0'
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.4.21
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