activerecord-postgis-adapter 5.1.0 → 5.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a032372c1d3d40f4808f7bc319c6d6c901612492c6702a882bf245749980b05
4
- data.tar.gz: 730358e510e622e42d3ebf743a2e2a6366776a60303b205b7d8fd7fa4743f6bd
3
+ metadata.gz: a36aaf405da9a1fd4cc773af8bd16504dfbc482ca2c80f0a5a941fbf1d428b7f
4
+ data.tar.gz: 85fde301aa11100d590e24614b9598f5e5376f2e14a9878277c81d68754484b2
5
5
  SHA512:
6
- metadata.gz: e2bd49f0d89b23776c003411c9c71e6d5882554095a78fc25e8adf6f94d4c06cded265db02881261a0b563f28a92ff2abe50df38f237e185ec628a69728673d7
7
- data.tar.gz: 4f2a8607f4561af4400e00f2a44bf65de457267c6aa74ed6432da8633efd2e1dd1ae14151b4b00f0f6f82895e2c97948e2ed8a2edce64ae4981d219dd878a5d5
6
+ metadata.gz: a07174891bc9836f90b1118cf21fe5a400c71f05d42ca19e7efd8c707b2f40632cdc83b0150c0823525f98d498849516b532e21c6105445b30b3ea0411bf74d0
7
+ data.tar.gz: 4ecaee8b53358240ecb2d07a2b0665179bb6735f19ccb2d532c4ac5d2c4801a6ed946ccde69a0c13dccca5d7ce9900f6ced77a48345f398ca9cbe0c6ec6bb4ed
@@ -6,7 +6,7 @@ module ActiveRecord
6
6
  # pass table_name to #new_column
7
7
  def columns(table_name)
8
8
  # Limit, precision, and scale are all handled by the superclass.
9
- column_definitions(table_name).map do |column_name, type, default, notnull, oid, fmod, collation|
9
+ column_definitions(table_name).map do |column_name, type, default, notnull, oid, fmod, collation, comment|
10
10
  oid = oid.to_i
11
11
  fmod = fmod.to_i
12
12
  type_metadata = fetch_type_metadata(column_name, type, oid, fmod)
@@ -14,12 +14,12 @@ module ActiveRecord
14
14
  default_value = extract_value_from_default(default)
15
15
 
16
16
  default_function = extract_default_function(default_value, default)
17
- new_column(table_name, column_name, default_value, cast_type, type_metadata, !notnull, default_function, collation)
17
+ new_column(table_name, column_name, default_value, cast_type, type_metadata, !notnull, default_function, collation, comment)
18
18
  end
19
19
  end
20
20
 
21
21
  # override
22
- def new_column(table_name, column_name, default, cast_type, sql_type_metadata = nil, null = true, default_function = nil, collation = nil)
22
+ def new_column(table_name, column_name, default, cast_type, sql_type_metadata = nil, null = true, default_function = nil, collation = nil, comment = nil)
23
23
  # JDBC gets true/false in Rails 4, where other platforms get 't'/'f' strings.
24
24
  if null.is_a?(String)
25
25
  null = (null == "t")
@@ -34,6 +34,7 @@ module ActiveRecord
34
34
  table_name,
35
35
  default_function,
36
36
  collation,
37
+ comment,
37
38
  cast_type,
38
39
  column_info)
39
40
  end
@@ -8,7 +8,7 @@ module ActiveRecord # :nodoc:
8
8
  # cast_type example classes:
9
9
  # OID::Spatial
10
10
  # OID::Integer
11
- def initialize(name, default, sql_type_metadata = nil, null = true, table_name = nil, default_function = nil, collation = nil, cast_type = nil, opts = nil)
11
+ def initialize(name, default, sql_type_metadata = nil, null = true, table_name = nil, default_function = nil, collation = nil, comment = nil, cast_type = nil, opts = nil)
12
12
  @cast_type = cast_type
13
13
  @geographic = !!(sql_type_metadata.sql_type =~ /geography\(/i)
14
14
  if opts
@@ -29,7 +29,7 @@ module ActiveRecord # :nodoc:
29
29
  # @geometric_type = geo_type_from_sql_type(sql_type)
30
30
  build_from_sql_type(sql_type_metadata.sql_type)
31
31
  end
32
- super(name, default, sql_type_metadata, null, table_name, default_function, collation)
32
+ super(name, default, sql_type_metadata, null, table_name, default_function, collation, comment: comment)
33
33
  if spatial?
34
34
  if @srid
35
35
  @limit = { srid: @srid, type: to_type_name(geometric_type) }
@@ -1,7 +1,7 @@
1
1
  module ActiveRecord
2
2
  module ConnectionAdapters
3
3
  module PostGIS
4
- VERSION = "5.1.0"
4
+ VERSION = "5.2.0"
5
5
  end
6
6
  end
7
7
  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: 5.1.0
4
+ version: 5.2.0
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-12-02 00:00:00.000000000 Z
11
+ date: 2017-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord