schema_plus_pg_indexes 0.3.1 → 0.3.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
- SHA1:
3
- metadata.gz: 5586f2b3408a3890cc6967d852d27ce9644380f7
4
- data.tar.gz: 7d22c43ab14375ce9b48106e2e380f1d19ed6564
2
+ SHA256:
3
+ metadata.gz: 12fd5f77a962549c53f4bbeadf41e9a875e5c0c1a1f9f7b7235dcd01e47eab01
4
+ data.tar.gz: 63818b97c17311c3184472be36e8d55b4e4d49b1e7c9d38605128bd949d48ef6
5
5
  SHA512:
6
- metadata.gz: a0e0425e6f627918c211b4ece0f892088dd1d4446a19dd26fac39bc26d10aebcae04acbe69f9d7d1a5c1a842242a6353de444c4a8eab448abaf61c03d8f90af3
7
- data.tar.gz: e075301f4c44a74edf3bfe577663caeed80afb1288764e5c54ce88bb2c16fdd05be173cfdf1b671e2b2520689547de03b6791a730d19d8732422baa459c82be2
6
+ metadata.gz: 05ff45aeac37ebb1b4303b2d69c3717355f238bf92e6de5445c27685d2c0552a7d1dcb2dd71da0abc37ca2b0ab18bf5ba58a2a7745ffc50ca30e9216422c356b
7
+ data.tar.gz: 5689752edfb5939e32d3334da14c00756c69772e0efbe7444eaa3ce70ccad049b749fc00b5a42f24fd393266df3f80ac31ca7a90ad2d21002efa8b26263e3860
@@ -9,6 +9,7 @@ rvm:
9
9
  gemfile:
10
10
  - gemfiles/activerecord-5.0/Gemfile.postgresql
11
11
  - gemfiles/activerecord-5.1/Gemfile.postgresql
12
+ - gemfiles/activerecord-5.2/Gemfile.postgresql
12
13
  env: POSTGRESQL_DB_USER=postgres
13
14
  addons:
14
15
  postgresql: '9.4'
data/README.md CHANGED
@@ -3,13 +3,39 @@
3
3
  [![Coverage Status](https://img.shields.io/coveralls/SchemaPlus/schema_plus_pg_indexes.svg)](https://coveralls.io/r/SchemaPlus/schema_plus_pg_indexes)
4
4
  [![Dependency Status](https://gemnasium.com/SchemaPlus/schema_plus_pg_indexes.svg)](https://gemnasium.com/SchemaPlus/schema_plus_pg_indexes)
5
5
 
6
+ # Deprecated for Rails 5.2+
7
+
8
+ As of ActiveRecord 5.2 all of the functionality provided by this gem is supported in the core ActiveRecord.
9
+
10
+ This gem can still be added to a Rails 5.2 project to maintain backward compatibility while migrating.
11
+ However it will not be supported in future Rails versions.
12
+ The schema_plus_indexes gem can still be used to support the shortcut index syntax.
13
+
14
+ Migrations can be written as
15
+
16
+ # instead of expression: 'upper(last_name)'
17
+ t.string :last_name
18
+ t.index 'upper(last_name)', name: 'index_my_table_on_last_name'
19
+
20
+ # instead of operator_class: 'varchar_pattern_ops'
21
+ t.string :last_name, index: { opclass: 'varchar_pattern_ops' }
22
+
23
+ # instead of operator_class {last_name: 'varchar_pattern_ops', address: 'text_pattern_ops' }
24
+ t.string :last_name, index: { with: :address, opclass: {last_name: 'varchar_pattern_ops', address: 'text_pattern_ops' } }
25
+
26
+ # instead of case_sensitive: false
27
+ t.string :last_name
28
+ t.index 'lower(last_name)', name: 'index_my_table_on_last_name'
29
+
30
+ After updating all of your migrations you can replace schema_plus_pg_indexes with schema_plus_indexes to continue to use the shortcut syntax.
31
+
6
32
  # schema_plus_pg_indexes
7
33
 
8
34
  Schema_plus_pg_indexes adds into `ActiveRecord` support for some additional PostgreSQL index features: expressions, operator classes, and case-insensitive indexes:
9
35
 
10
36
  t.string :last_name, index: { expression: 'upper(last_name)' }
11
37
  t.string :last_name, index: { operator_class: 'varchar_pattern_ops' }
12
- t.string :last_name, index: { with: :address, operator_class: {last_name: 'varchar_pattern_ops', address: 'text_pattern_ops' }
38
+ t.string :last_name, index: { with: :address, operator_class: {last_name: 'varchar_pattern_ops', address: 'text_pattern_ops' } }
13
39
  t.string :last_name, index: { case_sensitive: false }
14
40
 
15
41
  t.index expression: 'upper(last_name)', name: 'my_index' # no column given, must give a name
@@ -57,11 +83,13 @@ schema_plus_pg_indexes is tested on
57
83
  <!-- These lines are auto-generated by schema_dev based on schema_dev.yml -->
58
84
  * ruby **2.3.1** with activerecord **5.0**, using **postgresql**
59
85
  * ruby **2.3.1** with activerecord **5.1**, using **postgresql**
86
+ * ruby **2.3.1** with activerecord **5.2**, using **postgresql**
60
87
 
61
88
  <!-- SCHEMA_DEV: MATRIX - end -->
62
89
 
63
90
  ## Release Notes
64
91
 
92
+ * v0.3.2 - Add Rails 5.2 support and deprecate gem.
65
93
  * v0.3.1 - Bug fix: schema dump for complex order clause (#19). Thanks to [@joxxoxo](https://github.com/joxxoxo).
66
94
  * v0.3.0 - Added Rails 5.1.0 support
67
95
  * v0.2.1 - Added Rails 5.0.1 support (Removed Rails 5.0.0 support)
@@ -2,9 +2,9 @@ require "pathname"
2
2
  eval(Pathname.new(__FILE__).dirname.join("Gemfile.base").read, binding)
3
3
 
4
4
  platform :ruby do
5
- gem "pg"
5
+ gem "pg", "< 1"
6
6
  end
7
7
 
8
8
  platform :jruby do
9
9
  gem 'activerecord-jdbcpostgresql-adapter'
10
- end
10
+ end
@@ -2,9 +2,9 @@ require "pathname"
2
2
  eval(Pathname.new(__FILE__).dirname.join("Gemfile.base").read, binding)
3
3
 
4
4
  platform :ruby do
5
- gem "pg"
5
+ gem "pg", "< 1"
6
6
  end
7
7
 
8
8
  platform :jruby do
9
9
  gem 'activerecord-jdbcpostgresql-adapter'
10
- end
10
+ end
@@ -0,0 +1,3 @@
1
+ eval File.read File.expand_path('../../Gemfile.base', __FILE__)
2
+
3
+ gem "activerecord", ">= 5.2.0.beta0", "< 5.3"
@@ -0,0 +1,10 @@
1
+ require "pathname"
2
+ eval(Pathname.new(__FILE__).dirname.join("Gemfile.base").read, binding)
3
+
4
+ platform :ruby do
5
+ gem "pg"
6
+ end
7
+
8
+ platform :jruby do
9
+ gem 'activerecord-jdbcpostgresql-adapter'
10
+ end
@@ -1,12 +1,18 @@
1
1
  require 'schema_plus/indexes'
2
2
  require 'its-it'
3
3
 
4
- require_relative 'schema_plus_pg_indexes/active_record/connection_adapters/index_definition'
5
- require_relative 'schema_plus_pg_indexes/active_record/connection_adapters/postgresql_adapter'
6
- require_relative 'schema_plus_pg_indexes/middleware/postgresql/dumper'
7
- require_relative 'schema_plus_pg_indexes/middleware/postgresql/migration'
8
- require_relative 'schema_plus_pg_indexes/middleware/postgresql/sql'
9
- require_relative 'schema_plus_pg_indexes/middleware/postgresql/schema'
4
+ if Gem::Version.new(ActiveRecord::VERSION::STRING) < Gem::Version.new('5.2.0')
5
+ require_relative 'schema_plus_pg_indexes/active_record/connection_adapters/index_definition'
6
+ require_relative 'schema_plus_pg_indexes/active_record/connection_adapters/postgresql_adapter'
7
+ require_relative 'schema_plus_pg_indexes/middleware/postgresql/dumper'
8
+ require_relative 'schema_plus_pg_indexes/middleware/postgresql/migration'
9
+ require_relative 'schema_plus_pg_indexes/middleware/postgresql/sql'
10
+ require_relative 'schema_plus_pg_indexes/middleware/postgresql/schema'
11
+ else
12
+ ActiveSupport::Deprecation.warn('Schema+ PG Indexes is deprecated for ActiveRecord 5.2 and up. Please see the README.md for more details.')
13
+ require_relative 'schema_plus_pg_indexes/active_record/connection_adapters/index_definition_5_2'
14
+ require_relative 'schema_plus_pg_indexes/middleware/postgresql/migration_5_2'
15
+ end
10
16
  require_relative 'schema_plus_pg_indexes/version'
11
17
 
12
18
  SchemaMonkey.register SchemaPlusPgIndexes
@@ -3,7 +3,7 @@ module SchemaPlusPgIndexes
3
3
  module ConnectionAdapters
4
4
  #
5
5
  # SchemaPlusPgIndexes extends the IndexDefinition object to return information
6
- # case sensitivity, expessions, and operator classes
6
+ # case sensitivity, expressions, and operator classes
7
7
  module IndexDefinition
8
8
 
9
9
  attr_accessor :expression
@@ -0,0 +1,36 @@
1
+ module SchemaPlusPgIndexes
2
+ module ActiveRecord
3
+ module ConnectionAdapters
4
+ #
5
+ # SchemaPlusPgIndexes extends the IndexDefinition object to return information
6
+ # case sensitivity, expressions, and operator classes
7
+ module IndexDefinition
8
+
9
+ def case_sensitive?
10
+ ActiveSupport::Deprecation.warn "ActiveRecord IndexDefinition#case_sensitive? is deprecated, used lower(column) or a citext type instead"
11
+ true
12
+ end
13
+
14
+ def conditions
15
+ ActiveSupport::Deprecation.warn "ActiveRecord IndexDefinition#conditions is deprecated, used #where instead"
16
+ where
17
+ end
18
+
19
+ def kind
20
+ ActiveSupport::Deprecation.warn "ActiveRecord IndexDefinition#kind is deprecated, used #using.to_s instead"
21
+ using.to_s
22
+ end
23
+
24
+ def expression
25
+ ActiveSupport::Deprecation.warn "ActiveRecord IndexDefinition#expressions is deprecated, simply define them in the column instead"
26
+ nil
27
+ end
28
+
29
+ def operator_classes
30
+ ActiveSupport::Deprecation.warn "ActiveRecord IndexDefinition#operator_classes is deprecated, use #opclasses instead"
31
+ opclasses
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,25 @@
1
+ module SchemaPlusPgIndexes
2
+ module Middleware
3
+ module Postgresql
4
+ module Migration
5
+
6
+ module Index
7
+ # Deprecate args
8
+ def before(env)
9
+ {:conditions => :where, :kind => :using, :operator_classes => :opclasses}.each do |deprecated, proper|
10
+ if env.options[deprecated]
11
+ ActiveSupport::Deprecation.warn "ActiveRecord index option #{deprecated.inspect} is deprecated, use #{proper.inspect} instead"
12
+ env.options[proper] = env.options.delete(deprecated)
13
+ end
14
+ end
15
+
16
+ if env.options[:expression]
17
+ ActiveSupport::Deprecation.warn "ActiveRecord index option expression is deprecated, simply define the expressions in :columns instead"
18
+ env.column_names << env.options.delete(:expression)
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -14,7 +14,7 @@ module SchemaPlusPgIndexes
14
14
  # The <tt>:case_sensitive => false</tt> option ties in with Rails built-in support for case-insensitive searching:
15
15
  # validates_uniqueness_of :name, :case_sensitive => false
16
16
  #
17
- # Since since <tt>:case_sensitive => false</tt> is implemented by
17
+ # Since <tt>:case_sensitive => false</tt> is implemented by
18
18
  # using <tt>:expression</tt>, this raises an ArgumentError if both
19
19
  # are specified simultaneously.
20
20
  #
@@ -1,3 +1,3 @@
1
1
  module SchemaPlusPgIndexes
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
@@ -3,5 +3,6 @@ ruby:
3
3
  activerecord:
4
4
  - 5.0
5
5
  - 5.1
6
+ - 5.2
6
7
  db:
7
8
  - postgresql
@@ -17,14 +17,23 @@ Gem::Specification.new do |gem|
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ["lib"]
19
19
 
20
- gem.add_dependency "activerecord", "~> 5.0", ">= 5.0.1"
20
+ gem.post_install_message = <<EOF
21
+ ActiveRecord 5.2 supports all of the functionality provided by Schema+ PG Indexes (expression indexes,
22
+ operator classes, case insensitive indexes).
23
+ Thus this gem is now deprecated and will not be maintained for future ActiveRecord versions.
24
+ The rest of Schema+, however, is still being maintained.
25
+
26
+ Please see the README.md for more information on migrating your old migrations to AR 5.2 syntax so you can remove this gem.
27
+ EOF
28
+
29
+ gem.add_dependency "activerecord", ">= 5.0.1", "< 5.3"
21
30
  gem.add_dependency "schema_plus_indexes", "~> 0.2", ">= 0.2.4"
22
31
  gem.add_dependency "schema_plus_core", "~> 2.0"
23
32
  gem.add_dependency "its-it", "~> 1.2"
24
33
 
25
34
  gem.add_development_dependency "bundler", "~> 1.7"
26
35
  gem.add_development_dependency "rake", "~> 10.0"
27
- gem.add_development_dependency "rspec", "~> 3.0.0"
36
+ gem.add_development_dependency "rspec", "~> 3.0"
28
37
  gem.add_development_dependency "schema_dev", "~> 3.8"
29
38
  gem.add_development_dependency "simplecov"
30
39
  gem.add_development_dependency "simplecov-gem-profile"
@@ -24,6 +24,15 @@ describe 'Deprecations' do
24
24
  index = User.indexes.first
25
25
  expect(index.using).to eq using
26
26
  end
27
+
28
+ it "deprecates :expression", rails_5_2: :only do
29
+ field = 'date(login_at)'
30
+ expect(ActiveSupport::Deprecation).to receive(:warn).with(/expression.*simply/)
31
+ # type is here only for the tests, not a real option
32
+ create_table User, :login_at => { type: :datetime, index: { expression: field } }
33
+ index = User.indexes.first
34
+ expect(index.columns).to include field
35
+ end
27
36
  end
28
37
 
29
38
  context "on IndexDefinition object" do
@@ -45,6 +54,17 @@ describe 'Deprecations' do
45
54
  expect(index.using).to eq using # sanity check
46
55
  expect(index.kind).to eq using.to_s
47
56
  end
57
+
58
+ it "deprecates #expression", rails_5_2: :only do
59
+ field = 'date(login_at)'
60
+ # type is here only for the tests, not a real option
61
+ create_table User, :login_at => { type: :datetime }
62
+ migration.add_index User.table_name, field, name: 'index_login_date'
63
+ index = User.indexes.first
64
+ expect(ActiveSupport::Deprecation).to receive(:warn).with(/expression.*simply/)
65
+ expect(index.columns).to include field # sanity check
66
+ expect(index.expression).to be_nil
67
+ end
48
68
  end
49
69
 
50
70
  protected
@@ -53,7 +73,8 @@ describe 'Deprecations' do
53
73
  migration.suppress_messages do
54
74
  migration.create_table model.table_name, :force => true do |t|
55
75
  columns_with_options.each_pair do |column, options|
56
- t.send :string, column, options
76
+ type = options.delete(:type) || :string
77
+ t.send type, column, options
57
78
  end
58
79
  end
59
80
  model.reset_column_information
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
 
4
- describe "Index definition" do
4
+ describe "Index definition", rails_5_2: :skip do
5
5
 
6
6
  let(:migration) { ::ActiveRecord::Migration }
7
7
 
@@ -21,54 +21,66 @@ describe "index" do
21
21
  end
22
22
  end
23
23
 
24
- it "should assign expression, where and using" do
25
- add_index(:users, :expression => "USING hash (upper(login)) WHERE deleted_at IS NULL", :name => 'users_login_index')
26
- index = User.indexes.detect { |i| i.expression.present? }
27
- expect(index.expression).to eq("upper((login)::text)")
28
- expect(index.where).to eq("(deleted_at IS NULL)")
29
- expect(index.using).to eq(:hash)
24
+ fcontext 'rails 5.2 or newer', rails_5_2: :only do
25
+ it "should handle old arguments" do
26
+ add_index(:users, 'upper(login)', using: :hash, where: 'deleted_at is null', opclass: 'varchar_pattern_ops', :name => 'users_login_index')
27
+ index = User.indexes.first
28
+ expect(index.columns).to include("upper((login)::text)")
29
+ expect(index.where).to eq("(deleted_at IS NULL)")
30
+ expect(index.using).to eq(:hash)
31
+ end
30
32
  end
31
33
 
32
- it "should allow to specify expression, where and using separately" do
33
- add_index(:users, :using => "hash", :expression => "upper(login)", :where => "deleted_at IS NULL", :name => 'users_login_index')
34
- index = User.indexes.detect { |i| i.expression.present? }
35
- expect(index.expression).to eq("upper((login)::text)")
36
- expect(index.where).to eq("(deleted_at IS NULL)")
37
- expect(index.using).to eq(:hash)
38
- end
34
+ context 'before rails 5.2', rails_5_2: :skip do
35
+ it "should assign expression, where and using" do
36
+ add_index(:users, :expression => "USING hash (upper(login)) WHERE deleted_at IS NULL", :name => 'users_login_index')
37
+ index = User.indexes.detect { |i| i.expression.present? }
38
+ expect(index.expression).to eq("upper((login)::text)")
39
+ expect(index.where).to eq("(deleted_at IS NULL)")
40
+ expect(index.using).to eq(:hash)
41
+ end
39
42
 
40
- it "should assign operator_class" do
41
- add_index(:users, :login, :operator_class => 'varchar_pattern_ops')
42
- expect(index_for(:login).operator_classes).to eq({"login" => 'varchar_pattern_ops'})
43
- end
43
+ it "should allow to specify expression, where and using separately" do
44
+ add_index(:users, :using => "hash", :expression => "upper(login)", :where => "deleted_at IS NULL", :name => 'users_login_index')
45
+ index = User.indexes.detect { |i| i.expression.present? }
46
+ expect(index.expression).to eq("upper((login)::text)")
47
+ expect(index.where).to eq("(deleted_at IS NULL)")
48
+ expect(index.using).to eq(:hash)
49
+ end
44
50
 
45
- it "should assign multiple operator_classes" do
46
- add_index(:users, [:login, :address], :operator_class => {:login => 'varchar_pattern_ops', :address => 'text_pattern_ops'})
47
- expect(index_for([:login, :address]).operator_classes).to eq({"login" => 'varchar_pattern_ops', "address" => 'text_pattern_ops'})
48
- end
51
+ it "should assign operator_class" do
52
+ add_index(:users, :login, :operator_class => 'varchar_pattern_ops')
53
+ expect(index_for(:login).operator_classes).to eq({"login" => 'varchar_pattern_ops'})
54
+ end
49
55
 
50
- it "should allow to specify actual expression only" do
51
- add_index(:users, :expression => "upper(login)", :name => 'users_login_index')
52
- index = User.indexes.detect { |i| i.name == 'users_login_index' }
53
- expect(index.expression).to eq("upper((login)::text)")
54
- end
56
+ it "should assign multiple operator_classes" do
57
+ add_index(:users, [:login, :address], :operator_class => {:login => 'varchar_pattern_ops', :address => 'text_pattern_ops'})
58
+ expect(index_for([:login, :address]).operator_classes).to eq({"login" => 'varchar_pattern_ops', "address" => 'text_pattern_ops'})
59
+ end
55
60
 
56
- it "should create proper sql with jsonb expressions (schema_plus #212)" do
57
- add_index :users, :name => "json_expression", :using => :gin, :expression => "(json_col -> 'field')"
58
- index = User.indexes.detect(&its.name == "json_expression")
59
- expect(index.expression).to eq("(json_col -> 'field'::text)")
60
- end
61
+ it "should allow to specify actual expression only" do
62
+ add_index(:users, :expression => "upper(login)", :name => 'users_login_index')
63
+ index = User.indexes.detect { |i| i.name == 'users_login_index' }
64
+ expect(index.expression).to eq("upper((login)::text)")
65
+ end
61
66
 
62
- it "should raise if no column given and expression is missing" do
63
- expect { add_index(:users, :name => 'users_login_index') }.to raise_error(ArgumentError, /expression/)
64
- end
67
+ it "should create proper sql with jsonb expressions (schema_plus #212)" do
68
+ add_index :users, :name => "json_expression", :using => :gin, :expression => "(json_col -> 'field')"
69
+ index = User.indexes.detect(&its.name == "json_expression")
70
+ expect(index.expression).to eq("(json_col -> 'field'::text)")
71
+ end
65
72
 
66
- it "should raise if expression without name is given" do
67
- expect { add_index(:users, :expression => "upper(login)") }.to raise_error(ArgumentError, /name/)
68
- end
73
+ it "should raise if no column given and expression is missing" do
74
+ expect { add_index(:users, :name => 'users_login_index') }.to raise_error(ArgumentError, /expression/)
75
+ end
76
+
77
+ it "should raise if expression without name is given" do
78
+ expect { add_index(:users, :expression => "upper(login)") }.to raise_error(ArgumentError, /name/)
79
+ end
69
80
 
70
- it "should raise if expression is given and case_sensitive is false" do
71
- expect { add_index(:users, :name => 'users_login_index', :expression => "upper(login)", :case_sensitive => false) }.to raise_error(ArgumentError, /use LOWER/i)
81
+ it "should raise if expression is given and case_sensitive is false" do
82
+ expect { add_index(:users, :name => 'users_login_index', :expression => "upper(login)", :case_sensitive => false) }.to raise_error(ArgumentError, /use LOWER/i)
83
+ end
72
84
  end
73
85
 
74
86
  protected
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
  require 'stringio'
3
3
 
4
- describe "Schema dump" do
4
+ describe "Schema dump", rails_5_2: :skip do
5
5
 
6
6
  before(:each) do
7
7
  ActiveRecord::Migration.suppress_messages do
@@ -1,7 +1,7 @@
1
1
 
2
2
  require 'spec_helper'
3
3
 
4
- describe "schema" do
4
+ describe "schema", rails_5_2: :skip do
5
5
 
6
6
  class User < ::ActiveRecord::Base ; end
7
7
 
@@ -16,6 +16,11 @@ Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each {|f| require f}
16
16
 
17
17
  RSpec.configure do |config|
18
18
  config.include(SchemaPlusPgIndexesMatchers)
19
+ if Gem::Version.new(ActiveRecord::VERSION::STRING) >= Gem::Version.new('5.2.0')
20
+ config.filter_run_excluding rails_5_2: :skip
21
+ else
22
+ config.filter_run_excluding rails_5_2: :only
23
+ end
19
24
  config.warnings = true
20
25
  config.around(:each) do |example|
21
26
  ActiveRecord::Migration.suppress_messages do
metadata CHANGED
@@ -1,35 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schema_plus_pg_indexes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ronen barzel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-07 00:00:00.000000000 Z
11
+ date: 2018-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '5.0'
20
17
  - - ">="
21
18
  - !ruby/object:Gem::Version
22
19
  version: 5.0.1
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '5.3'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "~>"
28
- - !ruby/object:Gem::Version
29
- version: '5.0'
30
27
  - - ">="
31
28
  - !ruby/object:Gem::Version
32
29
  version: 5.0.1
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '5.3'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: schema_plus_indexes
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -112,14 +112,14 @@ dependencies:
112
112
  requirements:
113
113
  - - "~>"
114
114
  - !ruby/object:Gem::Version
115
- version: 3.0.0
115
+ version: '3.0'
116
116
  type: :development
117
117
  prerelease: false
118
118
  version_requirements: !ruby/object:Gem::Requirement
119
119
  requirements:
120
120
  - - "~>"
121
121
  - !ruby/object:Gem::Version
122
- version: 3.0.0
122
+ version: '3.0'
123
123
  - !ruby/object:Gem::Dependency
124
124
  name: schema_dev
125
125
  requirement: !ruby/object:Gem::Requirement
@@ -180,11 +180,15 @@ files:
180
180
  - gemfiles/activerecord-5.0/Gemfile.postgresql
181
181
  - gemfiles/activerecord-5.1/Gemfile.base
182
182
  - gemfiles/activerecord-5.1/Gemfile.postgresql
183
+ - gemfiles/activerecord-5.2/Gemfile.base
184
+ - gemfiles/activerecord-5.2/Gemfile.postgresql
183
185
  - lib/schema_plus_pg_indexes.rb
184
186
  - lib/schema_plus_pg_indexes/active_record/connection_adapters/index_definition.rb
187
+ - lib/schema_plus_pg_indexes/active_record/connection_adapters/index_definition_5_2.rb
185
188
  - lib/schema_plus_pg_indexes/active_record/connection_adapters/postgresql_adapter.rb
186
189
  - lib/schema_plus_pg_indexes/middleware/postgresql/dumper.rb
187
190
  - lib/schema_plus_pg_indexes/middleware/postgresql/migration.rb
191
+ - lib/schema_plus_pg_indexes/middleware/postgresql/migration_5_2.rb
188
192
  - lib/schema_plus_pg_indexes/middleware/postgresql/schema.rb
189
193
  - lib/schema_plus_pg_indexes/middleware/postgresql/sql.rb
190
194
  - lib/schema_plus_pg_indexes/version.rb
@@ -202,7 +206,13 @@ homepage: https://github.com/SchemaPlus/schema_plus_pg_indexes
202
206
  licenses:
203
207
  - MIT
204
208
  metadata: {}
205
- post_install_message:
209
+ post_install_message: |
210
+ ActiveRecord 5.2 supports all of the functionality provided by Schema+ PG Indexes (expression indexes,
211
+ operator classes, case insensitive indexes).
212
+ Thus this gem is now deprecated and will not be maintained for future ActiveRecord versions.
213
+ The rest of Schema+, however, is still being maintained.
214
+
215
+ Please see the README.md for more information on migrating your old migrations to AR 5.2 syntax so you can remove this gem.
206
216
  rdoc_options: []
207
217
  require_paths:
208
218
  - lib
@@ -218,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
228
  version: '0'
219
229
  requirements: []
220
230
  rubyforge_project:
221
- rubygems_version: 2.5.1
231
+ rubygems_version: 2.7.8
222
232
  signing_key:
223
233
  specification_version: 4
224
234
  summary: Adds support in ActiveRecord for PostgreSQL index expressions and operator