wildcard_matchers 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/wildcard_matchers/wildcard_matcher.rb +12 -2
- 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: 9f0029733e952a19949334e821540bcd02666e63
|
4
|
+
data.tar.gz: 8129970e9554d6d724891529d1dda6712fe2bfa1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d35e104eef286b82162eb6363d38b3f91512ca504a44fecb712967a1b53d70d02d3333df3362e920f3f0841e85992610446d89c8e90dcc5548d36742a8f43766
|
7
|
+
data.tar.gz: 0ed3f3e94e1ca35ba7087c3f06e8ecb56f29a19ccfb6c3de31b0b2b6e4d447f592fc43514d31a6dc0e62b697f5b526bc742216adc2fe959241f44bac6d1dd3c9
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
@@ -99,8 +99,18 @@ module WildcardMatchers
|
|
99
99
|
errors.push(*self.class.superclass.check_errors(actual[key], value, position + "[#{key.inspect}]"))
|
100
100
|
end
|
101
101
|
else
|
102
|
-
|
103
|
-
|
102
|
+
begin
|
103
|
+
actual_keys = actual.keys.sort
|
104
|
+
expected_keys = expectation.keys.sort
|
105
|
+
|
106
|
+
extra = actual_keys - expected_keys
|
107
|
+
short = expected_keys - actual_keys
|
108
|
+
|
109
|
+
errors << "#{position}: expect Hash keys #{actual_keys} to #{expected_keys}\n extra: #{extra}\n short: #{short}"
|
110
|
+
rescue
|
111
|
+
# when keys has more patterns than expacted
|
112
|
+
errors << "#{position}: expect Hash keys #{actual.keys} to #{expectation.keys}"
|
113
|
+
end
|
104
114
|
end
|
105
115
|
end
|
106
116
|
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.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- okitan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: facets
|