clienteer 1.5.7 → 1.5.8
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea86309a60966a11225dbf5ae06d22389a647932
|
4
|
+
data.tar.gz: 3568d00d371bf1588d52e9203d04a0784b5688ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d385f7cac27c86546839e1de705f85c1cdc1bff165bb6fc1047bbf5d004a9857034ad4c095ebb9d8463d9b0cb7cd64f40c7b68cd47e2341ba3931e78503ed699
|
7
|
+
data.tar.gz: a8cf1b333b104b7ec2fbfafcda11a651619e02b89a881b0c2f8c8e7a19a0eefa311e060976b3092d28e75948d6537e2f8cdb05d8df6c738fcfee4338997e17d8
|
@@ -6,7 +6,7 @@ module Clienteer
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def process(row)
|
9
|
-
row["address"] = Address.new(first_line: row[:raw].address_line1, second_line: row[:raw].address_line2, city: row[:raw].city, state: row[:raw].state, zip_code: row[:raw].postal_code)
|
9
|
+
row["address"] = Address.new(first_line: row[:raw].address_line1, second_line: row[:raw].address_line2, city: row[:raw].city.capitalize, state: row[:raw].state, zip_code: row[:raw].postal_code)
|
10
10
|
row
|
11
11
|
end
|
12
12
|
end
|
@@ -10,7 +10,7 @@ module Clienteer
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def new_client(row)
|
13
|
-
Client.find_or_create_by(first_name: row[:raw].first_name, last_name: row[:raw].first_name) do |c|
|
13
|
+
Client.find_or_create_by(first_name: row[:raw].first_name.capitalize, last_name: row[:raw].first_name.capitalize) do |c|
|
14
14
|
c.mindbody_id = row[:raw].id.to_s
|
15
15
|
c.birthdate = row[:raw].birth_date
|
16
16
|
c.gender = row[:raw].gender
|
@@ -15,11 +15,11 @@ module Clienteer
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def valid_zip_code?(address)
|
18
|
-
address.zip_code && address.zip_code.match
|
18
|
+
address.zip_code && address.zip_code.match(/\A\d{5}(-\d{4})?\Z/)
|
19
19
|
end
|
20
20
|
|
21
21
|
def clean_state(address)
|
22
|
-
address.state = "Illinois" if address.state && address.state.match
|
22
|
+
address.state = "Illinois" if address.state && address.state.match(/il/i)
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
data/lib/clienteer/version.rb
CHANGED