rgeo-activerecord 2.0.0 → 2.1.0
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b83476535f3d17674c94804b519733b8323132e
|
4
|
+
data.tar.gz: a6be4923114b7a126efca93c7a9777f05abfe427
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 289df566bcc7790e1a19af1b8ad937529f0b161db4ae95c02dc3b9878cee98e4a31b400dc6e0b96127559ae3c18687ad7276509bbb47c017349eda1b873dec2b
|
7
|
+
data.tar.gz: db7bbcafe746974fa60a8d2aff1ec298e30bb87203685b9cb16172e7f7e8f35b4d64ff905278827b714e77c85724ed3f5b57699241e5ad976f78fffcb2a0786b
|
@@ -91,41 +91,6 @@ module RGeo
|
|
91
91
|
|
92
92
|
::ActiveRecord::ConnectionAdapters::Table.send :include, GeoConnectionAdapters
|
93
93
|
|
94
|
-
|
95
|
-
# Hack schema dumper to output spatial index flag
|
96
|
-
module GeoSchemaDumper
|
97
|
-
def self.included(base)
|
98
|
-
base.class_eval do
|
99
|
-
alias_method :indexes_without_rgeo, :indexes
|
100
|
-
alias_method :indexes, :indexes_with_rgeo
|
101
|
-
end
|
102
|
-
end
|
103
|
-
|
104
|
-
private
|
105
|
-
|
106
|
-
def indexes_with_rgeo(table, stream)
|
107
|
-
indexes = @connection.indexes(table)
|
108
|
-
if indexes.any?
|
109
|
-
add_index_statements = indexes.map do |index|
|
110
|
-
statement = [
|
111
|
-
"add_index #{index.table.inspect}",
|
112
|
-
index.columns.inspect,
|
113
|
-
"name: #{index.name.inspect}",
|
114
|
-
]
|
115
|
-
statement << 'unique: true' if index.unique
|
116
|
-
statement << 'spatial: true' if index.respond_to?(:spatial) && index.spatial
|
117
|
-
index_lengths = (index.lengths || []).compact
|
118
|
-
statement << ("length: #{::Hash[*index.columns.zip(index.lengths).flatten].inspect}") if index_lengths.any?
|
119
|
-
" #{statement.join(', ')}"
|
120
|
-
end
|
121
|
-
stream.puts add_index_statements.sort.join("\n")
|
122
|
-
stream.puts
|
123
|
-
end
|
124
|
-
end
|
125
|
-
end
|
126
|
-
|
127
|
-
::ActiveRecord::SchemaDumper.send :include, GeoSchemaDumper
|
128
|
-
|
129
94
|
# :startdoc:
|
130
95
|
end
|
131
96
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rgeo-activerecord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Azuma, Tee Parham
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rgeo
|
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
125
|
rubyforge_project:
|
126
|
-
rubygems_version: 2.4.
|
126
|
+
rubygems_version: 2.4.5
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: An RGeo module providing spatial extensions to ActiveRecord.
|