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: b80f70c84d88643edef39e5d702779a4248b05c03ed692c09139bad00f7f5009
4
- data.tar.gz: 9f923717999ac80231119e353356f8f9570c04e17ef560e84aa0656132ec0618
3
+ metadata.gz: 5b46f58d9f4e2ae496184d5b010cd2ebd4707cea2f70526925e4eb677ab43270
4
+ data.tar.gz: 81e594ef0a7ca42ce1dc6996a70610fb2b80b980cf92bc889a461bfcb233da70
5
5
  SHA512:
6
- metadata.gz: aff8a1b78d4b16f498c013652b5fd0d1b9b268fe9292197e7d799e12c8cfa562be6f6ba9a118fd3bab8cef19f028439db1befa6da02528e81c7aede7669560d6
7
- data.tar.gz: 8cb2c7bfe70dfdab95a8c8d535f5b7397be7b03978808b01a3169979cc6c417eae1f4a9c8e24043b5196aa5bfb678bd50c1778393ed40429f10b58d82f3666fd
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
@@ -3,7 +3,7 @@
3
3
  module ActiveRecord
4
4
  module ConnectionAdapters
5
5
  module PostGIS
6
- VERSION = "0.5.0"
6
+ VERSION = "0.5.1"
7
7
  end
8
8
  end
9
9
  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.0
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