frnames 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/frnames/caser.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9bc497e8c319a208cf0d7e1deb473742dbb37b49
|
4
|
+
data.tar.gz: 360973ad2171325281bf0a3ed69f2d903c98b02a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d08a0f281e543ffec539f304cce2ce20aa2c5418793b8524240f2b0eae6d8e4c9ec2a0b1dde77696b320e08e211c7c69314213d03c509781c2535d5383ad9b5
|
7
|
+
data.tar.gz: 11efff0acb6a9dddc83b434506587edaeb9beb967c833b9d8bd3379c3066a0c7e282496954a2036df2f1cf11f355d75ae4fc3c7a4f835e519becf4acd465e43d
|
data/lib/frnames/caser.rb
CHANGED
@@ -15,7 +15,7 @@ module StringHelper
|
|
15
15
|
#EXCEPTION LE MANS
|
16
16
|
return "Le Mans" if town == "Le-Mans"
|
17
17
|
#Remove preposition
|
18
|
-
town.gsub!(/\A(Le|La|Les|L\'|De|Des|D\')
|
18
|
+
town.gsub!(/\A(Le|La|Les|L\'|De|Des|D\')-*/, '')
|
19
19
|
#replace the A, En, ...
|
20
20
|
town.gsub!('Le-', 'le-')
|
21
21
|
town.gsub!('La-', 'la-')
|