geocode_records 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG +6 -0
- data/lib/geocode_records.rb +1 -9
- data/lib/geocode_records/geocode_csv.rb +1 -1
- data/lib/geocode_records/update_table_from_csv.rb +2 -2
- data/lib/geocode_records/version.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 41292738054861f5efb53e50355e09445d4c120c582722309b9a2ef5da16721c
|
4
|
+
data.tar.gz: 5dd66f6b3150713e38613189c4ffce488c91532a936fc7aa17a4b676a233c786
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21bf2350fc512ae6fa35b3f9e662070cad2bd6d6d1ecbaaf6a37061cee57b8652784dda2687756a377f694d2073de2ae889e19190d54ab918104496cdc9198c7
|
7
|
+
data.tar.gz: d3531bc7961870f437740ab83970869262ce63072e21d1d82ec2dffae0aa0054bbb80e90cebc853533dcbf89208df933dd64be7130d5ddb05f1fbf65ba03b6ab
|
data/CHANGELOG
CHANGED
data/lib/geocode_records.rb
CHANGED
@@ -15,14 +15,6 @@ class GeocodeRecords
|
|
15
15
|
Dir::Tmpname.create(hint[0,64].delete('"').gsub(/\W/,'_').squeeze) {}
|
16
16
|
end
|
17
17
|
|
18
|
-
def system(*args)
|
19
|
-
result = Kernel.system(*args)
|
20
|
-
unless result
|
21
|
-
raise "failed command:\n#{Shellwords.join args}"
|
22
|
-
end
|
23
|
-
nil
|
24
|
-
end
|
25
|
-
|
26
18
|
def psql(database_url, sql)
|
27
19
|
system(
|
28
20
|
'psql',
|
@@ -33,7 +25,7 @@ class GeocodeRecords
|
|
33
25
|
'--no-psqlrc',
|
34
26
|
'--pset', 'pager=off',
|
35
27
|
'--command', sql
|
36
|
-
)
|
28
|
+
) or raise("psql failed")
|
37
29
|
end
|
38
30
|
end
|
39
31
|
|
@@ -109,12 +109,12 @@ class GeocodeRecords
|
|
109
109
|
|
110
110
|
def strip_csv
|
111
111
|
memo = GeocodeRecords.new_tmp_path('stripped')
|
112
|
-
|
112
|
+
system(
|
113
113
|
'xsv',
|
114
114
|
'select', DESIRED_COLUMNS.join(','),
|
115
115
|
path,
|
116
116
|
out: memo
|
117
|
-
)
|
117
|
+
) or raise("xsv failed")
|
118
118
|
memo
|
119
119
|
end
|
120
120
|
|
data/spec/spec_helper.rb
CHANGED
@@ -7,7 +7,7 @@ dbname = 'geocode_records_test'
|
|
7
7
|
ENV['DATABASE_URL'] = "postgresql://127.0.0.1:#{ENV['PGPORT'] || 5432}/#{dbname}"
|
8
8
|
|
9
9
|
unless ENV['FAST'] == 'true'
|
10
|
-
|
10
|
+
system('createdb', ENV.fetch('DATABASE_URL')) rescue nil
|
11
11
|
GeocodeRecords.psql(
|
12
12
|
ENV.fetch('DATABASE_URL'),
|
13
13
|
'CREATE EXTENSION IF NOT EXISTS postgis'
|
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.
|
4
|
+
version: 1.4.1
|
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-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
152
|
version: '0'
|
153
153
|
requirements: []
|
154
154
|
rubyforge_project:
|
155
|
-
rubygems_version: 2.6
|
155
|
+
rubygems_version: 2.7.6
|
156
156
|
signing_key:
|
157
157
|
specification_version: 4
|
158
158
|
summary: Geocode an ActiveRecord::Relation with node_smartystreets
|