pact-support 1.8.0 → 1.8.1

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
  SHA1:
3
- metadata.gz: 2e798766a40ccdcb43c8aed0bfbb4ee222c266db
4
- data.tar.gz: fb9ab7ab4bac90b552b8c993ff582f035b5a9e00
3
+ metadata.gz: 20803ab69ce7de1114071b9920664f7f48824c66
4
+ data.tar.gz: 290ea395354b4122de84a607f684919b99a91ff0
5
5
  SHA512:
6
- metadata.gz: 3d0363e0c4f19d960c4301cb96918d0eed195bd149eef1f4ce0ea4707c7629abf24a7c496e1918fb73f7b806bfea730e5a28397b972ea69a947e332bd2cd7cff
7
- data.tar.gz: 0ec07b703a4abe989d0507d2f91f0aa96a76b16142e2115abca1ca355d1b0e4333e733c9d0f9142c33674116995a907ca58781d0b07ba970625253a4eebe1df6
6
+ metadata.gz: 908d1db1d4356dbe878d2373c7092c1ed007482a490a199c5fb7045d02dcc57775e1378627714e1e7e07310e3419551194af9816eb291080ea778362b978e89a
7
+ data.tar.gz: 5dab25c5ec872af637559ea7ac255b9614c4b630963bf0ac9698a089d0771cdf19f5c164c351944835f8c4fa759cb4335064af5737f8733d660c3b2cb2266a50
@@ -1,3 +1,12 @@
1
+ <a name="v1.8.1"></a>
2
+ ### v1.8.1 (2018-11-15)
3
+
4
+
5
+ #### Bug Fixes
6
+
7
+ * correctly handle ignored 'combine' rule ([cd52108](/../../commit/cd52108))
8
+
9
+
1
10
  <a name="v1.8.0"></a>
2
11
  ### v1.8.0 (2018-10-01)
3
12
 
@@ -116,7 +116,7 @@ module Pact
116
116
  if @matching_rules.any?
117
117
  @matching_rules.each do | path, rules_hash |
118
118
  rules_hash.each do | key, value |
119
- $stderr.puts "WARN: Ignoring unsupported #{key} #{value} for path #{path}" if value.any?
119
+ $stderr.puts "WARN: Ignoring unsupported #{key} #{value} for path #{path}" if value_present?(value)
120
120
  end
121
121
  end
122
122
  end
@@ -129,6 +129,10 @@ module Pact
129
129
  def log_used_rule path, key, value
130
130
  @used_rules << [path, key, value]
131
131
  end
132
+
133
+ def value_present? value
134
+ value.respond_to?(:any?) ? value.any? : true
135
+ end
132
136
  end
133
137
  end
134
138
  end
@@ -1,5 +1,5 @@
1
1
  module Pact
2
2
  module Support
3
- VERSION = "1.8.0"
3
+ VERSION = "1.8.1"
4
4
  end
5
5
  end
@@ -456,6 +456,29 @@ module Pact
456
456
  end
457
457
  end
458
458
 
459
+ describe "with a combine key" do
460
+ let(:expected) do
461
+ {
462
+ "foo" => "bar"
463
+ }
464
+ end
465
+
466
+ let(:matching_rules) do
467
+ {
468
+ "$.foo" => {
469
+ "matchers" => [{ "match" => "type" }],
470
+ "combine" => "AND"
471
+ }
472
+ }
473
+
474
+ end
475
+
476
+ it "logs the ignored rule" do
477
+ allow(Pact.configuration.error_stream).to receive(:puts)
478
+ expect(Pact.configuration.error_stream).to receive(:puts).with("WARN: Ignoring unsupported combine AND for path $['foo']")
479
+ subject
480
+ end
481
+ end
459
482
  end
460
483
  end
461
484
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1
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: 2018-10-03 00:00:00.000000000 Z
15
+ date: 2018-11-15 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: randexp