devise 1.1.rc2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of devise might be problematic. Click here for more details.
- data/CHANGELOG.rdoc +22 -2
- data/Gemfile +7 -13
- data/Gemfile.lock +118 -0
- data/README.rdoc +15 -13
- data/app/controllers/devise/unlocks_controller.rb +0 -7
- data/app/mailers/devise/mailer.rb +7 -4
- data/app/views/devise/confirmations/new.html.erb +1 -1
- data/app/views/devise/passwords/new.html.erb +1 -1
- data/app/views/devise/unlocks/new.html.erb +1 -1
- data/lib/devise.rb +27 -9
- data/lib/devise/controllers/helpers.rb +19 -5
- data/lib/devise/controllers/internal_helpers.rb +2 -8
- data/lib/devise/encryptors/base.rb +1 -1
- data/lib/devise/encryptors/bcrypt.rb +2 -2
- data/lib/devise/failure_app.rb +6 -2
- data/lib/devise/hooks/rememberable.rb +9 -1
- data/lib/devise/mapping.rb +15 -50
- data/lib/devise/models/authenticatable.rb +8 -0
- data/lib/devise/models/confirmable.rb +10 -6
- data/lib/devise/models/database_authenticatable.rb +9 -1
- data/lib/devise/models/recoverable.rb +6 -1
- data/lib/devise/models/rememberable.rb +36 -7
- data/lib/devise/models/token_authenticatable.rb +5 -5
- data/lib/devise/models/validatable.rb +1 -1
- data/lib/devise/path_checker.rb +7 -2
- data/lib/devise/rails.rb +6 -1
- data/lib/devise/rails/routes.rb +137 -50
- data/lib/devise/rails/warden_compat.rb +16 -2
- data/lib/devise/strategies/authenticatable.rb +12 -0
- data/lib/devise/strategies/base.rb +0 -18
- data/lib/devise/strategies/rememberable.rb +9 -1
- data/lib/devise/test_helpers.rb +2 -0
- data/lib/devise/version.rb +1 -1
- data/lib/generators/active_record/devise_generator.rb +28 -0
- data/lib/generators/{devise/devise → active_record}/templates/migration.rb +4 -0
- data/lib/generators/devise/devise_generator.rb +17 -0
- data/lib/generators/devise/{install/install_generator.rb → install_generator.rb} +1 -1
- data/lib/generators/devise/orm_helpers.rb +23 -0
- data/lib/generators/devise/{install/templates → templates}/README +0 -0
- data/lib/generators/devise/{install/templates → templates}/devise.rb +20 -13
- data/lib/generators/devise/{views/views_generator.rb → views_generator.rb} +2 -2
- data/lib/generators/mongoid/devise_generator.rb +17 -0
- data/test/controllers/helpers_test.rb +9 -0
- data/test/controllers/internal_helpers_test.rb +7 -16
- data/test/controllers/url_helpers_test.rb +11 -0
- data/test/encryptors_test.rb +1 -1
- data/test/failure_app_test.rb +18 -5
- data/test/integration/authenticatable_test.rb +76 -11
- data/test/integration/confirmable_test.rb +16 -9
- data/test/integration/lockable_test.rb +11 -13
- data/test/integration/registerable_test.rb +4 -4
- data/test/integration/rememberable_test.rb +54 -1
- data/test/mapping_test.rb +10 -45
- data/test/models/confirmable_test.rb +1 -1
- data/test/models/rememberable_test.rb +108 -0
- data/test/models/validatable_test.rb +2 -4
- data/test/models_test.rb +4 -4
- data/test/rails_app/app/active_record/admin.rb +1 -1
- data/test/rails_app/app/controllers/publisher/registrations_controller.rb +2 -0
- data/test/rails_app/app/controllers/publisher/sessions_controller.rb +2 -0
- data/test/rails_app/app/controllers/users_controller.rb +5 -1
- data/test/rails_app/app/mongoid/admin.rb +1 -1
- data/test/rails_app/config/application.rb +2 -2
- data/test/rails_app/config/environments/test.rb +2 -0
- data/test/rails_app/config/initializers/devise.rb +95 -34
- data/test/rails_app/config/routes.rb +32 -14
- data/test/routes_test.rb +34 -2
- data/test/support/integration.rb +22 -6
- data/test/test_helpers_test.rb +16 -2
- metadata +24 -27
- data/lib/devise/orm/data_mapper.rb +0 -97
- data/lib/generators/devise/devise/devise_generator.rb +0 -86
- data/lib/generators/devise_generator.rb +0 -2
- data/test/orm/data_mapper.rb +0 -10
- data/test/rails_app/app/data_mapper/admin.rb +0 -12
- data/test/rails_app/app/data_mapper/shim.rb +0 -2
- data/test/rails_app/app/data_mapper/user.rb +0 -23
data/test/orm/data_mapper.rb
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
class User
|
2
|
-
include DataMapper::Resource
|
3
|
-
|
4
|
-
extend Devise::Orm::DataMapper::Schema
|
5
|
-
include Devise::Orm::DataMapper::Compatibility
|
6
|
-
|
7
|
-
property :id, Serial
|
8
|
-
property :username, String
|
9
|
-
|
10
|
-
devise :database_authenticatable, :confirmable, :lockable, :recoverable,
|
11
|
-
:registerable, :rememberable, :timeoutable, :token_authenticatable,
|
12
|
-
:trackable, :validatable
|
13
|
-
|
14
|
-
timestamps :at
|
15
|
-
|
16
|
-
def self.create!(*args)
|
17
|
-
create(*args)
|
18
|
-
end
|
19
|
-
|
20
|
-
def self.destroy_all
|
21
|
-
all.destroy
|
22
|
-
end
|
23
|
-
end
|