activerecord-postgis-adapter 8.0.1 → 8.0.2

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: d0e36778a7f367dc3b7477d7f389d94360b0f9130791cea0120b81f0feef745b
4
- data.tar.gz: 29d1233c9abbd1bbf0b0325310acb5a23eca2ba9baab7756729c2ea2bf6d14ec
3
+ metadata.gz: a73b6c9fb325971ec1f593c4698c12b68d8e9fd96e3af64f720d842f47f6c7d0
4
+ data.tar.gz: 52e0aa909ca3a69c74bcab5d6f0af4bd43f6610192a834743c632f803e17ce3c
5
5
  SHA512:
6
- metadata.gz: ce7fda2c1d2baa1a4ab7ba120ad643468e12ed68b7e7100e5a1ef002e803fac5c8b764514d108986942e41729809b24ef31e7a6b75b14658bfe6bbb5e5407fad
7
- data.tar.gz: 7e7d8e706991da86fb963735a67f1f28a9e97d258bf1fe099d6f61f449e0f16064909f2a96614fa8737e87cd31c2f99c3982d8d5e6da782f29a3a01bfbc6886b
6
+ metadata.gz: 8b1f926834a893d07c9e09928ffbce2635906292a8dbad8f949df978f779c06841cd36b89ab0c160f5f2f197fffeb82907e2b24f18fd2dffd34b8184f9591bdf
7
+ data.tar.gz: 7da434681d9cfa4f120b76768d0bdab74724e3eca2928df1c4897c94ee7e6b1f8b2367c4a2213831b3a8943b3ac4759fc7de2c8583f422640835fcc2563efe68
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveRecord
4
+ module ConnectionAdapters
5
+ module PostGIS
6
+ module OID
7
+ module DateTime
8
+ protected
9
+
10
+ # Uses PostGIS instead of PostgreSQLAdapter
11
+ def real_type_unless_aliased(real_type)
12
+ ActiveRecord::ConnectionAdapters::PostGISAdapter.datetime_type == real_type ? :datetime : real_type
13
+ end
14
+ end
15
+
16
+ PostgreSQL::OID::DateTime.prepend(DateTime)
17
+ end
18
+ end
19
+ end
20
+ end
@@ -8,7 +8,13 @@ module ActiveRecord # :nodoc:
8
8
 
9
9
  # super: https://github.com/rails/rails/blob/master/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
10
10
  def new_column_definition(name, type, **options)
11
- if (info = PostGISAdapter.spatial_column_options(type.to_sym))
11
+ col_type = if type.to_sym == :virtual
12
+ options[:type]
13
+ else
14
+ type
15
+ end
16
+
17
+ if (info = PostGISAdapter.spatial_column_options(col_type))
12
18
  if (limit = options.delete(:limit)) && limit.is_a?(::Hash)
13
19
  options.merge!(limit)
14
20
  end
@@ -3,7 +3,7 @@
3
3
  module ActiveRecord
4
4
  module ConnectionAdapters
5
5
  module PostGIS
6
- VERSION = "8.0.1"
6
+ VERSION = "8.0.2"
7
7
  end
8
8
  end
9
9
  end
@@ -18,6 +18,7 @@ require "active_record/connection_adapters/postgis/spatial_table_definition"
18
18
  require "active_record/connection_adapters/postgis/spatial_column"
19
19
  require "active_record/connection_adapters/postgis/arel_tosql"
20
20
  require "active_record/connection_adapters/postgis/oid/spatial"
21
+ require "active_record/connection_adapters/postgis/oid/date_time"
21
22
  require "active_record/connection_adapters/postgis/type" # has to be after oid/*
22
23
  require "active_record/connection_adapters/postgis/create_connection"
23
24
  # :startdoc:
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: 8.0.1
4
+ version: 8.0.2
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: 2022-08-01 00:00:00.000000000 Z
12
+ date: 2023-05-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -81,6 +81,34 @@ dependencies:
81
81
  - - "~>"
82
82
  - !ruby/object:Gem::Version
83
83
  version: '1.1'
84
+ - !ruby/object:Gem::Dependency
85
+ name: benchmark-ips
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: 2.9.1
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: 2.9.1
98
+ - !ruby/object:Gem::Dependency
99
+ name: rubocop
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
103
+ - !ruby/object:Gem::Version
104
+ version: '1.50'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: '1.50'
84
112
  description: ActiveRecord connection adapter for PostGIS. It is based on the stock
85
113
  PostgreSQL adapter, and adds built-in support for the spatial extensions provided
86
114
  by PostGIS. It uses the RGeo library to represent spatial data in Ruby.
@@ -97,6 +125,7 @@ files:
97
125
  - lib/active_record/connection_adapters/postgis/column_methods.rb
98
126
  - lib/active_record/connection_adapters/postgis/create_connection.rb
99
127
  - lib/active_record/connection_adapters/postgis/database_statements.rb
128
+ - lib/active_record/connection_adapters/postgis/oid/date_time.rb
100
129
  - lib/active_record/connection_adapters/postgis/oid/spatial.rb
101
130
  - lib/active_record/connection_adapters/postgis/schema_statements.rb
102
131
  - lib/active_record/connection_adapters/postgis/spatial_column.rb
@@ -126,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
155
  - !ruby/object:Gem::Version
127
156
  version: '0'
128
157
  requirements: []
129
- rubygems_version: 3.1.4
158
+ rubygems_version: 3.2.33
130
159
  signing_key:
131
160
  specification_version: 4
132
161
  summary: ActiveRecord adapter for PostGIS, based on RGeo.