activerecord-postgis 0.5.0 → 0.5.1
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5b46f58d9f4e2ae496184d5b010cd2ebd4707cea2f70526925e4eb677ab43270
|
|
4
|
+
data.tar.gz: 81e594ef0a7ca42ce1dc6996a70610fb2b80b980cf92bc889a461bfcb233da70
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 672a16c717f2f4a717d17fae6f55f9bc8b8ca714d4923ed8544af0fa04d82c361ee0acd768009860d68ee4598099e308013688b65e0ccf46e092fb7c539f6296
|
|
7
|
+
data.tar.gz: f6ca038d3130f62c662a77fb0ad58885339a278ec71af721003c3c0af416fb2ec6ff4f2d7b6829daab310664780ad874d8c970392b0ddfd097e2f905d4ee3d63
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ActiveRecord
|
|
4
|
+
module ConnectionAdapters
|
|
5
|
+
module PostGIS
|
|
6
|
+
module DatabaseStatements
|
|
7
|
+
def truncate_tables(*table_names)
|
|
8
|
+
table_names -= [ "spatial_ref_sys" ]
|
|
9
|
+
super(*table_names)
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -20,6 +20,7 @@ require_relative "postgis/adapter_extensions"
|
|
|
20
20
|
require_relative "postgis/column_extensions"
|
|
21
21
|
require_relative "postgis/quoting"
|
|
22
22
|
require_relative "postgis/spatial_queries"
|
|
23
|
+
require_relative "postgis/database_statements"
|
|
23
24
|
|
|
24
25
|
module ActiveRecord
|
|
25
26
|
module ConnectionAdapters
|
|
@@ -90,6 +91,9 @@ module ActiveRecord
|
|
|
90
91
|
# Prepend our extensions to handle spatial columns
|
|
91
92
|
PostgreSQLAdapter.prepend(AdapterExtensions)
|
|
92
93
|
|
|
94
|
+
# Prevent spatial_reference_sys truncation
|
|
95
|
+
PostgreSQLAdapter.prepend(DatabaseStatements)
|
|
96
|
+
|
|
93
97
|
# Register spatial types with ActiveRecord::Type - use st_* prefix to avoid conflicts
|
|
94
98
|
adapter_name = :postgresql
|
|
95
99
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activerecord-postgis
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Abdelkader Boudih
|
|
@@ -72,6 +72,7 @@ files:
|
|
|
72
72
|
- lib/active_record/connection_adapters/postgis/column_extensions.rb
|
|
73
73
|
- lib/active_record/connection_adapters/postgis/column_methods.rb
|
|
74
74
|
- lib/active_record/connection_adapters/postgis/constants.rb
|
|
75
|
+
- lib/active_record/connection_adapters/postgis/database_statements.rb
|
|
75
76
|
- lib/active_record/connection_adapters/postgis/oid/spatial.rb
|
|
76
77
|
- lib/active_record/connection_adapters/postgis/oid/spatial_types.rb
|
|
77
78
|
- lib/active_record/connection_adapters/postgis/quoting.rb
|