Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax gemspec to allow Rails 8.0; add Rails main branch to CI #729

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- rails70
- rails71
- rails72
- rails_main
db: [POSTGRES, MYSQL, SQLITE]
exclude:
# MySQL has issues on Ruby 2.3
Expand Down Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions audited.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 10 additions & 0 deletions gemfiles/rails_main.gemfile
Original file line number Diff line number Diff line change
@@ -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: "../"
4 changes: 4 additions & 0 deletions spec/rails_app/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down