activerecord-mysql2rgeo-adapter 2.0.3 → 2.2.0

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
  SHA1:
3
- metadata.gz: 347e7b8819994c6d6759e88a5ab6af2b580650bd
4
- data.tar.gz: 8e1aba30818aae96723909abb47da9f304cb7896
3
+ metadata.gz: 916dd6c6a2f329f0476e864abd896923ff9703d5
4
+ data.tar.gz: d223eee1c5f0985e9a22cccb2a1b3f16fb5b1111
5
5
  SHA512:
6
- metadata.gz: c91c8e58ceeef1a4d0482969d52df5abd15008b97580804ef7fde65a4dd6377b8d91f2adc289957d5ec5211ecc5c15862440412f6851d8efa7494c8ad8fd49ba
7
- data.tar.gz: 9f772f1d2501e46e9cf7a0982ef73fa06809b17aad795e2ecb6e5307a3f538f1f2e56b904216ca2d50fb9f665e26d702716f0b8d3b11033a270d4fb75996f1b1
6
+ metadata.gz: 9fd772f34bf93e71654c74ce98716817faf2e67f353fa01cf92dd18714b8c9a218e4b4e648d32338c1f1546d60a1c940b8d31e8f6f758074cc7daada4d9fa76b
7
+ data.tar.gz: c79130a963ea11b357dbb0c50f21c660299c0fed59c739e3bf35bb36b7a287fded05a0de3ab3122b5fd826b7ef237b73b8c532ae084f16be659bd359dd32f76b
@@ -44,8 +44,8 @@ module ActiveRecord
44
44
  alias multi_linestring multilinestring
45
45
  alias multi_polygon multipolygon
46
46
  end
47
-
48
- MySQL::Table.send(:include, ColumnMethods)
49
47
  end
48
+
49
+ MySQL::Table.include Mysql2Rgeo::ColumnMethods
50
50
  end
51
51
  end
@@ -11,8 +11,7 @@ module ActiveRecord # :nodoc:
11
11
  # @geometric_type = geo_type_from_sql_type(sql_type)
12
12
  build_from_sql_type(sql_type_metadata.sql_type)
13
13
  end
14
- super(name, default, sql_type_metadata, null, table_name, default_function, collation)
15
- @comment = comment
14
+ super(name, default, sql_type_metadata, null, table_name, default_function, collation, comment: comment)
16
15
  if spatial?
17
16
  if @srid
18
17
  @limit = { type: @geometric_type.type_name.underscore }
@@ -12,9 +12,6 @@ module ActiveRecord # :nodoc:
12
12
  end
13
13
 
14
14
  geo_type = ColumnDefinitionUtils.geo_type(options[:type] || type || info[:type])
15
- base_type = info[:type] || :geometry
16
-
17
- # puts name.dup << " - " << type.to_s << " - " << options.to_s << " :: " << geo_type.to_s << " - " << base_type.to_s
18
15
 
19
16
  options[:spatial_type] = geo_type
20
17
  column = super(name, geo_type.downcase.to_sym, options)
@@ -26,8 +23,6 @@ module ActiveRecord # :nodoc:
26
23
  end
27
24
  end
28
25
 
29
- SpatialIndexDefinition = Struct.new(*IndexDefinition.members, :spatial)
30
-
31
26
  module ColumnDefinitionUtils
32
27
  class << self
33
28
  def geo_type(type = "GEOMETRY")
@@ -1,7 +1,7 @@
1
1
  module ActiveRecord
2
2
  module ConnectionAdapters
3
3
  module Mysql2Rgeo
4
- VERSION = "2.0.3".freeze
4
+ VERSION = "2.2.0".freeze
5
5
  end
6
6
  end
7
7
  end
@@ -88,13 +88,7 @@ module ActiveRecord
88
88
  mysql_index_type = row[:Index_type].downcase.to_sym
89
89
  index_type = INDEX_TYPES.include?(mysql_index_type) ? mysql_index_type : nil
90
90
  index_using = INDEX_USINGS.include?(mysql_index_type) ? mysql_index_type : nil
91
- options = [row[:Table], row[:Key_name], row[:Non_unique].to_i == 0, [], {}, nil, nil, index_type, index_using, row[:Index_comment].presence]
92
- indexes << if mysql_index_type == :spatial
93
- options.push(true)
94
- Mysql2Rgeo::SpatialIndexDefinition.new(*options)
95
- else
96
- IndexDefinition.new(row[:Table], row[:Key_name], row[:Non_unique].to_i == 0, [], {}, nil, nil, index_type, index_using, row[:Index_comment].presence)
97
- end
91
+ indexes << IndexDefinition.new(row[:Table], row[:Key_name], row[:Non_unique].to_i == 0, [], {}, nil, nil, index_type, index_using, row[:Index_comment].presence)
98
92
  end
99
93
 
100
94
  indexes.last.columns << row[:Column_name]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-mysql2rgeo-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yongdae Hwang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-12 00:00:00.000000000 Z
11
+ date: 2018-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '5.1'
33
+ version: '6.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '5.1'
40
+ version: '6.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -134,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
134
  version: '0'
135
135
  requirements: []
136
136
  rubyforge_project:
137
- rubygems_version: 2.6.13
137
+ rubygems_version: 2.6.14
138
138
  signing_key:
139
139
  specification_version: 4
140
140
  summary: ActiveRecord adapter for MySQL, based on RGeo.