idata 0.1.5 → 0.1.6
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/bin/ivalidate +7 -1
- data/lib/idata/version.rb +1 -1
- 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: 673cf283d4058de28221f3876c91f125b485c23f
|
|
4
|
+
data.tar.gz: d19d74ba799782ff5369da19151886eafbc758ee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c72c6773422e856ee2e041f492814fa483ab3abff6a86b92e3df9cf2f28d908f002ee1373fc243bd83a9fb4eff65a52b99f2b16d96cab2c2e2427e6850b522d5
|
|
7
|
+
data.tar.gz: a4cd5113b26d8cbda3329b0aed56fa176e1f1cf7cf8e6294dd46938573863f9a8b8604d498c42248fb899de08c152f04dbcf3594996d90da22a1a650c54bfc0e
|
data/bin/ivalidate
CHANGED
|
@@ -267,11 +267,17 @@ end
|
|
|
267
267
|
# Custom validation
|
|
268
268
|
# --------------------------------------------------------------------
|
|
269
269
|
$options[:query].each do |query|
|
|
270
|
+
if query.split("--").count > 1
|
|
271
|
+
message = query.split("--").last.strip
|
|
272
|
+
else
|
|
273
|
+
message = "custom-validation"
|
|
274
|
+
end
|
|
275
|
+
|
|
270
276
|
puts "Checking with custom query: #{query}"
|
|
271
277
|
|
|
272
278
|
# @todo: poor performance here, think of a better SQL!!!
|
|
273
279
|
custom_sql = <<-eos
|
|
274
|
-
UPDATE #{$options[:table]} SET #{$options[:log_to]} = array_to_string(string_to_array(#{$options[:log_to]}, ' || ') || string_to_array('
|
|
280
|
+
UPDATE #{$options[:table]} SET #{$options[:log_to]} = array_to_string(string_to_array(#{$options[:log_to]}, ' || ') || string_to_array('#{message}', ' || '), ' || ')
|
|
275
281
|
WHERE NOT #{query}
|
|
276
282
|
eos
|
|
277
283
|
|
data/lib/idata/version.rb
CHANGED