spatial_features 1.2.5 → 1.2.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.
@@ -19,7 +19,8 @@ module SpatialFeatures
19
19
  # NOTE: features are never updated, only deleted and created, therefore we can
20
20
  # tell if they have changed by finding the maximum id and count instead of needing timestamps
21
21
  def features_cache_key
22
- "#{name}/#{Feature.where(:spatial_model_type => self).maximum(:id)}-#{Feature.where(:spatial_model_type => self).count}"
22
+ max_id, count = Feature.where(:spatial_model_type => self).pluck("MAX(id), COUNT(*)").first
23
+ "#{name}/#{max_id}-#{count}"
23
24
  end
24
25
 
25
26
  def intersecting(other, options = {})
@@ -86,7 +87,8 @@ module SpatialFeatures
86
87
  end
87
88
 
88
89
  def features_cache_key
89
- "#{self.class.name}/#{self.id}-#{features.maximum(:id)}-#{features.size}"
90
+ max_id, count = features.pluck("MAX(id), COUNT(*)").first
91
+ "#{self.class.name}/#{self.id}-#{max_id}-#{count}"
90
92
  end
91
93
 
92
94
  def polygons?
@@ -1,3 +1,3 @@
1
1
  module SpatialFeatures
2
- VERSION = "1.2.5"
2
+ VERSION = "1.2.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spatial_features
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Ryan Wallace
@@ -9,11 +10,12 @@ authors:
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2015-03-25 00:00:00.000000000 Z
13
+ date: 2015-04-02 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: rails
16
17
  requirement: !ruby/object:Gem::Requirement
18
+ none: false
17
19
  requirements:
18
20
  - - "~>"
19
21
  - !ruby/object:Gem::Version
@@ -21,6 +23,7 @@ dependencies:
21
23
  type: :runtime
22
24
  prerelease: false
23
25
  version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
24
27
  requirements:
25
28
  - - "~>"
26
29
  - !ruby/object:Gem::Version
@@ -28,6 +31,7 @@ dependencies:
28
31
  - !ruby/object:Gem::Dependency
29
32
  name: delayed_job_active_record
30
33
  requirement: !ruby/object:Gem::Requirement
34
+ none: false
31
35
  requirements:
32
36
  - - ">="
33
37
  - !ruby/object:Gem::Version
@@ -35,6 +39,7 @@ dependencies:
35
39
  type: :runtime
36
40
  prerelease: false
37
41
  version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
38
43
  requirements:
39
44
  - - ">="
40
45
  - !ruby/object:Gem::Version
@@ -42,6 +47,7 @@ dependencies:
42
47
  - !ruby/object:Gem::Dependency
43
48
  name: pg
44
49
  requirement: !ruby/object:Gem::Requirement
50
+ none: false
45
51
  requirements:
46
52
  - - ">="
47
53
  - !ruby/object:Gem::Version
@@ -49,6 +55,7 @@ dependencies:
49
55
  type: :development
50
56
  prerelease: false
51
57
  version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
52
59
  requirements:
53
60
  - - ">="
54
61
  - !ruby/object:Gem::Version
@@ -60,11 +67,7 @@ executables: []
60
67
  extensions: []
61
68
  extra_rdoc_files: []
62
69
  files:
63
- - MIT-LICENSE
64
- - README.rdoc
65
- - Rakefile
66
70
  - config/initializers/register_oids.rb
67
- - lib/spatial_features.rb
68
71
  - lib/spatial_features/caching.rb
69
72
  - lib/spatial_features/controller_helpers/spatial_extensions.rb
70
73
  - lib/spatial_features/engine.rb
@@ -76,9 +79,11 @@ files:
76
79
  - lib/spatial_features/venn_polygons.rb
77
80
  - lib/spatial_features/version.rb
78
81
  - lib/spatial_features/workers/arcgis_update_features_job.rb
82
+ - lib/spatial_features.rb
79
83
  - lib/tasks/spatial_features_tasks.rake
80
- - test/dummy/README.rdoc
81
- - test/dummy/Rakefile
84
+ - MIT-LICENSE
85
+ - Rakefile
86
+ - README.rdoc
82
87
  - test/dummy/app/assets/javascripts/application.js
83
88
  - test/dummy/app/assets/stylesheets/application.css
84
89
  - test/dummy/app/controllers/application_controller.rb
@@ -87,7 +92,6 @@ files:
87
92
  - test/dummy/bin/bundle
88
93
  - test/dummy/bin/rails
89
94
  - test/dummy/bin/rake
90
- - test/dummy/config.ru
91
95
  - test/dummy/config/application.rb
92
96
  - test/dummy/config/boot.rb
93
97
  - test/dummy/config/database.yml
@@ -106,35 +110,39 @@ files:
106
110
  - test/dummy/config/locales/en.yml
107
111
  - test/dummy/config/routes.rb
108
112
  - test/dummy/config/secrets.yml
113
+ - test/dummy/config.ru
109
114
  - test/dummy/public/404.html
110
115
  - test/dummy/public/422.html
111
116
  - test/dummy/public/500.html
112
117
  - test/dummy/public/favicon.ico
118
+ - test/dummy/Rakefile
119
+ - test/dummy/README.rdoc
113
120
  - test/spatial_features_test.rb
114
121
  - test/test_helper.rb
115
122
  homepage: https://github.com/culturecode/spatial_features
116
123
  licenses:
117
124
  - MIT
118
- metadata: {}
119
125
  post_install_message:
120
126
  rdoc_options: []
121
127
  require_paths:
122
128
  - lib
123
129
  required_ruby_version: !ruby/object:Gem::Requirement
130
+ none: false
124
131
  requirements:
125
132
  - - ">="
126
133
  - !ruby/object:Gem::Version
127
134
  version: '0'
128
135
  required_rubygems_version: !ruby/object:Gem::Requirement
136
+ none: false
129
137
  requirements:
130
138
  - - ">="
131
139
  - !ruby/object:Gem::Version
132
140
  version: '0'
133
141
  requirements: []
134
142
  rubyforge_project:
135
- rubygems_version: 2.4.6
143
+ rubygems_version: 1.8.25
136
144
  signing_key:
137
- specification_version: 4
145
+ specification_version: 3
138
146
  summary: Adds spatial methods to a model.
139
147
  test_files:
140
148
  - test/dummy/app/assets/javascripts/application.js
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: ec98df441de5998822d71084ce88108014832927
4
- data.tar.gz: 5ffa4c5e9bdda4dd520fd4454d6ff0050c0d3ea7
5
- SHA512:
6
- metadata.gz: 7a6de5764416da349235f113a79c37c315076ebcfc2bf2250838cf215363257fc06f3fc4d731cc8b1f44d142dc7c4a054ba30750298964031f531a40819d81a7
7
- data.tar.gz: a7589aab35b5312125890e0600379ffd54377c666378ce71ae25ccc56f7b1dfdd14083b67b8fd8183dac2b5b95552c6d61abb8dcc7abf1d800a40710fef62edc