run_cl 1.0.10 → 1.0.11

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 (3) hide show
  1. data/lib/run_cl.rb +1 -19
  2. data/lib/run_cl/version.rb +1 -1
  3. metadata +2 -2
data/lib/run_cl.rb CHANGED
@@ -88,23 +88,5 @@ module RunCl
88
88
  end
89
89
  end
90
90
 
91
- class RunValidator < ActiveModel::Validator
92
- def validate record
93
- options[:attributes].each do |attribute|
94
- # record.errors[:run] << I18n.t('run.invalid') unless valid_run? record
95
- record.errors[attribute.to_sym] << 'no es válido' unless valid_run? record, attribute
96
- end
97
- end
98
-
99
- private
100
-
101
- def valid_run? record, attribute
102
- if run = record.send(attribute).presence
103
- record.send("#{attribute}=", (( run = run.match(/^(\d+)[^\d*](\d+)[^\d*](\d+)[^\d*](\d|k)|(\d+)[^\d*](\d|k)|(\d+k)|(\d+)$/i).to_s ) =~ /\.|\-/ ? run.gsub!(/\.|\-/, '') : run))
104
- RunCl::Run.check_run record.send(attribute).chop, record.send(attribute).last
105
- else
106
- false
107
- end
108
- end
109
- end
91
+
110
92
  end
@@ -1,3 +1,3 @@
1
1
  module RunCl
2
- VERSION = "1.0.10"
2
+ VERSION = "1.0.11"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 10
9
- version: 1.0.10
8
+ - 11
9
+ version: 1.0.11
10
10
  platform: ruby
11
11
  authors:
12
12
  - mespina