activerecord-trilogis-adapter 7.0.1 → 8.0.0

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.
@@ -2,106 +2,256 @@
2
2
 
3
3
  module ActiveRecord
4
4
  module Type
5
- class Spatial < Binary # :nodoc:
6
- # sql_type is a string that comes from the database definition
7
- # examples:
8
- # "geometry"
9
- # "geometry NOT NULL"
10
- # "geometry"
5
+ class Spatial < Binary
6
+ attr_reader :geo_type, :srid
7
+
11
8
  def initialize(sql_type = "geometry")
12
9
  @sql_type = sql_type
13
10
  @geo_type, @srid = self.class.parse_sql_type(sql_type)
14
11
  end
15
12
 
16
- # sql_type: geometry, geometry(Point), geometry(Point,4326), ...
17
- #
18
- # returns [geo_type, srid]
19
- # geo_type: geometry, point, line_string, polygon, ...
20
- # srid: 1234
13
+ def type
14
+ :geometry
15
+ end
16
+
17
+ # Class method for parsing SQL type
21
18
  def self.parse_sql_type(sql_type)
22
- geo_type, srid = nil, 0
23
- if sql_type =~ /(geometry)\((.*)\)$/i
24
- # geometry(Point)
25
- # geometry(Point,4326)
26
- params = Regexp.last_match(2).split(",")
27
- if params.first =~ /([a-z]+[^zm])(z?)(m?)/i
28
- geo_type = Regexp.last_match(1)
29
- end
30
- if params.last =~ /(\d+)/
31
- srid = Regexp.last_match(1).to_i
32
- end
19
+ sql_type = sql_type.to_s.downcase
20
+
21
+ # Extract geometry type and SRID from SQL type
22
+ # Examples: "geometry", "point", "linestring", "geometry(Point,4326)"
23
+ if sql_type =~ /(\w+)(?:\((\w+)(?:,(\d+))?\))?/
24
+ geo_type = Regexp.last_match(1)
25
+ sub_type = Regexp.last_match(2)
26
+ srid = Regexp.last_match(3).to_i
27
+
28
+ geo_type = sub_type.downcase if sub_type
29
+ [geo_type, srid]
33
30
  else
34
- # geometry
35
- # otherType(a,b)
36
- geo_type = sql_type
31
+ [sql_type, 0]
37
32
  end
38
- [geo_type, srid]
39
33
  end
40
34
 
41
- def spatial_factory
42
- @spatial_factories ||= {}
35
+ def serialize(value)
36
+ return nil if value.nil?
37
+
38
+ # Return the RGeo geometry object as-is
39
+ # The adapter's quote method will handle conversion to SQL
40
+ cast(value)
41
+ end
42
+
43
+ def deserialize(value)
44
+ return nil if value.nil?
45
+
46
+ # Handle RGeo objects directly
47
+ return value if value.is_a?(RGeo::Feature::Instance)
48
+
49
+ # Convert to string if needed and check for empty
50
+ value = value.to_s if value.respond_to?(:to_s)
51
+ return nil if value.empty?
52
+
53
+ # MySQL returns binary WKB with SRID prefix
54
+ # Try to parse as binary WKB first
55
+ if [Encoding::ASCII_8BIT, Encoding::BINARY].include?(value.encoding)
56
+ result = parse_wkb_binary(value)
57
+ return result if result
58
+ end
43
59
 
44
- @spatial_factories[@srid] ||= if @srid == ConnectionAdapters::TrilogisAdapter::GEOGRAPHIC_SRID
45
- RGeo::Geographic.spherical_factory(srid: ConnectionAdapters::TrilogisAdapter::GEOGRAPHIC_SRID)
60
+ # Try hex WKB
61
+ return parse_wkb_hex(value) if value.match?(/\A[0-9a-fA-F]+\z/)
62
+
63
+ # Try WKT
64
+ parse_wkt(value)
65
+ end
66
+
67
+ def cast(value)
68
+ return nil if value.nil?
69
+
70
+ # Check by class name instead of is_a? due to ActiveRecord wrapping values
71
+ if value.is_a?(RGeo::Feature::Instance)
72
+ value
73
+ elsif value.instance_of?(::String) || value.respond_to?(:to_str)
74
+ parse_string(value.to_s)
75
+ elsif value.is_a?(Hash)
76
+ cast_hash(value)
77
+ end
78
+ end
79
+
80
+ def changed?(old_value, new_value, _new_value_before_type_cast)
81
+ old_value != new_value
82
+ end
83
+
84
+ def changed_in_place?(raw_old_value, new_value)
85
+ deserialize(raw_old_value) != new_value
86
+ end
87
+
88
+ private
89
+
90
+ def parse_sql_type(sql_type)
91
+ original_sql_type = sql_type.to_s
92
+ sql_type = sql_type.to_s.downcase
93
+
94
+ # Only parse known spatial types
95
+ # For non-spatial types, return them unchanged
96
+ spatial_types = %w[geometry point linestring polygon multipoint multilinestring multipolygon geometrycollection]
97
+
98
+ # Check if it's a spatial type
99
+ base_type = sql_type.split("(").first
100
+ return [original_sql_type, 0] unless spatial_types.include?(base_type)
101
+
102
+ # Extract geometry type and SRID from SQL type
103
+ # Examples: "geometry", "point", "linestring", "geometry(Point,4326)"
104
+ if sql_type =~ /(\w+)(?:\((\w+)(?:,(\d+))?\))?/
105
+ geo_type = Regexp.last_match(1)
106
+ sub_type = Regexp.last_match(2)
107
+ srid = Regexp.last_match(3).to_i
108
+
109
+ geo_type = sub_type.downcase if sub_type
110
+ [geo_type, srid]
46
111
  else
47
- RGeo::ActiveRecord::SpatialFactoryStore.instance.factory(
112
+ [sql_type, 0]
113
+ end
114
+ end
115
+
116
+ def parse_string(string)
117
+ return nil if string.blank?
118
+
119
+ # Handle EWKT format: SRID=xxxx;GEOMETRY(...)
120
+ if string =~ /SRID=(\d+);(.+)/i
121
+ srid = Regexp.last_match(1).to_i
122
+ wkt = Regexp.last_match(2)
123
+
124
+ # Use SpatialFactoryStore to get the appropriate factory
125
+ geo_factory = RGeo::ActiveRecord::SpatialFactoryStore.instance.factory(
48
126
  geo_type: @geo_type,
49
127
  sql_type: @sql_type,
50
- srid: @srid
128
+ srid: srid
51
129
  )
130
+ begin
131
+ return RGeo::WKRep::WKTParser.new(geo_factory, support_ewkt: true, default_srid: srid).parse(wkt)
132
+ rescue RGeo::Error::ParseError
133
+ return nil
134
+ end
52
135
  end
53
- end
54
136
 
55
- def klass
56
- type == :geometry ? RGeo::Feature::Geometry : super
137
+ # Try to parse as WKT
138
+ if string.match?(/^[A-Z]/i)
139
+ parse_wkt(string)
140
+ # Try to parse as WKB hex
141
+ elsif string.match?(/^[0-9a-fA-F]+$/)
142
+ parse_wkb_hex(string)
143
+ end
57
144
  end
58
145
 
59
- def spatial?
60
- true
146
+ def parse_wkt(string)
147
+ # Support EWKT (Extended Well-Known Text) format with SRID
148
+ RGeo::WKRep::WKTParser.new(spatial_factory, support_ewkt: true, default_srid: @srid).parse(string)
149
+ rescue RGeo::Error::ParseError
150
+ # WKT parsing failed, return nil
151
+ nil
61
152
  end
62
153
 
63
- def type
64
- :geometry
154
+ def parse_wkb_hex(hex_string)
155
+ return nil if hex_string.nil? || hex_string.empty?
156
+
157
+ binary = convert_hex_to_binary(hex_string)
158
+ parse_binary_with_srid(binary)
159
+ rescue RGeo::Error::ParseError, ArgumentError
160
+ nil
65
161
  end
66
162
 
67
- # support setting an RGeo object or a WKT string
68
- def serialize(value)
69
- return if value.nil?
163
+ def convert_hex_to_binary(hex_string)
164
+ # MySQL returns WKB as hex string
165
+ [hex_string].pack("H*")
166
+ end
70
167
 
71
- geo_value = cast_value(value)
168
+ def parse_binary_with_srid(binary)
169
+ # MySQL internal format: first 4 bytes are SRID (little-endian), then WKB
170
+ if binary.length >= 5
171
+ srid = extract_srid(binary)
172
+ wkb_data = binary[4..]
173
+ parse_wkb_with_factory(wkb_data, srid)
174
+ else
175
+ parse_standard_wkb(binary)
176
+ end
177
+ end
72
178
 
73
- # TODO: - only valid types should be allowed
74
- # e.g. linestring is not valid for point column
75
- raise "maybe should raise" unless RGeo::Feature::Geometry.check_type(geo_value)
179
+ def extract_srid(binary)
180
+ # V = unsigned 32-bit little-endian
181
+ binary[0..3].unpack1("V")
182
+ end
76
183
 
77
- geo_value
184
+ def parse_wkb_with_factory(wkb_data, srid)
185
+ geo_factory = create_factory_for_srid(srid)
186
+ RGeo::WKRep::WKBParser.new(geo_factory, support_ewkb: true, default_srid: srid).parse(wkb_data)
78
187
  end
79
188
 
80
- private
189
+ def create_factory_for_srid(srid)
190
+ # Geographic SRIDs (4326, 4269, 4267, 4258, 4019) need spherical factory
191
+ if geographic_srid?(srid)
192
+ RGeo::Geographic.spherical_factory(srid: srid)
193
+ else
194
+ RGeo::Cartesian.preferred_factory(srid: srid)
195
+ end
196
+ end
81
197
 
82
- def cast_value(value)
83
- return if value.nil?
198
+ def parse_standard_wkb(binary)
199
+ # Fall back to standard WKB parsing with EWKB support
200
+ RGeo::WKRep::WKBParser.new(spatial_factory, support_ewkb: true, default_srid: @srid).parse(binary)
201
+ end
84
202
 
85
- ::String === value ? parse_wkt(value) : value
203
+ # Check if SRID represents a geographic coordinate system
204
+ def geographic_srid?(srid)
205
+ # Common geographic SRIDs that use latitude-longitude
206
+ [4326, 4269, 4267, 4258, 4019].include?(srid)
86
207
  end
87
208
 
88
- # convert WKT string into RGeo object
89
- def parse_wkt(string)
90
- marker = string[4, 1]
91
- if ["\x00", "\x01"].include?(marker)
92
- @srid = string[0, 4].unpack1(marker == "\x01" ? "V" : "N")
93
- RGeo::WKRep::WKBParser.new(spatial_factory, support_ewkb: true, default_srid: @srid).parse(string[4..-1])
94
- elsif string[0, 10] =~ /[0-9a-fA-F]{8}0[01]/
95
- @srid = string[0, 8].to_i(16)
96
- @srid = [@srid].pack("V").unpack("N").first if string[9, 1] == "1"
97
- RGeo::WKRep::WKBParser.new(spatial_factory, support_ewkb: true, default_srid: @srid).parse(string[8..-1])
209
+ def parse_wkb_binary(binary_string)
210
+ return nil if binary_string.nil? || binary_string.empty?
211
+
212
+ # MySQL internal format: first 4 bytes are SRID (little-endian), then WKB
213
+ if binary_string.length >= 5
214
+ srid = binary_string[0..3].unpack1("V") # V = unsigned 32-bit little-endian
215
+ wkb_data = binary_string[4..]
216
+
217
+ # Create appropriate factory based on SRID
218
+ # Geographic SRIDs (4326, 4269, 4267, 4258, 4019) need spherical factory
219
+ geo_factory = if geographic_srid?(srid)
220
+ RGeo::Geographic.spherical_factory(srid: srid)
221
+ else
222
+ RGeo::Cartesian.preferred_factory(srid: srid)
223
+ end
224
+
225
+ # Support EWKB format
226
+ RGeo::WKRep::WKBParser.new(geo_factory, support_ewkb: true, default_srid: srid).parse(wkb_data)
98
227
  else
99
- string, @srid = Arel::Visitors::Trilogis.parse_node(string)
100
- RGeo::WKRep::WKTParser.new(spatial_factory, support_ewkt: true, default_srid: @srid).parse(string)
228
+ # Fall back to standard WKB parsing with EWKB support
229
+ RGeo::WKRep::WKBParser.new(spatial_factory, support_ewkb: true, default_srid: @srid).parse(binary_string)
101
230
  end
102
- rescue RGeo::Error::ParseError, RGeo::Error::InvalidGeometry
231
+ rescue RGeo::Error::ParseError, ArgumentError
232
+ # Failed to parse, return nil
103
233
  nil
104
234
  end
235
+
236
+ def cast_hash(hash)
237
+ return nil unless hash.is_a?(Hash)
238
+
239
+ # Support GeoJSON-like hashes (allow symbol or string keys)
240
+ normalized_hash = hash.transform_keys(&:to_s)
241
+ return unless normalized_hash["type"] && normalized_hash["coordinates"]
242
+
243
+ RGeo::GeoJSON.decode(normalized_hash.to_json, geo_factory: spatial_factory)
244
+ end
245
+
246
+ def spatial_factory
247
+ @spatial_factories ||= {}
248
+
249
+ @spatial_factories[@srid] ||= RGeo::ActiveRecord::SpatialFactoryStore.instance.factory(
250
+ geo_type: @geo_type,
251
+ sql_type: @sql_type,
252
+ srid: @srid
253
+ )
254
+ end
105
255
  end
106
256
  end
107
257
  end
@@ -1,4 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "active_record/connection_adapters/trilogis_adapter"
4
- require "active_record/connection_adapters/trilogis/railtie"
3
+ require "active_record"
4
+
5
+ # Load ActiveRecord dependencies explicitly to ensure correct loading order
6
+ # This approach works across all Ruby versions and avoids autoload issues
7
+ require_relative "active_record/dependency_loader"
8
+
9
+ require "active_record/connection_adapters/trilogy_adapter"
10
+ require "rgeo"
11
+ require "rgeo/active_record"
12
+
13
+ # Load the adapter
14
+ require_relative "active_record/connection_adapters/trilogis_adapter"
15
+
16
+ # Load railtie if Rails is defined
17
+ require_relative "active_record/connection_adapters/trilogis/railtie" if defined?(Rails)
metadata CHANGED
@@ -1,126 +1,198 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-trilogis-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.1
4
+ version: 8.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ether Moon
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-03-18 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activerecord
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '8.0'
19
+ - - "<"
20
+ - !ruby/object:Gem::Version
21
+ version: '9.0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ version: '8.0'
29
+ - - "<"
30
+ - !ruby/object:Gem::Version
31
+ version: '9.0'
32
+ - !ruby/object:Gem::Dependency
33
+ name: rgeo
15
34
  requirement: !ruby/object:Gem::Requirement
16
35
  requirements:
17
36
  - - "~>"
18
37
  - !ruby/object:Gem::Version
19
- version: 7.0.0
38
+ version: '3.0'
20
39
  type: :runtime
21
40
  prerelease: false
22
41
  version_requirements: !ruby/object:Gem::Requirement
23
42
  requirements:
24
43
  - - "~>"
25
44
  - !ruby/object:Gem::Version
26
- version: 7.0.0
45
+ version: '3.0'
27
46
  - !ruby/object:Gem::Dependency
28
47
  name: rgeo-activerecord
29
48
  requirement: !ruby/object:Gem::Requirement
30
49
  requirements:
31
50
  - - "~>"
32
51
  - !ruby/object:Gem::Version
33
- version: 7.0.0
52
+ version: '8.0'
34
53
  type: :runtime
35
54
  prerelease: false
36
55
  version_requirements: !ruby/object:Gem::Requirement
37
56
  requirements:
38
57
  - - "~>"
39
58
  - !ruby/object:Gem::Version
40
- version: 7.0.0
59
+ version: '8.0'
41
60
  - !ruby/object:Gem::Dependency
42
- name: activerecord-trilogy-adapter
61
+ name: minitest
43
62
  requirement: !ruby/object:Gem::Requirement
44
63
  requirements:
45
64
  - - "~>"
46
65
  - !ruby/object:Gem::Version
47
- version: 3.1.0
48
- type: :runtime
66
+ version: '5.4'
67
+ type: :development
49
68
  prerelease: false
50
69
  version_requirements: !ruby/object:Gem::Requirement
51
70
  requirements:
52
71
  - - "~>"
53
72
  - !ruby/object:Gem::Version
54
- version: 3.1.0
73
+ version: '5.4'
74
+ - !ruby/object:Gem::Dependency
75
+ name: mocha
76
+ requirement: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - "~>"
79
+ - !ruby/object:Gem::Version
80
+ version: '2.0'
81
+ type: :development
82
+ prerelease: false
83
+ version_requirements: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - "~>"
86
+ - !ruby/object:Gem::Version
87
+ version: '2.0'
88
+ - !ruby/object:Gem::Dependency
89
+ name: ostruct
90
+ requirement: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ type: :development
96
+ prerelease: false
97
+ version_requirements: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
55
102
  - !ruby/object:Gem::Dependency
56
103
  name: rake
57
104
  requirement: !ruby/object:Gem::Requirement
58
105
  requirements:
59
106
  - - "~>"
60
107
  - !ruby/object:Gem::Version
61
- version: '12.0'
108
+ version: '13.0'
62
109
  type: :development
63
110
  prerelease: false
64
111
  version_requirements: !ruby/object:Gem::Requirement
65
112
  requirements:
66
113
  - - "~>"
67
114
  - !ruby/object:Gem::Version
68
- version: '12.0'
115
+ version: '13.0'
69
116
  - !ruby/object:Gem::Dependency
70
- name: minitest
117
+ name: rubocop
71
118
  requirement: !ruby/object:Gem::Requirement
72
119
  requirements:
73
120
  - - "~>"
74
121
  - !ruby/object:Gem::Version
75
- version: '5.4'
122
+ version: '1.81'
76
123
  type: :development
77
124
  prerelease: false
78
125
  version_requirements: !ruby/object:Gem::Requirement
79
126
  requirements:
80
127
  - - "~>"
81
128
  - !ruby/object:Gem::Version
82
- version: '5.4'
129
+ version: '1.81'
83
130
  - !ruby/object:Gem::Dependency
84
- name: mocha
131
+ name: rubocop-minitest
85
132
  requirement: !ruby/object:Gem::Requirement
86
133
  requirements:
87
134
  - - "~>"
88
135
  - !ruby/object:Gem::Version
89
- version: '2.0'
136
+ version: '0.38'
90
137
  type: :development
91
138
  prerelease: false
92
139
  version_requirements: !ruby/object:Gem::Requirement
93
140
  requirements:
94
141
  - - "~>"
95
142
  - !ruby/object:Gem::Version
96
- version: '2.0'
143
+ version: '0.38'
97
144
  - !ruby/object:Gem::Dependency
98
- name: appraisal
145
+ name: rubocop-performance
99
146
  requirement: !ruby/object:Gem::Requirement
100
147
  requirements:
101
148
  - - "~>"
102
149
  - !ruby/object:Gem::Version
103
- version: '2.0'
150
+ version: '1.24'
104
151
  type: :development
105
152
  prerelease: false
106
153
  version_requirements: !ruby/object:Gem::Requirement
107
154
  requirements:
108
155
  - - "~>"
109
156
  - !ruby/object:Gem::Version
110
- version: '2.0'
111
- description: ActiveRecord connection adapter for MySQL. It is based on the stock MySQL
112
- adapter, and adds built-in support for the spatial extensions provided by MySQL.
113
- It uses the RGeo library to represent spatial data in Ruby.
157
+ version: '1.24'
158
+ - !ruby/object:Gem::Dependency
159
+ name: rubocop-rake
160
+ requirement: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - "~>"
163
+ - !ruby/object:Gem::Version
164
+ version: '0.6'
165
+ type: :development
166
+ prerelease: false
167
+ version_requirements: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - "~>"
170
+ - !ruby/object:Gem::Version
171
+ version: '0.6'
172
+ - !ruby/object:Gem::Dependency
173
+ name: trilogy
174
+ requirement: !ruby/object:Gem::Requirement
175
+ requirements:
176
+ - - "~>"
177
+ - !ruby/object:Gem::Version
178
+ version: '2.9'
179
+ type: :development
180
+ prerelease: false
181
+ version_requirements: !ruby/object:Gem::Requirement
182
+ requirements:
183
+ - - "~>"
184
+ - !ruby/object:Gem::Version
185
+ version: '2.9'
186
+ description: ActiveRecord connection adapter for MySQL. It extends the Rails built-in
187
+ Trilogy adapter and adds spatial extensions support via RGeo. Compatible with Rails
188
+ 8.0+ native Trilogy adapter. Requires Ruby 3.2+ and Rails 8.0+.
114
189
  email: chipseru@gmail.com
115
190
  executables: []
116
191
  extensions: []
117
192
  extra_rdoc_files: []
118
193
  files:
119
- - LICENSE.txt
194
+ - LICENSE
120
195
  - lib/active_record/connection_adapters/trilogis/arel_tosql.rb
121
- - lib/active_record/connection_adapters/trilogis/column_methods.rb
122
- - lib/active_record/connection_adapters/trilogis/connection.rb
123
- - lib/active_record/connection_adapters/trilogis/rails/dbconsole.rb
124
196
  - lib/active_record/connection_adapters/trilogis/railtie.rb
125
197
  - lib/active_record/connection_adapters/trilogis/schema_creation.rb
126
198
  - lib/active_record/connection_adapters/trilogis/schema_statements.rb
@@ -130,14 +202,15 @@ files:
130
202
  - lib/active_record/connection_adapters/trilogis/spatial_table_definition.rb
131
203
  - lib/active_record/connection_adapters/trilogis/version.rb
132
204
  - lib/active_record/connection_adapters/trilogis_adapter.rb
205
+ - lib/active_record/dependency_loader.rb
133
206
  - lib/active_record/tasks/trilogis_database_tasks.rb
134
207
  - lib/active_record/type/spatial.rb
135
208
  - lib/activerecord-trilogis-adapter.rb
136
209
  homepage: http://github.com/ether-moon/activerecord-trilogis-adapter
137
210
  licenses:
138
- - BSD-3-Clause
139
- metadata: {}
140
- post_install_message:
211
+ - MIT
212
+ metadata:
213
+ rubygems_mfa_required: 'true'
141
214
  rdoc_options: []
142
215
  require_paths:
143
216
  - lib
@@ -145,15 +218,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
218
  requirements:
146
219
  - - ">="
147
220
  - !ruby/object:Gem::Version
148
- version: 2.7.0
221
+ version: 3.2.0
222
+ - - "<"
223
+ - !ruby/object:Gem::Version
224
+ version: '3.5'
149
225
  required_rubygems_version: !ruby/object:Gem::Requirement
150
226
  requirements:
151
227
  - - ">="
152
228
  - !ruby/object:Gem::Version
153
229
  version: '0'
154
230
  requirements: []
155
- rubygems_version: 3.5.6
156
- signing_key:
231
+ rubygems_version: 3.6.9
157
232
  specification_version: 4
158
- summary: ActiveRecord adapter for MySQL, based on RGeo.
233
+ summary: ActiveRecord adapter for MySQL with spatial extensions, built on Trilogy.
159
234
  test_files: []
data/LICENSE.txt DELETED
@@ -1,29 +0,0 @@
1
- # -----------------------------------------------------------------------------
2
- # Copyright 2012 Daniel Azuma
3
- #
4
- # All rights reserved.
5
- #
6
- # Redistribution and use in source and binary forms, with or without
7
- # modification, are permitted provided that the following conditions are met:
8
- #
9
- # * Redistributions of source code must retain the above copyright notice,
10
- # this list of conditions and the following disclaimer.
11
- # * Redistributions in binary form must reproduce the above copyright notice,
12
- # this list of conditions and the following disclaimer in the documentation
13
- # and/or other materials provided with the distribution.
14
- # * Neither the name of the copyright holder, nor the names of any other
15
- # contributors to this software, may be used to endorse or promote products
16
- # derived from this software without specific prior written permission.
17
- #
18
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
- # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
- # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
- # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22
- # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23
- # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24
- # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25
- # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26
- # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27
- # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
- # POSSIBILITY OF SUCH DAMAGE.
29
- # -----------------------------------------------------------------------------