From 62a33bdfd99c7a980c20b1a3a189c13940e3da81 Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Wed, 11 May 2022 15:15:49 -0400 Subject: [PATCH] Add AR 7 support --- .github/workflows/prs.yml | 26 ++++++++++++++++++++ README.md | 5 ++++ gemfiles/activerecord-7.0/Gemfile.base | 4 +++ gemfiles/activerecord-7.0/Gemfile.mysql2 | 10 ++++++++ gemfiles/activerecord-7.0/Gemfile.postgresql | 10 ++++++++ gemfiles/activerecord-7.0/Gemfile.sqlite3 | 10 ++++++++ schema_dev.yml | 2 ++ schema_plus_compatibility.gemspec | 4 +-- 8 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 gemfiles/activerecord-7.0/Gemfile.base create mode 100644 gemfiles/activerecord-7.0/Gemfile.mysql2 create mode 100644 gemfiles/activerecord-7.0/Gemfile.postgresql create mode 100644 gemfiles/activerecord-7.0/Gemfile.sqlite3 diff --git a/.github/workflows/prs.yml b/.github/workflows/prs.yml index 7667ce4..aafbf0b 100644 --- a/.github/workflows/prs.yml +++ b/.github/workflows/prs.yml @@ -22,10 +22,12 @@ jobs: - '2.5' - '2.7' - '3.0' + - '3.1' activerecord: - '5.2' - '6.0' - '6.1' + - '7.0' db: - mysql2 - sqlite3 @@ -35,6 +37,10 @@ jobs: exclude: - ruby: '3.0' activerecord: '5.2' + - ruby: '3.1' + activerecord: '5.2' + - ruby: '2.5' + activerecord: '7.0' - db: skip dbversion: skip include: @@ -62,6 +68,10 @@ jobs: activerecord: '6.1' db: postgresql dbversion: '9.6' + - ruby: '2.7' + activerecord: '7.0' + db: postgresql + dbversion: '9.6' - ruby: '3.0' activerecord: '6.0' db: postgresql @@ -70,6 +80,22 @@ jobs: activerecord: '6.1' db: postgresql dbversion: '9.6' + - ruby: '3.0' + activerecord: '7.0' + db: postgresql + dbversion: '9.6' + - ruby: '3.1' + activerecord: '6.0' + db: postgresql + dbversion: '9.6' + - ruby: '3.1' + activerecord: '6.1' + db: postgresql + dbversion: '9.6' + - ruby: '3.1' + activerecord: '7.0' + db: postgresql + dbversion: '9.6' env: BUNDLE_GEMFILE: "${{ github.workspace }}/gemfiles/activerecord-${{ matrix.activerecord }}/Gemfile.${{ matrix.db }}" MYSQL_DB_HOST: 127.0.0.1 diff --git a/README.md b/README.md index 2d1c0d5..387cb3d 100644 --- a/README.md +++ b/README.md @@ -51,8 +51,13 @@ SchemaPlus::Compatibility is tested on: * ruby **2.7** with activerecord **5.2**, using **mysql2**, **sqlite3** or **postgresql:9.6** * ruby **2.7** with activerecord **6.0**, using **mysql2**, **sqlite3** or **postgresql:9.6** * ruby **2.7** with activerecord **6.1**, using **mysql2**, **sqlite3** or **postgresql:9.6** +* ruby **2.7** with activerecord **7.0**, using **mysql2**, **sqlite3** or **postgresql:9.6** * ruby **3.0** with activerecord **6.0**, using **mysql2**, **sqlite3** or **postgresql:9.6** * ruby **3.0** with activerecord **6.1**, using **mysql2**, **sqlite3** or **postgresql:9.6** +* ruby **3.0** with activerecord **7.0**, using **mysql2**, **sqlite3** or **postgresql:9.6** +* ruby **3.1** with activerecord **6.0**, using **mysql2**, **sqlite3** or **postgresql:9.6** +* ruby **3.1** with activerecord **6.1**, using **mysql2**, **sqlite3** or **postgresql:9.6** +* ruby **3.1** with activerecord **7.0**, using **mysql2**, **sqlite3** or **postgresql:9.6** diff --git a/gemfiles/activerecord-7.0/Gemfile.base b/gemfiles/activerecord-7.0/Gemfile.base new file mode 100644 index 0000000..b7f5994 --- /dev/null +++ b/gemfiles/activerecord-7.0/Gemfile.base @@ -0,0 +1,4 @@ +base_gemfile = File.expand_path('../../Gemfile.base', __FILE__) +eval File.read(base_gemfile) + +gem "activerecord", ">= 7.0", "< 7.1" diff --git a/gemfiles/activerecord-7.0/Gemfile.mysql2 b/gemfiles/activerecord-7.0/Gemfile.mysql2 new file mode 100644 index 0000000..832c90b --- /dev/null +++ b/gemfiles/activerecord-7.0/Gemfile.mysql2 @@ -0,0 +1,10 @@ +base_gemfile = File.expand_path('../Gemfile.base', __FILE__) +eval File.read(base_gemfile), binding, base_gemfile + +platform :ruby do + gem "mysql2" +end + +platform :jruby do + gem 'activerecord-jdbcmysql-adapter' +end diff --git a/gemfiles/activerecord-7.0/Gemfile.postgresql b/gemfiles/activerecord-7.0/Gemfile.postgresql new file mode 100644 index 0000000..1716cd8 --- /dev/null +++ b/gemfiles/activerecord-7.0/Gemfile.postgresql @@ -0,0 +1,10 @@ +base_gemfile = File.expand_path('../Gemfile.base', __FILE__) +eval File.read(base_gemfile), binding, base_gemfile + +platform :ruby do + gem "pg" +end + +platform :jruby do + gem 'activerecord-jdbcpostgresql-adapter' +end diff --git a/gemfiles/activerecord-7.0/Gemfile.sqlite3 b/gemfiles/activerecord-7.0/Gemfile.sqlite3 new file mode 100644 index 0000000..3d85216 --- /dev/null +++ b/gemfiles/activerecord-7.0/Gemfile.sqlite3 @@ -0,0 +1,10 @@ +base_gemfile = File.expand_path('../Gemfile.base', __FILE__) +eval File.read(base_gemfile), binding, base_gemfile + +platform :ruby do + gem "sqlite3" +end + +platform :jruby do + gem 'activerecord-jdbcsqlite3-adapter', '>=1.3.0.beta2' +end diff --git a/schema_dev.yml b/schema_dev.yml index 18b0948..75c842b 100644 --- a/schema_dev.yml +++ b/schema_dev.yml @@ -2,10 +2,12 @@ ruby: - 2.5 - 2.7 - 3.0 + - 3.1 activerecord: - 5.2 - 6.0 - 6.1 + - 7.0 db: - mysql2 - sqlite3 diff --git a/schema_plus_compatibility.gemspec b/schema_plus_compatibility.gemspec index 405407a..7ac1ef2 100644 --- a/schema_plus_compatibility.gemspec +++ b/schema_plus_compatibility.gemspec @@ -21,11 +21,11 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 2.5.0" - gem.add_dependency "activerecord", ">= 5.2", "< 7.0" + gem.add_dependency "activerecord", ">= 5.2", "< 7.1" gem.add_dependency "schema_monkey", "~> 3.0" gem.add_development_dependency "bundler" gem.add_development_dependency "rake", "~> 13.0" gem.add_development_dependency "rspec", "~> 3.0" - gem.add_development_dependency "schema_dev", "~> 4.1" + gem.add_development_dependency "schema_dev", "~> 4.2.beta.1" end