blsk_service_core 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/src/config.yml +1 -1
- data/src/validation/decorators/valid.rb +3 -4
- 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: 9e72c2748a22cb1fb989e9ac66c6edd6bd323ebf5e3c75181de26d188308ff53
|
4
|
+
data.tar.gz: a9f5df3fec3ac78c4649b29de285f24b7c0c46cbc7772766596d4f172304fe08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09efb7eb6902fbb4c00a8eadf27172b0450b41a0a57ffa2a594a63dda64a868278280a725d86c9940e09b268e92f6694c9ebf7d73180580e89995473b9955ee7'
|
7
|
+
data.tar.gz: 329fc27811203892f7cc777eb91444c74a1e12664fc67348b4ffa7ff43035ee5cf21332cacc8133fcd2e969f318e5ee3eb46a129e5900d69a5a97f5dbfeb0173
|
data/src/config.yml
CHANGED
@@ -5,8 +5,7 @@ module Validator
|
|
5
5
|
lambda {|self_model, *args, &blk|
|
6
6
|
# puts "Validate"
|
7
7
|
seed_model = args[0]
|
8
|
-
|
9
|
-
valid_result = check_validate(seed_model, self_rest) # check validation and return [true]/[false, errors]
|
8
|
+
valid_result = check_validate(seed_model) # check validation and return [true]/[false, errors]
|
10
9
|
if valid_result[0]
|
11
10
|
true
|
12
11
|
else
|
@@ -17,13 +16,13 @@ module Validator
|
|
17
16
|
}
|
18
17
|
end
|
19
18
|
|
20
|
-
def check_validate(seed_model
|
19
|
+
def check_validate(seed_model)
|
21
20
|
errors = seed_model.validate
|
22
21
|
if errors.empty?
|
23
22
|
[true]
|
24
23
|
else
|
25
24
|
errors_response = convert_errors_response(errors)
|
26
|
-
[false, errors_response
|
25
|
+
[false, errors_response]
|
27
26
|
end
|
28
27
|
end
|
29
28
|
|