Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use autoload to pre-load components (so they still work when rubygems…

… are disabled)
  • Loading branch information...
commit c711a9d1b54c3274b9222c851881394bfcc3e5d3 1 parent 153cc75
Dimitrij Denissenko authored josevalim committed
6 lib/devise.rb
View
@@ -1,4 +1,8 @@
module Devise
+ autoload :Schema, 'devise/schema'
+ autoload :Mapping, 'devise/mapping'
+ autoload :FailureApp, 'devise/failure_app'
+
ALL = [:authenticatable, :confirmable, :recoverable, :rememberable,
:timeoutable, :trackable, :validatable].freeze
@@ -144,6 +148,8 @@ def friendly_token
# Set the default_scope to nil, so it's overwritten when the first route is declared.
Warden::Manager.default_scope = nil
+require 'devise/controllers'
+require 'devise/encryptors'
require 'devise/strategies/base'
require 'devise/serializers/base'
require 'devise/rails'
7 lib/devise/controllers.rb
View
@@ -0,0 +1,7 @@
+module Devise
+ module Controllers
+ autoload :Filters, 'devise/controllers/filters'
+ autoload :Helpers, 'devise/controllers/helpers'
+ autoload :UrlHelpers, 'devise/controllers/url_helpers'
+ end
+end
9 lib/devise/encryptors.rb
View
@@ -0,0 +1,9 @@
+module Devise
+ module Encryptors
+ autoload :AuthlogicSha512, 'devise/encryptors/authlogic_sha512'
+ autoload :AuthlogicSha1, 'devise/encryptors/authlogic_sha1'
+ autoload :RestfulAuthenticationSha1, 'devise/encryptors/restful_authentication_sha1'
+ autoload :Sha512, 'devise/encryptors/sha512'
+ autoload :Sha1, 'devise/encryptors/sha1'
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.