geocode_records 1.4.1 → 1.4.2

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
  SHA256:
3
- metadata.gz: 41292738054861f5efb53e50355e09445d4c120c582722309b9a2ef5da16721c
4
- data.tar.gz: 5dd66f6b3150713e38613189c4ffce488c91532a936fc7aa17a4b676a233c786
3
+ metadata.gz: 28508fca264d8ca57bcc56670a22d7b3ec4de52cc655c95c11b6c1e271a746a1
4
+ data.tar.gz: d603f3859a91b662767eb205d5a72c612181e2fe522a42e9944001c6dff4a88d
5
5
  SHA512:
6
- metadata.gz: 21bf2350fc512ae6fa35b3f9e662070cad2bd6d6d1ecbaaf6a37061cee57b8652784dda2687756a377f694d2073de2ae889e19190d54ab918104496cdc9198c7
7
- data.tar.gz: d3531bc7961870f437740ab83970869262ce63072e21d1d82ec2dffae0aa0054bbb80e90cebc853533dcbf89208df933dd64be7130d5ddb05f1fbf65ba03b6ab
6
+ metadata.gz: 7ecc1ff77773eb748e6fb744518ef53531f1a607b1f4486eee8390ae56c4b2c10dd1fe8285b06a35798199fec90ac1ad16dfabb36a9d9bd2ff1eb31d3b215fd4
7
+ data.tar.gz: 9c37eec0996168bb5d5a5477249b3345a8d236bf35d459c08f4a4a494a7ab1a5fa3fe3aeedffe47597c201c2c47f3c8feae2f6ea1fbdda3f28bd826496493497
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ 1.4.2 / 2018-11-23
2
+
3
+ * Enhancements
4
+
5
+ * Add clean option, default true
6
+
1
7
  1.4.1 / 2018-11-23
2
8
 
3
9
  * Enhancements
@@ -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
- FileUtils.rm_f geocoded_path if geocoded_path
89
- FileUtils.rm_f ungeocoded_path if ungeocoded_path
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
@@ -1,3 +1,3 @@
1
1
  class GeocodeRecords
2
- VERSION = '1.4.1'
2
+ VERSION = '1.4.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geocode_records
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seamus Abshere