validation_profiler 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/validation_profiler/version.rb +1 -1
- data/lib/validation_profiler.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9490c77f17ba1d1d2b7def8c794d94f6462f7339
|
4
|
+
data.tar.gz: b4895489d995672e613269b970ad9af43898947a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93465aea3f838984c77b090b0c56dddd0bd6dc1048e9192f518f0a025c1e1144a163a36048cb169cdb6a8ec6287d398b428fda008654e97a9499e9ff6ab160b6
|
7
|
+
data.tar.gz: b7c9bf9ffabe1674a835bcacfbc2cc9b8a6a2657bcf986640fee74967eb9a6014713165ac70bb92234b9dc5312900d81a85c713f33642cebfd91d7e8a8ae207c
|
data/lib/validation_profiler.rb
CHANGED
@@ -38,6 +38,10 @@ class ValidationManager
|
|
38
38
|
validation_rules = profile.class_variable_get(:@@validation_rules)
|
39
39
|
validation_rules.each do |r|
|
40
40
|
|
41
|
+
if ValidationRuleManager.instance == nil
|
42
|
+
ValidationRuleManager.new
|
43
|
+
end
|
44
|
+
|
41
45
|
rule = ValidationRuleManager.instance.get_rule(r[:name])
|
42
46
|
outcome = rule.validate(obj, r[:field], r[:attributes])
|
43
47
|
|