run_cl 1.1.3 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ad3d74ae9892cecd2bd107c6b0678cb6ad01ec3
4
- data.tar.gz: 14db5327ddfa9c81c42b7f306e7778760f4fa9a6
3
+ metadata.gz: 82262100b00def3416d849bfbb1a71f7b3bfa681
4
+ data.tar.gz: 079229386e79ed2906fada0ae743e9113784dcfd
5
5
  SHA512:
6
- metadata.gz: 3ff72553841e2e823afa451cd2bee403f632890c3a16fd2ac27d878ac7bd09b1ae74928cfe3e136d14f2bea5fe8841728675322b12cb93b9e950410d76afe31d
7
- data.tar.gz: 8023736dfc29e89f0f0d2868d520d25a4e0f5f96f75cba22acf62ff2ba41576f8b5c3bbbb974a46bf52b4fca8e4092ac7023239474ae4b19c3d2e225e72bbf49
6
+ metadata.gz: 91dae2aa8813072d8f8affd0690dd3bda83bb13c88f6aa0aea01e7bbb8d56ef33a65ebd03c26b502b89b28e68151b53578b9adeb6e636ee69337d22ea9469cbb
7
+ data.tar.gz: 9683a37d9cb9eb4e4fd661cfda282733fcb3aadacd4fc87049f3e1d54abb1d76b7b5d197ab398c25d9fc1b008088479990479cb7a4a1d3263403c4f4c5f751c0
data/README.md CHANGED
@@ -89,11 +89,14 @@ If you need to remove a RUN format:
89
89
 
90
90
  ## Assumptions
91
91
 
92
- You are saving the RUN as a string
92
+ You are saving the RUN as a string, and that is keeping raw (without dots and dashes).
93
+ But, if you prefer storing that value which is entered, you can skip cleaning format for database:
94
+
95
+ has_run_cl :rut, skip_db_format_clear: true
93
96
 
94
97
  ## Notes
95
98
 
96
- RunCl uses [semantic versioning](http://semver.org/).
99
+ RunCl uses [semantic versioning](http://semver.org/).
97
100
 
98
101
  ## Contributing
99
102
 
data/lib/run_cl.rb CHANGED
@@ -31,10 +31,12 @@ module RunCl
31
31
  end
32
32
  end
33
33
 
34
- before_validation "make_#{name}_format!"
34
+ if options[:skip_db_format_clear].nil? or options[:skip_db_format_clear] == false
35
+ before_validation "make_#{name}_format!"
35
36
 
36
- define_method "make_#{name}_format!" do
37
- self.send("#{name}=", Run.remove_format(self.send("#{name}")) )
37
+ define_method "make_#{name}_format!" do
38
+ self.send("#{name}=", Run.remove_format(self.send("#{name}")) )
39
+ end
38
40
  end
39
41
  end
40
42
  end
@@ -1,3 +1,3 @@
1
1
  module RunCl
2
- VERSION = "1.1.3"
2
+ VERSION = "1.2.0"
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.1.3
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - mespina