activerecord-postgis-adapter 0.6.6 → 0.7.0
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 +4 -4
- data/History.rdoc +7 -0
- data/{lib/rgeo/active_record/postgis_adapter/railtie.rb → LICENSE.txt} +2 -12
- data/lib/active_record/connection_adapters/postgis_adapter.rb +1 -60
- data/lib/active_record/connection_adapters/postgis_adapter/rails4/create_connection.rb +15 -74
- data/lib/active_record/connection_adapters/postgis_adapter/rails4/databases.rake +0 -38
- data/lib/active_record/connection_adapters/postgis_adapter/rails4/main_adapter.rb +0 -68
- data/lib/active_record/connection_adapters/postgis_adapter/rails4/postgis_database_tasks.rb +0 -36
- data/lib/active_record/connection_adapters/postgis_adapter/rails4/spatial_column.rb +0 -36
- data/lib/active_record/connection_adapters/postgis_adapter/rails4/spatial_table_definition.rb +0 -36
- data/lib/active_record/connection_adapters/postgis_adapter/railtie.rb +0 -36
- data/lib/active_record/connection_adapters/postgis_adapter/shared/arel_tosql.rb +0 -36
- data/lib/active_record/connection_adapters/postgis_adapter/shared/common_adapter_methods.rb +3 -70
- data/lib/active_record/connection_adapters/postgis_adapter/shared/railtie.rb +1 -54
- data/lib/active_record/connection_adapters/postgis_adapter/shared/setup.rb +0 -36
- data/lib/active_record/connection_adapters/postgis_adapter/version.rb +7 -0
- data/lib/activerecord-postgis-adapter.rb +0 -36
- data/lib/activerecord/postgis/adapter.rb +0 -36
- data/test/database.yml +5 -0
- data/test/tc_basic.rb +0 -35
- data/test/tc_ddl.rb +0 -35
- data/test/tc_nested_class.rb +0 -35
- data/test/tc_spatial_queries.rb +0 -35
- data/test/tc_tasks.rb +0 -78
- metadata +33 -38
- data/Version +0 -1
- data/lib/active_record/connection_adapters/postgis_adapter/rails3/create_connection.rb +0 -96
- data/lib/active_record/connection_adapters/postgis_adapter/rails3/databases.rake +0 -232
- data/lib/active_record/connection_adapters/postgis_adapter/rails3/main_adapter.rb +0 -298
- data/lib/active_record/connection_adapters/postgis_adapter/rails3/spatial_column.rb +0 -195
- data/lib/active_record/connection_adapters/postgis_adapter/rails3/spatial_table_definition.rb +0 -145
- data/lib/active_record/connection_adapters/postgis_adapter/shared/jdbc_compat.rb +0 -134
- data/lib/active_record/connection_adapters/postgis_adapter/shared/version.rb +0 -62
@@ -1,37 +1 @@
|
|
1
|
-
# -----------------------------------------------------------------------------
|
2
|
-
#
|
3
|
-
# PostGIS adapter for ActiveRecord
|
4
|
-
#
|
5
|
-
# -----------------------------------------------------------------------------
|
6
|
-
# Copyright 2010-2012 Daniel Azuma
|
7
|
-
#
|
8
|
-
# All rights reserved.
|
9
|
-
#
|
10
|
-
# Redistribution and use in source and binary forms, with or without
|
11
|
-
# modification, are permitted provided that the following conditions are met:
|
12
|
-
#
|
13
|
-
# * Redistributions of source code must retain the above copyright notice,
|
14
|
-
# this list of conditions and the following disclaimer.
|
15
|
-
# * Redistributions in binary form must reproduce the above copyright notice,
|
16
|
-
# this list of conditions and the following disclaimer in the documentation
|
17
|
-
# and/or other materials provided with the distribution.
|
18
|
-
# * Neither the name of the copyright holder, nor the names of any other
|
19
|
-
# contributors to this software, may be used to endorse or promote products
|
20
|
-
# derived from this software without specific prior written permission.
|
21
|
-
#
|
22
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
23
|
-
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
24
|
-
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
25
|
-
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
26
|
-
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
27
|
-
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
28
|
-
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
29
|
-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
30
|
-
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
31
|
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
32
|
-
# POSSIBILITY OF SUCH DAMAGE.
|
33
|
-
# -----------------------------------------------------------------------------
|
34
|
-
;
|
35
|
-
|
36
|
-
|
37
1
|
require 'active_record/connection_adapters/postgis_adapter.rb'
|
data/test/database.yml
ADDED
data/test/tc_basic.rb
CHANGED
@@ -1,38 +1,3 @@
|
|
1
|
-
# -----------------------------------------------------------------------------
|
2
|
-
#
|
3
|
-
# Tests for the PostGIS ActiveRecord adapter
|
4
|
-
#
|
5
|
-
# -----------------------------------------------------------------------------
|
6
|
-
# Copyright 2010-2012 Daniel Azuma
|
7
|
-
#
|
8
|
-
# All rights reserved.
|
9
|
-
#
|
10
|
-
# Redistribution and use in source and binary forms, with or without
|
11
|
-
# modification, are permitted provided that the following conditions are met:
|
12
|
-
#
|
13
|
-
# * Redistributions of source code must retain the above copyright notice,
|
14
|
-
# this list of conditions and the following disclaimer.
|
15
|
-
# * Redistributions in binary form must reproduce the above copyright notice,
|
16
|
-
# this list of conditions and the following disclaimer in the documentation
|
17
|
-
# and/or other materials provided with the distribution.
|
18
|
-
# * Neither the name of the copyright holder, nor the names of any other
|
19
|
-
# contributors to this software, may be used to endorse or promote products
|
20
|
-
# derived from this software without specific prior written permission.
|
21
|
-
#
|
22
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
23
|
-
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
24
|
-
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
25
|
-
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
26
|
-
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
27
|
-
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
28
|
-
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
29
|
-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
30
|
-
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
31
|
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
32
|
-
# POSSIBILITY OF SUCH DAMAGE.
|
33
|
-
# -----------------------------------------------------------------------------
|
34
|
-
;
|
35
|
-
|
36
1
|
require 'minitest/autorun'
|
37
2
|
require 'rgeo/active_record/adapter_test_helper'
|
38
3
|
|
data/test/tc_ddl.rb
CHANGED
@@ -1,38 +1,3 @@
|
|
1
|
-
# -----------------------------------------------------------------------------
|
2
|
-
#
|
3
|
-
# Tests for the PostGIS ActiveRecord adapter
|
4
|
-
#
|
5
|
-
# -----------------------------------------------------------------------------
|
6
|
-
# Copyright 2010-2012 Daniel Azuma
|
7
|
-
#
|
8
|
-
# All rights reserved.
|
9
|
-
#
|
10
|
-
# Redistribution and use in source and binary forms, with or without
|
11
|
-
# modification, are permitted provided that the following conditions are met:
|
12
|
-
#
|
13
|
-
# * Redistributions of source code must retain the above copyright notice,
|
14
|
-
# this list of conditions and the following disclaimer.
|
15
|
-
# * Redistributions in binary form must reproduce the above copyright notice,
|
16
|
-
# this list of conditions and the following disclaimer in the documentation
|
17
|
-
# and/or other materials provided with the distribution.
|
18
|
-
# * Neither the name of the copyright holder, nor the names of any other
|
19
|
-
# contributors to this software, may be used to endorse or promote products
|
20
|
-
# derived from this software without specific prior written permission.
|
21
|
-
#
|
22
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
23
|
-
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
24
|
-
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
25
|
-
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
26
|
-
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
27
|
-
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
28
|
-
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
29
|
-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
30
|
-
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
31
|
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
32
|
-
# POSSIBILITY OF SUCH DAMAGE.
|
33
|
-
# -----------------------------------------------------------------------------
|
34
|
-
;
|
35
|
-
|
36
1
|
require 'minitest/autorun'
|
37
2
|
require 'rgeo/active_record/adapter_test_helper'
|
38
3
|
|
data/test/tc_nested_class.rb
CHANGED
@@ -1,38 +1,3 @@
|
|
1
|
-
# -----------------------------------------------------------------------------
|
2
|
-
#
|
3
|
-
# Tests for the PostGIS ActiveRecord adapter
|
4
|
-
#
|
5
|
-
# -----------------------------------------------------------------------------
|
6
|
-
# Copyright 2010-2012 Daniel Azuma
|
7
|
-
#
|
8
|
-
# All rights reserved.
|
9
|
-
#
|
10
|
-
# Redistribution and use in source and binary forms, with or without
|
11
|
-
# modification, are permitted provided that the following conditions are met:
|
12
|
-
#
|
13
|
-
# * Redistributions of source code must retain the above copyright notice,
|
14
|
-
# this list of conditions and the following disclaimer.
|
15
|
-
# * Redistributions in binary form must reproduce the above copyright notice,
|
16
|
-
# this list of conditions and the following disclaimer in the documentation
|
17
|
-
# and/or other materials provided with the distribution.
|
18
|
-
# * Neither the name of the copyright holder, nor the names of any other
|
19
|
-
# contributors to this software, may be used to endorse or promote products
|
20
|
-
# derived from this software without specific prior written permission.
|
21
|
-
#
|
22
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
23
|
-
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
24
|
-
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
25
|
-
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
26
|
-
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
27
|
-
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
28
|
-
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
29
|
-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
30
|
-
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
31
|
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
32
|
-
# POSSIBILITY OF SUCH DAMAGE.
|
33
|
-
# -----------------------------------------------------------------------------
|
34
|
-
;
|
35
|
-
|
36
1
|
require 'minitest/autorun'
|
37
2
|
require 'rgeo/active_record/adapter_test_helper'
|
38
3
|
|
data/test/tc_spatial_queries.rb
CHANGED
@@ -1,38 +1,3 @@
|
|
1
|
-
# -----------------------------------------------------------------------------
|
2
|
-
#
|
3
|
-
# Tests for the PostGIS ActiveRecord adapter
|
4
|
-
#
|
5
|
-
# -----------------------------------------------------------------------------
|
6
|
-
# Copyright 2010-2012 Daniel Azuma
|
7
|
-
#
|
8
|
-
# All rights reserved.
|
9
|
-
#
|
10
|
-
# Redistribution and use in source and binary forms, with or without
|
11
|
-
# modification, are permitted provided that the following conditions are met:
|
12
|
-
#
|
13
|
-
# * Redistributions of source code must retain the above copyright notice,
|
14
|
-
# this list of conditions and the following disclaimer.
|
15
|
-
# * Redistributions in binary form must reproduce the above copyright notice,
|
16
|
-
# this list of conditions and the following disclaimer in the documentation
|
17
|
-
# and/or other materials provided with the distribution.
|
18
|
-
# * Neither the name of the copyright holder, nor the names of any other
|
19
|
-
# contributors to this software, may be used to endorse or promote products
|
20
|
-
# derived from this software without specific prior written permission.
|
21
|
-
#
|
22
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
23
|
-
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
24
|
-
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
25
|
-
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
26
|
-
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
27
|
-
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
28
|
-
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
29
|
-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
30
|
-
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
31
|
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
32
|
-
# POSSIBILITY OF SUCH DAMAGE.
|
33
|
-
# -----------------------------------------------------------------------------
|
34
|
-
;
|
35
|
-
|
36
1
|
require 'minitest/autorun'
|
37
2
|
require 'rgeo/active_record/adapter_test_helper'
|
38
3
|
|
data/test/tc_tasks.rb
CHANGED
@@ -1,49 +1,11 @@
|
|
1
|
-
# -----------------------------------------------------------------------------
|
2
|
-
#
|
3
|
-
# Tests for the PostGIS ActiveRecord adapter
|
4
|
-
#
|
5
|
-
# -----------------------------------------------------------------------------
|
6
|
-
# Copyright 2010-2012 Daniel Azuma
|
7
|
-
#
|
8
|
-
# All rights reserved.
|
9
|
-
#
|
10
|
-
# Redistribution and use in source and binary forms, with or without
|
11
|
-
# modification, are permitted provided that the following conditions are met:
|
12
|
-
#
|
13
|
-
# * Redistributions of source code must retain the above copyright notice,
|
14
|
-
# this list of conditions and the following disclaimer.
|
15
|
-
# * Redistributions in binary form must reproduce the above copyright notice,
|
16
|
-
# this list of conditions and the following disclaimer in the documentation
|
17
|
-
# and/or other materials provided with the distribution.
|
18
|
-
# * Neither the name of the copyright holder, nor the names of any other
|
19
|
-
# contributors to this software, may be used to endorse or promote products
|
20
|
-
# derived from this software without specific prior written permission.
|
21
|
-
#
|
22
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
23
|
-
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
24
|
-
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
25
|
-
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
26
|
-
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
27
|
-
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
28
|
-
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
29
|
-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
30
|
-
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
31
|
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
32
|
-
# POSSIBILITY OF SUCH DAMAGE.
|
33
|
-
# -----------------------------------------------------------------------------
|
34
|
-
;
|
35
|
-
|
36
1
|
require 'minitest/autorun'
|
37
2
|
require 'rgeo/active_record/adapter_test_helper'
|
38
3
|
|
39
|
-
|
40
4
|
module RGeo
|
41
5
|
module ActiveRecord # :nodoc:
|
42
6
|
module PostGISAdapter # :nodoc:
|
43
7
|
module Tests # :nodoc:
|
44
|
-
|
45
8
|
class TestTasks < ::MiniTest::Unit::TestCase # :nodoc:
|
46
|
-
|
47
9
|
DATABASE_CONFIG_PATH = ::File.dirname(__FILE__)+'/database.yml'
|
48
10
|
OVERRIDE_DATABASE_CONFIG_PATH = ::File.dirname(__FILE__)+'/database_local.yml'
|
49
11
|
|
@@ -57,39 +19,19 @@ module RGeo
|
|
57
19
|
|
58
20
|
include AdapterTestHelper
|
59
21
|
|
60
|
-
|
61
22
|
def cleanup_tables
|
62
23
|
::ActiveRecord::Base.remove_connection
|
63
24
|
::ActiveRecord::Base.clear_active_connections!
|
64
25
|
TestTasks::DEFAULT_AR_CLASS.connection.execute("DROP DATABASE IF EXISTS \"postgis_adapter_test2\"")
|
65
26
|
end
|
66
27
|
|
67
|
-
|
68
28
|
define_test_methods do
|
69
|
-
|
70
|
-
|
71
|
-
def test_create_database_from_extension_in_postgis_schema
|
72
|
-
unless defined?(::ActiveRecord::ConnectionAdapters::PostGISAdapter::PostGISDatabaseTasks)
|
73
|
-
skip('No task tests for Rails 3')
|
74
|
-
end
|
75
|
-
::ActiveRecord::Tasks::DatabaseTasks.create(TestTasks.new_database_config.merge('schema_search_path' => 'public,postgis'))
|
76
|
-
::ActiveRecord::Base.connection.select_values("SELECT * from postgis.spatial_ref_sys")
|
77
|
-
end
|
78
|
-
|
79
|
-
|
80
29
|
def test_create_database_from_extension_in_public_schema
|
81
|
-
unless defined?(::ActiveRecord::ConnectionAdapters::PostGISAdapter::PostGISDatabaseTasks)
|
82
|
-
skip('No task tests for Rails 3')
|
83
|
-
end
|
84
30
|
::ActiveRecord::Tasks::DatabaseTasks.create(TestTasks.new_database_config)
|
85
31
|
::ActiveRecord::Base.connection.select_values("SELECT * from public.spatial_ref_sys")
|
86
32
|
end
|
87
33
|
|
88
|
-
|
89
34
|
def test_empty_sql_dump
|
90
|
-
unless defined?(::ActiveRecord::ConnectionAdapters::PostGISAdapter::PostGISDatabaseTasks)
|
91
|
-
skip('No task tests for Rails 3')
|
92
|
-
end
|
93
35
|
filename_ = ::File.expand_path('../tmp/tmp.sql', ::File.dirname(__FILE__))
|
94
36
|
::FileUtils.rm_f(filename_)
|
95
37
|
::FileUtils.mkdir_p(::File.dirname(filename_))
|
@@ -99,11 +41,7 @@ module RGeo
|
|
99
41
|
assert(sql_ !~ /CREATE/)
|
100
42
|
end
|
101
43
|
|
102
|
-
|
103
44
|
def test_basic_geography_sql_dump
|
104
|
-
unless defined?(::ActiveRecord::ConnectionAdapters::PostGISAdapter::PostGISDatabaseTasks)
|
105
|
-
skip('No task tests for Rails 3')
|
106
|
-
end
|
107
45
|
filename_ = ::File.expand_path('../tmp/tmp.sql', ::File.dirname(__FILE__))
|
108
46
|
::FileUtils.rm_f(filename_)
|
109
47
|
::FileUtils.mkdir_p(::File.dirname(filename_))
|
@@ -116,11 +54,7 @@ module RGeo
|
|
116
54
|
assert(data_.index('latlon postgis.geography(Point,4326)'))
|
117
55
|
end
|
118
56
|
|
119
|
-
|
120
57
|
def test_empty_schema_dump
|
121
|
-
unless defined?(::ActiveRecord::ConnectionAdapters::PostGISAdapter::PostGISDatabaseTasks)
|
122
|
-
skip('No task tests for Rails 3')
|
123
|
-
end
|
124
58
|
filename_ = ::File.expand_path('../tmp/tmp.rb', ::File.dirname(__FILE__))
|
125
59
|
::FileUtils.rm_f(filename_)
|
126
60
|
::FileUtils.mkdir_p(::File.dirname(filename_))
|
@@ -133,11 +67,7 @@ module RGeo
|
|
133
67
|
assert(data_.index('ActiveRecord::Schema'))
|
134
68
|
end
|
135
69
|
|
136
|
-
|
137
70
|
def test_basic_geometry_schema_dump
|
138
|
-
unless defined?(::ActiveRecord::ConnectionAdapters::PostGISAdapter::PostGISDatabaseTasks)
|
139
|
-
skip('No task tests for Rails 3')
|
140
|
-
end
|
141
71
|
filename_ = ::File.expand_path('../tmp/tmp.rb', ::File.dirname(__FILE__))
|
142
72
|
::FileUtils.rm_f(filename_)
|
143
73
|
::FileUtils.mkdir_p(::File.dirname(filename_))
|
@@ -156,11 +86,7 @@ module RGeo
|
|
156
86
|
assert(data_.index("t.spatial \"object2\", limit: {:srid=>#{conn_.default_srid}, :type=>\"geometry\"}"))
|
157
87
|
end
|
158
88
|
|
159
|
-
|
160
89
|
def test_basic_geography_schema_dump
|
161
|
-
unless defined?(::ActiveRecord::ConnectionAdapters::PostGISAdapter::PostGISDatabaseTasks)
|
162
|
-
skip('No task tests for Rails 3')
|
163
|
-
end
|
164
90
|
filename_ = ::File.expand_path('../tmp/tmp.rb', ::File.dirname(__FILE__))
|
165
91
|
::FileUtils.rm_f(filename_)
|
166
92
|
::FileUtils.mkdir_p(::File.dirname(filename_))
|
@@ -178,12 +104,8 @@ module RGeo
|
|
178
104
|
assert(data_.index('t.spatial "latlon1", limit: {:srid=>4326, :type=>"point", :geographic=>true}'))
|
179
105
|
assert(data_.index('t.spatial "latlon2", limit: {:srid=>4326, :type=>"point", :geographic=>true}'))
|
180
106
|
end
|
181
|
-
|
182
|
-
|
183
107
|
end
|
184
|
-
|
185
108
|
end
|
186
|
-
|
187
109
|
end
|
188
110
|
end
|
189
111
|
end
|
metadata
CHANGED
@@ -1,83 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-postgis-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Azuma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 4.0.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 4.0.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: activerecord
|
28
|
+
name: rgeo-activerecord
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.5.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.5.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: minitest
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rdoc
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
description: This is an ActiveRecord connection adapter for PostGIS. It is based on
|
@@ -91,11 +91,13 @@ extra_rdoc_files:
|
|
91
91
|
- History.rdoc
|
92
92
|
- README.rdoc
|
93
93
|
files:
|
94
|
-
-
|
95
|
-
-
|
96
|
-
-
|
97
|
-
-
|
94
|
+
- Documentation.rdoc
|
95
|
+
- History.rdoc
|
96
|
+
- LICENSE.txt
|
97
|
+
- README.rdoc
|
98
|
+
- lib/active_record/connection_adapters/postgis_adapter.rb
|
98
99
|
- lib/active_record/connection_adapters/postgis_adapter/rails4/create_connection.rb
|
100
|
+
- lib/active_record/connection_adapters/postgis_adapter/rails4/databases.rake
|
99
101
|
- lib/active_record/connection_adapters/postgis_adapter/rails4/main_adapter.rb
|
100
102
|
- lib/active_record/connection_adapters/postgis_adapter/rails4/postgis_database_tasks.rb
|
101
103
|
- lib/active_record/connection_adapters/postgis_adapter/rails4/spatial_column.rb
|
@@ -103,25 +105,17 @@ files:
|
|
103
105
|
- lib/active_record/connection_adapters/postgis_adapter/railtie.rb
|
104
106
|
- lib/active_record/connection_adapters/postgis_adapter/shared/arel_tosql.rb
|
105
107
|
- lib/active_record/connection_adapters/postgis_adapter/shared/common_adapter_methods.rb
|
106
|
-
- lib/active_record/connection_adapters/postgis_adapter/shared/jdbc_compat.rb
|
107
108
|
- lib/active_record/connection_adapters/postgis_adapter/shared/railtie.rb
|
108
109
|
- lib/active_record/connection_adapters/postgis_adapter/shared/setup.rb
|
109
|
-
- lib/active_record/connection_adapters/postgis_adapter/
|
110
|
-
- lib/active_record/connection_adapters/postgis_adapter.rb
|
111
|
-
- lib/activerecord/postgis/adapter.rb
|
110
|
+
- lib/active_record/connection_adapters/postgis_adapter/version.rb
|
112
111
|
- lib/activerecord-postgis-adapter.rb
|
113
|
-
- lib/
|
114
|
-
-
|
115
|
-
- lib/active_record/connection_adapters/postgis_adapter/rails4/databases.rake
|
112
|
+
- lib/activerecord/postgis/adapter.rb
|
113
|
+
- test/database.yml
|
116
114
|
- test/tc_basic.rb
|
117
115
|
- test/tc_ddl.rb
|
118
116
|
- test/tc_nested_class.rb
|
119
117
|
- test/tc_spatial_queries.rb
|
120
118
|
- test/tc_tasks.rb
|
121
|
-
- Documentation.rdoc
|
122
|
-
- History.rdoc
|
123
|
-
- README.rdoc
|
124
|
-
- Version
|
125
119
|
homepage: http://dazuma.github.com/activerecord-postgis-adapter
|
126
120
|
licenses:
|
127
121
|
- BSD
|
@@ -132,21 +126,22 @@ require_paths:
|
|
132
126
|
- lib
|
133
127
|
required_ruby_version: !ruby/object:Gem::Requirement
|
134
128
|
requirements:
|
135
|
-
- -
|
129
|
+
- - ">="
|
136
130
|
- !ruby/object:Gem::Version
|
137
|
-
version: 1.
|
131
|
+
version: 1.9.3
|
138
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
133
|
requirements:
|
140
|
-
- -
|
134
|
+
- - ">="
|
141
135
|
- !ruby/object:Gem::Version
|
142
136
|
version: '0'
|
143
137
|
requirements: []
|
144
|
-
rubyforge_project:
|
145
|
-
rubygems_version: 2.
|
138
|
+
rubyforge_project:
|
139
|
+
rubygems_version: 2.2.2
|
146
140
|
signing_key:
|
147
141
|
specification_version: 4
|
148
142
|
summary: An ActiveRecord adapter for PostGIS, based on RGeo.
|
149
143
|
test_files:
|
144
|
+
- test/database.yml
|
150
145
|
- test/tc_basic.rb
|
151
146
|
- test/tc_ddl.rb
|
152
147
|
- test/tc_nested_class.rb
|