match_json 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/match_json/matchers/include_json.rb +1 -1
- data/lib/match_json/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c5be3cae9af3a2a621e4af8b7ba9c674f1e1f2992cbcdc5587c195bd8506bdb
|
4
|
+
data.tar.gz: 1499537daf8a42881e11b16109e497ce83cb34a11853b04f5069a5f7ac310766
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '077910986c30cd5c3f4758ac15c1f23d2667f7da3f046e5697c915ee1e8b31eee8c340a189938540d3ea893b3ac9a80b46231ed5c9d48d03ff35faca1d17a33c'
|
7
|
+
data.tar.gz: 85c54afebcfee87f28f3322f133280d5efe9f5f9fa2cd870194df4c27159baffeabab00ecb5dc34c70e19f478c46aa9e324c50f564fa56322ea4c5f69b0ce81d
|
data/.gitignore
CHANGED
@@ -87,7 +87,7 @@ module MatchJson
|
|
87
87
|
when defined_regexp?(value)
|
88
88
|
defined_regexps = PATTERNS.keys.find_all { |pattern| pattern.is_a? Regexp }
|
89
89
|
matches = value.match(/{(\w+):(\w+)}/)
|
90
|
-
reg_exp = defined_regexps.find {|re| re.match
|
90
|
+
reg_exp = defined_regexps.find {|re| re.match("#{matches[1]}:#{matches[2]}") }
|
91
91
|
PATTERNS[reg_exp].call(actual, matches[2])
|
92
92
|
when pattern?(value)
|
93
93
|
actual =~ PATTERNS["#{value.tr('{}', '')}"]
|
data/lib/match_json/version.rb
CHANGED