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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 4f770afeb5bcc6a3f87b8bef7469f3ca7ac674d8
4
- data.tar.gz: 15139fb4ed56138410a6b46ab75c71314104ba07
2
+ SHA256:
3
+ metadata.gz: f3a5830ca87a36c72ef7f4642781ec9b3ed8fc0c9b7ffce35201629a17da27f1
4
+ data.tar.gz: baaac2acf2cf8e5a25b2507e7d85a4005f217982f5145c3377c27b4148d0c6f4
5
5
  SHA512:
6
- metadata.gz: 214f1133c45463be3ec2f4e393d31c00ac3fa9251d5e7c174c4491dc799cc3354fd0126fd2a7a8673b7b9d2a3bc4208b0b793b6f466c61d7dbdd34502c056f05
7
- data.tar.gz: 80ae6c4b68a4e5cbd3fdc56bca61e6ec5d384de3bbda35c6ebbe2ba36aef3bfb86831ae528fbe2a123c1ac941cad6de11a451439d437bd491dedc08fd2db41d0
6
+ metadata.gz: 055dca7b6c709c9ee90c893c8ab9c4684f142d3f742db093480131584a98079ca7bed669f521aedadbacf38cfd9c9161ab6cbd3c8d36118402407d33a0a7ccfc
7
+ data.tar.gz: f39ffea4a82a4608a5c6b86c5cd5ed868489ffec975698da02633804374526083aae727d24fcd9cbf462ca36186c23e6c5793b45557fc6aaf5b15c2b2e4ff859
@@ -1,3 +1,13 @@
1
+ <a name="v1.44.0"></a>
2
+ ### v1.44.0 (2020-01-16)
3
+
4
+
5
+ #### Features
6
+
7
+ * **message pact**
8
+ * add DSL for configuring Message Pact verifications ([a5181b6](/../../commit/a5181b6))
9
+
10
+
1
11
  <a name="v1.43.1"></a>
2
12
  ### v1.43.1 (2020-01-11)
3
13
 
@@ -1,7 +1,6 @@
1
1
  require 'pact/consumer/configuration/service_consumer'
2
2
 
3
3
  module Pact
4
-
5
4
  module Consumer
6
5
  module DSL
7
6
  def service_consumer name, &block
@@ -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
@@ -1,4 +1,4 @@
1
1
  # Remember to bump pact-provider-proxy when this changes major version
2
2
  module Pact
3
- VERSION = "1.43.1"
3
+ VERSION = "1.44.0"
4
4
  end
@@ -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.43.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-11 00:00:00.000000000 Z
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.6.14.3
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