geocode_records 0.1.4 → 0.1.5
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/update_table_from_csv.rb +2 -0
- data/lib/geocode_records/version.rb +1 -1
- 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: 9f9481740c101b666c731e1071a7d019b3e5f580
|
4
|
+
data.tar.gz: c2f36a4a3908b26fdfab3fcba6f07892a8193ae3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a3189caf4b574054a078989e2cc5b23ebd0773525eee869c7e2da1ac6ef7a6257a8104c3d5b857d952a7cd16f2315796210474f0e45c54a5e79d554730fc503
|
7
|
+
data.tar.gz: 7410d0746fbd76029a0cd573804abe6bd5a553e46c1a8d2a84415b3fb8090da7ca7bec25a3a8888b0edb248cdc99385b7bc60cf7c981e05de03d071df81edf48
|
data/CHANGELOG
CHANGED
@@ -3,6 +3,7 @@ require 'upsert'
|
|
3
3
|
|
4
4
|
class GeocodeRecords
|
5
5
|
class UpdateTableFromCsv
|
6
|
+
MAX_INT = 2**31 - 1
|
6
7
|
attr_private :connection
|
7
8
|
attr_private :table_name
|
8
9
|
attr_private :csv_path
|
@@ -18,6 +19,7 @@ class GeocodeRecords
|
|
18
19
|
row = row.to_hash
|
19
20
|
if hn = row['house_number']
|
20
21
|
row['house_number'] = hn.to_i
|
22
|
+
next if row['house_number'] > MAX_INT
|
21
23
|
end
|
22
24
|
if default_city = row.delete('default_city')
|
23
25
|
row['city'] = default_city
|
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: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seamus Abshere
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|