Skip to content

Commit

Permalink
Simplify autoload stack.
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Dec 13, 2009
1 parent 9095d52 commit 3432c9e
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 29 deletions.
4 changes: 4 additions & 0 deletions README.rdoc
Expand Up @@ -42,6 +42,10 @@ Configure warden and devise gems inside your app:
config.gem 'warden'
config.gem 'devise'

Run the generator:

ruby script/generate devise_install

And you're ready to go.

== Basic Usage
Expand Down
29 changes: 23 additions & 6 deletions lib/devise.rb
@@ -1,7 +1,28 @@
module Devise
autoload :Schema, 'devise/schema'
autoload :Mapping, 'devise/mapping'
autoload :FailureApp, 'devise/failure_app'
autoload :Mapping, 'devise/mapping'
autoload :Schema, 'devise/schema'
autoload :TestHelpers, 'devise/test_helpers'

module Controllers
autoload :Filters, 'devise/controllers/filters'
autoload :Helpers, 'devise/controllers/helpers'
autoload :UrlHelpers, 'devise/controllers/url_helpers'
end

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

module Orm
autoload :ActiveRecord, 'devise/orm/active_record'
autoload :DataMapper, 'devise/orm/data_mapper'
autoload :MongoMapper, 'devise/orm/mongo_mapper'
end

ALL = [:authenticatable, :confirmable, :recoverable, :rememberable,
:timeoutable, :trackable, :validatable]
Expand Down Expand Up @@ -147,8 +168,4 @@ 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/orm'
require 'devise/rails'
7 changes: 0 additions & 7 deletions lib/devise/controllers.rb

This file was deleted.

9 changes: 0 additions & 9 deletions lib/devise/encryptors.rb

This file was deleted.

7 changes: 0 additions & 7 deletions lib/devise/orm.rb

This file was deleted.

0 comments on commit 3432c9e

Please sign in to comment.