devise 4.2.0 → 4.4.3

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 (225) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +27 -5
  3. data/CHANGELOG.md +65 -0
  4. data/CONTRIBUTING.md +68 -28
  5. data/Gemfile +3 -1
  6. data/Gemfile.lock +79 -83
  7. data/ISSUE_TEMPLATE.md +19 -0
  8. data/MIT-LICENSE +1 -1
  9. data/README.md +108 -11
  10. data/Rakefile +1 -0
  11. data/app/controllers/devise/confirmations_controller.rb +2 -0
  12. data/app/controllers/devise/omniauth_callbacks_controller.rb +4 -2
  13. data/app/controllers/devise/passwords_controller.rb +2 -0
  14. data/app/controllers/devise/registrations_controller.rb +6 -3
  15. data/app/controllers/devise/sessions_controller.rb +3 -1
  16. data/app/controllers/devise/unlocks_controller.rb +2 -0
  17. data/app/controllers/devise_controller.rb +2 -0
  18. data/app/helpers/devise_helper.rb +2 -0
  19. data/app/mailers/devise/mailer.rb +6 -0
  20. data/app/views/devise/confirmations/new.html.erb +1 -1
  21. data/app/views/devise/mailer/email_changed.html.erb +7 -0
  22. data/app/views/devise/passwords/new.html.erb +1 -1
  23. data/app/views/devise/registrations/edit.html.erb +1 -1
  24. data/app/views/devise/registrations/new.html.erb +1 -1
  25. data/app/views/devise/sessions/new.html.erb +1 -1
  26. data/app/views/devise/unlocks/new.html.erb +1 -1
  27. data/config/locales/en.yml +2 -0
  28. data/devise.gemspec +3 -1
  29. data/gemfiles/Gemfile.rails-4.1-stable +3 -1
  30. data/gemfiles/Gemfile.rails-4.1-stable.lock +67 -70
  31. data/gemfiles/Gemfile.rails-4.2-stable +3 -1
  32. data/gemfiles/Gemfile.rails-4.2-stable.lock +69 -73
  33. data/gemfiles/Gemfile.rails-5.0-stable +33 -0
  34. data/gemfiles/Gemfile.rails-5.0-stable.lock +192 -0
  35. data/gemfiles/Gemfile.rails-5.2-rc1 +26 -0
  36. data/gemfiles/Gemfile.rails-5.2-rc1.lock +201 -0
  37. data/guides/bug_report_templates/integration_test.rb +2 -0
  38. data/lib/devise/controllers/helpers.rb +2 -0
  39. data/lib/devise/controllers/rememberable.rb +2 -0
  40. data/lib/devise/controllers/scoped_views.rb +2 -0
  41. data/lib/devise/controllers/sign_in_out.rb +6 -1
  42. data/lib/devise/controllers/store_location.rb +25 -7
  43. data/lib/devise/controllers/url_helpers.rb +2 -0
  44. data/lib/devise/delegator.rb +2 -0
  45. data/lib/devise/encryptor.rb +2 -0
  46. data/lib/devise/failure_app.rb +14 -12
  47. data/lib/devise/hooks/activatable.rb +2 -0
  48. data/lib/devise/hooks/csrf_cleaner.rb +2 -0
  49. data/lib/devise/hooks/forgetable.rb +2 -0
  50. data/lib/devise/hooks/lockable.rb +6 -1
  51. data/lib/devise/hooks/proxy.rb +2 -0
  52. data/lib/devise/hooks/rememberable.rb +2 -0
  53. data/lib/devise/hooks/timeoutable.rb +2 -0
  54. data/lib/devise/hooks/trackable.rb +2 -0
  55. data/lib/devise/mailers/helpers.rb +6 -3
  56. data/lib/devise/mapping.rb +2 -0
  57. data/lib/devise/models/authenticatable.rb +4 -2
  58. data/lib/devise/models/confirmable.rb +53 -17
  59. data/lib/devise/models/database_authenticatable.rb +40 -4
  60. data/lib/devise/models/lockable.rb +8 -2
  61. data/lib/devise/models/omniauthable.rb +2 -0
  62. data/lib/devise/models/recoverable.rb +26 -9
  63. data/lib/devise/models/registerable.rb +2 -0
  64. data/lib/devise/models/rememberable.rb +4 -2
  65. data/lib/devise/models/timeoutable.rb +2 -0
  66. data/lib/devise/models/trackable.rb +7 -0
  67. data/lib/devise/models/validatable.rb +10 -3
  68. data/lib/devise/models.rb +3 -1
  69. data/lib/devise/modules.rb +2 -0
  70. data/lib/devise/omniauth/config.rb +2 -0
  71. data/lib/devise/omniauth/url_helpers.rb +2 -0
  72. data/lib/devise/omniauth.rb +2 -0
  73. data/lib/devise/orm/active_record.rb +2 -0
  74. data/lib/devise/orm/mongoid.rb +2 -0
  75. data/lib/devise/parameter_filter.rb +2 -0
  76. data/lib/devise/parameter_sanitizer.rb +2 -0
  77. data/lib/devise/rails/routes.rb +3 -1
  78. data/lib/devise/rails/warden_compat.rb +2 -0
  79. data/lib/devise/rails.rb +3 -5
  80. data/lib/devise/secret_key_finder.rb +25 -0
  81. data/lib/devise/strategies/authenticatable.rb +2 -0
  82. data/lib/devise/strategies/base.rb +2 -0
  83. data/lib/devise/strategies/database_authenticatable.rb +2 -0
  84. data/lib/devise/strategies/rememberable.rb +2 -0
  85. data/lib/devise/test/controller_helpers.rb +4 -1
  86. data/lib/devise/test/integration_helpers.rb +2 -0
  87. data/lib/devise/test_helpers.rb +3 -1
  88. data/lib/devise/time_inflector.rb +2 -0
  89. data/lib/devise/token_generator.rb +2 -0
  90. data/lib/devise/version.rb +3 -1
  91. data/lib/devise.rb +17 -2
  92. data/lib/generators/active_record/devise_generator.rb +15 -2
  93. data/lib/generators/active_record/templates/migration.rb +3 -1
  94. data/lib/generators/active_record/templates/migration_existing.rb +2 -0
  95. data/lib/generators/devise/controllers_generator.rb +2 -0
  96. data/lib/generators/devise/devise_generator.rb +4 -2
  97. data/lib/generators/devise/install_generator.rb +2 -0
  98. data/lib/generators/devise/orm_helpers.rb +7 -1
  99. data/lib/generators/devise/views_generator.rb +7 -8
  100. data/lib/generators/mongoid/devise_generator.rb +2 -0
  101. data/lib/generators/templates/controllers/confirmations_controller.rb +2 -0
  102. data/lib/generators/templates/controllers/omniauth_callbacks_controller.rb +2 -0
  103. data/lib/generators/templates/controllers/passwords_controller.rb +2 -0
  104. data/lib/generators/templates/controllers/registrations_controller.rb +4 -2
  105. data/lib/generators/templates/controllers/sessions_controller.rb +3 -1
  106. data/lib/generators/templates/controllers/unlocks_controller.rb +2 -0
  107. data/lib/generators/templates/devise.rb +10 -1
  108. data/lib/generators/templates/markerb/email_changed.markerb +7 -0
  109. data/lib/generators/templates/markerb/password_change.markerb +2 -2
  110. data/test/controllers/custom_registrations_controller_test.rb +2 -0
  111. data/test/controllers/custom_strategy_test.rb +2 -0
  112. data/test/controllers/helper_methods_test.rb +2 -0
  113. data/test/controllers/helpers_test.rb +5 -3
  114. data/test/controllers/inherited_controller_i18n_messages_test.rb +2 -0
  115. data/test/controllers/internal_helpers_test.rb +2 -0
  116. data/test/controllers/load_hooks_controller_test.rb +2 -0
  117. data/test/controllers/passwords_controller_test.rb +2 -0
  118. data/test/controllers/sessions_controller_test.rb +2 -0
  119. data/test/controllers/url_helpers_test.rb +2 -0
  120. data/test/delegator_test.rb +2 -0
  121. data/test/devise_test.rb +2 -0
  122. data/test/failure_app_test.rb +2 -0
  123. data/test/generators/active_record_generator_test.rb +47 -0
  124. data/test/generators/controllers_generator_test.rb +2 -0
  125. data/test/generators/devise_generator_test.rb +2 -0
  126. data/test/generators/install_generator_test.rb +2 -0
  127. data/test/generators/mongoid_generator_test.rb +2 -0
  128. data/test/generators/views_generator_test.rb +2 -0
  129. data/test/helpers/devise_helper_test.rb +2 -0
  130. data/test/integration/authenticatable_test.rb +10 -2
  131. data/test/integration/confirmable_test.rb +2 -0
  132. data/test/integration/database_authenticatable_test.rb +2 -0
  133. data/test/integration/http_authenticatable_test.rb +8 -0
  134. data/test/integration/lockable_test.rb +5 -3
  135. data/test/integration/mounted_engine_test.rb +2 -0
  136. data/test/integration/omniauthable_test.rb +13 -0
  137. data/test/integration/recoverable_test.rb +2 -0
  138. data/test/integration/registerable_test.rb +2 -0
  139. data/test/integration/rememberable_test.rb +9 -1
  140. data/test/integration/timeoutable_test.rb +2 -0
  141. data/test/integration/trackable_test.rb +7 -0
  142. data/test/mailers/confirmation_instructions_test.rb +2 -0
  143. data/test/mailers/email_changed_test.rb +132 -0
  144. data/test/mailers/mailer_test.rb +20 -0
  145. data/test/mailers/reset_password_instructions_test.rb +2 -0
  146. data/test/mailers/unlock_instructions_test.rb +2 -0
  147. data/test/mapping_test.rb +2 -0
  148. data/test/models/authenticatable_test.rb +2 -0
  149. data/test/models/confirmable_test.rb +30 -0
  150. data/test/models/database_authenticatable_test.rb +15 -1
  151. data/test/models/lockable_test.rb +2 -0
  152. data/test/models/omniauthable_test.rb +2 -0
  153. data/test/models/recoverable_test.rb +13 -1
  154. data/test/models/registerable_test.rb +2 -0
  155. data/test/models/rememberable_test.rb +2 -0
  156. data/test/models/serializable_test.rb +6 -0
  157. data/test/models/timeoutable_test.rb +2 -0
  158. data/test/models/trackable_test.rb +21 -0
  159. data/test/models/validatable_test.rb +4 -2
  160. data/test/models_test.rb +2 -0
  161. data/test/omniauth/config_test.rb +11 -7
  162. data/test/omniauth/url_helpers_test.rb +2 -0
  163. data/test/orm/active_record.rb +9 -2
  164. data/test/orm/mongoid.rb +3 -1
  165. data/test/parameter_sanitizer_test.rb +2 -0
  166. data/test/rails_app/app/active_record/admin.rb +2 -0
  167. data/test/rails_app/app/active_record/shim.rb +2 -0
  168. data/test/rails_app/app/active_record/user.rb +14 -1
  169. data/test/rails_app/app/active_record/user_on_engine.rb +2 -0
  170. data/test/rails_app/app/active_record/user_on_main_app.rb +2 -0
  171. data/test/rails_app/app/active_record/user_with_validations.rb +12 -0
  172. data/test/rails_app/app/active_record/user_without_email.rb +2 -0
  173. data/test/rails_app/app/controllers/admins/sessions_controller.rb +2 -0
  174. data/test/rails_app/app/controllers/admins_controller.rb +2 -0
  175. data/test/rails_app/app/controllers/application_controller.rb +2 -0
  176. data/test/rails_app/app/controllers/application_with_fake_engine.rb +2 -0
  177. data/test/rails_app/app/controllers/custom/registrations_controller.rb +2 -0
  178. data/test/rails_app/app/controllers/home_controller.rb +3 -1
  179. data/test/rails_app/app/controllers/publisher/registrations_controller.rb +2 -0
  180. data/test/rails_app/app/controllers/publisher/sessions_controller.rb +2 -0
  181. data/test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb +3 -1
  182. data/test/rails_app/app/controllers/users_controller.rb +5 -3
  183. data/test/rails_app/app/helpers/application_helper.rb +2 -0
  184. data/test/rails_app/app/mailers/users/from_proc_mailer.rb +2 -0
  185. data/test/rails_app/app/mailers/users/mailer.rb +2 -0
  186. data/test/rails_app/app/mailers/users/reply_to_mailer.rb +2 -0
  187. data/test/rails_app/app/mongoid/admin.rb +2 -0
  188. data/test/rails_app/app/mongoid/shim.rb +2 -0
  189. data/test/rails_app/app/mongoid/user.rb +11 -0
  190. data/test/rails_app/app/mongoid/user_on_engine.rb +2 -0
  191. data/test/rails_app/app/mongoid/user_on_main_app.rb +2 -0
  192. data/test/rails_app/app/mongoid/user_with_validations.rb +37 -0
  193. data/test/rails_app/app/mongoid/user_without_email.rb +2 -0
  194. data/test/rails_app/config/application.rb +6 -2
  195. data/test/rails_app/config/boot.rb +16 -3
  196. data/test/rails_app/config/environment.rb +2 -0
  197. data/test/rails_app/config/environments/development.rb +2 -0
  198. data/test/rails_app/config/environments/production.rb +2 -0
  199. data/test/rails_app/config/environments/test.rb +2 -0
  200. data/test/rails_app/config/initializers/backtrace_silencers.rb +2 -0
  201. data/test/rails_app/config/initializers/devise.rb +2 -0
  202. data/test/rails_app/config/initializers/inflections.rb +2 -0
  203. data/test/rails_app/config/initializers/secret_token.rb +2 -0
  204. data/test/rails_app/config/initializers/session_store.rb +2 -0
  205. data/test/rails_app/config/routes.rb +2 -0
  206. data/test/rails_app/db/migrate/20100401102949_create_tables.rb +2 -0
  207. data/test/rails_app/db/schema.rb +2 -0
  208. data/test/rails_app/lib/shared_admin.rb +7 -1
  209. data/test/rails_app/lib/shared_user.rb +2 -0
  210. data/test/rails_app/lib/shared_user_without_email.rb +2 -0
  211. data/test/rails_app/lib/shared_user_without_omniauth.rb +2 -0
  212. data/test/rails_test.rb +2 -0
  213. data/test/routes_test.rb +7 -5
  214. data/test/secret_key_finder_test.rb +97 -0
  215. data/test/support/action_controller/record_identifier.rb +2 -0
  216. data/test/support/assertions.rb +2 -0
  217. data/test/support/helpers.rb +6 -0
  218. data/test/support/http_method_compatibility.rb +2 -0
  219. data/test/support/integration.rb +3 -0
  220. data/test/support/webrat/integrations/rails.rb +2 -0
  221. data/test/test/controller_helpers_test.rb +16 -1
  222. data/test/test/integration_helpers_test.rb +2 -0
  223. data/test/test_helper.rb +2 -0
  224. data/test/test_models.rb +2 -0
  225. metadata +23 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 5e29ea6d513d978b0fd04f14b67dd51e2122784d
4
- data.tar.gz: 05cc9f23bc3d9a990a174b0c9355e675fd0e4b7a
2
+ SHA256:
3
+ metadata.gz: 554c50f7db4c13beb0b2eb9ee1dbdd863aef2e7647de61d7070adac0b60fd1c7
4
+ data.tar.gz: 7624cffe7f3383660d08bca3c10b4f0c3ce2d5696b1f52cfe2e8b2b023c79fed
5
5
  SHA512:
6
- metadata.gz: 75169de4446c19bcd4da1faa1659f8481f807ea6de193a182d38dd681380c60d46cdd07dcfcaad80eaea07d8792878abf29a6572d630e982b6bba239d1b6434e
7
- data.tar.gz: 0a45b86723a424e2e9633c32fd3b8775e1f1d20d8316be3af54522112511e3da95d0446abf10c70f9ebf7c57e83adfb883ac2ccb905df3957912a6b9f624d424
6
+ metadata.gz: fa0cacb024cecbfb7a031f0dd5b5e8cf2ea518ecbd89b3f2d3994614bf8d859548984b4675f4cd1be1f73b17c0a07214e9d62e08e4d7362450664b27083bc1a4
7
+ data.tar.gz: e249d22cc464e7b04b53e990ff0c6e15b3c48a1bb7e8d9ef0a10722b867649840b7b5d48b30f234e9963400b773608b31c3732aeb5665287cea940d568bb5abe
data/.travis.yml CHANGED
@@ -1,22 +1,42 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 2.1.9
5
- - 2.2.5
6
- - 2.3.1
4
+ - 2.1.10
5
+ - 2.2.8
6
+ - 2.3.5
7
+ - 2.4.2
8
+ - 2.5.0
7
9
  - ruby-head
8
10
 
9
11
  gemfile:
10
12
  - Gemfile
13
+ - gemfiles/Gemfile.rails-5.2-rc1
14
+ - gemfiles/Gemfile.rails-5.0-stable
11
15
  - gemfiles/Gemfile.rails-4.2-stable
12
16
  - gemfiles/Gemfile.rails-4.1-stable
13
17
 
14
18
  matrix:
15
19
  exclude:
16
- - rvm: 2.1.9
20
+ - rvm: 2.1.10
21
+ gemfile: Gemfile
22
+ - rvm: 2.1.10
23
+ gemfile: gemfiles/Gemfile.rails-5.2-rc1
24
+ - rvm: 2.5.0
25
+ gemfile: gemfiles/Gemfile.rails-4.1-stable
26
+ - rvm: 2.4.2
27
+ gemfile: gemfiles/Gemfile.rails-4.1-stable
28
+ - rvm: ruby-head
29
+ gemfile: gemfiles/Gemfile.rails-4.1-stable
30
+ - rvm: 2.1.10
31
+ gemfile: gemfiles/Gemfile.rails-5.0-stable
32
+ - rvm: 2.1.10
17
33
  gemfile: Gemfile
18
34
  - env: DEVISE_ORM=mongoid
19
35
  gemfile: Gemfile
36
+ - env: DEVISE_ORM=mongoid
37
+ gemfile: gemfiles/Gemfile.rails-5.0-stable
38
+ - env: DEVISE_ORM=mongoid
39
+ gemfile: gemfiles/Gemfile.rails-5.2-rc1
20
40
  allow_failures:
21
41
  - rvm: ruby-head
22
42
  services:
@@ -31,7 +51,9 @@ env:
31
51
  - DEVISE_ORM=active_record
32
52
  - DEVISE_ORM=mongoid
33
53
 
34
- before_install: "rm ${BUNDLE_GEMFILE}.lock"
54
+ before_install:
55
+ - "rm ${BUNDLE_GEMFILE}.lock"
56
+ - gem update --system
35
57
 
36
58
  before_script: "bundle update"
37
59
 
data/CHANGELOG.md CHANGED
@@ -1,5 +1,70 @@
1
1
  ### Unreleased
2
2
 
3
+ ### 4.4.3 - 2018-03-17
4
+
5
+ * bug fixes
6
+ * Fix undefined method `rails5?` for Devise::Test:Module (by @tegon)
7
+ * Fix: secret key was being required to be set inside credentials on Rails 5.2 (by @tegon)
8
+
9
+ ### 4.4.2 - 2018-03-15
10
+
11
+ * enhancements
12
+ * Support for :credentials on Rails v5.2.x. (by @gencer)
13
+ * Improve documentation about the test suite. (by @tegon)
14
+ * Test with Rails 5.2.rc1 on Travis. (by @jcoyne)
15
+ * Allow test with Rails 6. (by @Fudoshiki)
16
+ * Creating a new section for controller configuration on `devise.rb` template (by @Danilo-Araujo-Silva)
17
+
18
+ * bug fixes
19
+ * Preserve content_type for unauthenticated tests (by @gmcnaughton)
20
+ * Check if the resource is persisted in `update_tracked_fields!` instead of performing validations (by @tegon)
21
+ * Revert "Replace log_process_action to append_info_to_payload" (by @tegon)
22
+
23
+ ### 4.4.1 - 2018-01-23
24
+
25
+ * bug fixes
26
+ * Ensure Gemspec is loaded as utf-8. (by @segiddins)
27
+ * Fix `ActiveRecord` check on `Confirmable`. (by @tegon)
28
+ * Fix `signed_in?` docs without running auth hooks. by (@machty)
29
+
30
+ ### 4.4.0 - 2017-12-29
31
+
32
+ * enhancements
33
+ * Add `frozen_string_literal` pragma comment to all Ruby files. (by @pat)
34
+ * Use `set_flash_method!` instead of `set_flash_method` in `Devise::OmniauthCallbacksController#failure`. (by @saichander17)
35
+ * Clarify how `store_location_for` modifies URIs. (by @olivierlacan)
36
+ * Move `failed_attempts` increment into its own function. by (@mobilutz)
37
+ * Add `autocomplete="email"` to email fields. by (@MikeRogers0)
38
+ * Add the ability to change the default migrations path introduced in Rails 5.0.3. (by @alexhifer)
39
+ * Delete unnecessary condition for helper method. (by @davydovanton)
40
+ * Support `id: :uuid` option for migrations. (by @filip373)
41
+
42
+ * bug fixes
43
+ * Fix syntax for MRI 2.5.0. (by @pat)
44
+ * Validations were being ignored on singup in the `Trackable#update_tracked_fields!` method. (by @AshleyFoster)
45
+ * Do not modify options for `#serializable_hash`. (by @guigs)
46
+ * Email confirmations were being sent on sign in/sign out for application using `mongoid` and `mongoid-paperclip` gems. This is because previously we were checking if a model is from Active Record by checking if the method `after_commit` was defined - since `mongoid` doesn' have one - but `mongoid-paperclip` gem does define one, which cause this issue. (by @fjg)
47
+
48
+ ### 4.3.0 - 2017-05-14
49
+
50
+ * Enhancements
51
+ * Dependency support added for Rails 5.1.x.
52
+
53
+ ### 4.2.1 - 2017-03-15
54
+
55
+ * removals
56
+ * `Devise::Mailer#scope_name` and `Devise::Mailer#resource` are now protected
57
+ methods instead of public.
58
+ * bug fixes
59
+ * Attempt to reset password without the password field in the request now results in a `:blank` validation error.
60
+ Before this change, Devise would accept the reset password request and log the user in, without validating/changing
61
+ the password. (by @victor-am)
62
+ * Confirmation links now expire based on UTC time, working properly when using different timezones. (by @jjuliano)
63
+ * enhancements
64
+ * Notify the original email when it is changed with a new `Devise.send_email_changed_notification` setting.
65
+ When using `reconfirmable`, the notification will be sent right away instead of when the unconfirmed email is confirmed.
66
+ (original change by @ethirajsrinivasan)
67
+
3
68
  ### 4.2.0 - 2016-07-01
4
69
 
5
70
  * removals
data/CONTRIBUTING.md CHANGED
@@ -1,39 +1,79 @@
1
- ### Please read before contributing
1
+ # How to contribute to Devise
2
2
 
3
- 1) Do not post questions in the issues tracker. If you have any questions about
4
- Devise, search the [Wiki](https://github.com/plataformatec/devise/wiki) or use
5
- the [Mailing List](https://groups.google.com/group/plataformatec-devise) or
6
- [Stack Overflow](http://stackoverflow.com/questions/tagged/devise).
3
+ Thanks for your interest on contributing to Devise! Here are a few general
4
+ guidelines on contributing and reporting bugs to Devise that we ask you to
5
+ take a look first. Notice that all of your interactions in the project are
6
+ expected to follow our [Code of Conduct](CODE_OF_CONDUCT.md).
7
7
 
8
- 2) If you find a security bug, **DO NOT** submit an issue here. Please send an
8
+ ## Reporting Issues
9
+
10
+ Before reporting a new issue, please be sure that the issue wasn't already
11
+ reported or fixed by searching on GitHub through our [issues](https://github.com/plataformatec/devise/issues).
12
+
13
+ When creating a new issue, be sure to include a **title and clear description**,
14
+ as much relevant information as possible, and either a test case example or
15
+ even better a **sample Rails app that replicates the issue** - Devise has a lot
16
+ of moving parts and it's functionality can be affected by third party gems, so
17
+ we need as much context and details as possible to identify what might be broken
18
+ for you. We have a [test case template](guides/bug_report_templates/integration_test.rb)
19
+ that can be used to replicate issues with minimal setup.
20
+
21
+ Please do not attempt to translate Devise built in views. The views are meant
22
+ to be a starting point for fresh apps and not production material - eventually
23
+ all applications will require custom views where you can write your own copy and
24
+ translate it if the application requires it . For historical references, please look into closed
25
+ [Issues/Pull Requests](https://github.com/plataformatec/devise/issues?q=i18n) regarding
26
+ internationalization.
27
+
28
+ Avoid opening new issues to ask questions in our issues tracker. Please go through
29
+ the project wiki, documentation and source code first, or try to ask your question
30
+ on [Stack Overflow](http://stackoverflow.com/questions/tagged/devise).
31
+
32
+ **If you find a security bug, do not report it through GitHub. Please send an
9
33
  e-mail to [opensource@plataformatec.com.br](mailto:opensource@plataformatec.com.br)
10
- instead.
34
+ instead.**
35
+
36
+ ## Sending Pull Requests
37
+
38
+ Before sending a new Pull Request, take a look on existing Pull Requests and Issues
39
+ to see if the proposed change or fix has been discussed in the past, or if the
40
+ change was already implemented but not yet released.
41
+
42
+ We expect new Pull Requests to include enough tests for new or changed behavior,
43
+ and we aim to maintain everything as most backwards compatible as possible,
44
+ reserving breaking changes to be ship in major releases when necessary - you
45
+ can wrap the new code path with a setting toggle from the `Devise` module defined
46
+ as `false` by default to require developers to opt-in for the new behavior.
11
47
 
12
- 3) If possible, replicate your issue with our
13
- [guides/bug_report_templates/integration_test.rb](test case example), and attach
14
- it to your issue or Pull Request - this way we have an isolated way to replicate
15
- your issue and investigate it further.
48
+ If your Pull Request includes new or changed behavior, be sure that the changes
49
+ are beneficial to a wide range of use cases or it's an application specific change
50
+ that might not be so valuable to other applications. Some changes can be introduced
51
+ as a new `devise-something` gem instead of belonging to the main codebase.
16
52
 
17
- 4) Otherwise, please provide a fresh new Rails application that replicates your
18
- issue on a public GitHub repository, as some scenarios might not be possible to
19
- replicate using the standalone test case example.
53
+ When adding new settings, you can take advantage of the [`Devise::Models.config`](https://github.com/plataformatec/devise/blob/245b1f9de0b3386b7913e14b60ea24f43b77feb0/lib/devise/models.rb#L13-L50) method to add class and instance level fallbacks
54
+ to the new setting.
20
55
 
21
- 5) Do a small search on the issues tracker before submitting your issue to see
22
- if it was already reported / fixed. Duplicated issues will be closed to avoid
23
- too much noise/duplication in the issue tracker.
56
+ We also welcome Pull Requests that improve our existing documentation (both our
57
+ `README.md` and the RDoc sections in the source code) or improve existing rough
58
+ edges in our API that might be blocking existing integrations or 3rd party gems.
24
59
 
25
- 6) When reporting an issue, include Rails, Devise and Warden versions. If you
26
- are getting exceptions, please include the full backtrace.
60
+ ## Other ways to contribute
27
61
 
28
- 7) Please do not attempt to translate Devise built in views. The views are meant
29
- to be a starting point and not a final version. For historical references,
30
- please look into closed issues/Pull regarding i18n.
62
+ We welcome anyone that wants to contribute to Devise to triage and reply to
63
+ open issues to help troubleshoot and fix existing bugs on Devise. Here is what
64
+ you can do:
31
65
 
32
- 8) Notice that all of your interactions in the project are expected to follow
33
- our [Code of Conduct](CODE_OF_CONDUCT.md)
66
+ * Help ensure that existing issues follows the recommendations from the
67
+ _[Reporting Issues](#reporting-issues)_ section, providing feeback to the issue's
68
+ author on what might be missing.
69
+ * Review and update the existing content of our [Wiki](https://github.com/plataformatec/devise/wiki)
70
+ with up to date instructions and code samples - the wiki was grown with several
71
+ different tutorials and references that we can't keep track of everything, so if
72
+ there is a page that showcases an integration or customization that you are
73
+ familiar with feel free to update it as necessary.
74
+ * Review existing Pull Requests, and testing patches against real existing
75
+ applications that use Devise.
34
76
 
35
- That's it! The more information you give, the easier it becomes for us to track
36
- it down and fix it. Ideally, you should provide an application that reproduces
37
- the error or a test case to Devise's suite.
77
+ Thanks again for your interest on contributing to the project!
38
78
 
39
- Thanks!
79
+ :heart:
data/Gemfile CHANGED
@@ -1,8 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source "https://rubygems.org"
2
4
 
3
5
  gemspec
4
6
 
5
- gem "rails", "~> 5.0.0"
7
+ gem "rails", "~> 5.1"
6
8
  gem "omniauth", "~> 1.3"
7
9
  gem "oauth2"
8
10
  gem "omniauth-oauth2"
data/Gemfile.lock CHANGED
@@ -1,79 +1,77 @@
1
1
  GIT
2
2
  remote: git://github.com/rails/activemodel-serializers-xml.git
3
- revision: 570ee7ed33d60e44ca1f3ccbec3d1fbf61d52cbf
3
+ revision: dd9c0acf26aab111ebc647cd8deb99ebc6946531
4
4
  specs:
5
5
  activemodel-serializers-xml (1.0.1)
6
6
  activemodel (> 5.x)
7
- activerecord (> 5.x)
8
7
  activesupport (> 5.x)
9
8
  builder (~> 3.1)
10
9
 
11
10
  PATH
12
11
  remote: .
13
12
  specs:
14
- devise (4.2.0)
13
+ devise (4.4.3)
15
14
  bcrypt (~> 3.0)
16
15
  orm_adapter (~> 0.1)
17
- railties (>= 4.1.0, < 5.1)
16
+ railties (>= 4.1.0, < 6.0)
18
17
  responders
19
18
  warden (~> 1.2.3)
20
19
 
21
20
  GEM
22
21
  remote: https://rubygems.org/
23
22
  specs:
24
- actioncable (5.0.0)
25
- actionpack (= 5.0.0)
26
- nio4r (~> 1.2)
23
+ actioncable (5.1.0)
24
+ actionpack (= 5.1.0)
25
+ nio4r (~> 2.0)
27
26
  websocket-driver (~> 0.6.1)
28
- actionmailer (5.0.0)
29
- actionpack (= 5.0.0)
30
- actionview (= 5.0.0)
31
- activejob (= 5.0.0)
27
+ actionmailer (5.1.0)
28
+ actionpack (= 5.1.0)
29
+ actionview (= 5.1.0)
30
+ activejob (= 5.1.0)
32
31
  mail (~> 2.5, >= 2.5.4)
33
32
  rails-dom-testing (~> 2.0)
34
- actionpack (5.0.0)
35
- actionview (= 5.0.0)
36
- activesupport (= 5.0.0)
33
+ actionpack (5.1.0)
34
+ actionview (= 5.1.0)
35
+ activesupport (= 5.1.0)
37
36
  rack (~> 2.0)
38
37
  rack-test (~> 0.6.3)
39
38
  rails-dom-testing (~> 2.0)
40
39
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
41
- actionview (5.0.0)
42
- activesupport (= 5.0.0)
40
+ actionview (5.1.0)
41
+ activesupport (= 5.1.0)
43
42
  builder (~> 3.1)
44
- erubis (~> 2.7.0)
43
+ erubi (~> 1.4)
45
44
  rails-dom-testing (~> 2.0)
46
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
47
- activejob (5.0.0)
48
- activesupport (= 5.0.0)
45
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
46
+ activejob (5.1.0)
47
+ activesupport (= 5.1.0)
49
48
  globalid (>= 0.3.6)
50
- activemodel (5.0.0)
51
- activesupport (= 5.0.0)
52
- activerecord (5.0.0)
53
- activemodel (= 5.0.0)
54
- activesupport (= 5.0.0)
55
- arel (~> 7.0)
56
- activesupport (5.0.0)
49
+ activemodel (5.1.0)
50
+ activesupport (= 5.1.0)
51
+ activerecord (5.1.0)
52
+ activemodel (= 5.1.0)
53
+ activesupport (= 5.1.0)
54
+ arel (~> 8.0)
55
+ activesupport (5.1.0)
57
56
  concurrent-ruby (~> 1.0, >= 1.0.2)
58
57
  i18n (~> 0.7)
59
58
  minitest (~> 5.1)
60
59
  tzinfo (~> 1.1)
61
- arel (7.0.0)
60
+ arel (8.0.0)
62
61
  bcrypt (3.1.11)
63
- builder (3.2.2)
64
- concurrent-ruby (1.0.2)
65
- erubis (2.7.0)
66
- faraday (0.9.2)
62
+ builder (3.2.3)
63
+ concurrent-ruby (1.0.5)
64
+ erubi (1.6.0)
65
+ faraday (0.11.0)
67
66
  multipart-post (>= 1.2, < 3)
68
- globalid (0.3.6)
69
- activesupport (>= 4.1.0)
70
- hashie (3.4.4)
71
- i18n (0.7.0)
72
- json (1.8.3)
73
- jwt (1.5.4)
67
+ globalid (0.4.0)
68
+ activesupport (>= 4.2.0)
69
+ hashie (3.5.5)
70
+ i18n (0.8.1)
71
+ jwt (1.5.6)
74
72
  loofah (2.0.3)
75
73
  nokogiri (>= 1.5.9)
76
- mail (2.6.4)
74
+ mail (2.6.5)
77
75
  mime-types (>= 1.16, < 4)
78
76
  metaclass (0.0.4)
79
77
  method_source (0.8.2)
@@ -81,26 +79,25 @@ GEM
81
79
  mime-types-data (~> 3.2015)
82
80
  mime-types-data (3.2016.0521)
83
81
  mini_portile2 (2.1.0)
84
- minitest (5.9.0)
85
- mocha (1.1.0)
82
+ minitest (5.10.1)
83
+ mocha (1.2.1)
86
84
  metaclass (~> 0.0.1)
87
85
  multi_json (1.12.1)
88
- multi_xml (0.5.5)
86
+ multi_xml (0.6.0)
89
87
  multipart-post (2.0.0)
90
- nio4r (1.2.1)
91
- nokogiri (1.6.8)
88
+ nio4r (2.0.0)
89
+ nokogiri (1.7.1)
92
90
  mini_portile2 (~> 2.1.0)
93
- pkg-config (~> 1.1.7)
94
- oauth2 (1.2.0)
95
- faraday (>= 0.8, < 0.10)
91
+ oauth2 (1.3.1)
92
+ faraday (>= 0.8, < 0.12)
96
93
  jwt (~> 1.0)
97
94
  multi_json (~> 1.3)
98
95
  multi_xml (~> 0.5)
99
96
  rack (>= 1.2, < 3)
100
- omniauth (1.3.1)
101
- hashie (>= 1.2, < 4)
102
- rack (>= 1.0, < 3)
103
- omniauth-facebook (3.0.0)
97
+ omniauth (1.6.1)
98
+ hashie (>= 3.4.6, < 3.6.0)
99
+ rack (>= 1.6.2, < 3)
100
+ omniauth-facebook (4.0.0)
104
101
  omniauth-oauth2 (~> 1.2)
105
102
  omniauth-oauth2 (1.4.0)
106
103
  oauth2 (~> 1.0)
@@ -109,65 +106,64 @@ GEM
109
106
  omniauth (~> 1.0)
110
107
  rack-openid (~> 1.3.1)
111
108
  orm_adapter (0.5.0)
112
- pkg-config (1.1.7)
113
109
  rack (2.0.1)
114
110
  rack-openid (1.3.1)
115
111
  rack (>= 1.1.0)
116
112
  ruby-openid (>= 2.1.8)
117
113
  rack-test (0.6.3)
118
114
  rack (>= 1.0)
119
- rails (5.0.0)
120
- actioncable (= 5.0.0)
121
- actionmailer (= 5.0.0)
122
- actionpack (= 5.0.0)
123
- actionview (= 5.0.0)
124
- activejob (= 5.0.0)
125
- activemodel (= 5.0.0)
126
- activerecord (= 5.0.0)
127
- activesupport (= 5.0.0)
115
+ rails (5.1.0)
116
+ actioncable (= 5.1.0)
117
+ actionmailer (= 5.1.0)
118
+ actionpack (= 5.1.0)
119
+ actionview (= 5.1.0)
120
+ activejob (= 5.1.0)
121
+ activemodel (= 5.1.0)
122
+ activerecord (= 5.1.0)
123
+ activesupport (= 5.1.0)
128
124
  bundler (>= 1.3.0, < 2.0)
129
- railties (= 5.0.0)
125
+ railties (= 5.1.0)
130
126
  sprockets-rails (>= 2.0.0)
131
- rails-controller-testing (0.1.1)
127
+ rails-controller-testing (1.0.1)
132
128
  actionpack (~> 5.x)
133
129
  actionview (~> 5.x)
134
130
  activesupport (~> 5.x)
135
- rails-dom-testing (2.0.1)
131
+ rails-dom-testing (2.0.2)
136
132
  activesupport (>= 4.2.0, < 6.0)
137
- nokogiri (~> 1.6.0)
133
+ nokogiri (~> 1.6)
138
134
  rails-html-sanitizer (1.0.3)
139
135
  loofah (~> 2.0)
140
- railties (5.0.0)
141
- actionpack (= 5.0.0)
142
- activesupport (= 5.0.0)
136
+ railties (5.1.0)
137
+ actionpack (= 5.1.0)
138
+ activesupport (= 5.1.0)
143
139
  method_source
144
140
  rake (>= 0.8.7)
145
141
  thor (>= 0.18.1, < 2.0)
146
- rake (11.2.2)
147
- rdoc (4.2.2)
148
- json (~> 1.4)
149
- responders (2.2.0)
150
- railties (>= 4.2.0, < 5.1)
142
+ rake (12.0.0)
143
+ rdoc (5.1.0)
144
+ responders (2.4.0)
145
+ actionpack (>= 4.2.0, < 5.3)
146
+ railties (>= 4.2.0, < 5.3)
151
147
  ruby-openid (2.7.0)
152
- sprockets (3.6.2)
148
+ sprockets (3.7.1)
153
149
  concurrent-ruby (~> 1.0)
154
150
  rack (> 1, < 3)
155
- sprockets-rails (3.1.1)
151
+ sprockets-rails (3.2.0)
156
152
  actionpack (>= 4.0)
157
153
  activesupport (>= 4.0)
158
154
  sprockets (>= 3.0.0)
159
- sqlite3 (1.3.11)
160
- thor (0.19.1)
161
- thread_safe (0.3.5)
162
- tzinfo (1.2.2)
155
+ sqlite3 (1.3.13)
156
+ thor (0.19.4)
157
+ thread_safe (0.3.6)
158
+ tzinfo (1.2.3)
163
159
  thread_safe (~> 0.1)
164
- warden (1.2.6)
160
+ warden (1.2.7)
165
161
  rack (>= 1.0)
166
162
  webrat (0.7.3)
167
163
  nokogiri (>= 1.2.0)
168
164
  rack (>= 1.0)
169
165
  rack-test (>= 0.5.3)
170
- websocket-driver (0.6.4)
166
+ websocket-driver (0.6.5)
171
167
  websocket-extensions (>= 0.1.0)
172
168
  websocket-extensions (0.1.2)
173
169
 
@@ -186,7 +182,7 @@ DEPENDENCIES
186
182
  omniauth-facebook
187
183
  omniauth-oauth2
188
184
  omniauth-openid
189
- rails (~> 5.0.0)
185
+ rails (~> 5.1)
190
186
  rails-controller-testing
191
187
  rdoc
192
188
  responders (~> 2.1)
@@ -194,4 +190,4 @@ DEPENDENCIES
194
190
  webrat (= 0.7.3)
195
191
 
196
192
  BUNDLED WITH
197
- 1.12.5
193
+ 1.16.1
data/ISSUE_TEMPLATE.md ADDED
@@ -0,0 +1,19 @@
1
+ ## Precheck
2
+
3
+ - Do not use the issues tracker for help or support, try Stack Overflow.
4
+ - For bugs, do a quick search and make sure the bug has not yet been reported
5
+ - Finally, be nice and have fun!
6
+
7
+ ## Environment
8
+
9
+ - Ruby **[version]**
10
+ - Rails **[version]**
11
+ - Devise **[version]**
12
+
13
+ ## Current behavior
14
+
15
+ Include code samples, errors, steps to reproduce the error and stacktraces if appropriate.
16
+
17
+ Will be even more helpful if you provide a sample application or a test case that reproduces the error.
18
+
19
+ ## Expected behavior
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2009-2016 Plataformatec. http://plataformatec.com.br
1
+ Copyright 2009-2017 Plataformatec. http://plataformatec.com.br
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the