devise 1.1.rc0 → 1.1.rc1

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 (64) hide show
  1. data/CHANGELOG.rdoc +11 -4
  2. data/Gemfile +1 -1
  3. data/README.rdoc +27 -22
  4. data/TODO +0 -1
  5. data/app/helpers/devise_helper.rb +17 -0
  6. data/app/{models → mailers}/devise/mailer.rb +8 -1
  7. data/app/views/devise/confirmations/new.html.erb +2 -2
  8. data/app/views/devise/passwords/edit.html.erb +2 -2
  9. data/app/views/devise/passwords/new.html.erb +2 -2
  10. data/app/views/devise/registrations/edit.html.erb +2 -2
  11. data/app/views/devise/registrations/new.html.erb +3 -2
  12. data/app/views/devise/sessions/new.html.erb +1 -1
  13. data/app/views/devise/shared/_links.erb +1 -1
  14. data/app/views/devise/unlocks/new.html.erb +2 -2
  15. data/config/locales/en.yml +1 -1
  16. data/lib/devise/controllers/internal_helpers.rb +1 -0
  17. data/lib/devise/controllers/scoped_views.rb +1 -1
  18. data/lib/devise/hooks/activatable.rb +1 -20
  19. data/lib/devise/hooks/forgetable.rb +10 -0
  20. data/lib/devise/hooks/rememberable.rb +4 -14
  21. data/lib/devise/mapping.rb +21 -9
  22. data/lib/devise/models.rb +21 -9
  23. data/lib/devise/models/authenticatable.rb +40 -4
  24. data/lib/devise/models/confirmable.rb +0 -4
  25. data/lib/devise/models/database_authenticatable.rb +6 -5
  26. data/lib/devise/models/lockable.rb +6 -10
  27. data/lib/devise/models/rememberable.rb +1 -0
  28. data/lib/devise/models/token_authenticatable.rb +14 -35
  29. data/lib/devise/modules.rb +0 -1
  30. data/lib/devise/rails.rb +2 -0
  31. data/lib/devise/rails/routes.rb +26 -27
  32. data/lib/devise/strategies/authenticatable.rb +0 -12
  33. data/lib/devise/strategies/base.rb +14 -0
  34. data/lib/devise/strategies/database_authenticatable.rb +1 -0
  35. data/lib/devise/strategies/rememberable.rb +3 -1
  36. data/lib/devise/strategies/token_authenticatable.rb +4 -1
  37. data/lib/devise/version.rb +1 -1
  38. data/lib/generators/devise/devise_generator.rb +1 -1
  39. data/lib/generators/devise/templates/migration.rb +2 -0
  40. data/lib/generators/devise_install/templates/README +6 -0
  41. data/lib/generators/devise_views/devise_views_generator.rb +2 -2
  42. data/test/integration/confirmable_test.rb +2 -2
  43. data/test/integration/database_authenticatable_test.rb +7 -7
  44. data/test/integration/lockable_test.rb +10 -2
  45. data/test/integration/recoverable_test.rb +3 -3
  46. data/test/integration/registerable_test.rb +1 -1
  47. data/test/integration/rememberable_test.rb +1 -1
  48. data/test/mapping_test.rb +11 -9
  49. data/test/models/lockable_test.rb +3 -0
  50. data/test/models/token_authenticatable_test.rb +4 -11
  51. data/test/models_test.rb +9 -2
  52. data/test/rails_app/app/active_record/admin.rb +1 -1
  53. data/test/rails_app/app/active_record/user.rb +1 -1
  54. data/test/rails_app/app/data_mapper/admin.rb +1 -2
  55. data/test/rails_app/app/data_mapper/user.rb +1 -1
  56. data/test/rails_app/app/mongoid/admin.rb +1 -1
  57. data/test/rails_app/app/mongoid/user.rb +1 -1
  58. data/test/rails_app/config/application.rb +0 -4
  59. data/test/rails_app/config/environments/test.rb +2 -0
  60. data/test/rails_app/config/initializers/secret_token.rb +2 -0
  61. data/test/rails_app/config/routes.rb +2 -2
  62. data/test/rails_app/db/migrate/20100401102949_create_tables.rb +1 -1
  63. metadata +7 -5
  64. data/lib/devise/models/activatable.rb +0 -16
@@ -29,9 +29,5 @@ module RailsApp
29
29
 
30
30
  # Configure sensitive parameters which will be filtered from the log file.
31
31
  config.filter_parameters << :password
32
-
33
- # Cookie settings
34
- config.cookie_secret = 'ea942c41850d502f2c8283e26bdc57829f471bb18224ddff0a192c4f32cdf6cb5aa0d82b3a7a7adbeb640c4b06f3aa1cd5f098162d8240f669b39d6b49680571'
35
- config.session_store :cookie_store, :key => "_my_app"
36
32
  end
37
33
  end
@@ -26,4 +26,6 @@ RailsApp::Application.configure do
26
26
  # This is necessary if your schema can't be completely dumped by the schema dumper,
27
27
  # like if you have constraints or database-specific column types
28
28
  # config.active_record.schema_format = :sql
29
+
30
+ config.action_dispatch.show_exceptions = false
29
31
  end
@@ -0,0 +1,2 @@
1
+ Rails.application.config.secret_token = 'ea942c41850d502f2c8283e26bdc57829f471bb18224ddff0a192c4f32cdf6cb5aa0d82b3a7a7adbeb640c4b06f3aa1cd5f098162d8240f669b39d6b49680571'
2
+ Rails.application.config.session_store :cookie_store, :key => "_my_app"
@@ -6,8 +6,8 @@ Rails::Application.routes.draw do
6
6
  resources :admins, :only => [:index]
7
7
 
8
8
  devise_for :users
9
- devise_for :admin, :as => "admin_area", :controllers => { :sessions => "sessions" }, :skip => :passwords
10
- devise_for :accounts, :scope => "manager", :path_prefix => ":locale",
9
+ devise_for :admin, :path => "admin_area", :controllers => { :sessions => "sessions" }, :skip => :passwords
10
+ devise_for :accounts, :singular => "manager", :path_prefix => ":locale",
11
11
  :class_name => "User", :path_names => {
12
12
  :sign_in => "login", :sign_out => "logout",
13
13
  :password => "secret", :confirmation => "verification",
@@ -2,7 +2,7 @@ class CreateTables < ActiveRecord::Migration
2
2
  def self.up
3
3
  [:users, :admins, :accounts].each do |table|
4
4
  create_table table do |t|
5
- t.authenticatable :null => table == :admins
5
+ t.database_authenticatable :null => (table == :admins)
6
6
 
7
7
  if table != :admin
8
8
  t.string :username
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 1
8
- - rc0
9
- version: 1.1.rc0
8
+ - rc1
9
+ version: 1.1.rc1
10
10
  platform: ruby
11
11
  authors:
12
12
  - "Jos\xC3\xA9 Valim"
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-04-03 00:00:00 +02:00
18
+ date: 2010-04-15 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -55,7 +55,8 @@ files:
55
55
  - app/controllers/devise/registrations_controller.rb
56
56
  - app/controllers/devise/sessions_controller.rb
57
57
  - app/controllers/devise/unlocks_controller.rb
58
- - app/models/devise/mailer.rb
58
+ - app/helpers/devise_helper.rb
59
+ - app/mailers/devise/mailer.rb
59
60
  - app/views/devise/confirmations/new.html.erb
60
61
  - app/views/devise/mailer/confirmation_instructions.html.erb
61
62
  - app/views/devise/mailer/reset_password_instructions.html.erb
@@ -82,12 +83,12 @@ files:
82
83
  - lib/devise/encryptors/sha512.rb
83
84
  - lib/devise/failure_app.rb
84
85
  - lib/devise/hooks/activatable.rb
86
+ - lib/devise/hooks/forgetable.rb
85
87
  - lib/devise/hooks/rememberable.rb
86
88
  - lib/devise/hooks/timeoutable.rb
87
89
  - lib/devise/hooks/trackable.rb
88
90
  - lib/devise/mapping.rb
89
91
  - lib/devise/models.rb
90
- - lib/devise/models/activatable.rb
91
92
  - lib/devise/models/authenticatable.rb
92
93
  - lib/devise/models/confirmable.rb
93
94
  - lib/devise/models/database_authenticatable.rb
@@ -207,6 +208,7 @@ test_files:
207
208
  - test/rails_app/config/initializers/backtrace_silencers.rb
208
209
  - test/rails_app/config/initializers/devise.rb
209
210
  - test/rails_app/config/initializers/inflections.rb
211
+ - test/rails_app/config/initializers/secret_token.rb
210
212
  - test/rails_app/config/routes.rb
211
213
  - test/rails_app/db/migrate/20100401102949_create_tables.rb
212
214
  - test/rails_app/db/schema.rb
@@ -1,16 +0,0 @@
1
- require 'devise/hooks/activatable'
2
-
3
- module Devise
4
- module Models
5
- # This module implements the default API required in activatable hook.
6
- module Activatable
7
- def active?
8
- true
9
- end
10
-
11
- def inactive_message
12
- :inactive
13
- end
14
- end
15
- end
16
- end