run_cl 1.0.24 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +6 -1
  2. data/lib/run_cl.rb +10 -2
  3. data/lib/run_cl/version.rb +1 -1
  4. metadata +3 -3
data/README.md CHANGED
@@ -21,6 +21,7 @@ Or install it yourself as:
21
21
  At your model:
22
22
 
23
23
  include RunCl::ActAsRun
24
+ validates :rut, presence: true, uniqueness: true
24
25
  has_run_cl :rut
25
26
 
26
27
  Where 'rut' is the name of the column that stores the RUN.
@@ -76,7 +77,11 @@ If you need to remove a RUN format:
76
77
 
77
78
  ## Assumptions
78
79
 
79
- You are saving the RUN as a text
80
+ You are saving the RUN as a string
81
+
82
+ ## Notes
83
+
84
+ RunCl uses [semantic versioning](http://semver.org/).
80
85
 
81
86
  ## Contributing
82
87
 
data/lib/run_cl.rb CHANGED
@@ -16,11 +16,19 @@ module RunCl
16
16
  include InstanceMethods
17
17
  def has_run_cl(name, options = {})
18
18
  if not options[:run].presence or options[:run]
19
- validates name, run: true
19
+ if options[:on].presence
20
+ validates name, run: true, on: options[:on]
21
+ else
22
+ validates name, run: true
23
+ end
20
24
  end
21
25
 
22
26
  if not options[:uniq_run].presence or options[:uniq_run]
23
- validates name, uniq_run: true
27
+ if options[:on].presence
28
+ validates name, uniq_run: true, on: options[:on]
29
+ else
30
+ validates name, uniq_run: true
31
+ end
24
32
  end
25
33
 
26
34
  before_save "make_#{name}_format!"
@@ -1,3 +1,3 @@
1
1
  module RunCl
2
- VERSION = "1.0.24"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 1
7
+ - 1
7
8
  - 0
8
- - 24
9
- version: 1.0.24
9
+ version: 1.1.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - mespina
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2013-04-01 00:00:00 -04:00
17
+ date: 2013-04-17 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies: []
20
20