activerecord-postgis-adapter 10.0.1 → 10.0.2

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: c89079951de976b3c0909194bfc5c19e7788f6002ac72851c4ad42606ffea8fd
4
- data.tar.gz: ab2b792b1bb948cd59cf7fcfccb447ac833c5cbae9d12b7a8822295b94c4cf65
3
+ metadata.gz: 006fc33b47e59f9a1a422164e55ce515434cc0b73aa0ebbb6b001f42fcc9bed3
4
+ data.tar.gz: 2f83c9c9f633b1b7a1a82e9357637a310a893cf8d2c3c72b5b51bef1ef5c1e9c
5
5
  SHA512:
6
- metadata.gz: b8399daa6d86e1871e1de81442f9fa059ed8667bf809429f3fd43b58fe7957c87d882322346ca808f7062acd1cebf63fbd2fe5507316de0fc1cefaec2b039523
7
- data.tar.gz: 9939e9d954d8d9c0aeb10c13641507819028c8f9b5d57e2db66fd50dff058773eda3c13f40c4ee28e75cd26e0c9fb6f4e39982f0dcadfe12d82ad88a9b9f34a0
6
+ metadata.gz: c6af69ad49016381177399d46a31468828e0a5d9c556bb6193a33e6155f25590eb127f119069552eb11fb0ca56aa592c75f4c3d169430552ff8e216ffcdefce3
7
+ data.tar.gz: 51f47cb3c2ef75806e5104deaeb546542a8b0202f13fd6f6cf4a05ed605048b5cb1832e2f023d31af7092396283fb8ce8e34bfc26a5713182002c55164b0bfce
@@ -58,6 +58,29 @@ module ActiveRecord # :nodoc:
58
58
  %i[geometry geography].include?(@sql_type_metadata.type)
59
59
  end
60
60
 
61
+ SPATIAL_ATTRIBUTES = %w[geographic geometric_type has_m has_z srid limit].freeze
62
+
63
+ def init_with(coder)
64
+ SPATIAL_ATTRIBUTES.each { |attr| instance_variable_set(:"@#{attr}", coder[attr]) }
65
+ super
66
+ end
67
+
68
+ def encode_with(coder)
69
+ SPATIAL_ATTRIBUTES.each { |attr| coder[attr] = instance_variable_get(:"@#{attr}") }
70
+ super
71
+ end
72
+
73
+ def ==(other)
74
+ other.is_a?(SpatialColumn) &&
75
+ super &&
76
+ SPATIAL_ATTRIBUTES.all? { |attr| public_send(attr) == other.public_send(attr) }
77
+ end
78
+ alias :eql? :==
79
+
80
+ def hash
81
+ SPATIAL_ATTRIBUTES.reduce(SpatialColumn.hash ^ super.hash) { |h, attr| h ^ public_send(attr).hash }
82
+ end
83
+
61
84
  private
62
85
 
63
86
  def set_geometric_type_from_name(name)
@@ -3,7 +3,7 @@
3
3
  module ActiveRecord
4
4
  module ConnectionAdapters
5
5
  module PostGIS
6
- VERSION = "10.0.1"
6
+ VERSION = "10.0.2"
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-postgis-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.0.1
4
+ version: 10.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Azuma
8
8
  - Tee Parham
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-11-15 00:00:00.000000000 Z
12
+ date: 2026-03-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -141,7 +141,7 @@ licenses:
141
141
  metadata:
142
142
  funding_uri: https://opencollective.com/rgeo
143
143
  rubygems_mfa_required: 'true'
144
- post_install_message:
144
+ post_install_message:
145
145
  rdoc_options: []
146
146
  require_paths:
147
147
  - lib
@@ -156,8 +156,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
156
  - !ruby/object:Gem::Version
157
157
  version: '0'
158
158
  requirements: []
159
- rubygems_version: 3.3.26
160
- signing_key:
159
+ rubygems_version: 3.5.22
160
+ signing_key:
161
161
  specification_version: 4
162
162
  summary: ActiveRecord adapter for PostGIS, based on RGeo.
163
163
  test_files: []