Skip to content

Commit 2306711

Browse files
committed
Merge branch 'master' into 6-4-stable
2 parents 3c91d10 + e522052 commit 2306711

File tree

7 files changed

+38
-17
lines changed

7 files changed

+38
-17
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
uses: actions/setup-ruby@v1
1515
with:
1616
# Set to `TargetRubyVersion` in `.rubocopy.yml`
17-
ruby-version: 2.4
17+
ruby-version: 2.6
1818
- name: Bundle
1919
run: |
2020
gem install bundler
@@ -56,19 +56,17 @@ jobs:
5656
# have set this up with each database as a separate job, but then we'd be
5757
# duplicating the matrix configuration three times.
5858
matrix:
59-
gemfile: [ 'rails_5.2', 'rails_6.0', 'rails_6.1' ]
59+
gemfile: [ 'rails_5.2', 'rails_6.0', 'rails_6.1', 'rails_7.0' ]
6060

6161
# To keep matrix size down, only test highest and lowest rubies. In
6262
# `.rubocopy.yml`, set `TargetRubyVersion`, to the lowest ruby version
6363
# tested here.
64-
ruby: [ '2.4', '2.7' ]
64+
ruby: [ '2.6', '2.7' ]
6565

6666
exclude:
67-
# rails 6 requires ruby >= 2.5.0
68-
- ruby: '2.4'
69-
gemfile: 'rails_6.0'
70-
- ruby: '2.4'
71-
gemfile: 'rails_6.1'
67+
# rails 7 requires ruby >= 2.7.0
68+
- ruby: '2.6'
69+
gemfile: 'rails_7.0'
7270
steps:
7371
- name: Checkout source
7472
uses: actions/checkout@v2

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ AllCops:
1212
# rubies on CI.
1313
#
1414
# Should be same as `ruby-version` in `.github/workflows/test.yml`
15-
TargetRubyVersion: 2.4
15+
TargetRubyVersion: 2.6
1616

1717
# Avoid empty lines in methods, they are a sign the method is too big.
1818
Layout/EmptyLineAfterGuardClause:

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1212
* Added
1313
* None
1414
* Fixed
15-
* None
15+
* [#743](https://github.com/binarylogic/authlogic/pull/743) - Fixed
16+
deprecation warning in Rails 7 re: `ActiveRecord::Base.default_timezone`
1617

1718
## 6.4.1 (2021-02-22)
1819

CONTRIBUTING.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Please use github issues only for bug reports and feature suggestions.
2121
### Usage Questions
2222

2323
Please ask usage questions on
24-
[stackoverflow](http://stackoverflow.com/questions/tagged/authlogic).
24+
[Stack Overflow](http://stackoverflow.com/questions/tagged/authlogic).
2525

2626
## Development
2727

@@ -33,8 +33,21 @@ ruby. See `required_ruby_version` in the gemspec.
3333
Tests can be run against different versions of Rails:
3434

3535
```
36+
# Rails 5.2
37+
BUNDLE_GEMFILE=gemfiles/rails_5.2.rb bundle install
38+
BUNDLE_GEMFILE=gemfiles/rails_5.2.rb bundle exec rake
39+
40+
# Rails 6.0
3641
BUNDLE_GEMFILE=gemfiles/rails_6.0.rb bundle install
3742
BUNDLE_GEMFILE=gemfiles/rails_6.0.rb bundle exec rake
43+
44+
# Rails 6.1
45+
BUNDLE_GEMFILE=gemfiles/rails_6.1.rb bundle install
46+
BUNDLE_GEMFILE=gemfiles/rails_6.1.rb bundle exec rake
47+
48+
# Rails 7.0
49+
BUNDLE_GEMFILE=gemfiles/rails_7.0.rb bundle install
50+
BUNDLE_GEMFILE=gemfiles/rails_7.0.rb bundle exec rake
3851
```
3952

4053
To run a single test:

authlogic.gemspec

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ require "authlogic/version"
1818
1919
2020
]
21-
s.homepage = "http://github.com/binarylogic/authlogic"
21+
s.homepage = "https://github.com/binarylogic/authlogic"
2222
s.summary = "An unobtrusive ruby authentication library based on ActiveRecord."
2323
s.license = "MIT"
2424

25-
s.required_ruby_version = ">= 2.4.0"
25+
s.required_ruby_version = ">= 2.6.0"
2626

2727
# See doc/rails_support_in_authlogic_5.0.md
28-
s.add_dependency "activemodel", [">= 5.2", "< 6.2"]
29-
s.add_dependency "activerecord", [">= 5.2", "< 6.2"]
30-
s.add_dependency "activesupport", [">= 5.2", "< 6.2"]
28+
s.add_dependency "activemodel", [">= 5.2", "< 7.1"]
29+
s.add_dependency "activerecord", [">= 5.2", "< 7.1"]
30+
s.add_dependency "activesupport", [">= 5.2", "< 7.1"]
3131
s.add_dependency "request_store", "~> 1.0"
3232
s.add_development_dependency "bcrypt", "~> 3.1"
3333
s.add_development_dependency "byebug", "~> 10.0"

gemfiles/rails_7.0.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# frozen_string_literal: true
2+
3+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
4+
5+
source "https://rubygems.org"
6+
gemspec path: ".."
7+
8+
gem "activerecord", "~> 7.0.0.alpha", github: "rails/rails", branch: "main"
9+
gem "activesupport", "~> 7.0.0.alpha", github: "rails/rails", branch: "main"

lib/authlogic/session/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2031,7 +2031,7 @@ def search_scope
20312031

20322032
# @api private
20332033
def set_last_request_at
2034-
current_time = klass.default_timezone == :utc ? Time.now.utc : Time.now
2034+
current_time = Time.current
20352035
MagicColumn::AssignsLastRequestAt
20362036
.new(current_time, record, controller, last_request_at_threshold)
20372037
.assign

0 commit comments

Comments
 (0)