Skip to content
This repository has been archived by the owner on Jun 13, 2022. It is now read-only.

Commit

Permalink
Add AR 7 support
Browse files Browse the repository at this point in the history
  • Loading branch information
urkle committed May 19, 2022
1 parent 39eee71 commit f4771ae
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 4 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/prs.yml
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
12 changes: 12 additions & 0 deletions README.md
Expand Up @@ -2,6 +2,13 @@
[![Build Status](https://github.com/SchemaPlus/schema_plus_compatibility/actions/workflows/prs.yml/badge.svg)](https://github.com/SchemaPlus/schema_plus_compatibility/actions)
[![Coverage Status](https://coveralls.io/repos/github/SchemaPlus/schema_plus_compatibility/badge.svg)](https://coveralls.io/github/SchemaPlus/schema_plus_compatibility)

# Deprecation notice

This gem is officially deprecated and will no longer be maintained.

Newer Active record versions correclty ignore views from the connection.tables list so this gem is no longer needed.
Also as we are only supporting AR 5.2+ there is no need for the "latest\_version" method either.

# SchemaPlus::Compatibility

SchemaPlus::Compatibility provides compatibility support for developing and testing using different versions of ActiveRecord.
Expand Down Expand Up @@ -51,8 +58,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**

<!-- SCHEMA_DEV: MATRIX - end -->

Expand Down
4 changes: 4 additions & 0 deletions 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"
10 changes: 10 additions & 0 deletions 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
10 changes: 10 additions & 0 deletions 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
10 changes: 10 additions & 0 deletions 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
2 changes: 2 additions & 0 deletions schema_dev.yml
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions schema_plus_compatibility.gemspec
Expand Up @@ -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 "schema_monkey", "~> 3.0"
gem.add_dependency "activerecord", ">= 5.2", "< 7.1"
gem.add_dependency "schema_monkey", "~> 3.0.2"

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.0"
end
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true

require 'simplecov'
SimpleCov.start
SimpleCov.start unless SimpleCov.running

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
Expand Down

0 comments on commit f4771ae

Please sign in to comment.