geocode_records 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +6 -0
- data/lib/geocode_records/geocode_csv.rb +2 -1
- data/lib/geocode_records/update_table_from_csv.rb +5 -2
- data/lib/geocode_records/version.rb +1 -1
- data/spec/geocode_records_spec.rb +2 -0
- data/spec/spec_helper.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92787a0bf5d0542da97fc0cc07baadeefb3b3e76
|
4
|
+
data.tar.gz: b2d11164ad2de539cc9cd89d1f354f08bf12bdca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1b65fe2aea63da45dca35718cf4edf559fd51d949a33cefdac866436cb9eff02642215bd6e75f665ef8dbffa1cc170954db0a0429e78e7bb2884f4bc26ea793
|
7
|
+
data.tar.gz: ab4e697cf55ee682d69d299251647fcdb4c3ee145f144ca9e07a8c977c192a26aa926149f5eec8a5bc9e2681b569c2d296d56435fd8652de3cdb308b5a295dc2
|
data/CHANGELOG
CHANGED
@@ -16,7 +16,8 @@ class GeocodeRecords
|
|
16
16
|
ss_plus4_code text,
|
17
17
|
ss_latitude float,
|
18
18
|
ss_longitude float,
|
19
|
-
ss_default_city_name text
|
19
|
+
ss_default_city_name text,
|
20
|
+
ss_rdi text
|
20
21
|
)
|
21
22
|
SQL
|
22
23
|
|
@@ -36,6 +37,7 @@ class GeocodeRecords
|
|
36
37
|
ss_latitude
|
37
38
|
ss_longitude
|
38
39
|
ss_default_city_name
|
40
|
+
ss_rdi
|
39
41
|
}
|
40
42
|
|
41
43
|
COPY_SQL = "\\copy $TMP_TABLE_NAME (#{DESIRED_COLUMNS.join(',')}) FROM '$PATH' DELIMITER ',' CSV HEADER"
|
@@ -59,7 +61,8 @@ class GeocodeRecords
|
|
59
61
|
postcode$NUM_SUFFIX = src.ss_zipcode,
|
60
62
|
postcode_zip4$NUM_SUFFIX = src.ss_plus4_code,
|
61
63
|
latitude$NUM_SUFFIX = src.ss_latitude,
|
62
|
-
longitude$NUM_SUFFIX = src.ss_longitude
|
64
|
+
longitude$NUM_SUFFIX = src.ss_longitude,
|
65
|
+
rdi$NUM_SUFFIX = src.ss_rdi
|
63
66
|
FROM $TMP_TABLE_NAME AS src
|
64
67
|
WHERE
|
65
68
|
target.id = src.id
|
@@ -12,6 +12,7 @@ describe GeocodeRecords do
|
|
12
12
|
expect(home.unit_number).to eq('403')
|
13
13
|
expect(home.house_number).to eq(123)
|
14
14
|
expect(home.latitude).to be_present
|
15
|
+
expect(home.rdi).to eq('Residential')
|
15
16
|
end
|
16
17
|
|
17
18
|
it "geocodes addr 2" do
|
@@ -23,6 +24,7 @@ describe GeocodeRecords do
|
|
23
24
|
expect(home.unit_number2).to eq('403')
|
24
25
|
expect(home.house_number2).to eq(123)
|
25
26
|
expect(home.latitude2).to be_present
|
27
|
+
expect(home.rdi2).to eq('Residential')
|
26
28
|
end
|
27
29
|
|
28
30
|
it "geocodes quoted table name" do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geocode_records
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seamus Abshere
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|