preformatter 0.7.0 → 0.7.1
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/VERSION +1 -1
- data/lib/preformatter.rb +4 -4
- data/preformatter.gemspec +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.1
|
data/lib/preformatter.rb
CHANGED
@@ -65,12 +65,12 @@ module Preformatter
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
-
def remove_extra_white_spaces(*args)
|
68
|
+
def remove_extra_white_spaces(*args)
|
69
69
|
args.each do |field|
|
70
|
-
|
70
|
+
before_save do |record|
|
71
71
|
attribute = record.send("#{field.to_s}")
|
72
|
-
attribute
|
73
|
-
attribute
|
72
|
+
attribute.strip! if !attribute.nil? and !attribute.strip!.nil?
|
73
|
+
attribute.gsub!(/[ ]+/, ' ') if !attribute.nil? and !attribute.gsub!(/[ ]+/, ' ').nil?
|
74
74
|
end
|
75
75
|
end
|
76
76
|
end
|
data/preformatter.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{preformatter}
|
8
|
-
s.version = "0.7.
|
8
|
+
s.version = "0.7.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Adrian Cuadros", "Eduardo Moreno", "Andres Paglayan"]
|
12
|
-
s.date = %q{2010-07-
|
12
|
+
s.date = %q{2010-07-08}
|
13
13
|
s.description = %q{The gem helps you by deleting spaces, special characters or replacing accents in the fields you need.}
|
14
14
|
s.email = %q{adrian@innku.com}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 7
|
8
|
-
-
|
9
|
-
version: 0.7.
|
8
|
+
- 1
|
9
|
+
version: 0.7.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Adrian Cuadros
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-07-
|
19
|
+
date: 2010-07-08 00:00:00 -05:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|