diff --git a/app/models/devise_token_auth/concerns/active_record_support.rb b/app/models/devise_token_auth/concerns/active_record_support.rb index 54d2e71b2..d086b8bdc 100644 --- a/app/models/devise_token_auth/concerns/active_record_support.rb +++ b/app/models/devise_token_auth/concerns/active_record_support.rb @@ -4,7 +4,7 @@ module DeviseTokenAuth::Concerns::ActiveRecordSupport extend ActiveSupport::Concern included do - serialize :tokens, DeviseTokenAuth::TokensSerialization + serialize :tokens, DeviseTokenAuth::Concerns::TokensSerialization end class_methods do diff --git a/app/models/devise_token_auth/concerns/tokens_serialization.rb b/app/models/devise_token_auth/concerns/tokens_serialization.rb index 0f8dfd7d4..5e6cc1c6d 100644 --- a/app/models/devise_token_auth/concerns/tokens_serialization.rb +++ b/app/models/devise_token_auth/concerns/tokens_serialization.rb @@ -1,4 +1,4 @@ -module DeviseTokenAuth::TokensSerialization +module DeviseTokenAuth::Concerns::TokensSerialization # Serialization hash to json def self.dump(object) object.each_value(&:compact!) unless object.nil? diff --git a/devise_token_auth.gemspec b/devise_token_auth.gemspec index a4cad9e89..5fc494465 100644 --- a/devise_token_auth.gemspec +++ b/devise_token_auth.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |s| s.required_ruby_version = ">= 2.2.0" s.add_dependency 'rails', '>= 4.2.0', '< 6.1' - s.add_dependency 'devise', '> 3.5.2', '< 4.7' + s.add_dependency 'devise', '> 3.5.2', '< 5' s.add_dependency 'bcrypt', '~> 3.0' s.add_development_dependency 'appraisal' diff --git a/test/models/concerns/tokens_serialization_test.rb b/test/models/concerns/tokens_serialization_test.rb index e99a6690a..388ec4c86 100644 --- a/test/models/concerns/tokens_serialization_test.rb +++ b/test/models/concerns/tokens_serialization_test.rb @@ -1,8 +1,8 @@ require 'test_helper' if DEVISE_TOKEN_AUTH_ORM == :active_record - describe 'DeviseTokenAuth::TokensSerialization' do - let(:ts) { DeviseTokenAuth::TokensSerialization } + describe 'DeviseTokenAuth::Concerns::TokensSerialization' do + let(:ts) { DeviseTokenAuth::Concerns::TokensSerialization } let(:user) { FactoryBot.create(:user) } let(:tokens) do # Сreate all possible token's attributes combinations