activerecord-postgis-adapter 5.2.1 → 5.2.2

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
  SHA256:
3
- metadata.gz: b2575c4737840ea81feaba17b0acc313c0e85a75acae5ffba257437057e41e15
4
- data.tar.gz: f77aa6f4a11a01e1be968c156ddb0b743f5bae71a96022c77a36cc7e03599129
3
+ metadata.gz: a6467b540dc2494cfe0add8a78d7d04258c6ae7a64b32ef397d7b58703b961d8
4
+ data.tar.gz: 508f828273255798e15451a683d331c7488fb2d0840f92ba5dccb7c7d97f2f9b
5
5
  SHA512:
6
- metadata.gz: 26c3e43c3a9f986811fa9f85272b76bc4fb396b408cffd1e480586bfef4a13401c1e44f6be3ce5162c980b31f95b01d81ed28740de79ff9866db454b863db6a8
7
- data.tar.gz: 2b12969c401226ed98b120e11566439ffbed2c3d4c96b9a0dbe63bd5083313723252588cb27f1a09abda7640f9999b100205b7a9456314947be795ca11ceaa2a
6
+ metadata.gz: 198647715bc7f7ed32b996e1dc5be24019d27c65b3cf3085b1b09d0544052b0f302aff527e58de2e75fd43964365af79044f512ee10575102284f82a489222d0
7
+ data.tar.gz: dbe312d6930f13c271a0ee82312e05966e645c7d77edb2dd31643e5277b3de755b35f0d55e7e5704ba56ea47a9d10efbb0e57b7b67e9019bb19366fadd2fd579
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Arel # :nodoc:
2
4
  module Visitors # :nodoc:
3
5
  # Different super-class under JRuby JDBC adapter.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveRecord
2
4
  module ConnectionAdapters
3
5
  module PostGIS
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  if RUBY_ENGINE == "jruby"
2
4
  require "active_record/connection_adapters/jdbcpostgresql_adapter"
3
5
  else
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  namespace :db do
2
4
  namespace :gis do
3
5
  desc "Setup PostGIS data in the database"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveRecord
2
4
  module ConnectionAdapters
3
5
  module PostGIS
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveRecord # :nodoc:
2
4
  module ConnectionAdapters # :nodoc:
3
5
  module PostGIS # :nodoc:
@@ -106,7 +108,9 @@ module ActiveRecord # :nodoc:
106
108
  def setup_gis_from_extension
107
109
  extension_names.each do |extname|
108
110
  if extname == "postgis_topology"
109
- raise ::ArgumentError, "'topology' must be in schema_search_path for postgis_topology" unless search_path.include?("topology")
111
+ unless search_path.include?("topology")
112
+ raise ArgumentError, "'topology' must be in schema_search_path for postgis_topology"
113
+ end
110
114
  connection.execute("CREATE EXTENSION IF NOT EXISTS #{extname} SCHEMA topology")
111
115
  else
112
116
  if (postgis_schema = configuration["postgis_schema"])
@@ -125,7 +129,9 @@ module ActiveRecord # :nodoc:
125
129
  end
126
130
 
127
131
  def schema_exists?(schema_name)
128
- connection.execute("SELECT schema_name FROM information_schema.schemata WHERE schema_name = '#{schema_name}'").any?
132
+ connection.execute(
133
+ "SELECT schema_name FROM information_schema.schemata WHERE schema_name = '#{schema_name}'"
134
+ ).any?
129
135
  end
130
136
  end
131
137
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveRecord # :nodoc:
2
4
  module ConnectionAdapters # :nodoc:
3
5
  module PostGIS # :nodoc:
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveRecord
2
4
  module ConnectionAdapters
3
5
  module PostGIS
@@ -14,12 +16,14 @@ module ActiveRecord
14
16
  default_value = extract_value_from_default(default)
15
17
 
16
18
  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, comment)
19
+ new_column(table_name, column_name, default_value, cast_type, type_metadata, !notnull,
20
+ default_function, collation, comment)
18
21
  end
19
22
  end
20
23
 
21
24
  # override
22
- def new_column(table_name, column_name, default, cast_type, sql_type_metadata = nil, null = true, default_function = nil, collation = nil, comment = nil)
25
+ def new_column(table_name, column_name, default, cast_type, sql_type_metadata = nil,
26
+ null = true, default_function = nil, collation = nil, comment = nil)
23
27
  # JDBC gets true/false in Rails 4, where other platforms get 't'/'f' strings.
24
28
  if null.is_a?(String)
25
29
  null = (null == "t")
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveRecord # :nodoc:
2
4
  module ConnectionAdapters # :nodoc:
3
5
  module PostGIS # :nodoc:
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveRecord # :nodoc:
2
4
  module ConnectionAdapters # :nodoc:
3
5
  module PostGIS # :nodoc:
@@ -8,7 +10,8 @@ module ActiveRecord # :nodoc:
8
10
  # cast_type example classes:
9
11
  # OID::Spatial
10
12
  # OID::Integer
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)
13
+ def initialize(name, default, sql_type_metadata = nil, null = true, table_name = nil,
14
+ default_function = nil, collation = nil, comment = nil, cast_type = nil, opts = nil)
12
15
  @cast_type = cast_type
13
16
  @geographic = !!(sql_type_metadata.sql_type =~ /geography\(/i)
14
17
  if opts
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveRecord # :nodoc:
2
4
  module ConnectionAdapters # :nodoc:
3
5
  module PostGIS
@@ -9,7 +11,9 @@ module ActiveRecord # :nodoc:
9
11
  end
10
12
 
11
13
  def all
12
- info = @adapter.query("SELECT f_geometry_column,coord_dimension,srid,type FROM geometry_columns WHERE f_table_name='#{@table_name}'")
14
+ info = @adapter.query(
15
+ "SELECT f_geometry_column,coord_dimension,srid,type FROM geometry_columns WHERE f_table_name='#{@table_name}'"
16
+ )
13
17
  result = {}
14
18
  info.each do |row|
15
19
  name = row[0]
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveRecord # :nodoc:
2
4
  module ConnectionAdapters # :nodoc:
3
5
  module PostGIS # :nodoc:
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveRecord
2
4
  module ConnectionAdapters
3
5
  module PostGIS
4
- VERSION = "5.2.1"
6
+ VERSION = "5.2.2"
5
7
  end
6
8
  end
7
9
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # The activerecord-postgis-adapter gem installs the *postgis*
2
4
  # connection adapter into ActiveRecord.
3
5
 
@@ -70,7 +72,7 @@ module ActiveRecord
70
72
  end
71
73
 
72
74
  def adapter_name
73
- "PostGIS".freeze
75
+ "PostGIS"
74
76
  end
75
77
 
76
78
  def self.spatial_column_options(key)
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  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.2.1
4
+ version: 5.2.2
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: 2018-03-05 00:00:00.000000000 Z
11
+ date: 2018-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  version: '0'
139
139
  requirements: []
140
140
  rubyforge_project:
141
- rubygems_version: 2.7.6
141
+ rubygems_version: 2.7.8
142
142
  signing_key:
143
143
  specification_version: 4
144
144
  summary: ActiveRecord adapter for PostGIS, based on RGeo.