schema_plus_compatibility 0.3.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/prs.yml +173 -0
  3. data/.simplecov +20 -0
  4. data/Gemfile +4 -1
  5. data/README.md +29 -10
  6. data/Rakefile +2 -0
  7. data/gemfiles/Gemfile.base +1 -1
  8. data/gemfiles/activerecord-5.2/Gemfile.base +4 -0
  9. data/gemfiles/activerecord-5.2/Gemfile.mysql2 +10 -0
  10. data/gemfiles/activerecord-5.2/Gemfile.postgresql +10 -0
  11. data/gemfiles/{activerecord-4.2 → activerecord-5.2}/Gemfile.sqlite3 +3 -3
  12. data/gemfiles/activerecord-6.0/Gemfile.base +4 -0
  13. data/gemfiles/activerecord-6.0/Gemfile.mysql2 +10 -0
  14. data/gemfiles/activerecord-6.0/Gemfile.postgresql +10 -0
  15. data/gemfiles/{activerecord-5.1 → activerecord-6.0}/Gemfile.sqlite3 +3 -3
  16. data/gemfiles/activerecord-6.1/Gemfile.base +4 -0
  17. data/gemfiles/activerecord-6.1/Gemfile.mysql2 +10 -0
  18. data/gemfiles/activerecord-6.1/Gemfile.postgresql +10 -0
  19. data/gemfiles/{activerecord-5.0 → activerecord-6.1}/Gemfile.sqlite3 +3 -3
  20. data/gemfiles/activerecord-7.0/Gemfile.base +4 -0
  21. data/gemfiles/activerecord-7.0/Gemfile.mysql2 +10 -0
  22. data/gemfiles/activerecord-7.0/Gemfile.postgresql +10 -0
  23. data/gemfiles/activerecord-7.0/Gemfile.sqlite3 +10 -0
  24. data/lib/schema_plus/compatibility/active_record/connection_adapters/abstract_adapter.rb +2 -0
  25. data/lib/schema_plus/compatibility/active_record/connection_adapters/mysql2_adapter.rb +2 -0
  26. data/lib/schema_plus/compatibility/active_record/connection_adapters/postgresql_adapter.rb +2 -0
  27. data/lib/schema_plus/compatibility/active_record/connection_adapters/sqlite3_adapter.rb +2 -0
  28. data/lib/schema_plus/compatibility/active_record/migration.rb +2 -0
  29. data/lib/schema_plus/compatibility/version.rb +3 -1
  30. data/lib/schema_plus/compatibility.rb +2 -0
  31. data/lib/schema_plus_compatibility.rb +2 -0
  32. data/schema_dev.yml +11 -7
  33. data/schema_plus_compatibility.gemspec +9 -8
  34. data/spec/migration_spec.rb +2 -1
  35. data/spec/spec_helper.rb +3 -2
  36. data/spec/tables_only_spec.rb +4 -7
  37. metadata +39 -63
  38. data/.travis.yml +0 -24
  39. data/gemfiles/activerecord-4.2/Gemfile.base +0 -3
  40. data/gemfiles/activerecord-4.2/Gemfile.mysql2 +0 -10
  41. data/gemfiles/activerecord-4.2/Gemfile.postgresql +0 -10
  42. data/gemfiles/activerecord-5.0/Gemfile.base +0 -3
  43. data/gemfiles/activerecord-5.0/Gemfile.mysql2 +0 -10
  44. data/gemfiles/activerecord-5.0/Gemfile.postgresql +0 -10
  45. data/gemfiles/activerecord-5.1/Gemfile.base +0 -3
  46. data/gemfiles/activerecord-5.1/Gemfile.mysql2 +0 -10
  47. data/gemfiles/activerecord-5.1/Gemfile.postgresql +0 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 513c8ac223d3622a0c5bd83bff572171a87d8c94
4
- data.tar.gz: 86a8768b81b2db8e7db42cad2b64aaedcfee7a9a
2
+ SHA256:
3
+ metadata.gz: b8b0d3cc0e6741285bd09e96547211610a8fb5279d41089d5c4f9fa1160ab007
4
+ data.tar.gz: cdac8e691194f1f771d11a365db1fbfb98b0cad629abd0edd9d6a13483012e48
5
5
  SHA512:
6
- metadata.gz: 3648d072155a2c58ca05b28c22144a08145d9292c7cad46b325ca992d1b2731e18be8b268fe1b73f941cf61732584ef345267b1cbe71d12777e4dcd1aae506fd
7
- data.tar.gz: 26c30d4ac51c95c7a0c55ae42473d7fec8e0286a72e9492db57b03f077c0eccc264eebbae95fc63f32133ec6a28f8ce3681f161ec24d73fd71a59c296017ee2d
6
+ metadata.gz: 0734a9cd1fa6e61b832d0bf22582fd582d583dc1af2ab2ea59a6812f768d662309d82e5df7acc66b13b7aeac2a7c8ed2eec840d21d8679273a437165b7c52a2b
7
+ data.tar.gz: 20f64940f62aa8dc06fd9e0e6f098bead28ab38ad558650a9892f13f99d97384e220707bfbbfb158ce8ddbe65fcc3a4d98d779866e152b92fcb6273502b9ad48
@@ -0,0 +1,173 @@
1
+ # This file was auto-generated by the schema_dev tool, based on the data in
2
+ # ./schema_dev.yml
3
+ # Please do not edit this file; any changes will be overwritten next time
4
+ # schema_dev gets run.
5
+ ---
6
+ name: CI PR Builds
7
+ 'on':
8
+ push:
9
+ branches:
10
+ - master
11
+ pull_request:
12
+ concurrency:
13
+ group: ci-${{ github.ref }}
14
+ cancel-in-progress: true
15
+ jobs:
16
+ test:
17
+ runs-on: ubuntu-latest
18
+ strategy:
19
+ fail-fast: false
20
+ matrix:
21
+ ruby:
22
+ - '2.5'
23
+ - '2.7'
24
+ - '3.0'
25
+ - '3.1'
26
+ activerecord:
27
+ - '5.2'
28
+ - '6.0'
29
+ - '6.1'
30
+ - '7.0'
31
+ db:
32
+ - mysql2
33
+ - sqlite3
34
+ - skip
35
+ dbversion:
36
+ - skip
37
+ exclude:
38
+ - ruby: '3.0'
39
+ activerecord: '5.2'
40
+ - ruby: '3.1'
41
+ activerecord: '5.2'
42
+ - ruby: '2.5'
43
+ activerecord: '7.0'
44
+ - db: skip
45
+ dbversion: skip
46
+ include:
47
+ - ruby: '2.5'
48
+ activerecord: '5.2'
49
+ db: postgresql
50
+ dbversion: '9.6'
51
+ - ruby: '2.5'
52
+ activerecord: '6.0'
53
+ db: postgresql
54
+ dbversion: '9.6'
55
+ - ruby: '2.5'
56
+ activerecord: '6.1'
57
+ db: postgresql
58
+ dbversion: '9.6'
59
+ - ruby: '2.7'
60
+ activerecord: '5.2'
61
+ db: postgresql
62
+ dbversion: '9.6'
63
+ - ruby: '2.7'
64
+ activerecord: '6.0'
65
+ db: postgresql
66
+ dbversion: '9.6'
67
+ - ruby: '2.7'
68
+ activerecord: '6.1'
69
+ db: postgresql
70
+ dbversion: '9.6'
71
+ - ruby: '2.7'
72
+ activerecord: '7.0'
73
+ db: postgresql
74
+ dbversion: '9.6'
75
+ - ruby: '3.0'
76
+ activerecord: '6.0'
77
+ db: postgresql
78
+ dbversion: '9.6'
79
+ - ruby: '3.0'
80
+ activerecord: '6.1'
81
+ db: postgresql
82
+ dbversion: '9.6'
83
+ - ruby: '3.0'
84
+ activerecord: '7.0'
85
+ db: postgresql
86
+ dbversion: '9.6'
87
+ - ruby: '3.1'
88
+ activerecord: '6.0'
89
+ db: postgresql
90
+ dbversion: '9.6'
91
+ - ruby: '3.1'
92
+ activerecord: '6.1'
93
+ db: postgresql
94
+ dbversion: '9.6'
95
+ - ruby: '3.1'
96
+ activerecord: '7.0'
97
+ db: postgresql
98
+ dbversion: '9.6'
99
+ env:
100
+ BUNDLE_GEMFILE: "${{ github.workspace }}/gemfiles/activerecord-${{ matrix.activerecord }}/Gemfile.${{ matrix.db }}"
101
+ MYSQL_DB_HOST: 127.0.0.1
102
+ MYSQL_DB_USER: root
103
+ MYSQL_DB_PASS: database
104
+ POSTGRESQL_DB_HOST: 127.0.0.1
105
+ POSTGRESQL_DB_USER: schema_plus_test
106
+ POSTGRESQL_DB_PASS: database
107
+ steps:
108
+ - uses: actions/checkout@v2
109
+ - name: Set up Ruby
110
+ uses: ruby/setup-ruby@v1
111
+ with:
112
+ ruby-version: "${{ matrix.ruby }}"
113
+ bundler-cache: true
114
+ - name: Run bundle update
115
+ run: bundle update
116
+ - name: Start Mysql
117
+ if: matrix.db == 'mysql2'
118
+ run: |
119
+ docker run --rm --detach \
120
+ -e MYSQL_ROOT_PASSWORD=$MYSQL_DB_PASS \
121
+ -p 3306:3306 \
122
+ --health-cmd "mysqladmin ping --host=127.0.0.1 --password=$MYSQL_DB_PASS --silent" \
123
+ --health-interval 5s \
124
+ --health-timeout 5s \
125
+ --health-retries 5 \
126
+ --name database mysql:5.6
127
+ - name: Start Postgresql
128
+ if: matrix.db == 'postgresql'
129
+ run: |
130
+ docker run --rm --detach \
131
+ -e POSTGRES_USER=$POSTGRESQL_DB_USER \
132
+ -e POSTGRES_PASSWORD=$POSTGRESQL_DB_PASS \
133
+ -p 5432:5432 \
134
+ --health-cmd "pg_isready -q" \
135
+ --health-interval 5s \
136
+ --health-timeout 5s \
137
+ --health-retries 5 \
138
+ --name database postgres:${{ matrix.dbversion }}
139
+ - name: Wait for database to start
140
+ if: "(matrix.db == 'postgresql' || matrix.db == 'mysql2')"
141
+ run: |
142
+ COUNT=0
143
+ ATTEMPTS=20
144
+ until [[ $COUNT -eq $ATTEMPTS ]]; do
145
+ [ "$(docker inspect -f {{.State.Health.Status}} database)" == "healthy" ] && break
146
+ echo $(( COUNT++ )) > /dev/null
147
+ sleep 2
148
+ done
149
+ - name: Create testing database
150
+ if: "(matrix.db == 'postgresql' || matrix.db == 'mysql2')"
151
+ run: bundle exec rake create_ci_database
152
+ - name: Run tests
153
+ run: bundle exec rake spec
154
+ - name: Shutdown database
155
+ if: always() && (matrix.db == 'postgresql' || matrix.db == 'mysql2')
156
+ run: docker stop database
157
+ - name: Coveralls Parallel
158
+ if: "${{ !env.ACT }}"
159
+ uses: coverallsapp/github-action@master
160
+ with:
161
+ github-token: "${{ secrets.GITHUB_TOKEN }}"
162
+ flag-name: run-${{ matrix.ruby }}-${{ matrix.activerecord }}-${{ matrix.db }}-${{ matrix.dbversion }}
163
+ parallel: true
164
+ finish:
165
+ needs: test
166
+ runs-on: ubuntu-latest
167
+ steps:
168
+ - name: Coveralls Finished
169
+ if: "${{ !env.ACT }}"
170
+ uses: coverallsapp/github-action@master
171
+ with:
172
+ github-token: "${{ secrets.GITHUB_TOKEN }}"
173
+ parallel-finished: true
data/.simplecov ADDED
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ SimpleCov.configure do
4
+ enable_coverage :branch
5
+ add_filter '/spec/'
6
+
7
+ add_group 'Binaries', '/bin/'
8
+ add_group 'Libraries', '/lib/'
9
+
10
+ if ENV['CI']
11
+ require 'simplecov-lcov'
12
+
13
+ SimpleCov::Formatter::LcovFormatter.config do |c|
14
+ c.report_with_single_file = true
15
+ c.single_report_path = 'coverage/lcov.info'
16
+ end
17
+
18
+ formatter SimpleCov::Formatter::LcovFormatter
19
+ end
20
+ end
data/Gemfile CHANGED
@@ -1,5 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source "http://rubygems.org"
2
4
 
3
5
  gemspec
4
6
 
5
- File.exist?(gemfile_local = File.expand_path('../Gemfile.local', __FILE__)) and eval File.read(gemfile_local), binding, gemfile_local
7
+ gemfile_local = File.expand_path '../Gemfile.local', __FILE__
8
+ eval File.read(gemfile_local), binding, gemfile_local if File.exist? gemfile_local
data/README.md CHANGED
@@ -1,6 +1,13 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/schema_plus_compatibility.svg)](http://badge.fury.io/rb/schema_plus_compatibility)
2
- [![Build Status](https://secure.travis-ci.org/SchemaPlus/schema_plus_compatibility.svg)](http://travis-ci.org/SchemaPlus/schema_plus_compatibility)
3
- [![Coverage Status](https://coveralls.io/repos/github/SchemaPlus/schema_plus_compatibility/badge.svg?branch=master)](https://coveralls.io/github/SchemaPlus/schema_plus_compatibility?branch=master)
2
+ [![Build Status](https://github.com/SchemaPlus/schema_plus_compatibility/actions/workflows/prs.yml/badge.svg)](https://github.com/SchemaPlus/schema_plus_compatibility/actions)
3
+ [![Coverage Status](https://coveralls.io/repos/github/SchemaPlus/schema_plus_compatibility/badge.svg)](https://coveralls.io/github/SchemaPlus/schema_plus_compatibility)
4
+
5
+ # Deprecation notice
6
+
7
+ This gem is officially deprecated and will no longer be maintained.
8
+
9
+ Newer Active record versions correclty ignore views from the connection.tables list so this gem is no longer needed.
10
+ Also as we are only supporting AR 5.2+ there is no need for the "latest\_version" method either.
4
11
 
5
12
  # SchemaPlus::Compatibility
6
13
 
@@ -45,17 +52,30 @@ SchemaPlus::Compatibility is tested on:
45
52
 
46
53
  <!-- SCHEMA_DEV: MATRIX - begin -->
47
54
  <!-- These lines are auto-generated by schema_dev based on schema_dev.yml -->
48
- * ruby **2.3.1** with activerecord **4.2**, using **mysql2**, **sqlite3** or **postgresql**
49
- * ruby **2.3.1** with activerecord **5.0**, using **mysql2**, **sqlite3** or **postgresql**
50
- * ruby **2.3.1** with activerecord **5.1**, using **mysql2**, **sqlite3** or **postgresql**
55
+ * ruby **2.5** with activerecord **5.2**, using **mysql2**, **sqlite3** or **postgresql:9.6**
56
+ * ruby **2.5** with activerecord **6.0**, using **mysql2**, **sqlite3** or **postgresql:9.6**
57
+ * ruby **2.5** with activerecord **6.1**, using **mysql2**, **sqlite3** or **postgresql:9.6**
58
+ * ruby **2.7** with activerecord **5.2**, using **mysql2**, **sqlite3** or **postgresql:9.6**
59
+ * ruby **2.7** with activerecord **6.0**, using **mysql2**, **sqlite3** or **postgresql:9.6**
60
+ * ruby **2.7** with activerecord **6.1**, using **mysql2**, **sqlite3** or **postgresql:9.6**
61
+ * ruby **2.7** with activerecord **7.0**, using **mysql2**, **sqlite3** or **postgresql:9.6**
62
+ * ruby **3.0** with activerecord **6.0**, using **mysql2**, **sqlite3** or **postgresql:9.6**
63
+ * ruby **3.0** with activerecord **6.1**, using **mysql2**, **sqlite3** or **postgresql:9.6**
64
+ * ruby **3.0** with activerecord **7.0**, using **mysql2**, **sqlite3** or **postgresql:9.6**
65
+ * ruby **3.1** with activerecord **6.0**, using **mysql2**, **sqlite3** or **postgresql:9.6**
66
+ * ruby **3.1** with activerecord **6.1**, using **mysql2**, **sqlite3** or **postgresql:9.6**
67
+ * ruby **3.1** with activerecord **7.0**, using **mysql2**, **sqlite3** or **postgresql:9.6**
51
68
 
52
69
  <!-- SCHEMA_DEV: MATRIX - end -->
53
70
 
54
71
  ## Release Notes
55
72
 
56
- * 0.3.0 - Allow AR 5.1
57
- * 0.2.0 - Replace the ill-defined `connection.tables_without_deprecation` with `connection.tables_only` which truly returns solely tables.
58
- * 0.1.0 - Initial release
73
+ * **1.0.1** - Add AR 7.0 support and deprecate gem.
74
+ * **1.0.0** - Drop AR < 5.2 and add 6.0 and 6.1 support
75
+ * **0.4.0** - Allow AR 5.2
76
+ * **0.3.0** - Allow AR 5.1
77
+ * **0.2.0** - Replace the ill-defined `connection.tables_without_deprecation` with `connection.tables_only` which truly returns solely tables.
78
+ * **0.1.0** - Initial release
59
79
 
60
80
  ## Development & Testing
61
81
 
@@ -70,7 +90,7 @@ Some things to know about to help you develop and test:
70
90
  * **schema_dev**: SchemaPlus::Compatibility uses [schema_dev](https://github.com/SchemaPlus/schema_dev) to
71
91
  facilitate running rspec tests on the matrix of ruby, activerecord, and database
72
92
  versions that the gem supports, both locally and on
73
- [travis-ci](http://travis-ci.org/SchemaPlus/schema_plus_compatibility)
93
+ [github actions](https://github.com/SchemaPlus/schema_plus_compatibility/actions)
74
94
 
75
95
  To to run rspec locally on the full matrix, do:
76
96
 
@@ -82,7 +102,6 @@ Some things to know about to help you develop and test:
82
102
  The matrix of configurations is specified in `schema_dev.yml` in
83
103
  the project root.
84
104
 
85
-
86
105
  <!-- SCHEMA_DEV: TEMPLATE USES SCHEMA_DEV - end -->
87
106
 
88
107
  <!-- SCHEMA_DEV: TEMPLATE USES SCHEMA_MONKEY - begin -->
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler'
2
4
  Bundler::GemHelper.install_tasks
3
5
 
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
- gemspec :path => File.expand_path('..', __FILE__)
2
+ gemspec path: File.expand_path('..', __FILE__)
3
3
 
4
4
  File.exist?(gemfile_local = File.expand_path('../Gemfile.local', __FILE__)) and eval File.read(gemfile_local), binding, gemfile_local
@@ -0,0 +1,4 @@
1
+ base_gemfile = File.expand_path('../../Gemfile.base', __FILE__)
2
+ eval File.read(base_gemfile)
3
+
4
+ gem "activerecord", ">= 5.2.0.beta0", "< 5.3"
@@ -0,0 +1,10 @@
1
+ base_gemfile = File.expand_path('../Gemfile.base', __FILE__)
2
+ eval File.read(base_gemfile), binding, base_gemfile
3
+
4
+ platform :ruby do
5
+ gem "mysql2"
6
+ end
7
+
8
+ platform :jruby do
9
+ gem 'activerecord-jdbcmysql-adapter'
10
+ end
@@ -0,0 +1,10 @@
1
+ base_gemfile = File.expand_path('../Gemfile.base', __FILE__)
2
+ eval File.read(base_gemfile), binding, base_gemfile
3
+
4
+ platform :ruby do
5
+ gem "pg"
6
+ end
7
+
8
+ platform :jruby do
9
+ gem 'activerecord-jdbcpostgresql-adapter'
10
+ end
@@ -1,5 +1,5 @@
1
- require "pathname"
2
- eval(Pathname.new(__FILE__).dirname.join("Gemfile.base").read, binding)
1
+ base_gemfile = File.expand_path('../Gemfile.base', __FILE__)
2
+ eval File.read(base_gemfile), binding, base_gemfile
3
3
 
4
4
  platform :ruby do
5
5
  gem "sqlite3"
@@ -7,4 +7,4 @@ end
7
7
 
8
8
  platform :jruby do
9
9
  gem 'activerecord-jdbcsqlite3-adapter', '>=1.3.0.beta2'
10
- end
10
+ end
@@ -0,0 +1,4 @@
1
+ base_gemfile = File.expand_path('../../Gemfile.base', __FILE__)
2
+ eval File.read(base_gemfile)
3
+
4
+ gem "activerecord", ">= 6.0", "< 6.1"
@@ -0,0 +1,10 @@
1
+ base_gemfile = File.expand_path('../Gemfile.base', __FILE__)
2
+ eval File.read(base_gemfile), binding, base_gemfile
3
+
4
+ platform :ruby do
5
+ gem "mysql2"
6
+ end
7
+
8
+ platform :jruby do
9
+ gem 'activerecord-jdbcmysql-adapter'
10
+ end
@@ -0,0 +1,10 @@
1
+ base_gemfile = File.expand_path('../Gemfile.base', __FILE__)
2
+ eval File.read(base_gemfile), binding, base_gemfile
3
+
4
+ platform :ruby do
5
+ gem "pg"
6
+ end
7
+
8
+ platform :jruby do
9
+ gem 'activerecord-jdbcpostgresql-adapter'
10
+ end
@@ -1,5 +1,5 @@
1
- require "pathname"
2
- eval(Pathname.new(__FILE__).dirname.join("Gemfile.base").read, binding)
1
+ base_gemfile = File.expand_path('../Gemfile.base', __FILE__)
2
+ eval File.read(base_gemfile), binding, base_gemfile
3
3
 
4
4
  platform :ruby do
5
5
  gem "sqlite3"
@@ -7,4 +7,4 @@ end
7
7
 
8
8
  platform :jruby do
9
9
  gem 'activerecord-jdbcsqlite3-adapter', '>=1.3.0.beta2'
10
- end
10
+ end
@@ -0,0 +1,4 @@
1
+ base_gemfile = File.expand_path('../../Gemfile.base', __FILE__)
2
+ eval File.read(base_gemfile)
3
+
4
+ gem "activerecord", ">= 6.1", "< 6.2"
@@ -0,0 +1,10 @@
1
+ base_gemfile = File.expand_path('../Gemfile.base', __FILE__)
2
+ eval File.read(base_gemfile), binding, base_gemfile
3
+
4
+ platform :ruby do
5
+ gem "mysql2"
6
+ end
7
+
8
+ platform :jruby do
9
+ gem 'activerecord-jdbcmysql-adapter'
10
+ end
@@ -0,0 +1,10 @@
1
+ base_gemfile = File.expand_path('../Gemfile.base', __FILE__)
2
+ eval File.read(base_gemfile), binding, base_gemfile
3
+
4
+ platform :ruby do
5
+ gem "pg"
6
+ end
7
+
8
+ platform :jruby do
9
+ gem 'activerecord-jdbcpostgresql-adapter'
10
+ end
@@ -1,5 +1,5 @@
1
- require "pathname"
2
- eval(Pathname.new(__FILE__).dirname.join("Gemfile.base").read, binding)
1
+ base_gemfile = File.expand_path('../Gemfile.base', __FILE__)
2
+ eval File.read(base_gemfile), binding, base_gemfile
3
3
 
4
4
  platform :ruby do
5
5
  gem "sqlite3"
@@ -7,4 +7,4 @@ end
7
7
 
8
8
  platform :jruby do
9
9
  gem 'activerecord-jdbcsqlite3-adapter', '>=1.3.0.beta2'
10
- end
10
+ end
@@ -0,0 +1,4 @@
1
+ base_gemfile = File.expand_path('../../Gemfile.base', __FILE__)
2
+ eval File.read(base_gemfile)
3
+
4
+ gem "activerecord", ">= 7.0", "< 7.1"
@@ -0,0 +1,10 @@
1
+ base_gemfile = File.expand_path('../Gemfile.base', __FILE__)
2
+ eval File.read(base_gemfile), binding, base_gemfile
3
+
4
+ platform :ruby do
5
+ gem "mysql2"
6
+ end
7
+
8
+ platform :jruby do
9
+ gem 'activerecord-jdbcmysql-adapter'
10
+ end
@@ -0,0 +1,10 @@
1
+ base_gemfile = File.expand_path('../Gemfile.base', __FILE__)
2
+ eval File.read(base_gemfile), binding, base_gemfile
3
+
4
+ platform :ruby do
5
+ gem "pg"
6
+ end
7
+
8
+ platform :jruby do
9
+ gem 'activerecord-jdbcpostgresql-adapter'
10
+ end
@@ -0,0 +1,10 @@
1
+ base_gemfile = File.expand_path('../Gemfile.base', __FILE__)
2
+ eval File.read(base_gemfile), binding, base_gemfile
3
+
4
+ platform :ruby do
5
+ gem "sqlite3"
6
+ end
7
+
8
+ platform :jruby do
9
+ gem 'activerecord-jdbcsqlite3-adapter', '>=1.3.0.beta2'
10
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SchemaPlus::Compatibility
2
4
  module ActiveRecord
3
5
  module ConnectionAdapters
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SchemaPlus::Compatibility
2
4
  module ActiveRecord
3
5
  module ConnectionAdapters
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SchemaPlus::Compatibility
2
4
  module ActiveRecord
3
5
  module ConnectionAdapters
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SchemaPlus::Compatibility
2
4
  module ActiveRecord
3
5
  module ConnectionAdapters
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SchemaPlus::Compatibility
2
4
  module ActiveRecord
3
5
  module Migration
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SchemaPlus
2
4
  module Compatibility
3
- VERSION = "0.3.0"
5
+ VERSION = "1.0.1"
4
6
  end
5
7
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'schema_monkey'
2
4
 
3
5
  require_relative 'compatibility/version'
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'schema_plus/compatibility'
data/schema_dev.yml CHANGED
@@ -1,10 +1,14 @@
1
1
  ruby:
2
- - 2.3.1
2
+ - 2.5
3
+ - 2.7
4
+ - 3.0
5
+ - 3.1
3
6
  activerecord:
4
- - 4.2
5
- - 5.0
6
- - 5.1
7
+ - 5.2
8
+ - 6.0
9
+ - 6.1
10
+ - 7.0
7
11
  db:
8
- - mysql2
9
- - sqlite3
10
- - postgresql
12
+ - mysql2
13
+ - sqlite3
14
+ - postgresql
@@ -1,4 +1,5 @@
1
- # coding: utf-8
1
+ # frozen_string_literal: true
2
+
2
3
  lib = File.expand_path('../lib', __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'schema_plus/compatibility/version'
@@ -18,13 +19,13 @@ Gem::Specification.new do |gem|
18
19
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
20
  gem.require_paths = ["lib"]
20
21
 
21
- gem.add_dependency "activerecord", ">= 4.2", "< 5.2"
22
- gem.add_dependency "schema_monkey", "~> 2.1"
22
+ gem.required_ruby_version = ">= 2.5.0"
23
+
24
+ gem.add_dependency "activerecord", ">= 5.2", "< 7.1"
25
+ gem.add_dependency "schema_monkey", "~> 3.0.2"
23
26
 
24
- gem.add_development_dependency "bundler", "~> 1.7"
25
- gem.add_development_dependency "rake", "~> 10.0"
27
+ gem.add_development_dependency "bundler"
28
+ gem.add_development_dependency "rake", "~> 13.0"
26
29
  gem.add_development_dependency "rspec", "~> 3.0"
27
- gem.add_development_dependency "schema_dev", "~> 3.5"
28
- gem.add_development_dependency "simplecov"
29
- gem.add_development_dependency "simplecov-gem-profile"
30
+ gem.add_development_dependency "schema_dev", "~> 4.2.0"
30
31
  end
@@ -1,4 +1,5 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
+
2
3
  require 'spec_helper'
3
4
 
4
5
  describe ActiveRecord::Migration do
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'simplecov'
2
- require 'simplecov-gem-profile'
3
- SimpleCov.start "gem"
4
+ SimpleCov.start unless SimpleCov.running
4
5
 
5
6
  $LOAD_PATH.unshift(File.dirname(__FILE__))
6
7
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
@@ -1,4 +1,5 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
+
2
3
  require 'spec_helper'
3
4
 
4
5
  describe "tables_only" do
@@ -18,7 +19,7 @@ describe "tables_only" do
18
19
  connection.tables_only.each do |table|
19
20
  connection.drop_table table, force: :cascade
20
21
  end
21
- ActiveRecord::InternalMetadata.create_table if ActiveRecord::VERSION::MAJOR >= 5 # ensure metadata table exists
22
+ ActiveRecord::InternalMetadata.create_table
22
23
  connection.create_table :t1
23
24
  connection.create_table :t2
24
25
  create_dummy_view :v1, :t1
@@ -38,11 +39,7 @@ describe "tables_only" do
38
39
  end
39
40
 
40
41
  let(:ar_internal_tables) {
41
- if ActiveRecord::VERSION::MAJOR >= 5
42
- [ActiveRecord::InternalMetadata.table_name]
43
- else
44
- []
45
- end
42
+ [ActiveRecord::InternalMetadata.table_name]
46
43
  }
47
44
 
48
45
  it "lists all tables" do
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schema_plus_compatibility
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ronen barzel
8
8
  - boaz yaniv
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-07-27 00:00:00.000000000 Z
12
+ date: 2022-06-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -17,62 +17,62 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '4.2'
20
+ version: '5.2'
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '5.2'
23
+ version: '7.1'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
28
  - - ">="
29
29
  - !ruby/object:Gem::Version
30
- version: '4.2'
30
+ version: '5.2'
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '5.2'
33
+ version: '7.1'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: schema_monkey
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '2.1'
40
+ version: 3.0.2
41
41
  type: :runtime
42
42
  prerelease: false
43
43
  version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.1'
47
+ version: 3.0.2
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: bundler
50
50
  requirement: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '1.7'
54
+ version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
57
  version_requirements: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '1.7'
61
+ version: '0'
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: rake
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '10.0'
68
+ version: '13.0'
69
69
  type: :development
70
70
  prerelease: false
71
71
  version_requirements: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '10.0'
75
+ version: '13.0'
76
76
  - !ruby/object:Gem::Dependency
77
77
  name: rspec
78
78
  requirement: !ruby/object:Gem::Requirement
@@ -93,42 +93,14 @@ dependencies:
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '3.5'
96
+ version: 4.2.0
97
97
  type: :development
98
98
  prerelease: false
99
99
  version_requirements: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '3.5'
104
- - !ruby/object:Gem::Dependency
105
- name: simplecov
106
- requirement: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- type: :development
112
- prerelease: false
113
- version_requirements: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- - !ruby/object:Gem::Dependency
119
- name: simplecov-gem-profile
120
- requirement: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
- type: :development
126
- prerelease: false
127
- version_requirements: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
103
+ version: 4.2.0
132
104
  description: Compatibility helpers for the SchemaPlus family of gems
133
105
  email:
134
106
  - ronen@barzel.org
@@ -137,25 +109,30 @@ executables: []
137
109
  extensions: []
138
110
  extra_rdoc_files: []
139
111
  files:
112
+ - ".github/workflows/prs.yml"
140
113
  - ".gitignore"
141
- - ".travis.yml"
114
+ - ".simplecov"
142
115
  - Gemfile
143
116
  - LICENSE.txt
144
117
  - README.md
145
118
  - Rakefile
146
119
  - gemfiles/Gemfile.base
147
- - gemfiles/activerecord-4.2/Gemfile.base
148
- - gemfiles/activerecord-4.2/Gemfile.mysql2
149
- - gemfiles/activerecord-4.2/Gemfile.postgresql
150
- - gemfiles/activerecord-4.2/Gemfile.sqlite3
151
- - gemfiles/activerecord-5.0/Gemfile.base
152
- - gemfiles/activerecord-5.0/Gemfile.mysql2
153
- - gemfiles/activerecord-5.0/Gemfile.postgresql
154
- - gemfiles/activerecord-5.0/Gemfile.sqlite3
155
- - gemfiles/activerecord-5.1/Gemfile.base
156
- - gemfiles/activerecord-5.1/Gemfile.mysql2
157
- - gemfiles/activerecord-5.1/Gemfile.postgresql
158
- - gemfiles/activerecord-5.1/Gemfile.sqlite3
120
+ - gemfiles/activerecord-5.2/Gemfile.base
121
+ - gemfiles/activerecord-5.2/Gemfile.mysql2
122
+ - gemfiles/activerecord-5.2/Gemfile.postgresql
123
+ - gemfiles/activerecord-5.2/Gemfile.sqlite3
124
+ - gemfiles/activerecord-6.0/Gemfile.base
125
+ - gemfiles/activerecord-6.0/Gemfile.mysql2
126
+ - gemfiles/activerecord-6.0/Gemfile.postgresql
127
+ - gemfiles/activerecord-6.0/Gemfile.sqlite3
128
+ - gemfiles/activerecord-6.1/Gemfile.base
129
+ - gemfiles/activerecord-6.1/Gemfile.mysql2
130
+ - gemfiles/activerecord-6.1/Gemfile.postgresql
131
+ - gemfiles/activerecord-6.1/Gemfile.sqlite3
132
+ - gemfiles/activerecord-7.0/Gemfile.base
133
+ - gemfiles/activerecord-7.0/Gemfile.mysql2
134
+ - gemfiles/activerecord-7.0/Gemfile.postgresql
135
+ - gemfiles/activerecord-7.0/Gemfile.sqlite3
159
136
  - lib/schema_plus/compatibility.rb
160
137
  - lib/schema_plus/compatibility/active_record/connection_adapters/abstract_adapter.rb
161
138
  - lib/schema_plus/compatibility/active_record/connection_adapters/mysql2_adapter.rb
@@ -173,7 +150,7 @@ homepage: https://github.com/SchemaPlus/schema_plus_compatibility
173
150
  licenses:
174
151
  - MIT
175
152
  metadata: {}
176
- post_install_message:
153
+ post_install_message:
177
154
  rdoc_options: []
178
155
  require_paths:
179
156
  - lib
@@ -181,16 +158,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
181
158
  requirements:
182
159
  - - ">="
183
160
  - !ruby/object:Gem::Version
184
- version: '0'
161
+ version: 2.5.0
185
162
  required_rubygems_version: !ruby/object:Gem::Requirement
186
163
  requirements:
187
164
  - - ">="
188
165
  - !ruby/object:Gem::Version
189
166
  version: '0'
190
167
  requirements: []
191
- rubyforge_project:
192
- rubygems_version: 2.5.1
193
- signing_key:
168
+ rubygems_version: 3.0.8
169
+ signing_key:
194
170
  specification_version: 4
195
171
  summary: Compatibility helpers for the SchemaPlus family of gems
196
172
  test_files:
data/.travis.yml DELETED
@@ -1,24 +0,0 @@
1
- # This file was auto-generated by the schema_dev tool, based on the data in
2
- # ./schema_dev.yml
3
- # Please do not edit this file; any changes will be overwritten next time
4
- # schema_dev gets run.
5
- ---
6
- sudo: false
7
- rvm:
8
- - 2.3.1
9
- gemfile:
10
- - gemfiles/activerecord-4.2/Gemfile.mysql2
11
- - gemfiles/activerecord-4.2/Gemfile.postgresql
12
- - gemfiles/activerecord-4.2/Gemfile.sqlite3
13
- - gemfiles/activerecord-5.0/Gemfile.mysql2
14
- - gemfiles/activerecord-5.0/Gemfile.postgresql
15
- - gemfiles/activerecord-5.0/Gemfile.sqlite3
16
- - gemfiles/activerecord-5.1/Gemfile.mysql2
17
- - gemfiles/activerecord-5.1/Gemfile.postgresql
18
- - gemfiles/activerecord-5.1/Gemfile.sqlite3
19
- env: POSTGRESQL_DB_USER=postgres MYSQL_DB_USER=travis
20
- addons:
21
- postgresql: '9.4'
22
- before_script: bundle exec rake create_databases
23
- after_script: bundle exec rake drop_databases
24
- script: bundle exec rake travis
@@ -1,3 +0,0 @@
1
- eval File.read File.expand_path('../../Gemfile.base', __FILE__)
2
-
3
- gem "activerecord", "~> 4.2.6"
@@ -1,10 +0,0 @@
1
- require "pathname"
2
- eval(Pathname.new(__FILE__).dirname.join("Gemfile.base").read, binding)
3
-
4
- platform :ruby do
5
- gem "mysql2", '>= 0.3.18', '< 0.5'
6
- end
7
-
8
- platform :jruby do
9
- gem 'activerecord-jdbcmysql-adapter'
10
- end
@@ -1,10 +0,0 @@
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,3 +0,0 @@
1
- eval File.read File.expand_path('../../Gemfile.base', __FILE__)
2
-
3
- gem "activerecord", "~> 5.0.1"
@@ -1,10 +0,0 @@
1
- require "pathname"
2
- eval(Pathname.new(__FILE__).dirname.join("Gemfile.base").read, binding)
3
-
4
- platform :ruby do
5
- gem "mysql2"
6
- end
7
-
8
- platform :jruby do
9
- gem 'activerecord-jdbcmysql-adapter'
10
- end
@@ -1,10 +0,0 @@
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,3 +0,0 @@
1
- eval File.read File.expand_path('../../Gemfile.base', __FILE__)
2
-
3
- gem "activerecord", "~> 5.1.0"
@@ -1,10 +0,0 @@
1
- require "pathname"
2
- eval(Pathname.new(__FILE__).dirname.join("Gemfile.base").read, binding)
3
-
4
- platform :ruby do
5
- gem "mysql2"
6
- end
7
-
8
- platform :jruby do
9
- gem 'activerecord-jdbcmysql-adapter'
10
- end
@@ -1,10 +0,0 @@
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