diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed0a8dc4..7a208ce3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,7 @@ jobs: - rails70 - rails71 - rails72 + - rails_main db: [POSTGRES, MYSQL, SQLITE] exclude: # MySQL has issues on Ruby 2.3 @@ -98,6 +99,22 @@ jobs: - appraisal: rails72 ruby: "3.0" + # Rails main supports Ruby 3.2+ + - appraisal: rails_main + ruby: "2.3" + - appraisal: rails_main + ruby: "2.4" + - appraisal: rails_main + ruby: "2.5" + - appraisal: rails_main + ruby: "2.6" + - appraisal: rails_main + ruby: "2.7" + - appraisal: rails_main + ruby: "3.0" + - appraisal: rails_main + ruby: "3.1" + services: postgres: image: postgres diff --git a/Appraisals b/Appraisals index 6df14d46..17d2d81e 100644 --- a/Appraisals +++ b/Appraisals @@ -44,3 +44,10 @@ appraise "rails72" do gem "pg", "~> 1.1" gem "sqlite3", ">= 1.4" end + +appraise "rails_main" do + gem "rails", github: "rails/rails", branch: "main" + gem "mysql2", "~> 0.5" + gem "pg", "~> 1.1" + gem "sqlite3", ">= 2.0" +end diff --git a/audited.gemspec b/audited.gemspec index bc1b17ff..8257f8b2 100644 --- a/audited.gemspec +++ b/audited.gemspec @@ -16,11 +16,11 @@ Gem::Specification.new do |gem| gem.required_ruby_version = ">= 2.3.0" - gem.add_dependency "activerecord", ">= 5.2", "< 8.0" - gem.add_dependency "activesupport", ">= 5.2", "< 8.0" + gem.add_dependency "activerecord", ">= 5.2", "< 8.1" + gem.add_dependency "activesupport", ">= 5.2", "< 8.1" gem.add_development_dependency "appraisal" - gem.add_development_dependency "rails", ">= 5.2", "< 8.0" + gem.add_development_dependency "rails", ">= 5.2", "< 8.1" gem.add_development_dependency "rspec-rails" gem.add_development_dependency "standard" gem.add_development_dependency "single_cov" diff --git a/gemfiles/rails_main.gemfile b/gemfiles/rails_main.gemfile new file mode 100644 index 00000000..c0bd890a --- /dev/null +++ b/gemfiles/rails_main.gemfile @@ -0,0 +1,10 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "rails", github: "rails/rails", branch: "main" +gem "mysql2", "~> 0.5" +gem "pg", "~> 1.1" +gem "sqlite3", ">= 2.0" + +gemspec name: "audited", path: "../" diff --git a/spec/rails_app/config/application.rb b/spec/rails_app/config/application.rb index 6de73c8e..a485f848 100644 --- a/spec/rails_app/config/application.rb +++ b/spec/rails_app/config/application.rb @@ -33,6 +33,10 @@ class Application < Rails::Application if Rails.gem_version >= Gem::Version.new("7.1") config.active_support.cache_format_version = 7.1 end + + if Rails.gem_version >= Gem::Version.new("8.0.0.alpha") + config.active_support.to_time_preserves_timezone = :zone + end end end