Skip to content

Commit

Permalink
Merge pull request #767 from lsylvester/rails-71
Browse files Browse the repository at this point in the history
Rails 7.1
  • Loading branch information
tiegz authored Dec 16, 2023
2 parents a485585 + e784aa1 commit 97c9aba
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
# have set this up with each database as a separate job, but then we'd be
# duplicating the matrix configuration three times.
matrix:
gemfile: [ 'rails_5.2', 'rails_6.0', 'rails_6.1', 'rails_7.0' ]
gemfile: [ 'rails_5.2', 'rails_6.0', 'rails_6.1', 'rails_7.0', 'rails_7.1' ]

# To keep matrix size down, only test highest and lowest rubies. In
# `.rubocopy.yml`, set `TargetRubyVersion`, to the lowest ruby version
Expand All @@ -67,6 +67,8 @@ jobs:
# rails 7 requires ruby >= 2.7.0
- ruby: '2.6'
gemfile: 'rails_7.0'
- ruby: '2.6'
gemfile: 'rails_7.1'
steps:
- name: Checkout source
uses: actions/checkout@v2
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ BUNDLE_GEMFILE=gemfiles/rails_6.1.rb bundle exec rake
# Rails 7.0
BUNDLE_GEMFILE=gemfiles/rails_7.0.rb bundle install
BUNDLE_GEMFILE=gemfiles/rails_7.0.rb bundle exec rake
# Rails 7.1
BUNDLE_GEMFILE=gemfiles/rails_7.1.rb bundle install
BUNDLE_GEMFILE=gemfiles/rails_7.1.rb bundle exec rake
```

To run a single test:
Expand Down
7 changes: 4 additions & 3 deletions authlogic.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ require "authlogic/version"
s.required_ruby_version = ">= 2.6.0"

# See doc/rails_support_in_authlogic_5.0.md
s.add_dependency "activemodel", [">= 5.2", "< 7.1"]
s.add_dependency "activerecord", [">= 5.2", "< 7.1"]
s.add_dependency "activesupport", [">= 5.2", "< 7.1"]
s.add_dependency "activemodel", [">= 5.2", "< 7.2"]
s.add_dependency "activerecord", [">= 5.2", "< 7.2"]
s.add_dependency "activesupport", [">= 5.2", "< 7.2"]
s.add_dependency "request_store", "~> 1.0"
s.add_development_dependency "bcrypt", "~> 3.1"
s.add_development_dependency "byebug", "~> 10.0"
s.add_development_dependency "coveralls", "~> 0.8.22"
s.add_development_dependency "minitest", "< 5.19.0" # See https://github.com/binarylogic/authlogic/issues/766
s.add_development_dependency "minitest-reporters", "~> 1.3"
s.add_development_dependency "mysql2", "~> 0.5.2"
s.add_development_dependency "pg", "~> 1.1.4"
Expand Down
9 changes: 9 additions & 0 deletions gemfiles/rails_7.1.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true

git_source(:github) { |repo| "https://github.com/#{repo}.git" }

source "https://rubygems.org"
gemspec path: ".."

gem "activerecord", "~> 7.1.0"
gem "activesupport", "~> 7.1.0"
6 changes: 5 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@
ActiveSupport.test_order = :sorted
end

ActiveRecord::Base.default_timezone = :local
if ActiveRecord::VERSION::STRING < "7.1"
ActiveRecord::Base.default_timezone = :local
else
ActiveRecord.default_timezone = :local
end
ActiveRecord::Schema.define(version: 1) do
create_table :companies do |t|
t.datetime :created_at, limit: 6
Expand Down

0 comments on commit 97c9aba

Please sign in to comment.