devise 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of devise might be problematic. Click here for more details.

Files changed (187) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +18 -3
  3. data/CHANGELOG.md +82 -9
  4. data/CONTRIBUTING.md +2 -2
  5. data/Gemfile +7 -9
  6. data/Gemfile.lock +102 -96
  7. data/MIT-LICENSE +1 -1
  8. data/README.md +94 -42
  9. data/Rakefile +1 -1
  10. data/app/controllers/devise/confirmations_controller.rb +5 -3
  11. data/app/controllers/devise/omniauth_callbacks_controller.rb +2 -2
  12. data/app/controllers/devise/passwords_controller.rb +5 -3
  13. data/app/controllers/devise/registrations_controller.rb +26 -10
  14. data/app/controllers/devise/sessions_controller.rb +39 -14
  15. data/app/controllers/devise/unlocks_controller.rb +4 -2
  16. data/app/controllers/devise_controller.rb +6 -6
  17. data/app/helpers/devise_helper.rb +2 -2
  18. data/app/views/devise/confirmations/new.html.erb +2 -2
  19. data/app/views/devise/mailer/confirmation_instructions.html.erb +1 -1
  20. data/app/views/devise/mailer/reset_password_instructions.html.erb +1 -1
  21. data/app/views/devise/mailer/unlock_instructions.html.erb +1 -1
  22. data/app/views/devise/passwords/edit.html.erb +3 -3
  23. data/app/views/devise/passwords/new.html.erb +2 -2
  24. data/app/views/devise/registrations/edit.html.erb +6 -6
  25. data/app/views/devise/registrations/new.html.erb +5 -5
  26. data/app/views/devise/sessions/new.html.erb +5 -5
  27. data/app/views/devise/shared/_links.erb +1 -1
  28. data/app/views/devise/unlocks/new.html.erb +2 -2
  29. data/config/locales/en.yml +17 -16
  30. data/devise.gemspec +2 -2
  31. data/gemfiles/{Gemfile.rails-3.2.x → Gemfile.rails-3.2-stable} +8 -10
  32. data/gemfiles/Gemfile.rails-3.2-stable.lock +166 -0
  33. data/gemfiles/Gemfile.rails-4.0-stable +29 -0
  34. data/gemfiles/Gemfile.rails-4.0-stable.lock +162 -0
  35. data/gemfiles/Gemfile.rails-head +32 -0
  36. data/gemfiles/Gemfile.rails-head.lock +190 -0
  37. data/lib/devise/controllers/helpers.rb +84 -29
  38. data/lib/devise/controllers/rememberable.rb +3 -3
  39. data/lib/devise/controllers/scoped_views.rb +1 -1
  40. data/lib/devise/controllers/sign_in_out.rb +9 -10
  41. data/lib/devise/controllers/store_location.rb +56 -0
  42. data/lib/devise/controllers/url_helpers.rb +3 -1
  43. data/lib/devise/failure_app.rb +12 -10
  44. data/lib/devise/hooks/activatable.rb +5 -6
  45. data/lib/devise/hooks/csrf_cleaner.rb +3 -1
  46. data/lib/devise/hooks/lockable.rb +1 -1
  47. data/lib/devise/hooks/proxy.rb +2 -2
  48. data/lib/devise/hooks/rememberable.rb +2 -2
  49. data/lib/devise/hooks/timeoutable.rb +10 -3
  50. data/lib/devise/hooks/trackable.rb +1 -1
  51. data/lib/devise/mailers/helpers.rb +8 -8
  52. data/lib/devise/mapping.rb +4 -1
  53. data/lib/devise/models/authenticatable.rb +5 -5
  54. data/lib/devise/models/confirmable.rb +14 -14
  55. data/lib/devise/models/database_authenticatable.rb +18 -5
  56. data/lib/devise/models/lockable.rb +14 -11
  57. data/lib/devise/models/omniauthable.rb +1 -1
  58. data/lib/devise/models/recoverable.rb +23 -7
  59. data/lib/devise/models/rememberable.rb +6 -6
  60. data/lib/devise/models/timeoutable.rb +2 -2
  61. data/lib/devise/models/trackable.rb +5 -2
  62. data/lib/devise/models/validatable.rb +6 -6
  63. data/lib/devise/modules.rb +10 -10
  64. data/lib/devise/omniauth/url_helpers.rb +2 -2
  65. data/lib/devise/orm/active_record.rb +1 -1
  66. data/lib/devise/orm/mongoid.rb +1 -1
  67. data/lib/devise/rails/routes.rb +107 -78
  68. data/lib/devise/rails.rb +7 -1
  69. data/lib/devise/strategies/authenticatable.rb +11 -4
  70. data/lib/devise/strategies/base.rb +1 -1
  71. data/lib/devise/strategies/database_authenticatable.rb +7 -4
  72. data/lib/devise/test_helpers.rb +2 -2
  73. data/lib/devise/time_inflector.rb +2 -2
  74. data/lib/devise/version.rb +1 -1
  75. data/lib/devise.rb +15 -10
  76. data/lib/generators/active_record/devise_generator.rb +27 -10
  77. data/lib/generators/active_record/templates/migration.rb +4 -4
  78. data/lib/generators/active_record/templates/migration_existing.rb +4 -4
  79. data/lib/generators/devise/devise_generator.rb +5 -3
  80. data/lib/generators/devise/install_generator.rb +5 -0
  81. data/lib/generators/devise/views_generator.rb +31 -18
  82. data/lib/generators/mongoid/devise_generator.rb +20 -19
  83. data/lib/generators/templates/README +4 -4
  84. data/lib/generators/templates/devise.rb +20 -11
  85. data/lib/generators/templates/markerb/confirmation_instructions.markerb +1 -1
  86. data/lib/generators/templates/markerb/reset_password_instructions.markerb +1 -1
  87. data/lib/generators/templates/markerb/unlock_instructions.markerb +1 -1
  88. data/lib/generators/templates/simple_form_for/confirmations/new.html.erb +2 -2
  89. data/lib/generators/templates/simple_form_for/passwords/edit.html.erb +4 -4
  90. data/lib/generators/templates/simple_form_for/passwords/new.html.erb +2 -2
  91. data/lib/generators/templates/simple_form_for/registrations/edit.html.erb +6 -6
  92. data/lib/generators/templates/simple_form_for/registrations/new.html.erb +4 -4
  93. data/lib/generators/templates/simple_form_for/sessions/new.html.erb +4 -4
  94. data/lib/generators/templates/simple_form_for/unlocks/new.html.erb +2 -2
  95. data/script/cached-bundle +49 -0
  96. data/script/s3-put +71 -0
  97. data/test/controllers/custom_registrations_controller_test.rb +35 -0
  98. data/test/controllers/helpers_test.rb +89 -31
  99. data/test/controllers/internal_helpers_test.rb +11 -8
  100. data/test/controllers/passwords_controller_test.rb +1 -1
  101. data/test/controllers/sessions_controller_test.rb +29 -25
  102. data/test/controllers/url_helpers_test.rb +4 -4
  103. data/test/delegator_test.rb +1 -1
  104. data/test/devise_test.rb +21 -8
  105. data/test/failure_app_test.rb +61 -25
  106. data/test/generators/active_record_generator_test.rb +10 -4
  107. data/test/generators/devise_generator_test.rb +2 -2
  108. data/test/generators/mongoid_generator_test.rb +3 -3
  109. data/test/generators/views_generator_test.rb +30 -1
  110. data/test/helpers/devise_helper_test.rb +14 -13
  111. data/test/integration/authenticatable_test.rb +61 -45
  112. data/test/integration/confirmable_test.rb +95 -55
  113. data/test/integration/database_authenticatable_test.rb +16 -16
  114. data/test/integration/http_authenticatable_test.rb +12 -12
  115. data/test/integration/lockable_test.rb +43 -43
  116. data/test/integration/omniauthable_test.rb +3 -3
  117. data/test/integration/recoverable_test.rb +53 -53
  118. data/test/integration/registerable_test.rb +90 -80
  119. data/test/integration/rememberable_test.rb +15 -15
  120. data/test/integration/timeoutable_test.rb +27 -16
  121. data/test/integration/trackable_test.rb +4 -4
  122. data/test/mailers/confirmation_instructions_test.rb +7 -7
  123. data/test/mailers/reset_password_instructions_test.rb +6 -6
  124. data/test/mailers/unlock_instructions_test.rb +5 -5
  125. data/test/mapping_test.rb +3 -3
  126. data/test/models/authenticatable_test.rb +3 -3
  127. data/test/models/confirmable_test.rb +32 -32
  128. data/test/models/database_authenticatable_test.rb +32 -27
  129. data/test/models/lockable_test.rb +57 -33
  130. data/test/models/recoverable_test.rb +34 -22
  131. data/test/models/rememberable_test.rb +29 -14
  132. data/test/models/serializable_test.rb +8 -8
  133. data/test/models/timeoutable_test.rb +1 -1
  134. data/test/models/trackable_test.rb +28 -0
  135. data/test/models/validatable_test.rb +13 -13
  136. data/test/omniauth/config_test.rb +4 -4
  137. data/test/omniauth/url_helpers_test.rb +3 -3
  138. data/test/orm/mongoid.rb +1 -1
  139. data/test/parameter_sanitizer_test.rb +1 -1
  140. data/test/rails_app/app/active_record/shim.rb +1 -1
  141. data/test/rails_app/app/active_record/user_on_engine.rb +7 -0
  142. data/test/rails_app/app/active_record/user_on_main_app.rb +7 -0
  143. data/test/rails_app/app/controllers/admins/sessions_controller.rb +1 -1
  144. data/test/rails_app/app/controllers/admins_controller.rb +1 -1
  145. data/test/rails_app/app/controllers/application_controller.rb +5 -2
  146. data/test/rails_app/app/controllers/application_with_fake_engine.rb +30 -0
  147. data/test/rails_app/app/controllers/custom/registrations_controller.rb +21 -0
  148. data/test/rails_app/app/controllers/home_controller.rb +1 -1
  149. data/test/rails_app/app/controllers/publisher/registrations_controller.rb +1 -1
  150. data/test/rails_app/app/controllers/publisher/sessions_controller.rb +1 -1
  151. data/test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb +4 -4
  152. data/test/rails_app/app/controllers/users_controller.rb +6 -6
  153. data/test/rails_app/app/mailers/users/mailer.rb +4 -4
  154. data/test/rails_app/app/mongoid/admin.rb +11 -11
  155. data/test/rails_app/app/mongoid/shim.rb +2 -2
  156. data/test/rails_app/app/mongoid/user.rb +19 -19
  157. data/test/rails_app/app/mongoid/user_on_engine.rb +39 -0
  158. data/test/rails_app/app/mongoid/user_on_main_app.rb +39 -0
  159. data/test/rails_app/app/views/admins/sessions/new.html.erb +1 -1
  160. data/test/rails_app/app/views/home/admin_dashboard.html.erb +1 -1
  161. data/test/rails_app/app/views/home/index.html.erb +1 -1
  162. data/test/rails_app/app/views/home/join.html.erb +1 -1
  163. data/test/rails_app/app/views/home/user_dashboard.html.erb +1 -1
  164. data/test/rails_app/app/views/layouts/application.html.erb +1 -1
  165. data/test/rails_app/config/application.rb +2 -2
  166. data/test/rails_app/config/boot.rb +7 -1
  167. data/test/rails_app/config/environments/development.rb +0 -4
  168. data/test/rails_app/config/environments/production.rb +0 -4
  169. data/test/rails_app/config/initializers/devise.rb +7 -5
  170. data/test/rails_app/config/initializers/secret_token.rb +1 -1
  171. data/test/rails_app/config/routes.rb +60 -42
  172. data/test/rails_app/db/migrate/20100401102949_create_tables.rb +7 -7
  173. data/test/rails_app/db/schema.rb +21 -17
  174. data/test/rails_app/lib/shared_admin.rb +4 -4
  175. data/test/rails_app/lib/shared_user.rb +1 -1
  176. data/test/rails_app/lib/shared_user_without_omniauth.rb +13 -0
  177. data/test/routes_test.rb +72 -58
  178. data/test/support/action_controller/record_identifier.rb +10 -0
  179. data/test/support/assertions.rb +2 -3
  180. data/test/support/helpers.rb +4 -4
  181. data/test/support/integration.rb +14 -14
  182. data/test/support/mongoid.yml +6 -0
  183. data/test/test_helper.rb +2 -7
  184. data/test/test_helpers_test.rb +25 -35
  185. data/test/test_models.rb +12 -5
  186. metadata +53 -38
  187. data/gemfiles/Gemfile.rails-3.2.x.lock +0 -159
@@ -6,8 +6,8 @@ class DeviseController < Devise.parent_controller.constantize
6
6
 
7
7
  helpers = %w(resource scope_name resource_name signed_in_resource
8
8
  resource_class resource_params devise_mapping)
9
- hide_action *helpers
10
- helper_method *helpers
9
+ hide_action(*helpers)
10
+ helper_method(*helpers)
11
11
 
12
12
  prepend_before_filter :assert_is_devise_resource!
13
13
  respond_to :html if mimes_for_respond_to.empty?
@@ -30,7 +30,7 @@ class DeviseController < Devise.parent_controller.constantize
30
30
 
31
31
  # Returns a signed in resource from session (if one exists)
32
32
  def signed_in_resource
33
- warden.authenticate(:scope => resource_name)
33
+ warden.authenticate(scope: resource_name)
34
34
  end
35
35
 
36
36
  # Attempt to find the mapped route for devise based on request path
@@ -44,7 +44,7 @@ class DeviseController < Devise.parent_controller.constantize
44
44
  # loaded before even having a request object.
45
45
  def _prefixes #:nodoc:
46
46
  @_prefixes ||= if self.class.scoped_views? && request && devise_mapping
47
- super.unshift("#{devise_mapping.scoped_path}/#{controller_name}")
47
+ ["#{devise_mapping.scoped_path}/#{controller_name}"] + super
48
48
  else
49
49
  super
50
50
  end
@@ -92,14 +92,14 @@ MESSAGE
92
92
  # Helper for use in before_filters where no authentication is required.
93
93
  #
94
94
  # Example:
95
- # before_filter :require_no_authentication, :only => :new
95
+ # before_filter :require_no_authentication, only: :new
96
96
  def require_no_authentication
97
97
  assert_is_devise_resource!
98
98
  return unless is_navigational_format?
99
99
  no_input = devise_mapping.no_input_strategies
100
100
 
101
101
  authenticated = if no_input.present?
102
- args = no_input.dup.push :scope => resource_name
102
+ args = no_input.dup.push scope: resource_name
103
103
  warden.authenticate?(*args)
104
104
  else
105
105
  warden.authenticated?(resource_name)
@@ -10,8 +10,8 @@ module DeviseHelper
10
10
 
11
11
  messages = resource.errors.full_messages.map { |msg| content_tag(:li, msg) }.join
12
12
  sentence = I18n.t("errors.messages.not_saved",
13
- :count => resource.errors.count,
14
- :resource => resource.class.model_name.human.downcase)
13
+ count: resource.errors.count,
14
+ resource: resource.class.model_name.human.downcase)
15
15
 
16
16
  html = <<-HTML
17
17
  <div id="error_explanation">
@@ -1,10 +1,10 @@
1
1
  <h2>Resend confirmation instructions</h2>
2
2
 
3
- <%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
4
4
  <%= devise_error_messages! %>
5
5
 
6
6
  <div><%= f.label :email %><br />
7
- <%= f.email_field :email, :autofocus => true %></div>
7
+ <%= f.email_field :email, autofocus: true %></div>
8
8
 
9
9
  <div><%= f.submit "Resend confirmation instructions" %></div>
10
10
  <% end %>
@@ -2,4 +2,4 @@
2
2
 
3
3
  <p>You can confirm your account email through the link below:</p>
4
4
 
5
- <p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @token) %></p>
5
+ <p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
@@ -2,7 +2,7 @@
2
2
 
3
3
  <p>Someone has requested a link to change your password. You can do this through the link below.</p>
4
4
 
5
- <p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @token) %></p>
5
+ <p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
6
6
 
7
7
  <p>If you didn't request this, please ignore this email.</p>
8
8
  <p>Your password won't change until you access the link above and create a new one.</p>
@@ -4,4 +4,4 @@
4
4
 
5
5
  <p>Click the link below to unlock your account:</p>
6
6
 
7
- <p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @token) %></p>
7
+ <p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
@@ -1,14 +1,14 @@
1
1
  <h2>Change your password</h2>
2
2
 
3
- <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
4
4
  <%= devise_error_messages! %>
5
5
  <%= f.hidden_field :reset_password_token %>
6
6
 
7
7
  <div><%= f.label :password, "New password" %><br />
8
- <%= f.password_field :password, :autofocus => true %></div>
8
+ <%= f.password_field :password, autofocus: true, autocomplete: "off" %></div>
9
9
 
10
10
  <div><%= f.label :password_confirmation, "Confirm new password" %><br />
11
- <%= f.password_field :password_confirmation %></div>
11
+ <%= f.password_field :password_confirmation, autocomplete: "off" %></div>
12
12
 
13
13
  <div><%= f.submit "Change my password" %></div>
14
14
  <% end %>
@@ -1,10 +1,10 @@
1
1
  <h2>Forgot your password?</h2>
2
2
 
3
- <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
4
4
  <%= devise_error_messages! %>
5
5
 
6
6
  <div><%= f.label :email %><br />
7
- <%= f.email_field :email, :autofocus => true %></div>
7
+ <%= f.email_field :email, autofocus: true %></div>
8
8
 
9
9
  <div><%= f.submit "Send me reset password instructions" %></div>
10
10
  <% end %>
@@ -1,29 +1,29 @@
1
1
  <h2>Edit <%= resource_name.to_s.humanize %></h2>
2
2
 
3
- <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
4
4
  <%= devise_error_messages! %>
5
5
 
6
6
  <div><%= f.label :email %><br />
7
- <%= f.email_field :email, :autofocus => true %></div>
7
+ <%= f.email_field :email, autofocus: true %></div>
8
8
 
9
9
  <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
10
10
  <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
11
11
  <% end %>
12
12
 
13
13
  <div><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
14
- <%= f.password_field :password, :autocomplete => "off" %></div>
14
+ <%= f.password_field :password, autocomplete: "off" %></div>
15
15
 
16
16
  <div><%= f.label :password_confirmation %><br />
17
- <%= f.password_field :password_confirmation %></div>
17
+ <%= f.password_field :password_confirmation, autocomplete: "off" %></div>
18
18
 
19
19
  <div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
20
- <%= f.password_field :current_password %></div>
20
+ <%= f.password_field :current_password, autocomplete: "off" %></div>
21
21
 
22
22
  <div><%= f.submit "Update" %></div>
23
23
  <% end %>
24
24
 
25
25
  <h3>Cancel my account</h3>
26
26
 
27
- <p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %></p>
27
+ <p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>
28
28
 
29
29
  <%= link_to "Back", :back %>
@@ -1,16 +1,16 @@
1
1
  <h2>Sign up</h2>
2
2
 
3
- <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
4
4
  <%= devise_error_messages! %>
5
5
 
6
6
  <div><%= f.label :email %><br />
7
- <%= f.email_field :email, :autofocus => true %></div>
7
+ <%= f.email_field :email, autofocus: true %></div>
8
8
 
9
- <div><%= f.label :password %><br />
10
- <%= f.password_field :password %></div>
9
+ <div><%= f.label :password %> <% if @validatable %><i>(<%= @minimum_password_length %> characters minimum)</i><% end %><br />
10
+ <%= f.password_field :password, autocomplete: "off" %></div>
11
11
 
12
12
  <div><%= f.label :password_confirmation %><br />
13
- <%= f.password_field :password_confirmation %></div>
13
+ <%= f.password_field :password_confirmation, autocomplete: "off" %></div>
14
14
 
15
15
  <div><%= f.submit "Sign up" %></div>
16
16
  <% end %>
@@ -1,17 +1,17 @@
1
- <h2>Sign in</h2>
1
+ <h2>Log in</h2>
2
2
 
3
- <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
4
4
  <div><%= f.label :email %><br />
5
- <%= f.email_field :email, :autofocus => true %></div>
5
+ <%= f.email_field :email, autofocus: true %></div>
6
6
 
7
7
  <div><%= f.label :password %><br />
8
- <%= f.password_field :password %></div>
8
+ <%= f.password_field :password, autocomplete: "off" %></div>
9
9
 
10
10
  <% if devise_mapping.rememberable? -%>
11
11
  <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
12
12
  <% end -%>
13
13
 
14
- <div><%= f.submit "Sign in" %></div>
14
+ <div><%= f.submit "Log in" %></div>
15
15
  <% end %>
16
16
 
17
17
  <%= render "devise/shared/links" %>
@@ -1,5 +1,5 @@
1
1
  <%- if controller_name != 'sessions' %>
2
- <%= link_to "Sign in", new_session_path(resource_name) %><br />
2
+ <%= link_to "Log in", new_session_path(resource_name) %><br />
3
3
  <% end -%>
4
4
 
5
5
  <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
@@ -1,10 +1,10 @@
1
1
  <h2>Resend unlock instructions</h2>
2
2
 
3
- <%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
3
+ <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
4
4
  <%= devise_error_messages! %>
5
5
 
6
6
  <div><%= f.label :email %><br />
7
- <%= f.email_field :email, :autofocus => true %></div>
7
+ <%= f.email_field :email, autofocus: true %></div>
8
8
 
9
9
  <div><%= f.submit "Resend unlock instructions" %></div>
10
10
  <% end %>
@@ -3,49 +3,50 @@
3
3
  en:
4
4
  devise:
5
5
  confirmations:
6
- confirmed: "Your account was successfully confirmed."
7
- send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes."
8
- send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes."
6
+ confirmed: "Your email address has been successfully confirmed."
7
+ send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
8
+ send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
9
9
  failure:
10
10
  already_authenticated: "You are already signed in."
11
11
  inactive: "Your account is not activated yet."
12
12
  invalid: "Invalid email or password."
13
13
  locked: "Your account is locked."
14
- last_attempt: "You have one more attempt before your account will be locked."
15
- not_found_in_database: "Invalid email or password."
14
+ last_attempt: "You have one more attempt before your account is locked."
15
+ not_found_in_database: "Invalid email address or password."
16
16
  timeout: "Your session expired. Please sign in again to continue."
17
17
  unauthenticated: "You need to sign in or sign up before continuing."
18
- unconfirmed: "You have to confirm your account before continuing."
18
+ unconfirmed: "You have to confirm your email address before continuing."
19
19
  mailer:
20
20
  confirmation_instructions:
21
21
  subject: "Confirmation instructions"
22
22
  reset_password_instructions:
23
23
  subject: "Reset password instructions"
24
24
  unlock_instructions:
25
- subject: "Unlock Instructions"
25
+ subject: "Unlock instructions"
26
26
  omniauth_callbacks:
27
27
  failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
28
28
  success: "Successfully authenticated from %{kind} account."
29
29
  passwords:
30
30
  no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
31
- send_instructions: "You will receive an email with instructions about how to reset your password in a few minutes."
31
+ send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
32
32
  send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
33
- updated: "Your password was changed successfully. You are now signed in."
34
- updated_not_active: "Your password was changed successfully."
33
+ updated: "Your password has been changed successfully. You are now signed in."
34
+ updated_not_active: "Your password has been changed successfully."
35
35
  registrations:
36
- destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon."
36
+ destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
37
37
  signed_up: "Welcome! You have signed up successfully."
38
38
  signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
39
39
  signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
40
- signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please open the link to activate your account."
41
- update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
42
- updated: "You updated your account successfully."
40
+ signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
41
+ update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address."
42
+ updated: "Your account has been updated successfully."
43
43
  sessions:
44
44
  signed_in: "Signed in successfully."
45
45
  signed_out: "Signed out successfully."
46
+ already_signed_out: "Signed out successfully."
46
47
  unlocks:
47
- send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes."
48
- send_paranoid_instructions: "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes."
48
+ send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
49
+ send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
49
50
  unlocked: "Your account has been unlocked successfully. Please sign in to continue."
50
51
  errors:
51
52
  messages:
data/devise.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
9
9
  s.licenses = ["MIT"]
10
10
  s.summary = "Flexible authentication solution for Rails with Warden"
11
11
  s.email = "contact@plataformatec.com.br"
12
- s.homepage = "http://github.com/plataformatec/devise"
12
+ s.homepage = "https://github.com/plataformatec/devise"
13
13
  s.description = "Flexible authentication solution for Rails with Warden"
14
14
  s.authors = ['José Valim', 'Carlos Antônio']
15
15
 
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
 
22
22
  s.add_dependency("warden", "~> 1.2.3")
23
23
  s.add_dependency("orm_adapter", "~> 0.1")
24
- s.add_dependency("bcrypt-ruby", "~> 3.0")
24
+ s.add_dependency("bcrypt", "~> 3.0")
25
25
  s.add_dependency("thread_safe", "~> 0.1")
26
26
  s.add_dependency("railties", ">= 3.2.6", "< 5")
27
27
  end
@@ -1,17 +1,17 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gemspec :path => '..'
3
+ gemspec path: '..'
4
4
 
5
- gem "rails", "~> 3.2.6"
6
- gem "omniauth", "~> 1.0.0"
7
- gem "omniauth-oauth2", "~> 1.0.0"
5
+ gem "rails", github: 'rails/rails', branch: '3-2-stable'
6
+ gem "omniauth", "~> 1.2.0"
7
+ gem "omniauth-oauth2", "~> 1.1.0"
8
8
  gem "rdoc"
9
9
 
10
10
  group :test do
11
11
  gem "omniauth-facebook"
12
12
  gem "omniauth-openid", "~> 1.0.1"
13
- gem "webrat", "0.7.3", :require => false
14
- gem "mocha", "~> 0.13.1", :require => false
13
+ gem "webrat", "0.7.3", require: false
14
+ gem "mocha", "~> 1.1", require: false
15
15
  end
16
16
 
17
17
  platforms :jruby do
@@ -24,8 +24,6 @@ platforms :ruby do
24
24
  gem "sqlite3"
25
25
  end
26
26
 
27
- platforms :mri_19, :mri_20 do
28
- group :mongoid do
29
- gem "mongoid", "~> 3.0"
30
- end
27
+ group :mongoid do
28
+ gem "mongoid", "~> 3.0"
31
29
  end
@@ -0,0 +1,166 @@
1
+ GIT
2
+ remote: git://github.com/rails/rails.git
3
+ revision: 11fd052aa815ae0255ea5b2463e88138fb3fec61
4
+ branch: 3-2-stable
5
+ specs:
6
+ actionmailer (3.2.19)
7
+ actionpack (= 3.2.19)
8
+ mail (~> 2.5.4)
9
+ actionpack (3.2.19)
10
+ activemodel (= 3.2.19)
11
+ activesupport (= 3.2.19)
12
+ builder (~> 3.0.0)
13
+ erubis (~> 2.7.0)
14
+ journey (~> 1.0.4)
15
+ rack (~> 1.4.5)
16
+ rack-cache (~> 1.2)
17
+ rack-test (~> 0.6.1)
18
+ sprockets (~> 2.2.1)
19
+ activemodel (3.2.19)
20
+ activesupport (= 3.2.19)
21
+ builder (~> 3.0.0)
22
+ activerecord (3.2.19)
23
+ activemodel (= 3.2.19)
24
+ activesupport (= 3.2.19)
25
+ arel (~> 3.0.2)
26
+ tzinfo (~> 0.3.29)
27
+ activeresource (3.2.19)
28
+ activemodel (= 3.2.19)
29
+ activesupport (= 3.2.19)
30
+ activesupport (3.2.19)
31
+ i18n (~> 0.6, >= 0.6.4)
32
+ multi_json (~> 1.0)
33
+ rails (3.2.19)
34
+ actionmailer (= 3.2.19)
35
+ actionpack (= 3.2.19)
36
+ activerecord (= 3.2.19)
37
+ activeresource (= 3.2.19)
38
+ activesupport (= 3.2.19)
39
+ bundler (~> 1.0)
40
+ railties (= 3.2.19)
41
+ railties (3.2.19)
42
+ actionpack (= 3.2.19)
43
+ activesupport (= 3.2.19)
44
+ rack-ssl (~> 1.3.2)
45
+ rake (>= 0.8.7)
46
+ rdoc (~> 3.4)
47
+ thor (>= 0.14.6, < 2.0)
48
+
49
+ PATH
50
+ remote: ..
51
+ specs:
52
+ devise (3.3.0)
53
+ bcrypt (~> 3.0)
54
+ orm_adapter (~> 0.1)
55
+ railties (>= 3.2.6, < 5)
56
+ thread_safe (~> 0.1)
57
+ warden (~> 1.2.3)
58
+
59
+ GEM
60
+ remote: https://rubygems.org/
61
+ specs:
62
+ arel (3.0.3)
63
+ bcrypt (3.1.7)
64
+ builder (3.0.4)
65
+ erubis (2.7.0)
66
+ faraday (0.9.0)
67
+ multipart-post (>= 1.2, < 3)
68
+ hashie (3.2.0)
69
+ hike (1.2.3)
70
+ i18n (0.6.11)
71
+ journey (1.0.4)
72
+ json (1.8.1)
73
+ jwt (1.0.0)
74
+ mail (2.5.4)
75
+ mime-types (~> 1.16)
76
+ treetop (~> 1.4.8)
77
+ metaclass (0.0.4)
78
+ mime-types (1.25.1)
79
+ mini_portile (0.6.0)
80
+ mocha (1.1.0)
81
+ metaclass (~> 0.0.1)
82
+ mongoid (3.1.6)
83
+ activemodel (~> 3.2)
84
+ moped (~> 1.4)
85
+ origin (~> 1.0)
86
+ tzinfo (~> 0.3.29)
87
+ moped (1.5.2)
88
+ multi_json (1.10.1)
89
+ multi_xml (0.5.5)
90
+ multipart-post (2.0.0)
91
+ nokogiri (1.6.3.1)
92
+ mini_portile (= 0.6.0)
93
+ oauth2 (0.9.4)
94
+ faraday (>= 0.8, < 0.10)
95
+ jwt (~> 1.0)
96
+ multi_json (~> 1.3)
97
+ multi_xml (~> 0.5)
98
+ rack (~> 1.2)
99
+ omniauth (1.2.2)
100
+ hashie (>= 1.2, < 4)
101
+ rack (~> 1.0)
102
+ omniauth-facebook (1.6.0)
103
+ omniauth-oauth2 (~> 1.1)
104
+ omniauth-oauth2 (1.1.2)
105
+ faraday (>= 0.8, < 0.10)
106
+ multi_json (~> 1.3)
107
+ oauth2 (~> 0.9.3)
108
+ omniauth (~> 1.2)
109
+ omniauth-openid (1.0.1)
110
+ omniauth (~> 1.0)
111
+ rack-openid (~> 1.3.1)
112
+ origin (1.1.0)
113
+ orm_adapter (0.5.0)
114
+ polyglot (0.3.5)
115
+ rack (1.4.5)
116
+ rack-cache (1.2)
117
+ rack (>= 0.4)
118
+ rack-openid (1.3.1)
119
+ rack (>= 1.1.0)
120
+ ruby-openid (>= 2.1.8)
121
+ rack-ssl (1.3.4)
122
+ rack
123
+ rack-test (0.6.2)
124
+ rack (>= 1.0)
125
+ rake (10.3.2)
126
+ rdoc (3.12.2)
127
+ json (~> 1.4)
128
+ ruby-openid (2.5.0)
129
+ sprockets (2.2.2)
130
+ hike (~> 1.2)
131
+ multi_json (~> 1.0)
132
+ rack (~> 1.0)
133
+ tilt (~> 1.1, != 1.3.0)
134
+ sqlite3 (1.3.9)
135
+ thor (0.19.1)
136
+ thread_safe (0.3.4)
137
+ tilt (1.4.1)
138
+ treetop (1.4.15)
139
+ polyglot
140
+ polyglot (>= 0.3.1)
141
+ tzinfo (0.3.40)
142
+ warden (1.2.3)
143
+ rack (>= 1.0)
144
+ webrat (0.7.3)
145
+ nokogiri (>= 1.2.0)
146
+ rack (>= 1.0)
147
+ rack-test (>= 0.5.3)
148
+
149
+ PLATFORMS
150
+ ruby
151
+
152
+ DEPENDENCIES
153
+ activerecord-jdbc-adapter
154
+ activerecord-jdbcsqlite3-adapter
155
+ devise!
156
+ jruby-openssl
157
+ mocha (~> 1.1)
158
+ mongoid (~> 3.0)
159
+ omniauth (~> 1.2.0)
160
+ omniauth-facebook
161
+ omniauth-oauth2 (~> 1.1.0)
162
+ omniauth-openid (~> 1.0.1)
163
+ rails!
164
+ rdoc
165
+ sqlite3
166
+ webrat (= 0.7.3)
@@ -0,0 +1,29 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec path: '..'
4
+
5
+ gem "rails", github: 'rails/rails', branch: '4-0-stable'
6
+ gem "omniauth", "~> 1.2.0"
7
+ gem "omniauth-oauth2", "~> 1.1.0"
8
+ gem "rdoc"
9
+
10
+ group :test do
11
+ gem "omniauth-facebook"
12
+ gem "omniauth-openid", "~> 1.0.1"
13
+ gem "webrat", "0.7.3", require: false
14
+ gem "mocha", "~> 1.1", require: false
15
+ end
16
+
17
+ platforms :jruby do
18
+ gem "activerecord-jdbc-adapter"
19
+ gem "activerecord-jdbcsqlite3-adapter"
20
+ gem "jruby-openssl"
21
+ end
22
+
23
+ platforms :ruby do
24
+ gem "sqlite3"
25
+ end
26
+
27
+ group :mongoid do
28
+ gem "mongoid", "~> 4.0.0"
29
+ end