diff --git a/devise-two-factor.gemspec b/devise-two-factor.gemspec index bb556b3..1a027e5 100644 --- a/devise-two-factor.gemspec +++ b/devise-two-factor.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency 'railties', '< 7.1' s.add_runtime_dependency 'activesupport', '< 7.1' - s.add_runtime_dependency 'attr_encrypted', '>= 1.3', '< 4', '!= 2' + s.add_runtime_dependency 'attr_encrypted', '>= 1.3', '< 5', '!= 2' s.add_runtime_dependency 'devise', '~> 4.0' s.add_runtime_dependency 'rotp', '~> 6.0' diff --git a/spec/devise/models/two_factor_authenticatable_spec.rb b/spec/devise/models/two_factor_authenticatable_spec.rb index 3458c61..26b88bb 100644 --- a/spec/devise/models/two_factor_authenticatable_spec.rb +++ b/spec/devise/models/two_factor_authenticatable_spec.rb @@ -64,15 +64,15 @@ def save(validate) describe 'otp_secret options' do it 'should be of the key' do - expect(subject.encrypted_attributes[:otp_secret][:key]).to eq('test-key'*8) + expect(subject.attr_encrypted_encrypted_attributes[:otp_secret][:key]).to eq('test-key'*8) end it 'should be of the mode' do - expect(subject.encrypted_attributes[:otp_secret][:mode]).to eq(:per_attribute_iv_and_salt) + expect(subject.attr_encrypted_encrypted_attributes[:otp_secret][:mode]).to eq(:per_attribute_iv_and_salt) end it 'should be of the mode' do - expect(subject.encrypted_attributes[:otp_secret][:algorithm]).to eq('aes-256-cbc') + expect(subject.attr_encrypted_encrypted_attributes[:otp_secret][:algorithm]).to eq('aes-256-cbc') end end end