geocode_records 1.0.0 → 1.0.1

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
  SHA1:
3
- metadata.gz: 1cfba62c3b057b69bc8180fe3d09d7fa0a09c931
4
- data.tar.gz: 9ab706ef30253318866feb80a9d2fa5ee947ace7
3
+ metadata.gz: 83fb253418d4002fbfc73f142af3b3727941757c
4
+ data.tar.gz: 8b62d3741a7aeec0386a195075b5a71b0ed30ddb
5
5
  SHA512:
6
- metadata.gz: 2a99ba57d347697a74160599861696897b564bc8f528dcccab87eccb0c5127a9743380c769e15ef66a6d94fb9dea693a526a1cd97ac86183169d778a5b3a254b
7
- data.tar.gz: c10936fe5170800b77bc186099666a9dadd3e909074c9af39956519b90a1d5f864d929cbac964047ddbbfc7def9ad05bb149c7cdff66f5bc5f12fcb44437f665
6
+ metadata.gz: 284069b053dc0a918487f3089bec1b73c54cc05f252480ca9701f47e654eacc5852c993736ed3f4bb22d86353acd11043f7f7b79671ec9185cd203a9a3f0602d
7
+ data.tar.gz: 735420c63e805174ec2dd5e4c4f18cf3b07c6c7d74455e5b52a7a4354a25485912639838984d520686100028bd2b8ab50c508da9e83c428bf8b4c142295c0877
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ 1.0.1 / 2018-01-16
2
+
3
+ * Enhancements
4
+
5
+ * Don't die on quoted table names
6
+
1
7
  1.0.0 / 2018-01-16
2
8
 
3
9
  * Breaking changes
@@ -87,7 +87,7 @@ class GeocodeRecords
87
87
  end
88
88
 
89
89
  def create_tmp_table
90
- memo = "geocode_records_#{table_name}_#{rand(999999)}"
90
+ memo = "geocode_records_#{table_name}_#{rand(999999)}".gsub(/[^a-z0-9_]/i, '')
91
91
  GeocodeRecords.run_sql(
92
92
  database_url,
93
93
  CREATE_TABLE_SQL.sub('$TMP_TABLE_NAME', memo)
@@ -1,3 +1,3 @@
1
1
  class GeocodeRecords
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
@@ -10,6 +10,13 @@ describe GeocodeRecords do
10
10
  expect(home.house_number_and_street).to eq('1038 E Dayton St')
11
11
  end
12
12
 
13
+ it "geocodes quoted table name" do
14
+ home = Home.create! house_number_and_street: '1038 e deyton st', postcode: '53703'
15
+ GeocodeRecords.new(database_url: ENV.fetch('DATABASE_URL'), table_name: '"homes"').perform
16
+ home.reload
17
+ expect(home.house_number_and_street).to eq('1038 E Dayton St')
18
+ end
19
+
13
20
  it "geocodes glob" do
14
21
  home = Home.create! glob: '1038 e dayton st, madison, wi 53703'
15
22
  subject
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.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seamus Abshere