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.

Files changed (77) hide show
  1. data/CHANGELOG.rdoc +22 -2
  2. data/Gemfile +7 -13
  3. data/Gemfile.lock +118 -0
  4. data/README.rdoc +15 -13
  5. data/app/controllers/devise/unlocks_controller.rb +0 -7
  6. data/app/mailers/devise/mailer.rb +7 -4
  7. data/app/views/devise/confirmations/new.html.erb +1 -1
  8. data/app/views/devise/passwords/new.html.erb +1 -1
  9. data/app/views/devise/unlocks/new.html.erb +1 -1
  10. data/lib/devise.rb +27 -9
  11. data/lib/devise/controllers/helpers.rb +19 -5
  12. data/lib/devise/controllers/internal_helpers.rb +2 -8
  13. data/lib/devise/encryptors/base.rb +1 -1
  14. data/lib/devise/encryptors/bcrypt.rb +2 -2
  15. data/lib/devise/failure_app.rb +6 -2
  16. data/lib/devise/hooks/rememberable.rb +9 -1
  17. data/lib/devise/mapping.rb +15 -50
  18. data/lib/devise/models/authenticatable.rb +8 -0
  19. data/lib/devise/models/confirmable.rb +10 -6
  20. data/lib/devise/models/database_authenticatable.rb +9 -1
  21. data/lib/devise/models/recoverable.rb +6 -1
  22. data/lib/devise/models/rememberable.rb +36 -7
  23. data/lib/devise/models/token_authenticatable.rb +5 -5
  24. data/lib/devise/models/validatable.rb +1 -1
  25. data/lib/devise/path_checker.rb +7 -2
  26. data/lib/devise/rails.rb +6 -1
  27. data/lib/devise/rails/routes.rb +137 -50
  28. data/lib/devise/rails/warden_compat.rb +16 -2
  29. data/lib/devise/strategies/authenticatable.rb +12 -0
  30. data/lib/devise/strategies/base.rb +0 -18
  31. data/lib/devise/strategies/rememberable.rb +9 -1
  32. data/lib/devise/test_helpers.rb +2 -0
  33. data/lib/devise/version.rb +1 -1
  34. data/lib/generators/active_record/devise_generator.rb +28 -0
  35. data/lib/generators/{devise/devise → active_record}/templates/migration.rb +4 -0
  36. data/lib/generators/devise/devise_generator.rb +17 -0
  37. data/lib/generators/devise/{install/install_generator.rb → install_generator.rb} +1 -1
  38. data/lib/generators/devise/orm_helpers.rb +23 -0
  39. data/lib/generators/devise/{install/templates → templates}/README +0 -0
  40. data/lib/generators/devise/{install/templates → templates}/devise.rb +20 -13
  41. data/lib/generators/devise/{views/views_generator.rb → views_generator.rb} +2 -2
  42. data/lib/generators/mongoid/devise_generator.rb +17 -0
  43. data/test/controllers/helpers_test.rb +9 -0
  44. data/test/controllers/internal_helpers_test.rb +7 -16
  45. data/test/controllers/url_helpers_test.rb +11 -0
  46. data/test/encryptors_test.rb +1 -1
  47. data/test/failure_app_test.rb +18 -5
  48. data/test/integration/authenticatable_test.rb +76 -11
  49. data/test/integration/confirmable_test.rb +16 -9
  50. data/test/integration/lockable_test.rb +11 -13
  51. data/test/integration/registerable_test.rb +4 -4
  52. data/test/integration/rememberable_test.rb +54 -1
  53. data/test/mapping_test.rb +10 -45
  54. data/test/models/confirmable_test.rb +1 -1
  55. data/test/models/rememberable_test.rb +108 -0
  56. data/test/models/validatable_test.rb +2 -4
  57. data/test/models_test.rb +4 -4
  58. data/test/rails_app/app/active_record/admin.rb +1 -1
  59. data/test/rails_app/app/controllers/publisher/registrations_controller.rb +2 -0
  60. data/test/rails_app/app/controllers/publisher/sessions_controller.rb +2 -0
  61. data/test/rails_app/app/controllers/users_controller.rb +5 -1
  62. data/test/rails_app/app/mongoid/admin.rb +1 -1
  63. data/test/rails_app/config/application.rb +2 -2
  64. data/test/rails_app/config/environments/test.rb +2 -0
  65. data/test/rails_app/config/initializers/devise.rb +95 -34
  66. data/test/rails_app/config/routes.rb +32 -14
  67. data/test/routes_test.rb +34 -2
  68. data/test/support/integration.rb +22 -6
  69. data/test/test_helpers_test.rb +16 -2
  70. metadata +24 -27
  71. data/lib/devise/orm/data_mapper.rb +0 -97
  72. data/lib/generators/devise/devise/devise_generator.rb +0 -86
  73. data/lib/generators/devise_generator.rb +0 -2
  74. data/test/orm/data_mapper.rb +0 -10
  75. data/test/rails_app/app/data_mapper/admin.rb +0 -12
  76. data/test/rails_app/app/data_mapper/shim.rb +0 -2
  77. data/test/rails_app/app/data_mapper/user.rb +0 -23
@@ -1,2 +0,0 @@
1
- # Remove this file on next rails release
2
- require "generators/devise/devise/devise_generator"
@@ -1,10 +0,0 @@
1
- require 'rails/test_help'
2
-
3
- DataMapper.auto_migrate!
4
-
5
- class ActiveSupport::TestCase
6
- setup do
7
- User.all.destroy!
8
- Admin.all.destroy!
9
- end
10
- end
@@ -1,12 +0,0 @@
1
- class Admin
2
- include DataMapper::Resource
3
-
4
- property :id, Serial
5
- property :username, String
6
-
7
- devise :database_authenticatable, :registerable, :timeoutable, :recoverable
8
-
9
- def self.create!(*args)
10
- create(*args)
11
- end
12
- end
@@ -1,2 +0,0 @@
1
- module Shim
2
- end
@@ -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