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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/ivalidate +7 -1
  3. data/lib/idata/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2044f9a6b9fae36b3a529a88e9418b52d3d1442f
4
- data.tar.gz: 1b9ed2d193de713bab6f27efcf521ba46445b3ab
3
+ metadata.gz: 673cf283d4058de28221f3876c91f125b485c23f
4
+ data.tar.gz: d19d74ba799782ff5369da19151886eafbc758ee
5
5
  SHA512:
6
- metadata.gz: aa68dbc6e46fda7637e093c272a0f2fed5887be04f888e7cfae7165d836a6e408ebcaebe00a8b45c6626ab5236f23c9f929f49abf1892d2139fd2d0adbd22ca4
7
- data.tar.gz: 9ff78ee78166292cf035ed7636f9e2ad388b027c7d64f93f0265bd79f9b44ff0b0dbdc0add7060106ca3f44c5cf3a29b4e1853ba38116de9a4a32de9a5777314
6
+ metadata.gz: c72c6773422e856ee2e041f492814fa483ab3abff6a86b92e3df9cf2f28d908f002ee1373fc243bd83a9fb4eff65a52b99f2b16d96cab2c2e2427e6850b522d5
7
+ data.tar.gz: a4cd5113b26d8cbda3329b0aed56fa176e1f1cf7cf8e6294dd46938573863f9a8b8604d498c42248fb899de08c152f04dbcf3594996d90da22a1a650c54bfc0e
@@ -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('custom-validation', ' || '), ' || ')
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
 
@@ -1,3 +1,3 @@
1
1
  module Idata
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nghi Pham