spatial_features 2.1.5 → 2.1.6

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: e95e4c5de92ba868287059cbc55cd3ad0d2c1846
4
- data.tar.gz: 9a69e73f631891b6f0a2d31cc44a0beedc18c07f
3
+ metadata.gz: ca9589fa4acf1bb8c8d5c4a915891628c298b80c
4
+ data.tar.gz: b450b7c37ffa34bfd87731493916f3a20210b414
5
5
  SHA512:
6
- metadata.gz: 45abd37c19fb70efdb09451017a2541a00f60e2eac82f41271669103f1ff26ae91942a3eaaff8d5c9553f3585a416ccdad4e26b538635f66a215c9a29f7fa693
7
- data.tar.gz: d4a85dc77e38d8c5f761e9260affcb1daad1586c881eb673f0e91d108f5691eccb5d8f4daf512dea92a38e63ced95aa36768b7b81e9f07164f2245ed53ee65a7
6
+ metadata.gz: cbdd1f67b29366a08858491b4d8c3c0deaeab2e8feebfd335b07c7d90ca38908b5d750834c9dc46336c038bb77cb2ef60a47405029ad412ddf4c7b87387c583e
7
+ data.tar.gz: 7c03e44c03b576eec2bd88c5524f3925b7e78579b9d927fa6aa79ead01c7e92425c012a8c63e3f3bd8cacfc1727b69bf9c66908ac3f3c0b9cdb219a5aa6bccbf
@@ -13,12 +13,12 @@ module SpatialFeatures
13
13
  end
14
14
 
15
15
  def tables
16
- fusion_tables_service.list_tables.items
16
+ fusion_tables_service.list_tables(max_results: 10000).items || []
17
17
  end
18
18
 
19
19
  def create_table(name, columns = [], table_options = {})
20
20
  table_object = {:name => name, :columns => columns, :is_exportable => true}.merge(table_options)
21
- fusion_tables_service.insert_table(table_object, :fields => 'table_id')
21
+ fusion_tables_service.insert_table(table_object, :fields => 'table_id').table_id
22
22
  end
23
23
 
24
24
  def delete_table(table_id)
@@ -34,15 +34,15 @@ module SpatialFeatures
34
34
 
35
35
  def fusion_table_id_cache
36
36
  @fusion_table_id_cache ||= Hash.new {|hash, table_name| hash[table_name] = API.find_or_create_table(table_name) }
37
- .replace(API.tables.collect {|table| [table.name, table.table_id] }.to_h) # Warm the cache
37
+ .merge(API.tables.collect {|table| [table.name, table.table_id] }.to_h) # Warm the cache
38
38
  end
39
39
 
40
40
  private
41
41
 
42
42
  def fusion_table_groups(only: [], except: [])
43
43
  groups = all.group_by(&:fusion_table_id)
44
- groups.select! {|fusion_table_id| Array.wrap(only).include?(fusion_table_id) } if only.present?
45
- groups.select! {|fusion_table_id| !Array.wrap(except).include?(fusion_table_id) } if except.present?
44
+ groups.select! {|fusion_table_id, _| Array.wrap(only).include?(fusion_table_id) } if only.present?
45
+ groups.select! {|fusion_table_id, _| !Array.wrap(except).include?(fusion_table_id) } if except.present?
46
46
  groups.each do |fusion_table_id, records|
47
47
  yield fusion_table_id, records, features.where(:spatial_model_id => records)
48
48
  end
@@ -1,3 +1,3 @@
1
1
  module SpatialFeatures
2
- VERSION = "2.1.5"
2
+ VERSION = "2.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spatial_features
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.5
4
+ version: 2.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Wallace