Skip to content

Commit

Permalink
Support for writing style deprecated in 7.1 and removed in 7.2 (#1606)
Browse files Browse the repository at this point in the history
* Support for writing style deprecated in 7.1 and removed in 7.2

* test: 💍 MiniTest->Minitest

* 7.1 -> 7.2
  • Loading branch information
hatsu38 authored Nov 2, 2023
1 parent eeed642 commit d9a91bc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ module DeviseTokenAuth::Concerns::ActiveRecordSupport
extend ActiveSupport::Concern

included do
serialize :tokens, DeviseTokenAuth::Concerns::TokensSerialization
if Rails::VERSION::MAJOR >= 7 && Rails::VERSION::MINOR >= 1
serialize :tokens, coder: DeviseTokenAuth::Concerns::TokensSerialization
else
serialize :tokens, DeviseTokenAuth::Concerns::TokensSerialization
end
end

class_methods do
Expand Down
2 changes: 1 addition & 1 deletion devise_token_auth.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Gem::Specification.new do |s|

s.required_ruby_version = ">= 2.3.0"

s.add_dependency 'rails', '>= 4.2.0', '< 7.1'
s.add_dependency 'rails', '>= 4.2.0', '< 7.2'
s.add_dependency 'devise', '> 3.5.2', '< 5'
s.add_dependency 'bcrypt', '~> 3.0'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def @controller.reset_session
describe 'With paranoid mode' do
before do
mock_hash = '$2a$04$MUWADkfA6MHXDdWHoep6QOvX1o0Y56pNqt3NMWQ9zCRwKSp1HZJba'
@bcrypt_mock = MiniTest::Mock.new
@bcrypt_mock = Minitest::Mock.new
@bcrypt_mock.expect(:call, mock_hash, [Object, String])

swap Devise, paranoid: true do
Expand Down

0 comments on commit d9a91bc

Please sign in to comment.