spatial_features 2.12.0 → 2.12.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '035228e67c042788f246694fb215346e72303a7eebe7052cec11a01db0b26ab7'
4
- data.tar.gz: 4361a0cf3ffa83dfddbe54a35717b2dd31633245fc28438dace60675a2058147
3
+ metadata.gz: 589cebda0f09ed3f2568a2ddcd91908b556e1690062004d7158b2db98ba5fc96
4
+ data.tar.gz: d69b66a8242de5feffd71a33390cedf671eaa7e8652a26e2f6a8a23d586b3e75
5
5
  SHA512:
6
- metadata.gz: c0e3d96ed8f19a968fbb1ff9fb583091cd7a6565a86d288977baf87eeea6be0412ee52321a24a911baaeb5326d1aa32bf65c176a992d1357e0055c06ad580bb5
7
- data.tar.gz: 796f292feae7681fd6e4f6b3785421932d9a0a00585b17a5506c25f6399047cb04119e2bcae4db48f1418cace52267821a898fcbd84c1460026bb3dd8cabae26
6
+ metadata.gz: 8732f12f99fab1fcad7c58ccab5d0956937f36cedb2f6fd16b02d004016ca36207a4bc601fb8c3804fabec28fa8b444ae3f0e74a93333f099eacaf74129b4034
7
+ data.tar.gz: bae08792bc07a63c25f1eeb0d0037d55ec55d438e376f61551203773e2e24ccfc89351a58f6f559bcc954ad41076653cf500fe7204298ed61c7cdf6f9942b3c3
@@ -1,8 +1,8 @@
1
1
  module PostGISTypes
2
- def initialize_type_map(mapping)
2
+ def initialize_type_map(m = type_map)
3
3
  super
4
- register_class_with_limit mapping, 'geometry', ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::SpecializedString
5
- register_class_with_limit mapping, 'geography', ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::SpecializedString
4
+ register_class_with_limit m, 'geometry', ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::SpecializedString
5
+ register_class_with_limit m, 'geography', ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::SpecializedString
6
6
  end
7
7
  end
8
8
 
@@ -36,12 +36,8 @@ module SpatialFeatures
36
36
  true
37
37
  end
38
38
 
39
- # Add methods to generate cache keys for a record or all records of this class
40
- # NOTE: features are never updated, only deleted and created, therefore we can
41
- # tell if they have changed by finding the maximum id and count instead of needing timestamps
42
39
  def features_cache_key
43
- # Do two separate queries because it is much faster for some reason
44
- "#{name}/#{features.cache_key}"
40
+ "#{name}/#{aggregate_features.cache_key}"
45
41
  end
46
42
 
47
43
  def intersecting(other, options = {})
@@ -172,7 +168,7 @@ module SpatialFeatures
172
168
  end
173
169
 
174
170
  def features_cache_key
175
- "#{self.class.name}/#{self.id}-#{features.cache_key}"
171
+ "#{self.class.name}/#{id}-#{has_spatial_features_hash? ? features_hash : aggregate_feature.cache_key}"
176
172
  end
177
173
 
178
174
  def polygons?
@@ -1,3 +1,3 @@
1
1
  module SpatialFeatures
2
- VERSION = "2.12.0"
2
+ VERSION = "2.12.1"
3
3
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spatial_features
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.0
4
+ version: 2.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Wallace
8
8
  - Nicholas Jakobsen
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-06-14 00:00:00.000000000 Z
12
+ date: 2020-07-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -20,7 +20,7 @@ dependencies:
20
20
  version: '4.2'
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '5.2'
23
+ version: '6.0'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -30,7 +30,7 @@ dependencies:
30
30
  version: '4.2'
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '5.2'
33
+ version: '6.0'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: delayed_job_active_record
36
36
  requirement: !ruby/object:Gem::Requirement
@@ -205,7 +205,7 @@ homepage: https://github.com/culturecode/spatial_features
205
205
  licenses:
206
206
  - MIT
207
207
  metadata: {}
208
- post_install_message:
208
+ post_install_message:
209
209
  rdoc_options: []
210
210
  require_paths:
211
211
  - lib
@@ -220,9 +220,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
220
220
  - !ruby/object:Gem::Version
221
221
  version: '0'
222
222
  requirements: []
223
- rubyforge_project:
224
- rubygems_version: 2.7.9
225
- signing_key:
223
+ rubygems_version: 3.0.8
224
+ signing_key:
226
225
  specification_version: 4
227
226
  summary: Adds spatial methods to a model.
228
227
  test_files: []