pact-support 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/pact/matchers/{extract_messages.rb → extract_diff_messages.rb} +0 -0
- data/lib/pact/matchers/unix_diff_formatter.rb +2 -1
- data/lib/pact/matching_rules/extract.rb +9 -1
- data/lib/pact/matching_rules/merge.rb +1 -1
- data/lib/pact/support/version.rb +1 -1
- data/spec/lib/pact/matchers/{extract_messages_spec.rb → extract_diff_messages_spec.rb} +1 -1
- data/spec/lib/pact/matching_rules/extract_spec.rb +14 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5705c6f8c4fe983c2cb2c5f2be606e3d494f1ac3
|
4
|
+
data.tar.gz: 4ba3900546869ecf9f86d783ab3e2d74addd028c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8bf385b08ed2113cb7332df410559b259bbf93306e77ba00f23ec8a22b24556f152e69e88d317066f8c77ce8521ac2e0bc8bc177f662da27371a7afc1e0b52b
|
7
|
+
data.tar.gz: 2300ed0ea707978c082fe214694d495cef48a323350e23d27c4a97b932bde6a122f915ee7fc493733f351da7a2042eda83e77860bafffbc949e7cabc840acc32
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,9 @@ Do this to generate your change history
|
|
2
2
|
|
3
3
|
git log --pretty=format:' * %h - %s (%an, %ad)'
|
4
4
|
|
5
|
+
### 1.1.3 (28 July 2017)
|
6
|
+
* cd0fc09 - fix(pact serialisation): Use square bracket notation for JSON path keys containing dots when serialising the pact Fixes https://github.com/pact-foundation/pact-support/issues/39 (Beth Skurrie, Fri Jul 28 09:39:15 2017 +1000)
|
7
|
+
|
5
8
|
### 1.1.2 (20 June 2017)
|
6
9
|
* 8c3e53d - Fixing recursive require problems for https://github.com/pact-foundation/pact-support/issues/36 (Beth Skurrie, Tue Jun 20 18:59:24 2017 +1000)
|
7
10
|
|
File without changes
|
@@ -38,7 +38,7 @@ module Pact
|
|
38
38
|
|
39
39
|
def recurse_hash hash, path, match_type
|
40
40
|
hash.each do | (key, value) |
|
41
|
-
recurse value, "#{path}
|
41
|
+
recurse value, "#{path}#{next_path_part(key)}", match_type
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
@@ -76,6 +76,14 @@ module Pact
|
|
76
76
|
rules[path]['match'] = match_type
|
77
77
|
end
|
78
78
|
end
|
79
|
+
|
80
|
+
def next_path_part key
|
81
|
+
if key.to_s.include?('.')
|
82
|
+
"[\"#{key}\"]"
|
83
|
+
else
|
84
|
+
".#{key}"
|
85
|
+
end
|
86
|
+
end
|
79
87
|
end
|
80
88
|
end
|
81
89
|
end
|
data/lib/pact/support/version.rb
CHANGED
@@ -196,6 +196,20 @@ module Pact
|
|
196
196
|
expect(subject).to eq rules
|
197
197
|
end
|
198
198
|
end
|
199
|
+
|
200
|
+
context "with a key containing a dot" do
|
201
|
+
let(:matchable) do
|
202
|
+
{
|
203
|
+
"key" => {
|
204
|
+
"key.with.dots" => Pact::SomethingLike.new("foo")
|
205
|
+
}
|
206
|
+
}
|
207
|
+
end
|
208
|
+
|
209
|
+
it "uses square brackets notation for the key with dots" do
|
210
|
+
expect(subject.keys).to include '$.key["key.with.dots"]'
|
211
|
+
end
|
212
|
+
end
|
199
213
|
end
|
200
214
|
end
|
201
215
|
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.1.
|
4
|
+
version: 1.1.3
|
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: 2017-
|
15
|
+
date: 2017-07-27 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: randexp
|
@@ -274,7 +274,7 @@ files:
|
|
274
274
|
- lib/pact/matchers/difference_indicator.rb
|
275
275
|
- lib/pact/matchers/embedded_diff_formatter.rb
|
276
276
|
- lib/pact/matchers/expected_type.rb
|
277
|
-
- lib/pact/matchers/
|
277
|
+
- lib/pact/matchers/extract_diff_messages.rb
|
278
278
|
- lib/pact/matchers/index_not_found.rb
|
279
279
|
- lib/pact/matchers/list_diff_formatter.rb
|
280
280
|
- lib/pact/matchers/matchers.rb
|
@@ -325,7 +325,7 @@ files:
|
|
325
325
|
- spec/lib/pact/matchers/differ_spec.rb
|
326
326
|
- spec/lib/pact/matchers/difference_spec.rb
|
327
327
|
- spec/lib/pact/matchers/embedded_diff_formatter_spec.rb
|
328
|
-
- spec/lib/pact/matchers/
|
328
|
+
- spec/lib/pact/matchers/extract_diff_messages_spec.rb
|
329
329
|
- spec/lib/pact/matchers/index_not_found_spec.rb
|
330
330
|
- spec/lib/pact/matchers/list_diff_formatter_spec.rb
|
331
331
|
- spec/lib/pact/matchers/matchers_array_like_spec.rb
|
@@ -396,7 +396,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
396
396
|
version: '0'
|
397
397
|
requirements: []
|
398
398
|
rubyforge_project:
|
399
|
-
rubygems_version: 2.
|
399
|
+
rubygems_version: 2.6.12
|
400
400
|
signing_key:
|
401
401
|
specification_version: 4
|
402
402
|
summary: Shared code for Pact gems
|
@@ -419,7 +419,7 @@ test_files:
|
|
419
419
|
- spec/lib/pact/matchers/differ_spec.rb
|
420
420
|
- spec/lib/pact/matchers/difference_spec.rb
|
421
421
|
- spec/lib/pact/matchers/embedded_diff_formatter_spec.rb
|
422
|
-
- spec/lib/pact/matchers/
|
422
|
+
- spec/lib/pact/matchers/extract_diff_messages_spec.rb
|
423
423
|
- spec/lib/pact/matchers/index_not_found_spec.rb
|
424
424
|
- spec/lib/pact/matchers/list_diff_formatter_spec.rb
|
425
425
|
- spec/lib/pact/matchers/matchers_array_like_spec.rb
|