devise-warbler 2.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (208) hide show
  1. data/.gitignore +10 -0
  2. data/.travis.yml +35 -0
  3. data/CHANGELOG.rdoc +923 -0
  4. data/CONTRIBUTING.md +14 -0
  5. data/Gemfile +32 -0
  6. data/Gemfile.lock +156 -0
  7. data/MIT-LICENSE +20 -0
  8. data/README.md +396 -0
  9. data/Rakefile +34 -0
  10. data/app/controllers/devise/confirmations_controller.rb +43 -0
  11. data/app/controllers/devise/omniauth_callbacks_controller.rb +30 -0
  12. data/app/controllers/devise/passwords_controller.rb +65 -0
  13. data/app/controllers/devise/registrations_controller.rb +119 -0
  14. data/app/controllers/devise/sessions_controller.rb +48 -0
  15. data/app/controllers/devise/unlocks_controller.rb +44 -0
  16. data/app/controllers/devise_controller.rb +184 -0
  17. data/app/helpers/devise_helper.rb +25 -0
  18. data/app/mailers/devise/mailer.rb +15 -0
  19. data/app/views/devise/_links.erb +3 -0
  20. data/app/views/devise/confirmations/new.html.erb +12 -0
  21. data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  22. data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  23. data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  24. data/app/views/devise/passwords/edit.html.erb +16 -0
  25. data/app/views/devise/passwords/new.html.erb +12 -0
  26. data/app/views/devise/registrations/edit.html.erb +29 -0
  27. data/app/views/devise/registrations/new.html.erb +18 -0
  28. data/app/views/devise/sessions/new.html.erb +17 -0
  29. data/app/views/devise/shared/_links.erb +25 -0
  30. data/app/views/devise/unlocks/new.html.erb +12 -0
  31. data/config/locales/en.yml +59 -0
  32. data/devise.gemspec +24 -0
  33. data/gemfiles/Gemfile.rails-3.1.x +35 -0
  34. data/gemfiles/Gemfile.rails-3.1.x.lock +167 -0
  35. data/lib/devise.rb +451 -0
  36. data/lib/devise/controllers/helpers.rb +285 -0
  37. data/lib/devise/controllers/rememberable.rb +56 -0
  38. data/lib/devise/controllers/scoped_views.rb +17 -0
  39. data/lib/devise/controllers/url_helpers.rb +67 -0
  40. data/lib/devise/delegator.rb +16 -0
  41. data/lib/devise/failure_app.rb +187 -0
  42. data/lib/devise/hooks/activatable.rb +11 -0
  43. data/lib/devise/hooks/forgetable.rb +9 -0
  44. data/lib/devise/hooks/lockable.rb +7 -0
  45. data/lib/devise/hooks/rememberable.rb +6 -0
  46. data/lib/devise/hooks/timeoutable.rb +25 -0
  47. data/lib/devise/hooks/trackable.rb +9 -0
  48. data/lib/devise/mailers/helpers.rb +95 -0
  49. data/lib/devise/mapping.rb +172 -0
  50. data/lib/devise/models.rb +128 -0
  51. data/lib/devise/models/authenticatable.rb +276 -0
  52. data/lib/devise/models/confirmable.rb +267 -0
  53. data/lib/devise/models/database_authenticatable.rb +126 -0
  54. data/lib/devise/models/lockable.rb +193 -0
  55. data/lib/devise/models/omniauthable.rb +27 -0
  56. data/lib/devise/models/recoverable.rb +140 -0
  57. data/lib/devise/models/registerable.rb +25 -0
  58. data/lib/devise/models/rememberable.rb +125 -0
  59. data/lib/devise/models/timeoutable.rb +49 -0
  60. data/lib/devise/models/token_authenticatable.rb +89 -0
  61. data/lib/devise/models/trackable.rb +35 -0
  62. data/lib/devise/models/validatable.rb +66 -0
  63. data/lib/devise/modules.rb +29 -0
  64. data/lib/devise/omniauth.rb +28 -0
  65. data/lib/devise/omniauth/config.rb +45 -0
  66. data/lib/devise/omniauth/url_helpers.rb +18 -0
  67. data/lib/devise/orm/active_record.rb +3 -0
  68. data/lib/devise/orm/mongoid.rb +3 -0
  69. data/lib/devise/param_filter.rb +40 -0
  70. data/lib/devise/rails.rb +51 -0
  71. data/lib/devise/rails/routes.rb +448 -0
  72. data/lib/devise/rails/warden_compat.rb +43 -0
  73. data/lib/devise/strategies/authenticatable.rb +176 -0
  74. data/lib/devise/strategies/base.rb +20 -0
  75. data/lib/devise/strategies/database_authenticatable.rb +20 -0
  76. data/lib/devise/strategies/rememberable.rb +55 -0
  77. data/lib/devise/strategies/token_authenticatable.rb +56 -0
  78. data/lib/devise/test_helpers.rb +131 -0
  79. data/lib/devise/time_inflector.rb +14 -0
  80. data/lib/devise/version.rb +3 -0
  81. data/lib/generators/active_record/devise_generator.rb +79 -0
  82. data/lib/generators/active_record/templates/migration.rb +19 -0
  83. data/lib/generators/active_record/templates/migration_existing.rb +26 -0
  84. data/lib/generators/devise/devise_generator.rb +24 -0
  85. data/lib/generators/devise/install_generator.rb +24 -0
  86. data/lib/generators/devise/orm_helpers.rb +32 -0
  87. data/lib/generators/devise/views_generator.rb +122 -0
  88. data/lib/generators/mongoid/devise_generator.rb +57 -0
  89. data/lib/generators/templates/README +35 -0
  90. data/lib/generators/templates/devise.rb +240 -0
  91. data/lib/generators/templates/markerb/confirmation_instructions.markerb +5 -0
  92. data/lib/generators/templates/markerb/reset_password_instructions.markerb +8 -0
  93. data/lib/generators/templates/markerb/unlock_instructions.markerb +7 -0
  94. data/lib/generators/templates/simple_form_for/confirmations/new.html.erb +16 -0
  95. data/lib/generators/templates/simple_form_for/passwords/edit.html.erb +19 -0
  96. data/lib/generators/templates/simple_form_for/passwords/new.html.erb +15 -0
  97. data/lib/generators/templates/simple_form_for/registrations/edit.html.erb +27 -0
  98. data/lib/generators/templates/simple_form_for/registrations/new.html.erb +17 -0
  99. data/lib/generators/templates/simple_form_for/sessions/new.html.erb +15 -0
  100. data/lib/generators/templates/simple_form_for/unlocks/new.html.erb +16 -0
  101. data/test/controllers/custom_strategy_test.rb +62 -0
  102. data/test/controllers/helpers_test.rb +253 -0
  103. data/test/controllers/internal_helpers_test.rb +110 -0
  104. data/test/controllers/sessions_controller_test.rb +85 -0
  105. data/test/controllers/url_helpers_test.rb +59 -0
  106. data/test/delegator_test.rb +19 -0
  107. data/test/devise_test.rb +83 -0
  108. data/test/failure_app_test.rb +221 -0
  109. data/test/generators/active_record_generator_test.rb +75 -0
  110. data/test/generators/devise_generator_test.rb +39 -0
  111. data/test/generators/install_generator_test.rb +13 -0
  112. data/test/generators/mongoid_generator_test.rb +23 -0
  113. data/test/generators/views_generator_test.rb +67 -0
  114. data/test/helpers/devise_helper_test.rb +51 -0
  115. data/test/integration/authenticatable_test.rb +687 -0
  116. data/test/integration/confirmable_test.rb +299 -0
  117. data/test/integration/database_authenticatable_test.rb +84 -0
  118. data/test/integration/http_authenticatable_test.rb +97 -0
  119. data/test/integration/lockable_test.rb +242 -0
  120. data/test/integration/omniauthable_test.rb +133 -0
  121. data/test/integration/recoverable_test.rb +334 -0
  122. data/test/integration/registerable_test.rb +347 -0
  123. data/test/integration/rememberable_test.rb +165 -0
  124. data/test/integration/timeoutable_test.rb +140 -0
  125. data/test/integration/token_authenticatable_test.rb +161 -0
  126. data/test/integration/trackable_test.rb +92 -0
  127. data/test/mailers/confirmation_instructions_test.rb +106 -0
  128. data/test/mailers/reset_password_instructions_test.rb +87 -0
  129. data/test/mailers/unlock_instructions_test.rb +82 -0
  130. data/test/mapping_test.rb +127 -0
  131. data/test/models/authenticatable_test.rb +13 -0
  132. data/test/models/confirmable_test.rb +398 -0
  133. data/test/models/database_authenticatable_test.rb +207 -0
  134. data/test/models/lockable_test.rb +273 -0
  135. data/test/models/omniauthable_test.rb +7 -0
  136. data/test/models/recoverable_test.rb +205 -0
  137. data/test/models/registerable_test.rb +7 -0
  138. data/test/models/rememberable_test.rb +174 -0
  139. data/test/models/serializable_test.rb +49 -0
  140. data/test/models/timeoutable_test.rb +46 -0
  141. data/test/models/token_authenticatable_test.rb +55 -0
  142. data/test/models/trackable_test.rb +13 -0
  143. data/test/models/validatable_test.rb +117 -0
  144. data/test/models_test.rb +158 -0
  145. data/test/omniauth/config_test.rb +57 -0
  146. data/test/omniauth/url_helpers_test.rb +51 -0
  147. data/test/orm/active_record.rb +9 -0
  148. data/test/orm/mongoid.rb +13 -0
  149. data/test/rails_app/Rakefile +10 -0
  150. data/test/rails_app/app/active_record/admin.rb +6 -0
  151. data/test/rails_app/app/active_record/shim.rb +2 -0
  152. data/test/rails_app/app/active_record/user.rb +6 -0
  153. data/test/rails_app/app/controllers/admins/sessions_controller.rb +6 -0
  154. data/test/rails_app/app/controllers/admins_controller.rb +11 -0
  155. data/test/rails_app/app/controllers/application_controller.rb +9 -0
  156. data/test/rails_app/app/controllers/home_controller.rb +25 -0
  157. data/test/rails_app/app/controllers/publisher/registrations_controller.rb +2 -0
  158. data/test/rails_app/app/controllers/publisher/sessions_controller.rb +2 -0
  159. data/test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb +14 -0
  160. data/test/rails_app/app/controllers/users_controller.rb +23 -0
  161. data/test/rails_app/app/helpers/application_helper.rb +3 -0
  162. data/test/rails_app/app/mailers/users/mailer.rb +8 -0
  163. data/test/rails_app/app/mongoid/admin.rb +29 -0
  164. data/test/rails_app/app/mongoid/shim.rb +24 -0
  165. data/test/rails_app/app/mongoid/user.rb +42 -0
  166. data/test/rails_app/app/views/admins/index.html.erb +1 -0
  167. data/test/rails_app/app/views/admins/sessions/new.html.erb +2 -0
  168. data/test/rails_app/app/views/home/admin_dashboard.html.erb +1 -0
  169. data/test/rails_app/app/views/home/index.html.erb +1 -0
  170. data/test/rails_app/app/views/home/join.html.erb +1 -0
  171. data/test/rails_app/app/views/home/private.html.erb +1 -0
  172. data/test/rails_app/app/views/home/user_dashboard.html.erb +1 -0
  173. data/test/rails_app/app/views/layouts/application.html.erb +24 -0
  174. data/test/rails_app/app/views/users/index.html.erb +1 -0
  175. data/test/rails_app/app/views/users/mailer/confirmation_instructions.erb +1 -0
  176. data/test/rails_app/app/views/users/sessions/new.html.erb +1 -0
  177. data/test/rails_app/config.ru +4 -0
  178. data/test/rails_app/config/application.rb +41 -0
  179. data/test/rails_app/config/boot.rb +8 -0
  180. data/test/rails_app/config/database.yml +18 -0
  181. data/test/rails_app/config/environment.rb +5 -0
  182. data/test/rails_app/config/environments/development.rb +18 -0
  183. data/test/rails_app/config/environments/production.rb +33 -0
  184. data/test/rails_app/config/environments/test.rb +33 -0
  185. data/test/rails_app/config/initializers/backtrace_silencers.rb +7 -0
  186. data/test/rails_app/config/initializers/devise.rb +178 -0
  187. data/test/rails_app/config/initializers/inflections.rb +2 -0
  188. data/test/rails_app/config/initializers/secret_token.rb +2 -0
  189. data/test/rails_app/config/routes.rb +100 -0
  190. data/test/rails_app/db/migrate/20100401102949_create_tables.rb +74 -0
  191. data/test/rails_app/db/schema.rb +52 -0
  192. data/test/rails_app/lib/shared_admin.rb +14 -0
  193. data/test/rails_app/lib/shared_user.rb +26 -0
  194. data/test/rails_app/public/404.html +26 -0
  195. data/test/rails_app/public/422.html +26 -0
  196. data/test/rails_app/public/500.html +26 -0
  197. data/test/rails_app/public/favicon.ico +0 -0
  198. data/test/rails_app/script/rails +10 -0
  199. data/test/routes_test.rb +248 -0
  200. data/test/support/assertions.rb +40 -0
  201. data/test/support/helpers.rb +91 -0
  202. data/test/support/integration.rb +92 -0
  203. data/test/support/locale/en.yml +4 -0
  204. data/test/support/webrat/integrations/rails.rb +24 -0
  205. data/test/test_helper.rb +27 -0
  206. data/test/test_helpers_test.rb +151 -0
  207. data/test/test_models.rb +27 -0
  208. metadata +423 -0
@@ -0,0 +1,25 @@
1
+ module DeviseHelper
2
+ # A simple way to show error messages for the current devise resource. If you need
3
+ # to customize this method, you can either overwrite it in your application helpers or
4
+ # copy the views to your application.
5
+ #
6
+ # This method is intended to stay simple and it is unlikely that we are going to change
7
+ # it to add more behavior or options.
8
+ def devise_error_messages!
9
+ return "" if resource.errors.empty?
10
+
11
+ messages = resource.errors.full_messages.map { |msg| content_tag(:li, msg) }.join
12
+ sentence = I18n.t("errors.messages.not_saved",
13
+ :count => resource.errors.count,
14
+ :resource => resource.class.model_name.human.downcase)
15
+
16
+ html = <<-HTML
17
+ <div id="error_explanation">
18
+ <h2>#{sentence}</h2>
19
+ <ul>#{messages}</ul>
20
+ </div>
21
+ HTML
22
+
23
+ html.html_safe
24
+ end
25
+ end
@@ -0,0 +1,15 @@
1
+ class Devise::Mailer < Devise.parent_mailer.constantize
2
+ include Devise::Mailers::Helpers
3
+
4
+ def confirmation_instructions(record, opts={})
5
+ devise_mail(record, :confirmation_instructions, opts)
6
+ end
7
+
8
+ def reset_password_instructions(record, opts={})
9
+ devise_mail(record, :reset_password_instructions, opts)
10
+ end
11
+
12
+ def unlock_instructions(record, opts={})
13
+ devise_mail(record, :unlock_instructions, opts)
14
+ end
15
+ end
@@ -0,0 +1,3 @@
1
+ <% ActiveSupport::Deprecation.warn "Rendering partials devise/_links.erb is deprecated" \
2
+ "please use devise/shared/_links.erb instead."%>
3
+ <%= render "shared/links" %>
@@ -0,0 +1,12 @@
1
+ <h2>Resend confirmation instructions</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
4
+ <%= devise_error_messages! %>
5
+
6
+ <div><%= f.label :email %><br />
7
+ <%= f.email_field :email, :autofocus => true %></div>
8
+
9
+ <div><%= f.submit "Resend confirmation instructions" %></div>
10
+ <% end %>
11
+
12
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,5 @@
1
+ <p>Welcome <%= @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>
@@ -0,0 +1,8 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Someone has requested a link to change your password. 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>
@@ -0,0 +1,7 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Your account has been locked due to an excessive number 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>
@@ -0,0 +1,16 @@
1
+ <h2>Change your password</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
4
+ <%= devise_error_messages! %>
5
+ <%= f.hidden_field :reset_password_token %>
6
+
7
+ <div><%= f.label :password, "New password" %><br />
8
+ <%= f.password_field :password, :autofocus => true %></div>
9
+
10
+ <div><%= f.label :password_confirmation, "Confirm new password" %><br />
11
+ <%= f.password_field :password_confirmation %></div>
12
+
13
+ <div><%= f.submit "Change my password" %></div>
14
+ <% end %>
15
+
16
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,12 @@
1
+ <h2>Forgot your password?</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
4
+ <%= devise_error_messages! %>
5
+
6
+ <div><%= f.label :email %><br />
7
+ <%= f.email_field :email, :autofocus => true %></div>
8
+
9
+ <div><%= f.submit "Send me reset password instructions" %></div>
10
+ <% end %>
11
+
12
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,29 @@
1
+ <h2>Edit <%= resource_name.to_s.humanize %></h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
4
+ <%= devise_error_messages! %>
5
+
6
+ <div><%= f.label :email %><br />
7
+ <%= f.email_field :email, :autofocus => true %></div>
8
+
9
+ <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
10
+ <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
11
+ <% end %>
12
+
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>
15
+
16
+ <div><%= f.label :password_confirmation %><br />
17
+ <%= f.password_field :password_confirmation %></div>
18
+
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>
21
+
22
+ <div><%= f.submit "Update" %></div>
23
+ <% end %>
24
+
25
+ <h3>Cancel my account</h3>
26
+
27
+ <p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %>.</p>
28
+
29
+ <%= link_to "Back", :back %>
@@ -0,0 +1,18 @@
1
+ <h2>Sign up</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
4
+ <%= devise_error_messages! %>
5
+
6
+ <div><%= f.label :email %><br />
7
+ <%= f.email_field :email, :autofocus => true %></div>
8
+
9
+ <div><%= f.label :password %><br />
10
+ <%= f.password_field :password %></div>
11
+
12
+ <div><%= f.label :password_confirmation %><br />
13
+ <%= f.password_field :password_confirmation %></div>
14
+
15
+ <div><%= f.submit "Sign up" %></div>
16
+ <% end %>
17
+
18
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,17 @@
1
+ <h2>Sign in</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
4
+ <div><%= f.label :email %><br />
5
+ <%= f.email_field :email, :autofocus => true %></div>
6
+
7
+ <div><%= f.label :password %><br />
8
+ <%= f.password_field :password %></div>
9
+
10
+ <% if devise_mapping.rememberable? -%>
11
+ <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
12
+ <% end -%>
13
+
14
+ <div><%= f.submit "Sign in" %></div>
15
+ <% end %>
16
+
17
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,25 @@
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 -%>
@@ -0,0 +1,12 @@
1
+ <h2>Resend unlock instructions</h2>
2
+
3
+ <%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
4
+ <%= devise_error_messages! %>
5
+
6
+ <div><%= f.label :email %><br />
7
+ <%= f.email_field :email, :autofocus => true %></div>
8
+
9
+ <div><%= f.submit "Resend unlock instructions" %></div>
10
+ <% end %>
11
+
12
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,59 @@
1
+ # Additional translations at https://github.com/plataformatec/devise/wiki/I18n
2
+
3
+ en:
4
+ devise:
5
+ confirmations:
6
+ confirmed: "Your account was successfully confirmed. You are now signed in."
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."
9
+ failure:
10
+ already_authenticated: "You are already signed in."
11
+ inactive: "Your account was not activated yet."
12
+ invalid: "Invalid email or password."
13
+ invalid_token: "Invalid authentication token."
14
+ locked: "Your account is locked."
15
+ not_found_in_database: "Invalid email or password."
16
+ timeout: "Your session expired, please sign in again to continue."
17
+ unauthenticated: "You need to sign in or sign up before continuing."
18
+ unconfirmed: "You have to confirm your account before continuing."
19
+ mailer:
20
+ confirmation_instructions:
21
+ subject: "Confirmation instructions"
22
+ reset_password_instructions:
23
+ subject: "Reset password instructions"
24
+ unlock_instructions:
25
+ subject: "Unlock Instructions"
26
+ omniauth_callbacks:
27
+ failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
28
+ success: "Successfully authenticated from %{kind} account."
29
+ passwords:
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."
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."
35
+ registrations:
36
+ destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon."
37
+ signed_up: "Welcome! You have signed up successfully."
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
+ 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."
43
+ sessions:
44
+ signed_in: "Signed in successfully."
45
+ signed_out: "Signed out successfully."
46
+ 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."
49
+ unlocked: "Your account has been unlocked successfully. Please sign in to continue."
50
+ errors:
51
+ messages:
52
+ already_confirmed: "was already confirmed, please try signing in"
53
+ confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
54
+ expired: "has expired, please request a new one"
55
+ not_found: "not found"
56
+ not_locked: "was not locked"
57
+ not_saved:
58
+ one: "1 error prohibited this %{resource} from being saved:"
59
+ other: "%{count} errors prohibited this %{resource} from being saved:"
data/devise.gemspec ADDED
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "devise/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "devise-warbler"
7
+ s.version = Devise::VERSION.dup
8
+ s.platform = Gem::Platform::RUBY
9
+ s.summary = "Flexible authentication solution for Rails with Warden"
10
+ s.homepage = "http://github.com/in4systems/devise"
11
+ s.description = "Devise that should work with jRuby Warbler compiled."
12
+ s.authors = ['José Valim', 'Carlos Antônio']
13
+
14
+ s.rubyforge_project = "devise"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- test/*`.split("\n")
18
+ s.require_paths = ["lib"]
19
+
20
+ s.add_dependency("warden", "~> 1.2.1")
21
+ s.add_dependency("orm_adapter", "~> 0.1")
22
+ s.add_dependency("bcrypt-ruby", "~> 3.0")
23
+ s.add_dependency("railties", "~> 3.1")
24
+ end
@@ -0,0 +1,35 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem "devise", :path => ".."
4
+
5
+ gem "rails", "~> 3.1.0"
6
+ gem "omniauth", "~> 1.0.0"
7
+ gem "omniauth-oauth2", "~> 1.0.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.2", :require => false
14
+ gem "mocha", "0.10.0", :require => false
15
+
16
+ platforms :mri_18 do
17
+ gem "ruby-debug", ">= 0.10.3"
18
+ end
19
+ end
20
+
21
+ platforms :jruby do
22
+ gem "activerecord-jdbc-adapter"
23
+ gem "activerecord-jdbcsqlite3-adapter"
24
+ gem "jruby-openssl"
25
+ end
26
+
27
+ platforms :ruby do
28
+ gem "sqlite3"
29
+ end
30
+
31
+ platforms :mri_19 do
32
+ group :mongoid do
33
+ gem "mongoid", "~> 3.0"
34
+ end
35
+ end
@@ -0,0 +1,167 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ devise (2.2.0)
5
+ bcrypt-ruby (~> 3.0)
6
+ orm_adapter (~> 0.1)
7
+ railties (~> 3.1)
8
+ warden (~> 1.2.1)
9
+
10
+ GEM
11
+ remote: http://rubygems.org/
12
+ specs:
13
+ actionmailer (3.1.10)
14
+ actionpack (= 3.1.10)
15
+ mail (~> 2.3.3)
16
+ actionpack (3.1.10)
17
+ activemodel (= 3.1.10)
18
+ activesupport (= 3.1.10)
19
+ builder (~> 3.0.0)
20
+ erubis (~> 2.7.0)
21
+ i18n (~> 0.6)
22
+ rack (~> 1.3.6)
23
+ rack-cache (~> 1.2)
24
+ rack-mount (~> 0.8.2)
25
+ rack-test (~> 0.6.1)
26
+ sprockets (~> 2.0.4)
27
+ activemodel (3.1.10)
28
+ activesupport (= 3.1.10)
29
+ builder (~> 3.0.0)
30
+ i18n (~> 0.6)
31
+ activerecord (3.1.10)
32
+ activemodel (= 3.1.10)
33
+ activesupport (= 3.1.10)
34
+ arel (~> 2.2.3)
35
+ tzinfo (~> 0.3.29)
36
+ activeresource (3.1.10)
37
+ activemodel (= 3.1.10)
38
+ activesupport (= 3.1.10)
39
+ activesupport (3.1.10)
40
+ multi_json (>= 1.0, < 1.3)
41
+ arel (2.2.3)
42
+ bcrypt-ruby (3.0.1)
43
+ builder (3.0.4)
44
+ columnize (0.3.6)
45
+ erubis (2.7.0)
46
+ faraday (0.8.4)
47
+ multipart-post (~> 1.1)
48
+ hashie (1.2.0)
49
+ hike (1.2.1)
50
+ httpauth (0.2.0)
51
+ i18n (0.6.1)
52
+ json (1.7.6)
53
+ jwt (0.1.5)
54
+ multi_json (>= 1.0)
55
+ linecache (0.46)
56
+ rbx-require-relative (> 0.0.4)
57
+ mail (2.3.3)
58
+ i18n (>= 0.4.0)
59
+ mime-types (~> 1.16)
60
+ treetop (~> 1.4.8)
61
+ metaclass (0.0.1)
62
+ mime-types (1.19)
63
+ mocha (0.10.0)
64
+ metaclass (~> 0.0.1)
65
+ mongoid (3.0.16)
66
+ activemodel (~> 3.1)
67
+ moped (~> 1.1)
68
+ origin (~> 1.0)
69
+ tzinfo (~> 0.3.22)
70
+ moped (1.3.2)
71
+ multi_json (1.2.0)
72
+ multipart-post (1.1.5)
73
+ nokogiri (1.5.6)
74
+ oauth2 (0.8.0)
75
+ faraday (~> 0.8)
76
+ httpauth (~> 0.1)
77
+ jwt (~> 0.1.4)
78
+ multi_json (~> 1.0)
79
+ rack (~> 1.2)
80
+ omniauth (1.0.3)
81
+ hashie (~> 1.2)
82
+ rack
83
+ omniauth-facebook (1.4.0)
84
+ omniauth-oauth2 (~> 1.0.2)
85
+ omniauth-oauth2 (1.0.3)
86
+ oauth2 (~> 0.8.0)
87
+ omniauth (~> 1.0)
88
+ omniauth-openid (1.0.1)
89
+ omniauth (~> 1.0)
90
+ rack-openid (~> 1.3.1)
91
+ origin (1.0.11)
92
+ orm_adapter (0.4.0)
93
+ polyglot (0.3.3)
94
+ rack (1.3.8)
95
+ rack-cache (1.2)
96
+ rack (>= 0.4)
97
+ rack-mount (0.8.3)
98
+ rack (>= 1.0.0)
99
+ rack-openid (1.3.1)
100
+ rack (>= 1.1.0)
101
+ ruby-openid (>= 2.1.8)
102
+ rack-ssl (1.3.2)
103
+ rack
104
+ rack-test (0.6.2)
105
+ rack (>= 1.0)
106
+ rails (3.1.10)
107
+ actionmailer (= 3.1.10)
108
+ actionpack (= 3.1.10)
109
+ activerecord (= 3.1.10)
110
+ activeresource (= 3.1.10)
111
+ activesupport (= 3.1.10)
112
+ bundler (~> 1.0)
113
+ railties (= 3.1.10)
114
+ railties (3.1.10)
115
+ actionpack (= 3.1.10)
116
+ activesupport (= 3.1.10)
117
+ rack-ssl (~> 1.3.2)
118
+ rake (>= 0.8.7)
119
+ rdoc (~> 3.4)
120
+ thor (~> 0.14.6)
121
+ rake (10.0.3)
122
+ rbx-require-relative (0.0.9)
123
+ rdoc (3.12)
124
+ json (~> 1.4)
125
+ ruby-debug (0.10.4)
126
+ columnize (>= 0.1)
127
+ ruby-debug-base (~> 0.10.4.0)
128
+ ruby-debug-base (0.10.4)
129
+ linecache (>= 0.3)
130
+ ruby-openid (2.2.2)
131
+ sprockets (2.0.4)
132
+ hike (~> 1.2)
133
+ rack (~> 1.0)
134
+ tilt (~> 1.1, != 1.3.0)
135
+ sqlite3 (1.3.6)
136
+ thor (0.14.6)
137
+ tilt (1.3.3)
138
+ treetop (1.4.12)
139
+ polyglot
140
+ polyglot (>= 0.3.1)
141
+ tzinfo (0.3.35)
142
+ warden (1.2.1)
143
+ rack (>= 1.0)
144
+ webrat (0.7.2)
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 (= 0.10.0)
158
+ mongoid (~> 3.0)
159
+ omniauth (~> 1.0.0)
160
+ omniauth-facebook
161
+ omniauth-oauth2 (~> 1.0.0)
162
+ omniauth-openid (~> 1.0.1)
163
+ rails (~> 3.1.0)
164
+ rdoc
165
+ ruby-debug (>= 0.10.3)
166
+ sqlite3
167
+ webrat (= 0.7.2)