ae_easy-qa 0.0.28 → 0.0.29
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/lib/ae_easy/qa/validate_value.rb +11 -2
- data/lib/ae_easy/qa/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: 1ce6bef710db31f58f1b5aa8be6c56a1236c7ccf351ce7182e25a2591b5b88ec
|
4
|
+
data.tar.gz: 5c1df465ff7784212593c3eea51600e81194eb95a0aaaf272c136990487f3456
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63bd32612cd55d7da0bae8d6af5844d14503eb0ce14dd991b059c53eccfaec80f090dd850da1aa31f063796e6df9a79dd80dc8c297420e52f8cdea5685436197
|
7
|
+
data.tar.gz: f74ccf359c5f783d7fb2af685ace70dd44aa6ec8466f9b98966feb175c4aacd1eb18a9e6e7b4de12ef9a71fadc665b60ad0f30325e20948b50e9c59ae8915be9
|
@@ -27,8 +27,17 @@ module AeEasy
|
|
27
27
|
condition_hash = params['if'][field_name]
|
28
28
|
case condition_hash.keys.first
|
29
29
|
when 'value'
|
30
|
-
|
31
|
-
|
30
|
+
value_hash = condition_hash['value'] #Ex: {"equal"=>"A"}
|
31
|
+
if value_hash['equal']
|
32
|
+
main_value_check if data_hash[field_name] == value_hash['equal']
|
33
|
+
elsif value_hash['regex']
|
34
|
+
main_value_check if data_hash[field_name].to_s =~ Regexp.new(value_hash['regex'], true)
|
35
|
+
elsif params['less_than']
|
36
|
+
main_value_check if data_hash[field_name] < value_hash['less_than']
|
37
|
+
elsif params['greater_than']
|
38
|
+
main_value_check if data_hash[field_name] > value_hash['greater_than']
|
39
|
+
else
|
40
|
+
raise StandardError.new("The if condition '#{value_hash}' is unknown.")
|
32
41
|
end
|
33
42
|
end
|
34
43
|
end
|
data/lib/ae_easy/qa/version.rb
CHANGED