activerecord-postgis-adapter 3.1.4 → 3.1.5
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fee81a4f105118b668eb878de411fd97b66d55d4
|
4
|
+
data.tar.gz: 35b004a98e571fdfa144e09e0027112c72a19727
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 731d5e563468a576fada2108b39ea1339d7b320eec1765075d39c2f4dd18f6108faa2103d4a4b831bb1c286fd2789a20b8be5feb605ed97ca9ea16d4f877c7d6
|
7
|
+
data.tar.gz: 05441edb1a4b20d95afc7f6a67d0161e5ea5effd10251861dfb9db6efaee1b7cabe4754f5ae24391e803c964f7244dfe74f94189d995c6d5f40ffd0cd4810451
|
@@ -10,7 +10,8 @@ module ActiveRecord
|
|
10
10
|
oid = get_oid_type(oid.to_i, fmod.to_i, column_name, type)
|
11
11
|
default_value = extract_value_from_default(oid, default)
|
12
12
|
default_function = extract_default_function(default_value, default)
|
13
|
-
|
13
|
+
notnull = notnull == "t" if notnull.is_a?(String) # JDBC gets true/false
|
14
|
+
new_column(table_name, column_name, default_value, oid, type, !notnull, default_function)
|
14
15
|
end
|
15
16
|
end
|
16
17
|
|
@@ -30,7 +30,7 @@ module ActiveRecord # :nodoc:
|
|
30
30
|
super(name, default, cast_type, sql_type, null, default_function)
|
31
31
|
if spatial?
|
32
32
|
if @srid
|
33
|
-
@limit = { srid: @srid, type: geometric_type
|
33
|
+
@limit = { srid: @srid, type: to_type_name(geometric_type) }
|
34
34
|
@limit[:has_z] = true if @has_z
|
35
35
|
@limit[:has_m] = true if @has_m
|
36
36
|
@limit[:geographic] = true if @geographic
|
@@ -70,6 +70,17 @@ module ActiveRecord # :nodoc:
|
|
70
70
|
geo_type, @srid, @has_z, @has_m = OID::Spatial.parse_sql_type(sql_type)
|
71
71
|
set_geometric_type_from_name(geo_type)
|
72
72
|
end
|
73
|
+
|
74
|
+
def to_type_name(geometric_type)
|
75
|
+
name = geometric_type.type_name.underscore
|
76
|
+
if name == "point"
|
77
|
+
"st_point"
|
78
|
+
elsif name == "polygon"
|
79
|
+
"st_polygon"
|
80
|
+
else
|
81
|
+
name
|
82
|
+
end
|
83
|
+
end
|
73
84
|
end
|
74
85
|
end
|
75
86
|
end
|
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: 3.1.
|
4
|
+
version: 3.1.5
|
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:
|
11
|
+
date: 2017-04-30 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.
|
141
|
+
rubygems_version: 2.6.11
|
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:
|