From 4775606abc8a9a1166e27e51a8b756ec6cdff053 Mon Sep 17 00:00:00 2001 From: Noel Rappin Date: Tue, 22 Aug 2023 09:28:51 -0500 Subject: [PATCH] Put back the Rails 5 tests --- .github/workflows/tests.yml | 2 ++ Appraisals | 9 +++++++++ lib/active_record/connection_adapters/abstract_mysql.rb | 3 +++ sql_enum.gemspec | 4 ++-- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2644d1f..f5a6679 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,6 +15,8 @@ jobs: - '3.1' - '3.2' rails: + - '5.1' + - '5.2' - '6.0' - '6.1' diff --git a/Appraisals b/Appraisals index ad66f60..045e3e1 100644 --- a/Appraisals +++ b/Appraisals @@ -1,3 +1,11 @@ +appraise "rails-5.1" do + gem "rails", "~> 5.1.0" +end + +appraise "rails-5.2" do + gem "rails", "~> 5.2.0" +end + appraise "rails-6.0" do gem "rails", "~> 6.0.0" end @@ -6,6 +14,7 @@ appraise "rails-6.1" do gem "rails", "~> 6.1.0" end +# Rails 7.0 doesn't work yet # appraise "rails-7.0" do # gem "rails", "~> 7.0" # end \ No newline at end of file diff --git a/lib/active_record/connection_adapters/abstract_mysql.rb b/lib/active_record/connection_adapters/abstract_mysql.rb index e92d6c3..7f8770d 100644 --- a/lib/active_record/connection_adapters/abstract_mysql.rb +++ b/lib/active_record/connection_adapters/abstract_mysql.rb @@ -1,3 +1,6 @@ +# This module fails in Rails 7.0 becuase the method being modified has been +# changed to a class method. + module ActiveRecord module ConnectionAdapters class AbstractMysqlAdapter diff --git a/sql_enum.gemspec b/sql_enum.gemspec index 7095bf0..633f0a8 100644 --- a/sql_enum.gemspec +++ b/sql_enum.gemspec @@ -25,8 +25,8 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.add_dependency "activesupport", ">= 5.1" - spec.add_dependency "activerecord", ">= 5.1" + spec.add_dependency "activesupport", ">= 5.1", "< 7.0" + spec.add_dependency "activerecord", ">= 5.1", "< 7.0" spec.add_dependency "mysql2" spec.add_development_dependency "appraisal"