pact-support 1.1.5 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/RELEASING.md +1 -1
- data/lib/pact/matching_rules/extract.rb +3 -1
- data/lib/pact/support/version.rb +1 -1
- data/spec/lib/pact/matching_rules/extract_spec.rb +1 -1
- data/spec/lib/pact/matching_rules/merge_spec.rb +36 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50cf90801b288d0d6f9a020193c22a58ad31a1f1
|
4
|
+
data.tar.gz: 2bf0663efdb8fd0df0628923f56c4aa6d13a4276
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a22eaf84f8c557ba9d3c0465bd89369e0149742117f1746e5f847aae9e19db2ffb04434e735fb49c1e8c4177303de34e8580a2c45b60b243b1bf461373365aa
|
7
|
+
data.tar.gz: e074377405d4fd0dba18327e4c04f4d2b5d1340e1b669042ec7747bf9acbb3943fe4d013c923671463d08f49007666a3126cfa790e08dbcb37d5a66cc9a57670
|
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.6 (2017-08-25)
|
6
|
+
* be9ef39 - fix(matching): use single quotes instead of double to escape keys with dots (Beth Skurrie, Fri Aug 25 09:41:14 2017 +1000)
|
7
|
+
|
5
8
|
### 1.1.5 (1 Aug 2017)
|
6
9
|
* 81bc967 - fix(match type rules): Allow match: 'type' to be specified on the parent element of the array. Closes: #35, https://github.com/pact-foundation/pact-provider-verifier/issues/8 (Beth Skurrie, Tue Aug 1 10:33:02 2017 +1000)
|
7
10
|
|
data/RELEASING.md
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
3. Add files to git
|
9
9
|
|
10
10
|
$ git add CHANGELOG.md lib/pact/support/version.rb
|
11
|
-
$ git commit -m "
|
11
|
+
$ git commit -m "chore(release): version $(ruby -r ./lib/pact/support/version.rb -e "puts Pact::Support::VERSION")"
|
12
12
|
|
13
13
|
3. Release:
|
14
14
|
|
@@ -77,9 +77,11 @@ module Pact
|
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
80
|
+
# Beth: there's a potential bug if the key contains a dot and a single quote.
|
81
|
+
# Not sure what to do then.
|
80
82
|
def next_path_part key
|
81
83
|
if key.to_s.include?('.')
|
82
|
-
"[
|
84
|
+
"['#{key}']"
|
83
85
|
else
|
84
86
|
".#{key}"
|
85
87
|
end
|
data/lib/pact/support/version.rb
CHANGED
@@ -307,6 +307,42 @@ module Pact
|
|
307
307
|
expect(subject['name']).to be_instance_of(Pact::SomethingLike)
|
308
308
|
end
|
309
309
|
end
|
310
|
+
|
311
|
+
describe "with a dot in the path" do
|
312
|
+
let(:expected) do
|
313
|
+
{
|
314
|
+
"first.name" => "Mary"
|
315
|
+
}
|
316
|
+
end
|
317
|
+
|
318
|
+
let(:matching_rules) do
|
319
|
+
{
|
320
|
+
"$.body['first.name']" => { "match" => "type" }
|
321
|
+
}
|
322
|
+
end
|
323
|
+
|
324
|
+
it "applies the rule" do
|
325
|
+
expect(subject['first.name']).to be_instance_of(Pact::SomethingLike)
|
326
|
+
end
|
327
|
+
end
|
328
|
+
|
329
|
+
describe "with an @ in the path" do
|
330
|
+
let(:expected) do
|
331
|
+
{
|
332
|
+
"@name" => "Mary"
|
333
|
+
}
|
334
|
+
end
|
335
|
+
|
336
|
+
let(:matching_rules) do
|
337
|
+
{
|
338
|
+
"$.body['@name']" => { "match" => "type" }
|
339
|
+
}
|
340
|
+
end
|
341
|
+
|
342
|
+
it "applies the rule" do
|
343
|
+
expect(subject['@name']).to be_instance_of(Pact::SomethingLike)
|
344
|
+
end
|
345
|
+
end
|
310
346
|
end
|
311
347
|
end
|
312
348
|
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.6
|
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-08-
|
15
|
+
date: 2017-08-24 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: randexp
|
@@ -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.4.5.2
|
400
400
|
signing_key:
|
401
401
|
specification_version: 4
|
402
402
|
summary: Shared code for Pact gems
|