crm_formatter 2.63 → 2.64
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.
- checksums.yaml +4 -4
- data/Rakefile +6 -6
- data/lib/crm_formatter/tools.rb +3 -1
- data/lib/crm_formatter/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 92cfbafb9cbfe1960251a1f1855ac76691358c8d30a15d3ecc81d7892d33a85b
|
|
4
|
+
data.tar.gz: 34b2614956573f9d571348932a2465d21b88523d47cbdd2d73cae6a4357dde97
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b4db07d17a983dbff0459ccfc9a23b6a853580240276b73540017021ae9f39a04200f7dd47545b53e3b62055da7af5cb39e7e3c897a1d3129589de97e21a7ce9
|
|
7
|
+
data.tar.gz: 2fd347108d0947e00626cfdfd2cf37a192cb7e74546805ad6ab8855c7d98d7eb9b44e07ea1c608056b206c9813b542f8cd9452aa2261ec72a8af2b992a042f4c
|
data/Rakefile
CHANGED
|
@@ -18,23 +18,23 @@ task :console do
|
|
|
18
18
|
# formatted_data = format_with_report
|
|
19
19
|
# formatted_phones = format_phones
|
|
20
20
|
# formatted_urls = format_urls
|
|
21
|
-
formatted_proper = format_proper
|
|
22
|
-
|
|
23
|
-
# formatted_propers = format_propers
|
|
21
|
+
# formatted_proper = format_proper
|
|
22
|
+
formatted_propers = format_propers
|
|
24
23
|
# formatted_addresses = format_addresses
|
|
25
|
-
|
|
24
|
+
binding.pry
|
|
25
|
+
|
|
26
26
|
IRB.start
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
#############################################
|
|
30
30
|
def format_proper
|
|
31
|
-
proper_string = '
|
|
31
|
+
proper_string = 'quick auto-approval gmc and bmw-world of AUSTIN tx, INC'
|
|
32
32
|
formatted_proper = CrmFormatter.format_proper(proper_string)
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
def format_propers
|
|
36
36
|
array_of_propers = [
|
|
37
|
-
'
|
|
37
|
+
'quick auto-approval gmc and bmw-world of AUSTIN tx, INC',
|
|
38
38
|
'123 Car-world Kia OF CHICAGO IL',
|
|
39
39
|
'Main Street Ford in DALLAS tX',
|
|
40
40
|
'broad st fiat of houston',
|
data/lib/crm_formatter/tools.rb
CHANGED
|
@@ -39,6 +39,8 @@ module CrmFormatter
|
|
|
39
39
|
str = add_space(str)
|
|
40
40
|
|
|
41
41
|
grab_ups.map do |up|
|
|
42
|
+
str = str.gsub(" #{up.capitalize},", " #{up}")
|
|
43
|
+
str = str.gsub(" #{up.capitalize}.", " #{up}")
|
|
42
44
|
str = str.gsub(" #{up.capitalize} ", " #{up} ")
|
|
43
45
|
str = str.gsub(" #{up.capitalize}-", " #{up}-")
|
|
44
46
|
str = str.gsub("-#{up.capitalize} ", "-#{up} ")
|
|
@@ -78,7 +80,7 @@ module CrmFormatter
|
|
|
78
80
|
ups = %w[I]
|
|
79
81
|
brands = %w[BMW CDJR CJDR GMC CJD I]
|
|
80
82
|
professional = %w[BA BS MA JD DC PA MD VP SVP EVP CMO CFO CEO]
|
|
81
|
-
states = %w[AK AL AR AZ CA CT DC DE FL GA HI IA ID IL KS KY LA MA MD MI MN MO NC ND NE NH NJ NM NV NY OH OK PA RI SC SD TN TX UT VA VT WA WI WV WY]
|
|
83
|
+
states = %w[AK AL AR AZ CA CO CT DC DE FL GA HI IA ID IL KS KY LA MA MD MI MN MO NC ND NE NH NJ NM NV NY OH OK PA RI SC SD TN TX UT VA VT WA WI WV WY]
|
|
82
84
|
directions = %w[NE NW SE SW]
|
|
83
85
|
ups = [brands, professional, states, directions].flatten.uniq
|
|
84
86
|
end
|