wildcard_matchers 0.9.1 → 0.9.2
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/.travis.yml +1 -2
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/wildcard_matchers/matchers/hash_includes.rb +5 -1
- data/spec/wildcard_matchers/matchers/hash_includes_spec.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7ae1ea449d073688746ff3fa0d7186417d2035b
|
4
|
+
data.tar.gz: fa25d175b944e85b91dfeb12fa20426b73acdba4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79416af7f558737617d61c2ecfccda5fa488d4c05f5026c521c4d7297bf24ee3f74c1035dd9f3b78cfccd5f7287c19f9082888617e9edae1d2284faf01cec18c
|
7
|
+
data.tar.gz: c85a121c0075b9b90cadf160ca232cbda0a57ad52648b5a953bf2d5545543185067f95dc001c33372008733ba6258e599d68e922b2ccfe97eec6ea479ae83f1c
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.2
|
@@ -16,7 +16,11 @@ module WildcardMatchers
|
|
16
16
|
errors << "#{position}: expect #{actual} to have key #{key}" unless actual.has_key?(key)
|
17
17
|
else
|
18
18
|
key.each do |key, value|
|
19
|
-
|
19
|
+
unless actual.has_key?(key)
|
20
|
+
errors << "#{position}: expect #{actual} to have key #{key}"
|
21
|
+
else
|
22
|
+
errors.push(*self.class.superclass.check_errors(actual[key], value, position + "[#{key.inspect}]"))
|
23
|
+
end
|
20
24
|
end
|
21
25
|
end
|
22
26
|
end
|
@@ -11,6 +11,7 @@ describe WildcardMatchers::Matchers::HashIncludes do
|
|
11
11
|
[ [ { :a => 1, :b => 1, :c => 1 }, :hash_includes, :a, :d ],
|
12
12
|
[ { :a => 1, :b => 1, :c => 1 }, :hash_includes, :a, :b => 2 ],
|
13
13
|
[ { :a => 1, :b => 1, :c => 1 }, :hash_includes, :a, :b => String ],
|
14
|
+
[ { :a => 1, :b => 1, :c => 1 }, :hash_includes, :a, :b => String, :d => nil ],
|
14
15
|
].each do |actual, matcher, *args|
|
15
16
|
it_behaves_like "not wildcard match", actual, matcher, *args
|
16
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wildcard_matchers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- okitan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: facets
|