activerecord-postgis-adapter 6.0.2 → 6.0.3

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
  SHA256:
3
- metadata.gz: 6f48bf8a031b980aa3b0f5126c348628f06c5d20c7a12d50b4994bb6b118f718
4
- data.tar.gz: f5bdbb705028bc67f7bd506038e1017de0ada5b96f529db6761977f03f7ec1d2
3
+ metadata.gz: 69cf59b00676a1afdd07f0f6569b267995f5a5a3587fdf52a706876d5e4a1f87
4
+ data.tar.gz: d678ad7901ed89fae596ebfef4a48d2f04231a085da840c7fa2c4714f0aca534
5
5
  SHA512:
6
- metadata.gz: 91939a84b430809a77548cc34c8c792264306fe55219fa2d7ec2328509db0a3345ecb93a4ae742d94f483444ab6bd579e77f551ffbb86e01bda472b4d248239e
7
- data.tar.gz: 3f02dfbbea496a28d5a529f59628466cd1e146a7e2de8c39510ae5f172f6cbceff2978e7e34e2b2a1e644c4ae43d4bad100bd004971b84e278d7fc50537ca1f7
6
+ metadata.gz: 355f65508295569307ac86dba4970477eb6d41f1f48484bb203a61ff31b7a3ec827b9eea321441c24a83f8706ceead8c916cb833947074b2463e8ffdf0060050
7
+ data.tar.gz: ea179ffdf8d4d31a0065001ae396e552732679c7048e48994ef503c8e8ff206e7aa2140f07ffe31f67be5a046f3ee679ba3e8d50e993f54a08512bf214ccceed
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveRecord
4
+ module ConnectionAdapters # :nodoc:
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 = "6.0.2"
6
+ VERSION = "6.0.3"
7
7
  end
8
8
  end
9
9
  end
@@ -18,6 +18,7 @@ require "active_record/connection_adapters/postgresql_adapter"
18
18
  require "active_record/connection_adapters/postgis/version"
19
19
  require "active_record/connection_adapters/postgis/column_methods"
20
20
  require "active_record/connection_adapters/postgis/schema_statements"
21
+ require "active_record/connection_adapters/postgis/database_statements"
21
22
  require "active_record/connection_adapters/postgis/spatial_column_info"
22
23
  require "active_record/connection_adapters/postgis/spatial_table_definition"
23
24
  require "active_record/connection_adapters/postgis/spatial_column"
@@ -58,6 +59,7 @@ module ActiveRecord
58
59
  DEFAULT_SRID = 0
59
60
 
60
61
  include PostGIS::SchemaStatements
62
+ include PostGIS::DatabaseStatements
61
63
 
62
64
  def arel_visitor # :nodoc:
63
65
  Arel::Visitors::PostGIS.new(self)
@@ -93,6 +95,14 @@ module ActiveRecord
93
95
  super
94
96
  end
95
97
  end
98
+
99
+ def quote_default_expression(value, column)
100
+ if column.type == :geography || column.type == :geometry
101
+ quote(value)
102
+ else
103
+ super
104
+ end
105
+ end
96
106
  end
97
107
  end
98
108
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-postgis-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.2
4
+ version: 6.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Azuma
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-03-28 00:00:00.000000000 Z
12
+ date: 2021-08-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -110,6 +110,7 @@ files:
110
110
  - lib/active_record/connection_adapters/postgis/arel_tosql.rb
111
111
  - lib/active_record/connection_adapters/postgis/column_methods.rb
112
112
  - lib/active_record/connection_adapters/postgis/create_connection.rb
113
+ - lib/active_record/connection_adapters/postgis/database_statements.rb
113
114
  - lib/active_record/connection_adapters/postgis/databases.rake
114
115
  - lib/active_record/connection_adapters/postgis/oid/spatial.rb
115
116
  - lib/active_record/connection_adapters/postgis/postgis_database_tasks.rb
@@ -141,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
142
  - !ruby/object:Gem::Version
142
143
  version: '0'
143
144
  requirements: []
144
- rubygems_version: 3.0.8
145
+ rubygems_version: 3.1.4
145
146
  signing_key:
146
147
  specification_version: 4
147
148
  summary: ActiveRecord adapter for PostGIS, based on RGeo.