run_cl 1.0.19 → 1.0.20

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.
data/lib/run_cl/run.rb CHANGED
@@ -65,7 +65,6 @@ module Run
65
65
  def valid_run? run
66
66
  if run
67
67
  run_copy = run.clone
68
- # run_copy = run_copy.match(/^(\d+)[^\d*](\d+)[^\d*](\d+)[^\d*](\d|k)|(\d+)[^\d*](\d|k)|(\d+k)|(\d+)$/i).to_s.gsub!(/\.|\-/, '')
69
68
  run_copy = run_copy.match(/^(\d+)\.{1}\d{3}\.{1}\d{3}-{1}(\d|k|K)$|^(\d+)\d{6}\-{1}(\d|k|K)|^(\d+)\d{6}(\d|k|K)$/i).to_s
70
69
  return false unless run_copy
71
70
  run_copy = remove_format(run_copy)
@@ -3,8 +3,11 @@
3
3
  class RunValidator < ActiveModel::Validator
4
4
  def validate record
5
5
  options[:attributes].each do |attribute|
6
- # record.errors[:run] << I18n.t('run.invalid') unless valid_run? record
7
6
  record.errors[attribute.to_sym] << 'no es válido' unless Run.valid_run? record.send(attribute)
8
7
  end
9
8
  end
9
+
10
+ private
11
+ # record.errors[attribute.to_sym] << I18n.t('run.invalid') unless Run.valid_run? record.send(attribute)
12
+
10
13
  end
@@ -1,3 +1,3 @@
1
1
  module RunCl
2
- VERSION = "1.0.19"
2
+ VERSION = "1.0.20"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: run_cl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.19
4
+ version: 1.0.20
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: