Skip to content

Commit

Permalink
Fix devise version (#1333)
Browse files Browse the repository at this point in the history
* Fix devise version

* Fix tokens serialization load
  • Loading branch information
laerciosb authored and MaicolBen committed Aug 23, 2019
1 parent 2c3a8d8 commit d934274
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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?
Expand Down
2 changes: 1 addition & 1 deletion devise_token_auth.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions test/models/concerns/tokens_serialization_test.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit d934274

Please sign in to comment.