string_utils 1.0.4 → 1.0.5
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/string_utils/version.rb +1 -1
- data/lib/string_utils.rb +3 -0
- data/test/normalize_name_spec.rb +5 -1
- metadata +3 -3
data/lib/string_utils/version.rb
CHANGED
data/lib/string_utils.rb
CHANGED
data/test/normalize_name_spec.rb
CHANGED
@@ -9,7 +9,7 @@ describe "StringUtils" do
|
|
9
9
|
end
|
10
10
|
|
11
11
|
it 'normalizes periods, commas and /' do
|
12
|
-
StringUtils.normalize_name("Av . Valle ,\302\240\302\240 Tetuan.Aqui ,a").should == "Av. Valle, Tetuan. Aqui, a"
|
12
|
+
StringUtils.normalize_name(" Av . Valle ,\302\240\302\240 Tetuan.Aqui ,a").should == "Av. Valle, Tetuan. Aqui, a"
|
13
13
|
end
|
14
14
|
|
15
15
|
it 'removes trailing and leading [,.]' do
|
@@ -19,5 +19,9 @@ describe "StringUtils" do
|
|
19
19
|
it 'does not capitalize prepositions' do
|
20
20
|
StringUtils.normalize_name("Tom AND Jerry", :titleize => true).should == "Tom and Jerry"
|
21
21
|
end
|
22
|
+
|
23
|
+
it 'removes trailing and leading quotes' do
|
24
|
+
StringUtils.normalize_name(%Q{"'I'm awesome"}).should == "I'm awesome"
|
25
|
+
end
|
22
26
|
end
|
23
27
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: string_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 5
|
10
|
+
version: 1.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Gleb Mazovetskiy
|