lib/devise.rb in devise-0.6.0 vs lib/devise.rb in devise-0.6.1
- old
+ new
@@ -1,7 +1,7 @@
module Devise
- ALL = [:authenticatable, :confirmable, :recoverable, :rememberable, :validatable].freeze
+ ALL = [:authenticatable, :confirmable, :recoverable, :rememberable, :timeoutable, :validatable].freeze
# Maps controller names to devise modules
CONTROLLERS = {
:sessions => :authenticatable,
:passwords => :recoverable,
@@ -12,11 +12,11 @@
SERIALIZERS = [:authenticatable, :rememberable].freeze
TRUE_VALUES = [true, 1, '1', 't', 'T', 'true', 'TRUE'].freeze
# Maps the messages types that are used in flash message. This array is not
# frozen, so you can add messages from your own strategies.
- FLASH_MESSAGES = [ :unauthenticated, :unconfirmed, :invalid ]
+ FLASH_MESSAGES = [ :unauthenticated, :unconfirmed, :invalid, :timeout ]
# Declare encryptors length which are used in migrations.
ENCRYPTORS_LENGTH = {
:sha1 => 40,
:sha512 => 128,
@@ -43,10 +43,14 @@
# Time interval you can access your account before confirming your account.
mattr_accessor :confirm_within
@@confirm_within = 0.days
+ # Time interval to timeout the user session without activity.
+ mattr_accessor :timeout
+ @@timeout = 30.minutes
+
# Used to define the password encryption algorithm.
mattr_accessor :encryptor
@@encryptor = :sha1
# Store scopes mappings.
@@ -139,7 +143,6 @@
# Set the default_scope to nil, so it's overwritten when the first route is declared.
Warden::Manager.default_scope = nil
require 'devise/strategies/base'
require 'devise/serializers/base'
-
require 'devise/rails'