activerecord-postgis-adapter 5.0.2 → 5.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
- SHA1:
3
- metadata.gz: 86c9222def52fff846e2a810afb1ff873c38c3c9
4
- data.tar.gz: 56df8e96c3557c5e7f219dfe4db98cd515840847
2
+ SHA256:
3
+ metadata.gz: 55d8ccb80a5af7b9cb4bdf9ccc538a17bb5049581c8e064ea32158ffa8087970
4
+ data.tar.gz: bc50927ccd18b0a6c17e6e73159cbc40b83a9e9bbcbe8c20a0265ad0915d091d
5
5
  SHA512:
6
- metadata.gz: 63ba97d3c64f37a431e95793be0f43a40648deeea1e53c80fbb3dac216ec0dbac9c1c4beba1a30e69e3cb5ee42a733b623252cc179ebdc03d11599ceb9ca2bb6
7
- data.tar.gz: 1fccafc33a9ad1495696e42d48b9ba7dba79e56d35c0e5150acf1721ebc395898efd8a8916804f916198c565dbfb37c3a6dce327599e37d8817a65f1b4791510
6
+ metadata.gz: dd1c8bdd0daedc8eb52c7d92a56468efe6efb93cfbd04468e00cafbf12899e47cbb0f087a59177e12f96e1b796cfa7f1afeba5f20e28435d9274cd7681ea2977
7
+ data.tar.gz: 826ff90f7b07ad036ca114e01ee2088a9bbcb5bb724099a77d49ea64ddd548e12112f1bae02b8a2b415488c03be3688e7fc7be7c86d7aa95078efff8fab8481e
@@ -43,8 +43,8 @@ module ActiveRecord
43
43
  column(name, :st_polygon, options)
44
44
  end
45
45
  end
46
-
47
- PostgreSQL::Table.send(:include, ColumnMethods)
48
46
  end
47
+
48
+ PostgreSQL::Table.include PostGIS::ColumnMethods
49
49
  end
50
50
  end
@@ -24,9 +24,9 @@ module ActiveRecord
24
24
  def self.parse_sql_type(sql_type)
25
25
  geo_type, srid, has_z, has_m = nil, 0, false, false
26
26
 
27
- if sql_type =~ /[geography,geometry]\((.*)\)$/i
27
+ if sql_type =~ /(geography|geometry)\((.*)\)$/i
28
28
  # geometry(Point,4326)
29
- params = Regexp.last_match(1).split(",")
29
+ params = Regexp.last_match(2).split(",")
30
30
  if params.size > 1
31
31
  if params.first =~ /([a-z]+[^zm])(z?)(m?)/i
32
32
  has_z = Regexp.last_match(2).length > 0
@@ -1,12 +1,9 @@
1
- require "rails/railtie"
2
- require "active_record/connection_adapters/postgis_adapter"
3
-
4
1
  module ActiveRecord # :nodoc:
5
2
  module ConnectionAdapters # :nodoc:
6
3
  module PostGIS # :nodoc:
7
4
  class Railtie < ::Rails::Railtie # :nodoc:
8
5
  rake_tasks do
9
- load ::File.expand_path("databases.rake", ::File.dirname(__FILE__))
6
+ load "active_record/connection_adapters/postgis/databases.rake"
10
7
  end
11
8
  end
12
9
  end
@@ -14,8 +14,6 @@ module ActiveRecord # :nodoc:
14
14
  geo_type = ColumnDefinitionUtils.geo_type(options[:type] || type || info[:type])
15
15
  base_type = info[:type] || (options[:geographic] ? :geography : :geometry)
16
16
 
17
- # puts name.dup << " - " << type.to_s << " - " << options.to_s << " :: " << geo_type.to_s << " - " << base_type.to_s
18
-
19
17
  options[:limit] = ColumnDefinitionUtils.limit_from_options(geo_type, options)
20
18
  options[:spatial_type] = geo_type
21
19
  column = super(name, base_type, options)
@@ -1,7 +1,7 @@
1
1
  module ActiveRecord
2
2
  module ConnectionAdapters
3
3
  module PostGIS
4
- VERSION = "5.0.2"
4
+ VERSION = "5.0.3"
5
5
  end
6
6
  end
7
7
  end
@@ -3,8 +3,16 @@
3
3
 
4
4
  # :stopdoc:
5
5
 
6
- require "active_record/connection_adapters/postgresql_adapter"
7
6
  require "rgeo/active_record"
7
+
8
+ # autoload AbstractAdapter to avoid circular require and void context warnings
9
+ module ActiveRecord
10
+ module ConnectionAdapters
11
+ AbstractAdapter
12
+ end
13
+ end
14
+
15
+ require "active_record/connection_adapters/postgresql_adapter"
8
16
  require "active_record/connection_adapters/postgis/version"
9
17
  require "active_record/connection_adapters/postgis/column_methods"
10
18
  require "active_record/connection_adapters/postgis/schema_statements"
@@ -17,10 +25,10 @@ require "active_record/connection_adapters/postgis/oid/spatial"
17
25
  require "active_record/connection_adapters/postgis/create_connection"
18
26
  require "active_record/connection_adapters/postgis/postgis_database_tasks"
19
27
 
20
- ::ActiveRecord::ConnectionAdapters::PostGIS.initial_setup
28
+ ActiveRecord::ConnectionAdapters::PostGIS.initial_setup
21
29
 
22
- if defined?(::Rails::Railtie)
23
- load ::File.expand_path("postgis/railtie.rb", ::File.dirname(__FILE__))
30
+ if defined?(Rails::Railtie)
31
+ require "active_record/connection_adapters/postgis/railtie"
24
32
  end
25
33
 
26
34
  # :startdoc:
@@ -1 +1 @@
1
- require "active_record/connection_adapters/postgis_adapter.rb"
1
+ require "active_record/connection_adapters/postgis_adapter"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-postgis-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.2
4
+ version: 5.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Azuma, Tee Parham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-14 00:00:00.000000000 Z
11
+ date: 2017-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -138,9 +138,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  version: '0'
139
139
  requirements: []
140
140
  rubyforge_project:
141
- rubygems_version: 2.6.12
141
+ rubygems_version: 2.7.0
142
142
  signing_key:
143
143
  specification_version: 4
144
144
  summary: ActiveRecord adapter for PostGIS, based on RGeo.
145
145
  test_files: []
146
- has_rdoc: