devise 2.0.0 → 2.0.1

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 (41) hide show
  1. data/.gitignore +10 -0
  2. data/.travis.yml +16 -0
  3. data/CHANGELOG.rdoc +10 -1
  4. data/Gemfile +35 -0
  5. data/Gemfile.lock +167 -0
  6. data/{README.rdoc → README.md} +170 -150
  7. data/Rakefile +34 -0
  8. data/app/controllers/devise/sessions_controller.rb +7 -3
  9. data/devise.gemspec +25 -0
  10. data/gemfiles/Gemfile.rails-3.1.x +35 -0
  11. data/lib/devise.rb +1 -1
  12. data/lib/devise/models/confirmable.rb +8 -1
  13. data/lib/devise/rails.rb +8 -3
  14. data/lib/devise/rails/routes.rb +17 -2
  15. data/lib/devise/version.rb +1 -1
  16. data/lib/generators/devise/views_generator.rb +11 -0
  17. metadata +28 -69
  18. data/test/rails_app/log/development.log +0 -13
  19. data/test/rails_app/log/test.log +0 -319550
  20. data/test/tmp/app/views/devise/_links.erb +0 -25
  21. data/test/tmp/app/views/devise/confirmations/new.html.erb +0 -15
  22. data/test/tmp/app/views/devise/mailer/confirmation_instructions.html.erb +0 -5
  23. data/test/tmp/app/views/devise/mailer/reset_password_instructions.html.erb +0 -8
  24. data/test/tmp/app/views/devise/mailer/unlock_instructions.html.erb +0 -7
  25. data/test/tmp/app/views/devise/passwords/edit.html.erb +0 -19
  26. data/test/tmp/app/views/devise/passwords/new.html.erb +0 -15
  27. data/test/tmp/app/views/devise/registrations/edit.html.erb +0 -22
  28. data/test/tmp/app/views/devise/registrations/new.html.erb +0 -17
  29. data/test/tmp/app/views/devise/sessions/new.html.erb +0 -15
  30. data/test/tmp/app/views/devise/unlocks/new.html.erb +0 -15
  31. data/test/tmp/app/views/users/_links.erb +0 -25
  32. data/test/tmp/app/views/users/confirmations/new.html.erb +0 -15
  33. data/test/tmp/app/views/users/mailer/confirmation_instructions.html.erb +0 -5
  34. data/test/tmp/app/views/users/mailer/reset_password_instructions.html.erb +0 -8
  35. data/test/tmp/app/views/users/mailer/unlock_instructions.html.erb +0 -7
  36. data/test/tmp/app/views/users/passwords/edit.html.erb +0 -19
  37. data/test/tmp/app/views/users/passwords/new.html.erb +0 -15
  38. data/test/tmp/app/views/users/registrations/edit.html.erb +0 -22
  39. data/test/tmp/app/views/users/registrations/new.html.erb +0 -17
  40. data/test/tmp/app/views/users/sessions/new.html.erb +0 -15
  41. data/test/tmp/app/views/users/unlocks/new.html.erb +0 -15
@@ -1,25 +0,0 @@
1
- <%- if controller_name != 'sessions' %>
2
- <%= link_to "Sign in", new_session_path(resource_name) %><br />
3
- <% end -%>
4
-
5
- <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
6
- <%= link_to "Sign up", new_registration_path(resource_name) %><br />
7
- <% end -%>
8
-
9
- <%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
10
- <%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
11
- <% end -%>
12
-
13
- <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14
- <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
15
- <% end -%>
16
-
17
- <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18
- <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
19
- <% end -%>
20
-
21
- <%- if devise_mapping.omniauthable? %>
22
- <%- resource_class.omniauth_providers.each do |provider| %>
23
- <%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
24
- <% end -%>
25
- <% end -%>
@@ -1,15 +0,0 @@
1
- <h2>Resend confirmation instructions</h2>
2
-
3
- <%= simple_form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
4
- <%= f.error_notification %>
5
-
6
- <div class="inputs">
7
- <%= f.input :email, :required => true %>
8
- </div>
9
-
10
- <div class="actions">
11
- <%= f.button :submit, "Resend confirmation instructions" %>
12
- </div>
13
- <% end %>
14
-
15
- <%= render "links" %>
@@ -1,5 +0,0 @@
1
- <p>Welcome <%= @resource.email %>!</p>
2
-
3
- <p>You can confirm your account email through the link below:</p>
4
-
5
- <p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
@@ -1,8 +0,0 @@
1
- <p>Hello <%= @resource.email %>!</p>
2
-
3
- <p>Someone has requested a link to change your password, and you can do this through the link below.</p>
4
-
5
- <p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
6
-
7
- <p>If you didn't request this, please ignore this email.</p>
8
- <p>Your password won't change until you access the link above and create a new one.</p>
@@ -1,7 +0,0 @@
1
- <p>Hello <%= @resource.email %>!</p>
2
-
3
- <p>Your account has been locked due to an excessive amount of unsuccessful sign in attempts.</p>
4
-
5
- <p>Click the link below to unlock your account:</p>
6
-
7
- <p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
@@ -1,19 +0,0 @@
1
- <h2>Change your password</h2>
2
-
3
- <%= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
4
- <%= f.error_notification %>
5
-
6
- <%= f.input :reset_password_token, :as => :hidden %>
7
- <%= f.full_error :reset_password_token %>
8
-
9
- <div class="inputs">
10
- <%= f.input :password, :label => "New password", :required => true %>
11
- <%= f.input :password_confirmation, :label => "Confirm your new password", :required => true %>
12
- </div>
13
-
14
- <div class="actions">
15
- <%= f.button :submit, "Change my password" %>
16
- </div>
17
- <% end %>
18
-
19
- <%= render "links" %>
@@ -1,15 +0,0 @@
1
- <h2>Forgot your password?</h2>
2
-
3
- <%= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
4
- <%= f.error_notification %>
5
-
6
- <div class="inputs">
7
- <%= f.input :email, :required => true %>
8
- </div>
9
-
10
- <div class="actions">
11
- <%= f.button :submit, "Send me reset password instructions" %>
12
- </div>
13
- <% end %>
14
-
15
- <%= render "links" %>
@@ -1,22 +0,0 @@
1
- <h2>Edit <%= resource_name.to_s.humanize %></h2>
2
-
3
- <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
4
- <%= f.error_notification %>
5
-
6
- <div class="inputs">
7
- <%= f.input :email, :required => true, :autofocus => true %>
8
- <%= f.input :password, :hint => "leave it blank if you don't want to change it", :required => false %>
9
- <%= f.input :password_confirmation, :required => false %>
10
- <%= f.input :current_password, :hint => "we need your current password to confirm your changes", :required => true %>
11
- </div>
12
-
13
- <div class="actions">
14
- <%= f.button :submit, "Update" %>
15
- </div>
16
- <% end %>
17
-
18
- <h3>Cancel my account</h3>
19
-
20
- <p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</p>
21
-
22
- <%= link_to "Back", :back %>
@@ -1,17 +0,0 @@
1
- <h2>Sign up</h2>
2
-
3
- <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
4
- <%= f.error_notification %>
5
-
6
- <div class="inputs">
7
- <%= f.input :email, :required => true, :autofocus => true %>
8
- <%= f.input :password, :required => true %>
9
- <%= f.input :password_confirmation, :required => true %>
10
- </div>
11
-
12
- <div class="actions">
13
- <%= f.button :submit, "Sign up" %>
14
- </div>
15
- <% end %>
16
-
17
- <%= render "links" %>
@@ -1,15 +0,0 @@
1
- <h2>Sign in</h2>
2
-
3
- <%= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
4
- <div class="inputs">
5
- <%= f.input :email, :required => false, :autofocus => true %>
6
- <%= f.input :password, :required => false %>
7
- <%= f.input :remember_me, :as => :boolean if devise_mapping.rememberable? %>
8
- </div>
9
-
10
- <div class="actions">
11
- <%= f.button :submit, "Sign in" %>
12
- </div>
13
- <% end %>
14
-
15
- <%= render "links" %>
@@ -1,15 +0,0 @@
1
- <h2>Resend unlock instructions</h2>
2
-
3
- <%= simple_form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
4
- <%= f.error_notification %>
5
-
6
- <div class="inputs">
7
- <%= f.input :email, :required => true %>
8
- </div>
9
-
10
- <div class="actions">
11
- <%= f.button :submit, "Resend unlock instructions" %>
12
- </div>
13
- <% end %>
14
-
15
- <%= render "links" %>
@@ -1,25 +0,0 @@
1
- <%- if controller_name != 'sessions' %>
2
- <%= link_to "Sign in", new_session_path(resource_name) %><br />
3
- <% end -%>
4
-
5
- <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
6
- <%= link_to "Sign up", new_registration_path(resource_name) %><br />
7
- <% end -%>
8
-
9
- <%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
10
- <%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
11
- <% end -%>
12
-
13
- <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14
- <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
15
- <% end -%>
16
-
17
- <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18
- <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
19
- <% end -%>
20
-
21
- <%- if devise_mapping.omniauthable? %>
22
- <%- resource_class.omniauth_providers.each do |provider| %>
23
- <%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
24
- <% end -%>
25
- <% end -%>
@@ -1,15 +0,0 @@
1
- <h2>Resend confirmation instructions</h2>
2
-
3
- <%= simple_form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
4
- <%= f.error_notification %>
5
-
6
- <div class="inputs">
7
- <%= f.input :email, :required => true %>
8
- </div>
9
-
10
- <div class="actions">
11
- <%= f.button :submit, "Resend confirmation instructions" %>
12
- </div>
13
- <% end %>
14
-
15
- <%= render "links" %>
@@ -1,5 +0,0 @@
1
- <p>Welcome <%= @resource.email %>!</p>
2
-
3
- <p>You can confirm your account email through the link below:</p>
4
-
5
- <p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
@@ -1,8 +0,0 @@
1
- <p>Hello <%= @resource.email %>!</p>
2
-
3
- <p>Someone has requested a link to change your password, and you can do this through the link below.</p>
4
-
5
- <p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
6
-
7
- <p>If you didn't request this, please ignore this email.</p>
8
- <p>Your password won't change until you access the link above and create a new one.</p>
@@ -1,7 +0,0 @@
1
- <p>Hello <%= @resource.email %>!</p>
2
-
3
- <p>Your account has been locked due to an excessive amount of unsuccessful sign in attempts.</p>
4
-
5
- <p>Click the link below to unlock your account:</p>
6
-
7
- <p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
@@ -1,19 +0,0 @@
1
- <h2>Change your password</h2>
2
-
3
- <%= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
4
- <%= f.error_notification %>
5
-
6
- <%= f.input :reset_password_token, :as => :hidden %>
7
- <%= f.full_error :reset_password_token %>
8
-
9
- <div class="inputs">
10
- <%= f.input :password, :label => "New password", :required => true %>
11
- <%= f.input :password_confirmation, :label => "Confirm your new password", :required => true %>
12
- </div>
13
-
14
- <div class="actions">
15
- <%= f.button :submit, "Change my password" %>
16
- </div>
17
- <% end %>
18
-
19
- <%= render "links" %>
@@ -1,15 +0,0 @@
1
- <h2>Forgot your password?</h2>
2
-
3
- <%= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
4
- <%= f.error_notification %>
5
-
6
- <div class="inputs">
7
- <%= f.input :email, :required => true %>
8
- </div>
9
-
10
- <div class="actions">
11
- <%= f.button :submit, "Send me reset password instructions" %>
12
- </div>
13
- <% end %>
14
-
15
- <%= render "links" %>
@@ -1,22 +0,0 @@
1
- <h2>Edit <%= resource_name.to_s.humanize %></h2>
2
-
3
- <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
4
- <%= f.error_notification %>
5
-
6
- <div class="inputs">
7
- <%= f.input :email, :required => true, :autofocus => true %>
8
- <%= f.input :password, :hint => "leave it blank if you don't want to change it", :required => false %>
9
- <%= f.input :password_confirmation, :required => false %>
10
- <%= f.input :current_password, :hint => "we need your current password to confirm your changes", :required => true %>
11
- </div>
12
-
13
- <div class="actions">
14
- <%= f.button :submit, "Update" %>
15
- </div>
16
- <% end %>
17
-
18
- <h3>Cancel my account</h3>
19
-
20
- <p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</p>
21
-
22
- <%= link_to "Back", :back %>
@@ -1,17 +0,0 @@
1
- <h2>Sign up</h2>
2
-
3
- <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
4
- <%= f.error_notification %>
5
-
6
- <div class="inputs">
7
- <%= f.input :email, :required => true, :autofocus => true %>
8
- <%= f.input :password, :required => true %>
9
- <%= f.input :password_confirmation, :required => true %>
10
- </div>
11
-
12
- <div class="actions">
13
- <%= f.button :submit, "Sign up" %>
14
- </div>
15
- <% end %>
16
-
17
- <%= render "links" %>
@@ -1,15 +0,0 @@
1
- <h2>Sign in</h2>
2
-
3
- <%= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
4
- <div class="inputs">
5
- <%= f.input :email, :required => false, :autofocus => true %>
6
- <%= f.input :password, :required => false %>
7
- <%= f.input :remember_me, :as => :boolean if devise_mapping.rememberable? %>
8
- </div>
9
-
10
- <div class="actions">
11
- <%= f.button :submit, "Sign in" %>
12
- </div>
13
- <% end %>
14
-
15
- <%= render "links" %>
@@ -1,15 +0,0 @@
1
- <h2>Resend unlock instructions</h2>
2
-
3
- <%= simple_form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
4
- <%= f.error_notification %>
5
-
6
- <div class="inputs">
7
- <%= f.input :email, :required => true %>
8
- </div>
9
-
10
- <div class="actions">
11
- <%= f.button :submit, "Resend unlock instructions" %>
12
- </div>
13
- <% end %>
14
-
15
- <%= render "links" %>