geocode_records 1.4.1 → 1.4.2
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.rb +8 -3
- data/lib/geocode_records/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: 28508fca264d8ca57bcc56670a22d7b3ec4de52cc655c95c11b6c1e271a746a1
|
4
|
+
data.tar.gz: d603f3859a91b662767eb205d5a72c612181e2fe522a42e9944001c6dff4a88d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ecc1ff77773eb748e6fb744518ef53531f1a607b1f4486eee8390ae56c4b2c10dd1fe8285b06a35798199fec90ac1ad16dfabb36a9d9bd2ff1eb31d3b215fd4
|
7
|
+
data.tar.gz: 9c37eec0996168bb5d5a5477249b3345a8d236bf35d459c08f4a4a494a7ab1a5fa3fe3aeedffe47597c201c2c47f3c8feae2f6ea1fbdda3f28bd826496493497
|
data/CHANGELOG
CHANGED
data/lib/geocode_records.rb
CHANGED
@@ -36,19 +36,22 @@ class GeocodeRecords
|
|
36
36
|
attr_reader :include_invalid
|
37
37
|
attr_reader :subquery
|
38
38
|
attr_reader :num
|
39
|
+
attr_reader :clean
|
39
40
|
|
40
41
|
def initialize(
|
41
42
|
database_url:,
|
42
43
|
table_name:,
|
43
44
|
subquery: nil,
|
44
45
|
include_invalid: false,
|
45
|
-
num: 1
|
46
|
+
num: 1,
|
47
|
+
clean: true
|
46
48
|
)
|
47
49
|
@database_url = database_url
|
48
50
|
@table_name = table_name
|
49
51
|
@subquery = subquery
|
50
52
|
@include_invalid = include_invalid
|
51
53
|
@num = num
|
54
|
+
@clean = clean
|
52
55
|
end
|
53
56
|
|
54
57
|
def perform
|
@@ -85,8 +88,10 @@ class GeocodeRecords
|
|
85
88
|
num: num,
|
86
89
|
).perform
|
87
90
|
ensure
|
88
|
-
|
89
|
-
|
91
|
+
if clean
|
92
|
+
FileUtils.rm_f geocoded_path if geocoded_path
|
93
|
+
FileUtils.rm_f ungeocoded_path if ungeocoded_path
|
94
|
+
end
|
90
95
|
end
|
91
96
|
end
|
92
97
|
end
|