pact 1.43.1 → 1.44.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 +10 -0
- data/lib/pact/consumer/configuration/dsl.rb +0 -1
- data/lib/pact/provider/configuration/dsl.rb +6 -1
- data/lib/pact/provider/configuration/message_provider_dsl.rb +32 -0
- data/lib/pact/version.rb +1 -1
- data/pact.gemspec +2 -1
- metadata +24 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f3a5830ca87a36c72ef7f4642781ec9b3ed8fc0c9b7ffce35201629a17da27f1
|
4
|
+
data.tar.gz: baaac2acf2cf8e5a25b2507e7d85a4005f217982f5145c3377c27b4148d0c6f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 055dca7b6c709c9ee90c893c8ab9c4684f142d3f742db093480131584a98079ca7bed669f521aedadbacf38cfd9c9161ab6cbd3c8d36118402407d33a0a7ccfc
|
7
|
+
data.tar.gz: f39ffea4a82a4608a5c6b86c5cd5ed868489ffec975698da02633804374526083aae727d24fcd9cbf462ca36186c23e6c5793b45557fc6aaf5b15c2b2e4ff859
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'pact/provider/configuration/service_provider_dsl'
|
2
|
+
require 'pact/provider/configuration/message_provider_dsl'
|
2
3
|
|
3
4
|
module Pact
|
4
5
|
|
@@ -8,6 +9,10 @@ module Pact
|
|
8
9
|
def service_provider name, &block
|
9
10
|
Configuration::ServiceProviderDSL.build(name, &block)
|
10
11
|
end
|
12
|
+
|
13
|
+
def message_provider name, &block
|
14
|
+
Configuration::MessageProviderDSL.build(name, &block)
|
15
|
+
end
|
11
16
|
end
|
12
17
|
end
|
13
|
-
end
|
18
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'pact/provider/configuration/service_provider_dsl'
|
2
|
+
|
3
|
+
module Pact
|
4
|
+
module Provider
|
5
|
+
module Configuration
|
6
|
+
class MessageProviderDSL < ServiceProviderDSL
|
7
|
+
class RackToMessageAdapter
|
8
|
+
def initialize(message_builder)
|
9
|
+
@message_builder = message_builder
|
10
|
+
end
|
11
|
+
|
12
|
+
def call(env)
|
13
|
+
request_body_json = JSON.parse(env['rack.input'].read)
|
14
|
+
contents = @message_builder.call(request_body_json['description'])
|
15
|
+
[200, {"Content-Type" => "application/json"}, [{ contents: contents }.to_json]]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def initialize name
|
20
|
+
super
|
21
|
+
@mapper_block = lambda { |args| }
|
22
|
+
end
|
23
|
+
|
24
|
+
dsl do
|
25
|
+
def builder &block
|
26
|
+
self.app_block = lambda { RackToMessageAdapter.new(block) }
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/pact/version.rb
CHANGED
data/pact.gemspec
CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |gem|
|
|
33
33
|
gem.add_runtime_dependency 'term-ansicolor', '~> 1.0'
|
34
34
|
|
35
35
|
gem.add_runtime_dependency 'pact-support', '~> 1.9'
|
36
|
-
gem.add_runtime_dependency 'pact-mock_service', '~> 3.0'
|
36
|
+
gem.add_runtime_dependency 'pact-mock_service', '~> 3.0', '>= 3.3.1'
|
37
37
|
|
38
38
|
gem.add_development_dependency 'rake', '~> 10.0.3'
|
39
39
|
gem.add_development_dependency 'webmock', '~> 3.0'
|
@@ -45,4 +45,5 @@ Gem::Specification.new do |gem|
|
|
45
45
|
gem.add_development_dependency 'appraisal', '~> 2.2'
|
46
46
|
gem.add_development_dependency 'conventional-changelog', '~> 1.3'
|
47
47
|
gem.add_development_dependency 'bump', '~> 0.5'
|
48
|
+
gem.add_development_dependency 'pact-message'
|
48
49
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pact
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.44.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-01-
|
15
|
+
date: 2020-01-16 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rspec
|
@@ -111,6 +111,9 @@ dependencies:
|
|
111
111
|
- - "~>"
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: '3.0'
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: 3.3.1
|
114
117
|
type: :runtime
|
115
118
|
prerelease: false
|
116
119
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -118,6 +121,9 @@ dependencies:
|
|
118
121
|
- - "~>"
|
119
122
|
- !ruby/object:Gem::Version
|
120
123
|
version: '3.0'
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: 3.3.1
|
121
127
|
- !ruby/object:Gem::Dependency
|
122
128
|
name: rake
|
123
129
|
requirement: !ruby/object:Gem::Requirement
|
@@ -258,6 +264,20 @@ dependencies:
|
|
258
264
|
- - "~>"
|
259
265
|
- !ruby/object:Gem::Version
|
260
266
|
version: '0.5'
|
267
|
+
- !ruby/object:Gem::Dependency
|
268
|
+
name: pact-message
|
269
|
+
requirement: !ruby/object:Gem::Requirement
|
270
|
+
requirements:
|
271
|
+
- - ">="
|
272
|
+
- !ruby/object:Gem::Version
|
273
|
+
version: '0'
|
274
|
+
type: :development
|
275
|
+
prerelease: false
|
276
|
+
version_requirements: !ruby/object:Gem::Requirement
|
277
|
+
requirements:
|
278
|
+
- - ">="
|
279
|
+
- !ruby/object:Gem::Version
|
280
|
+
version: '0'
|
261
281
|
description: Enables consumer driven contract testing, providing a mock service and
|
262
282
|
DSL for the consumer project, and interaction playback and verification for the
|
263
283
|
service provider project.
|
@@ -317,6 +337,7 @@ files:
|
|
317
337
|
- lib/pact/provider/configuration.rb
|
318
338
|
- lib/pact/provider/configuration/configuration_extension.rb
|
319
339
|
- lib/pact/provider/configuration/dsl.rb
|
340
|
+
- lib/pact/provider/configuration/message_provider_dsl.rb
|
320
341
|
- lib/pact/provider/configuration/pact_verification.rb
|
321
342
|
- lib/pact/provider/configuration/pact_verification_from_broker.rb
|
322
343
|
- lib/pact/provider/configuration/service_provider_config.rb
|
@@ -388,7 +409,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
388
409
|
version: '0'
|
389
410
|
requirements: []
|
390
411
|
rubyforge_project:
|
391
|
-
rubygems_version: 2.
|
412
|
+
rubygems_version: 2.7.7
|
392
413
|
signing_key:
|
393
414
|
specification_version: 4
|
394
415
|
summary: Enables consumer driven contract testing, providing a mock service and DSL
|