pg_saurus 5.2.0 → 5.3.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
  SHA256:
3
- metadata.gz: 2e34851f56966751c37812d080ed193b3423044b8195b6b719a5e694a4079774
4
- data.tar.gz: 30ec47321e4d6216016b16b3c322d176175e11b43a675a866cf33654a4102e9c
3
+ metadata.gz: e4dfa9fa5e2ea0cf5c38fc323434ff9a8e2fd0fc051adf45e378d31d09bfd3bb
4
+ data.tar.gz: db821a3566aea980399af5d4178771d42b7aac460549905e8f2765690e930562
5
5
  SHA512:
6
- metadata.gz: d961c60aea3f5f0c12d5b7fa8db0829bfae06a89c25f26352dc4be834b8e180bc78fed0079355f425324e4a7278b41e6a751069008044b1556596999b7eec961
7
- data.tar.gz: 98fdf87d1e1e084e6b2dddd90d74f01c08a22e2e6a9322a755dab3e3f339ad516312a257a6337d20a733425070eccf0bf58fe9c1d4eaf51da1c4ac1ebec95951
6
+ metadata.gz: 8b5c252cba03504a37fb499a6c38fb7a97807025ff3aa0e9574a12036fa1583b7d4307d5398a3aaa0dda2979a764a5d7af3c8a96da80e6ae7d399c268b234e75
7
+ data.tar.gz: c5b8a0629e1a25d53e52f57451e9efa54f8e31a5b8abab97f0b1de624eca446893785a53e2b54d372bb0a0f1e83fd128cd0bb27badc816d5fd093a57e35cc762
@@ -225,7 +225,7 @@ module ActiveRecord
225
225
  end
226
226
 
227
227
  # Override super method to provide support for expression column names.
228
- def quoted_columns_for_index(column_names, **options)
228
+ def quoted_columns_for_index(column_names, options = {})
229
229
  return [column_names] if column_names.is_a?(String)
230
230
 
231
231
  quoted_columns = Hash[
@@ -5,12 +5,13 @@ module PgSaurus::ConnectionAdapters::AbstractAdapter::SchemaMethods
5
5
  # Provide :schema option to +create_table+ method.
6
6
  def create_table(table_name, options = {}, &block)
7
7
  table_name, options = extract_table_options(table_name, options)
8
- super(table_name, options, &block)
8
+ super(table_name, **options, &block)
9
9
  end
10
10
 
11
11
  # Provide :schema option to +drop_table+ method.
12
12
  def drop_table(table_name, options = {})
13
- super(*extract_table_options(table_name, options))
13
+ table_name, options = extract_table_options(table_name, options)
14
+ super(table_name, **options)
14
15
  end
15
16
 
16
17
  # Extract the table-specific options for the given table name from the options.
@@ -34,7 +34,7 @@ module PgSaurus # :nodoc:
34
34
  " Use :exclude_index => true when adding the foreign key."
35
35
  end
36
36
 
37
- super from_table, to_table, options
37
+ super from_table, to_table, **options
38
38
 
39
39
  unless exclude_index
40
40
  add_index from_table, column
@@ -44,14 +44,14 @@ module PgSaurus # :nodoc:
44
44
  # See activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
45
45
  #
46
46
  # Pass in the option remove_index: true to remove index as well.
47
- def remove_foreign_key(from_table, options_or_to_table = {})
48
- if options_or_to_table.is_a?(Hash) && options_or_to_table[:remove_index]
49
- column = options_or_to_table[:column]
47
+ def remove_foreign_key(from_table, to_table = nil, **options)
48
+ if options[:remove_index]
49
+ column = options[:column]
50
50
  remove_index from_table, column
51
- options_or_to_table.delete(:remove_index)
51
+ options.delete(:remove_index)
52
52
  end
53
53
 
54
- super(from_table, options_or_to_table)
54
+ super(from_table, to_table, **options)
55
55
  end
56
56
 
57
57
  # See: activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -27,7 +27,7 @@ module PgSaurus::ConnectionAdapters::PostgreSQLAdapter::SchemaMethods
27
27
  options = options.dup
28
28
  schema_name = options.delete(:schema)
29
29
  table_name = "#{schema_name}.#{table_name}" if schema_name
30
- super(table_name, options)
30
+ super(table_name, **options)
31
31
  end
32
32
 
33
33
  # Make method +tables+ return tables not only from public schema.
@@ -1,4 +1,4 @@
1
1
  module PgSaurus
2
2
  # Version of pg_saurus gem.
3
- VERSION = "5.2.0"
3
+ VERSION = "5.3.0"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_saurus
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.0
4
+ version: 5.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Potapov Sergey
@@ -298,7 +298,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
298
298
  - !ruby/object:Gem::Version
299
299
  version: '0'
300
300
  requirements: []
301
- rubygems_version: 3.0.8
301
+ rubygems_version: 3.0.9
302
302
  signing_key:
303
303
  specification_version: 4
304
304
  summary: ActiveRecord extensions for PostgreSQL.