From 49c41a87dcb994318d70e78999053b13d80508b2 Mon Sep 17 00:00:00 2001 From: Kopylov German Date: Tue, 20 Oct 2015 20:51:22 +0300 Subject: [PATCH] Move require rotp library to the file where it is used --- lib/two_factor_authentication.rb | 1 - .../models/two_factor_authenticatable.rb | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/two_factor_authentication.rb b/lib/two_factor_authentication.rb index 1f7b342..524a58f 100644 --- a/lib/two_factor_authentication.rb +++ b/lib/two_factor_authentication.rb @@ -5,7 +5,6 @@ require "active_model" require "active_record" require "active_support/core_ext/class/attribute_accessors" require "cgi" -require "rotp" module Devise mattr_accessor :max_login_attempts diff --git a/lib/two_factor_authentication/models/two_factor_authenticatable.rb b/lib/two_factor_authentication/models/two_factor_authenticatable.rb index dcfc1ae..9999554 100644 --- a/lib/two_factor_authentication/models/two_factor_authenticatable.rb +++ b/lib/two_factor_authentication/models/two_factor_authenticatable.rb @@ -1,4 +1,6 @@ require 'two_factor_authentication/hooks/two_factor_authenticatable' +require 'rotp' + module Devise module Models module TwoFactorAuthenticatable