devise_ennder 1.0.1.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (255) hide show
  1. data/CHANGELOG.rdoc +397 -0
  2. data/INSTALL +94 -0
  3. data/MIT-LICENSE +20 -0
  4. data/README.rdoc +272 -0
  5. data/Rakefile +53 -0
  6. data/TODO +2 -0
  7. data/app/controllers/confirmations_controller.rb +33 -0
  8. data/app/controllers/passwords_controller.rb +41 -0
  9. data/app/controllers/registrations_controller.rb +62 -0
  10. data/app/controllers/sessions_controller.rb +42 -0
  11. data/app/controllers/unlocks_controller.rb +41 -0
  12. data/app/models/devise_mailer.rb +68 -0
  13. data/app/models/user.rb +9 -0
  14. data/app/views/confirmations/new.html.erb +14 -0
  15. data/app/views/devise_mailer/confirmation_instructions.html.erb +6 -0
  16. data/app/views/devise_mailer/reset_password_instructions.html.erb +8 -0
  17. data/app/views/devise_mailer/unlock_instructions.html.erb +7 -0
  18. data/app/views/passwords/edit.html.erb +16 -0
  19. data/app/views/passwords/new.html.erb +12 -0
  20. data/app/views/registrations/edit.html.erb +25 -0
  21. data/app/views/registrations/new.html.erb +17 -0
  22. data/app/views/sessions/new.html.erb +17 -0
  23. data/app/views/shared/_devise_links.erb +19 -0
  24. data/app/views/shared/_user_nav.html.erb +15 -0
  25. data/app/views/unlocks/new.html.erb +12 -0
  26. data/config/locales/devise.en.yml +62 -0
  27. data/config/locales/devise.fr.yml +60 -0
  28. data/config/locales/en.yml +6 -0
  29. data/config/locales/fr.yml +18 -0
  30. data/config/routes.rb +4 -0
  31. data/db/migrate/20100506013336_devise_create_users.rb +23 -0
  32. data/lib/devise/controllers/helpers.rb +212 -0
  33. data/lib/devise/controllers/internal_helpers.rb +129 -0
  34. data/lib/devise/controllers/url_helpers.rb +41 -0
  35. data/lib/devise/encryptors/authlogic_sha512.rb +21 -0
  36. data/lib/devise/encryptors/base.rb +20 -0
  37. data/lib/devise/encryptors/bcrypt.rb +21 -0
  38. data/lib/devise/encryptors/clearance_sha1.rb +19 -0
  39. data/lib/devise/encryptors/restful_authentication_sha1.rb +22 -0
  40. data/lib/devise/encryptors/sha1.rb +27 -0
  41. data/lib/devise/encryptors/sha512.rb +27 -0
  42. data/lib/devise/failure_app.rb +70 -0
  43. data/lib/devise/hooks/activatable.rb +15 -0
  44. data/lib/devise/hooks/rememberable.rb +33 -0
  45. data/lib/devise/hooks/timeoutable.rb +18 -0
  46. data/lib/devise/hooks/trackable.rb +18 -0
  47. data/lib/devise/locales/en.yml +35 -0
  48. data/lib/devise/mapping.rb +130 -0
  49. data/lib/devise/models/activatable.rb +16 -0
  50. data/lib/devise/models/confirmable.rb +167 -0
  51. data/lib/devise/models/database_authenticatable.rb +144 -0
  52. data/lib/devise/models/http_authenticatable.rb +23 -0
  53. data/lib/devise/models/lockable.rb +150 -0
  54. data/lib/devise/models/recoverable.rb +80 -0
  55. data/lib/devise/models/registerable.rb +8 -0
  56. data/lib/devise/models/rememberable.rb +92 -0
  57. data/lib/devise/models/timeoutable.rb +28 -0
  58. data/lib/devise/models/token_authenticatable.rb +89 -0
  59. data/lib/devise/models/trackable.rb +16 -0
  60. data/lib/devise/models/validatable.rb +39 -0
  61. data/lib/devise/models.rb +117 -0
  62. data/lib/devise/orm/active_record.rb +41 -0
  63. data/lib/devise/orm/data_mapper.rb +83 -0
  64. data/lib/devise/orm/mongo_mapper.rb +52 -0
  65. data/lib/devise/rails/routes.rb +133 -0
  66. data/lib/devise/rails/warden_compat.rb +60 -0
  67. data/lib/devise/rails.rb +14 -0
  68. data/lib/devise/schema.rb +73 -0
  69. data/lib/devise/strategies/base.rb +16 -0
  70. data/lib/devise/strategies/database_authenticatable.rb +36 -0
  71. data/lib/devise/strategies/http_authenticatable.rb +59 -0
  72. data/lib/devise/strategies/rememberable.rb +37 -0
  73. data/lib/devise/strategies/token_authenticatable.rb +37 -0
  74. data/lib/devise/test_helpers.rb +90 -0
  75. data/lib/devise/version.rb +3 -0
  76. data/lib/devise.rb +269 -0
  77. data/lib/devise_ennder.rb +3 -0
  78. data/lib/tasks/devise_ennder_tasks.rake +11 -0
  79. data/test/controllers/helpers_test.rb +184 -0
  80. data/test/controllers/internal_helpers_test.rb +55 -0
  81. data/test/controllers/url_helpers_test.rb +47 -0
  82. data/test/devise_test.rb +74 -0
  83. data/test/encryptors_test.rb +31 -0
  84. data/test/failure_app_test.rb +44 -0
  85. data/test/integration/authenticatable_test.rb +332 -0
  86. data/test/integration/confirmable_test.rb +97 -0
  87. data/test/integration/http_authenticatable_test.rb +52 -0
  88. data/test/integration/lockable_test.rb +102 -0
  89. data/test/integration/rack_middleware_test.rb +47 -0
  90. data/test/integration/recoverable_test.rb +141 -0
  91. data/test/integration/registerable_test.rb +144 -0
  92. data/test/integration/rememberable_test.rb +72 -0
  93. data/test/integration/timeoutable_test.rb +68 -0
  94. data/test/integration/token_authenticatable_test.rb +55 -0
  95. data/test/integration/trackable_test.rb +64 -0
  96. data/test/mailers/confirmation_instructions_test.rb +86 -0
  97. data/test/mailers/reset_password_instructions_test.rb +68 -0
  98. data/test/mailers/unlock_instructions_test.rb +62 -0
  99. data/test/mapping_test.rb +158 -0
  100. data/test/models/authenticatable_test.rb +180 -0
  101. data/test/models/confirmable_test.rb +228 -0
  102. data/test/models/lockable_test.rb +202 -0
  103. data/test/models/recoverable_test.rb +138 -0
  104. data/test/models/rememberable_test.rb +135 -0
  105. data/test/models/timeoutable_test.rb +28 -0
  106. data/test/models/token_authenticatable_test.rb +51 -0
  107. data/test/models/trackable_test.rb +5 -0
  108. data/test/models/validatable_test.rb +106 -0
  109. data/test/models_test.rb +70 -0
  110. data/test/orm/active_record.rb +31 -0
  111. data/test/orm/mongo_mapper.rb +20 -0
  112. data/test/rails_app/app/active_record/admin.rb +7 -0
  113. data/test/rails_app/app/active_record/user.rb +7 -0
  114. data/test/rails_app/app/controllers/admins_controller.rb +6 -0
  115. data/test/rails_app/app/controllers/application_controller.rb +12 -0
  116. data/test/rails_app/app/controllers/home_controller.rb +4 -0
  117. data/test/rails_app/app/controllers/users_controller.rb +16 -0
  118. data/test/rails_app/app/helpers/application_helper.rb +3 -0
  119. data/test/rails_app/app/mongo_mapper/admin.rb +13 -0
  120. data/test/rails_app/app/mongo_mapper/user.rb +14 -0
  121. data/test/rails_app/config/boot.rb +110 -0
  122. data/test/rails_app/config/environment.rb +42 -0
  123. data/test/rails_app/config/environments/development.rb +17 -0
  124. data/test/rails_app/config/environments/production.rb +28 -0
  125. data/test/rails_app/config/environments/test.rb +28 -0
  126. data/test/rails_app/config/initializers/devise.rb +82 -0
  127. data/test/rails_app/config/initializers/inflections.rb +2 -0
  128. data/test/rails_app/config/initializers/new_rails_defaults.rb +24 -0
  129. data/test/rails_app/config/initializers/session_store.rb +15 -0
  130. data/test/rails_app/config/routes.rb +25 -0
  131. data/test/rails_app/vendor/plugins/devise/app/controllers/confirmations_controller.rb +33 -0
  132. data/test/rails_app/vendor/plugins/devise/app/controllers/passwords_controller.rb +41 -0
  133. data/test/rails_app/vendor/plugins/devise/app/controllers/registrations_controller.rb +53 -0
  134. data/test/rails_app/vendor/plugins/devise/app/controllers/sessions_controller.rb +42 -0
  135. data/test/rails_app/vendor/plugins/devise/app/controllers/unlocks_controller.rb +41 -0
  136. data/test/rails_app/vendor/plugins/devise/app/models/devise_mailer.rb +68 -0
  137. data/test/rails_app/vendor/plugins/devise/generators/devise/devise_generator.rb +15 -0
  138. data/test/rails_app/vendor/plugins/devise/generators/devise/lib/route_devise.rb +32 -0
  139. data/test/rails_app/vendor/plugins/devise/generators/devise/templates/migration.rb +23 -0
  140. data/test/rails_app/vendor/plugins/devise/generators/devise/templates/model.rb +9 -0
  141. data/test/rails_app/vendor/plugins/devise/generators/devise_install/devise_install_generator.rb +15 -0
  142. data/test/rails_app/vendor/plugins/devise/generators/devise_install/templates/devise.rb +105 -0
  143. data/test/rails_app/vendor/plugins/devise/generators/devise_views/devise_views_generator.rb +21 -0
  144. data/test/rails_app/vendor/plugins/devise/lib/devise/controllers/helpers.rb +212 -0
  145. data/test/rails_app/vendor/plugins/devise/lib/devise/controllers/internal_helpers.rb +129 -0
  146. data/test/rails_app/vendor/plugins/devise/lib/devise/controllers/url_helpers.rb +41 -0
  147. data/test/rails_app/vendor/plugins/devise/lib/devise/encryptors/authlogic_sha512.rb +21 -0
  148. data/test/rails_app/vendor/plugins/devise/lib/devise/encryptors/base.rb +20 -0
  149. data/test/rails_app/vendor/plugins/devise/lib/devise/encryptors/bcrypt.rb +21 -0
  150. data/test/rails_app/vendor/plugins/devise/lib/devise/encryptors/clearance_sha1.rb +19 -0
  151. data/test/rails_app/vendor/plugins/devise/lib/devise/encryptors/restful_authentication_sha1.rb +22 -0
  152. data/test/rails_app/vendor/plugins/devise/lib/devise/encryptors/sha1.rb +27 -0
  153. data/test/rails_app/vendor/plugins/devise/lib/devise/encryptors/sha512.rb +27 -0
  154. data/test/rails_app/vendor/plugins/devise/lib/devise/failure_app.rb +70 -0
  155. data/test/rails_app/vendor/plugins/devise/lib/devise/hooks/activatable.rb +15 -0
  156. data/test/rails_app/vendor/plugins/devise/lib/devise/hooks/rememberable.rb +33 -0
  157. data/test/rails_app/vendor/plugins/devise/lib/devise/hooks/timeoutable.rb +18 -0
  158. data/test/rails_app/vendor/plugins/devise/lib/devise/hooks/trackable.rb +18 -0
  159. data/test/rails_app/vendor/plugins/devise/lib/devise/mapping.rb +130 -0
  160. data/test/rails_app/vendor/plugins/devise/lib/devise/models/activatable.rb +16 -0
  161. data/test/rails_app/vendor/plugins/devise/lib/devise/models/confirmable.rb +167 -0
  162. data/test/rails_app/vendor/plugins/devise/lib/devise/models/database_authenticatable.rb +144 -0
  163. data/test/rails_app/vendor/plugins/devise/lib/devise/models/http_authenticatable.rb +23 -0
  164. data/test/rails_app/vendor/plugins/devise/lib/devise/models/lockable.rb +150 -0
  165. data/test/rails_app/vendor/plugins/devise/lib/devise/models/recoverable.rb +80 -0
  166. data/test/rails_app/vendor/plugins/devise/lib/devise/models/registerable.rb +8 -0
  167. data/test/rails_app/vendor/plugins/devise/lib/devise/models/rememberable.rb +92 -0
  168. data/test/rails_app/vendor/plugins/devise/lib/devise/models/timeoutable.rb +28 -0
  169. data/test/rails_app/vendor/plugins/devise/lib/devise/models/token_authenticatable.rb +89 -0
  170. data/test/rails_app/vendor/plugins/devise/lib/devise/models/trackable.rb +16 -0
  171. data/test/rails_app/vendor/plugins/devise/lib/devise/models/validatable.rb +39 -0
  172. data/test/rails_app/vendor/plugins/devise/lib/devise/models.rb +117 -0
  173. data/test/rails_app/vendor/plugins/devise/lib/devise/orm/active_record.rb +41 -0
  174. data/test/rails_app/vendor/plugins/devise/lib/devise/orm/data_mapper.rb +83 -0
  175. data/test/rails_app/vendor/plugins/devise/lib/devise/orm/mongo_mapper.rb +52 -0
  176. data/test/rails_app/vendor/plugins/devise/lib/devise/rails/routes.rb +133 -0
  177. data/test/rails_app/vendor/plugins/devise/lib/devise/rails/warden_compat.rb +60 -0
  178. data/test/rails_app/vendor/plugins/devise/lib/devise/rails.rb +14 -0
  179. data/test/rails_app/vendor/plugins/devise/lib/devise/schema.rb +73 -0
  180. data/test/rails_app/vendor/plugins/devise/lib/devise/strategies/base.rb +16 -0
  181. data/test/rails_app/vendor/plugins/devise/lib/devise/strategies/database_authenticatable.rb +36 -0
  182. data/test/rails_app/vendor/plugins/devise/lib/devise/strategies/http_authenticatable.rb +59 -0
  183. data/test/rails_app/vendor/plugins/devise/lib/devise/strategies/rememberable.rb +37 -0
  184. data/test/rails_app/vendor/plugins/devise/lib/devise/strategies/token_authenticatable.rb +37 -0
  185. data/test/rails_app/vendor/plugins/devise/lib/devise/test_helpers.rb +90 -0
  186. data/test/rails_app/vendor/plugins/devise/lib/devise/version.rb +3 -0
  187. data/test/rails_app/vendor/plugins/devise/lib/devise.rb +266 -0
  188. data/test/rails_app/vendor/plugins/devise/rails/init.rb +2 -0
  189. data/test/rails_app/vendor/plugins/devise/test/controllers/helpers_test.rb +184 -0
  190. data/test/rails_app/vendor/plugins/devise/test/controllers/internal_helpers_test.rb +55 -0
  191. data/test/rails_app/vendor/plugins/devise/test/controllers/url_helpers_test.rb +47 -0
  192. data/test/rails_app/vendor/plugins/devise/test/devise_test.rb +74 -0
  193. data/test/rails_app/vendor/plugins/devise/test/encryptors_test.rb +31 -0
  194. data/test/rails_app/vendor/plugins/devise/test/failure_app_test.rb +44 -0
  195. data/test/rails_app/vendor/plugins/devise/test/integration/authenticatable_test.rb +332 -0
  196. data/test/rails_app/vendor/plugins/devise/test/integration/confirmable_test.rb +97 -0
  197. data/test/rails_app/vendor/plugins/devise/test/integration/http_authenticatable_test.rb +52 -0
  198. data/test/rails_app/vendor/plugins/devise/test/integration/lockable_test.rb +102 -0
  199. data/test/rails_app/vendor/plugins/devise/test/integration/rack_middleware_test.rb +47 -0
  200. data/test/rails_app/vendor/plugins/devise/test/integration/recoverable_test.rb +141 -0
  201. data/test/rails_app/vendor/plugins/devise/test/integration/registerable_test.rb +144 -0
  202. data/test/rails_app/vendor/plugins/devise/test/integration/rememberable_test.rb +72 -0
  203. data/test/rails_app/vendor/plugins/devise/test/integration/timeoutable_test.rb +68 -0
  204. data/test/rails_app/vendor/plugins/devise/test/integration/token_authenticatable_test.rb +55 -0
  205. data/test/rails_app/vendor/plugins/devise/test/integration/trackable_test.rb +64 -0
  206. data/test/rails_app/vendor/plugins/devise/test/mailers/confirmation_instructions_test.rb +86 -0
  207. data/test/rails_app/vendor/plugins/devise/test/mailers/reset_password_instructions_test.rb +68 -0
  208. data/test/rails_app/vendor/plugins/devise/test/mailers/unlock_instructions_test.rb +62 -0
  209. data/test/rails_app/vendor/plugins/devise/test/mapping_test.rb +158 -0
  210. data/test/rails_app/vendor/plugins/devise/test/models/authenticatable_test.rb +180 -0
  211. data/test/rails_app/vendor/plugins/devise/test/models/confirmable_test.rb +228 -0
  212. data/test/rails_app/vendor/plugins/devise/test/models/lockable_test.rb +202 -0
  213. data/test/rails_app/vendor/plugins/devise/test/models/recoverable_test.rb +138 -0
  214. data/test/rails_app/vendor/plugins/devise/test/models/rememberable_test.rb +135 -0
  215. data/test/rails_app/vendor/plugins/devise/test/models/timeoutable_test.rb +28 -0
  216. data/test/rails_app/vendor/plugins/devise/test/models/token_authenticatable_test.rb +51 -0
  217. data/test/rails_app/vendor/plugins/devise/test/models/trackable_test.rb +5 -0
  218. data/test/rails_app/vendor/plugins/devise/test/models/validatable_test.rb +106 -0
  219. data/test/rails_app/vendor/plugins/devise/test/models_test.rb +70 -0
  220. data/test/rails_app/vendor/plugins/devise/test/orm/active_record.rb +31 -0
  221. data/test/rails_app/vendor/plugins/devise/test/orm/mongo_mapper.rb +20 -0
  222. data/test/rails_app/vendor/plugins/devise/test/rails_app/app/active_record/admin.rb +7 -0
  223. data/test/rails_app/vendor/plugins/devise/test/rails_app/app/active_record/user.rb +7 -0
  224. data/test/rails_app/vendor/plugins/devise/test/rails_app/app/controllers/admins_controller.rb +6 -0
  225. data/test/rails_app/vendor/plugins/devise/test/rails_app/app/controllers/application_controller.rb +12 -0
  226. data/test/rails_app/vendor/plugins/devise/test/rails_app/app/controllers/home_controller.rb +4 -0
  227. data/test/rails_app/vendor/plugins/devise/test/rails_app/app/controllers/users_controller.rb +16 -0
  228. data/test/rails_app/vendor/plugins/devise/test/rails_app/app/helpers/application_helper.rb +3 -0
  229. data/test/rails_app/vendor/plugins/devise/test/rails_app/app/mongo_mapper/admin.rb +13 -0
  230. data/test/rails_app/vendor/plugins/devise/test/rails_app/app/mongo_mapper/user.rb +14 -0
  231. data/test/rails_app/vendor/plugins/devise/test/rails_app/config/boot.rb +110 -0
  232. data/test/rails_app/vendor/plugins/devise/test/rails_app/config/environment.rb +42 -0
  233. data/test/rails_app/vendor/plugins/devise/test/rails_app/config/environments/development.rb +17 -0
  234. data/test/rails_app/vendor/plugins/devise/test/rails_app/config/environments/production.rb +28 -0
  235. data/test/rails_app/vendor/plugins/devise/test/rails_app/config/environments/test.rb +28 -0
  236. data/test/rails_app/vendor/plugins/devise/test/rails_app/config/initializers/devise.rb +82 -0
  237. data/test/rails_app/vendor/plugins/devise/test/rails_app/config/initializers/inflections.rb +2 -0
  238. data/test/rails_app/vendor/plugins/devise/test/rails_app/config/initializers/new_rails_defaults.rb +24 -0
  239. data/test/rails_app/vendor/plugins/devise/test/rails_app/config/initializers/session_store.rb +15 -0
  240. data/test/rails_app/vendor/plugins/devise/test/rails_app/config/routes.rb +25 -0
  241. data/test/rails_app/vendor/plugins/devise/test/routes_test.rb +131 -0
  242. data/test/rails_app/vendor/plugins/devise/test/support/assertions_helper.rb +37 -0
  243. data/test/rails_app/vendor/plugins/devise/test/support/integration_tests_helper.rb +71 -0
  244. data/test/rails_app/vendor/plugins/devise/test/support/test_silencer.rb +5 -0
  245. data/test/rails_app/vendor/plugins/devise/test/support/tests_helper.rb +39 -0
  246. data/test/rails_app/vendor/plugins/devise/test/test_helper.rb +21 -0
  247. data/test/rails_app/vendor/plugins/devise/test/test_helpers_test.rb +57 -0
  248. data/test/routes_test.rb +131 -0
  249. data/test/support/assertions_helper.rb +37 -0
  250. data/test/support/integration_tests_helper.rb +71 -0
  251. data/test/support/test_silencer.rb +5 -0
  252. data/test/support/tests_helper.rb +39 -0
  253. data/test/test_helper.rb +21 -0
  254. data/test/test_helpers_test.rb +57 -0
  255. metadata +515 -0
data/CHANGELOG.rdoc ADDED
@@ -0,0 +1,397 @@
1
+ == 1.0.9
2
+
3
+ * enhancements
4
+ * Extracted redirect path from Devise failure app to a new method, allowing override in custom failure apps
5
+ * Added sign_out_via
6
+
7
+ * bug fix
8
+ * Email is now case insensitive
9
+ * Avoid session fixation attacks
10
+
11
+ == 1.0.8
12
+
13
+ * enhancements
14
+ * Support for latest MongoMapper
15
+ * Added anybody_signed_in? helper (by github.com/SSDany)
16
+
17
+ * bug fix
18
+ * confirmation_required? is properly honored on active? calls. (by github.com/paulrosania)
19
+
20
+ == 1.0.7
21
+
22
+ * bug fix
23
+ * Ensure password confirmation is always required
24
+
25
+ * deprecations
26
+ * authenticatable was deprecated and renamed to database_authenticatable
27
+ * confirmable is not included by default on generation
28
+
29
+ == 1.0.6
30
+
31
+ * bug fix
32
+ * Do not allow unlockable strategies based on time to access a controller.
33
+ * Do not send unlockable email several times.
34
+ * Allow controller to upstram custom! failures to Warden.
35
+
36
+ == 1.0.5
37
+
38
+ * bug fix
39
+ * Use prepend_before_filter in require_no_authentication.
40
+ * require_no_authentication on unlockable.
41
+ * Fix a bug when giving an association proxy to devise.
42
+ * Do not use lock! on lockable since it's part of ActiveRecord API.
43
+
44
+ == 1.0.4
45
+
46
+ * bug fix
47
+ * Fixed a bug when deleting an account with rememberable
48
+ * Fixed a bug with custom controllers
49
+
50
+ == 1.0.3
51
+
52
+ * enhancements
53
+ * HTML e-mails now have proper formatting
54
+ * Do not remove MongoMapper options in find
55
+
56
+ == 1.0.2
57
+
58
+ * enhancements
59
+ * Allows you set mailer content type (by github.com/glennr)
60
+
61
+ * bug fix
62
+ * Uses the same content type as request on http authenticatable 401 responses
63
+
64
+ == 1.0.1
65
+
66
+ * enhancements
67
+ * HttpAuthenticatable is not added by default automatically.
68
+ * Avoid mass assignment error messages with current password.
69
+
70
+ * bug fix
71
+ * Fixed encryptors autoload
72
+
73
+ == 1.0.0
74
+
75
+ * deprecation
76
+ * :old_password in update_with_password is deprecated, use :current_password instead
77
+
78
+ * enhancements
79
+ * Added Registerable
80
+ * Added Http Basic Authentication support
81
+ * Allow scoped_views to be customized per controller/mailer class
82
+ * [#99] Allow authenticatable to used in change_table statements
83
+ * Add mailer_content_type configuration parameter (by github.com/glennr)
84
+
85
+ == 0.9.2
86
+
87
+ * bug fix
88
+ * Ensure inactive user cannot sign in
89
+ * Ensure redirect to proper url after sign up
90
+
91
+ * enhancements
92
+ * Added gemspec to repo
93
+ * Added token authenticatable (by github.com/grimen)
94
+
95
+ == 0.9.1
96
+
97
+ * bug fix
98
+ * Allow bigger salt size (by github.com/jgeiger)
99
+ * Fix relative url root
100
+
101
+ == 0.9.0
102
+
103
+ * deprecation
104
+ * devise :all is deprecated
105
+ * :success and :failure flash messages are now :notice and :alert
106
+
107
+ * enhancements
108
+ * Added devise lockable (by github.com/mhfs)
109
+ * Warden 0.9.0 compatibility
110
+ * Mongomapper 0.6.10 compatibility
111
+ * Added Devise.add_module as hooks for extensions (by github.com/grimen)
112
+ * Ruby 1.9.1 compatibility (by github.com/grimen)
113
+
114
+ * bug fix
115
+ * Accept path prefix not starting with slash
116
+ * url helpers should rely on find_scope!
117
+
118
+ == 0.8.2
119
+
120
+ * enhancements
121
+ * Allow Devise.mailer_sender to be a proc (by github.com/grimen)
122
+
123
+ * bug fix
124
+ * Fix bug with passenger, update is required to anyone deploying on passenger (by github.com/dvdpalm)
125
+
126
+ == 0.8.1
127
+
128
+ * enhancements
129
+ * Move salt to encryptors
130
+ * Devise::Lockable
131
+ * Moved view links into partial and I18n'ed them
132
+
133
+ * bug fix
134
+ * Bcrypt generator was not being loaded neither setting the proper salt
135
+
136
+ == 0.8.0
137
+
138
+ * enhancements
139
+ * Warden 0.8.0 compatibility
140
+ * Add an easy for map.connect "sign_in", :controller => "sessions", :action => "new" to work
141
+ * Added :bcrypt encryptor (by github.com/capotej)
142
+
143
+ * bug fix
144
+ * sign_in_count is also increased when user signs in via password change, confirmation, etc..
145
+ * More DataMapper compatibility (by github.com/lancecarlson)
146
+
147
+ * deprecation
148
+ * Removed DeviseMailer.sender
149
+
150
+ == 0.7.5
151
+
152
+ * enhancements
153
+ * Set a default value for mailer to avoid find_template issues
154
+ * Add models configuration to MongoMapper::EmbeddedDocument as well
155
+
156
+ == 0.7.4
157
+
158
+ * enhancements
159
+ * Extract Activatable from Confirmable
160
+ * Decouple Serializers from Devise modules
161
+
162
+ == 0.7.3
163
+
164
+ * bug fix
165
+ * Give scope to the proper model validation
166
+
167
+ * enhancements
168
+ * Mail views are scoped as well
169
+ * Added update_with_password for authenticatable
170
+ * Allow render_with_scope to accept :controller option
171
+
172
+ == 0.7.2
173
+
174
+ * deprecation
175
+ * Renamed reset_confirmation! to resend_confirmation!
176
+ * Copying locale is part of the installation process
177
+
178
+ * bug fix
179
+ * Fixed render_with_scope to work with all controllers
180
+ * Allow sign in with two different users in Devise::TestHelpers
181
+
182
+ == 0.7.1
183
+
184
+ * enhancements
185
+ * Small enhancements for other plugins compatibility (by github.com/grimen)
186
+
187
+ == 0.7.0
188
+
189
+ * deprecations
190
+ * :authenticatable is not included by default anymore
191
+
192
+ * enhancements
193
+ * Improve loading process
194
+ * Extract SessionSerializer from Authenticatable
195
+
196
+ == 0.6.3
197
+
198
+ * bug fix
199
+ * Added trackable to migrations
200
+ * Allow inflections to work
201
+
202
+ == 0.6.2
203
+
204
+ * enhancements
205
+ * More DataMapper compatibility
206
+ * Devise::Trackable - track sign in count, timestamps and ips
207
+
208
+ == 0.6.1
209
+
210
+ * enhancements
211
+ * Devise::Timeoutable - timeout sessions without activity
212
+ * DataMapper now accepts conditions
213
+
214
+ == 0.6.0
215
+
216
+ * deprecations
217
+ * :authenticatable is still included by default, but yields a deprecation warning
218
+
219
+ * enhancements
220
+ * Added DataMapper support
221
+ * Remove store_location from authenticatable strategy and add it to failure app
222
+ * Allow a strategy to be placed after authenticatable
223
+ * [#45] Do not rely attribute? methods, since they are not added on Datamapper
224
+
225
+ == 0.5.6
226
+
227
+ * enhancements
228
+ * [#42] Do not send nil to build (DataMapper compatibility)
229
+ * [#44] Allow to have scoped views
230
+
231
+ == 0.5.5
232
+
233
+ * enhancements
234
+ * Allow overwriting find for authentication method
235
+ * [#38] Remove Ruby 1.8.7 dependency
236
+
237
+ == 0.5.4
238
+
239
+ * deprecations
240
+ * Deprecate :singular in devise_for and use :scope instead
241
+
242
+ * enhancements
243
+ * [#37] Create after_sign_in_path_for and after_sign_out_path_for hooks to be
244
+ overwriten in ApplicationController
245
+ * Create sign_in_and_redirect and sign_out_and_redirect helpers
246
+ * Warden::Manager.default_scope is automatically configured to the first given scope
247
+
248
+ == 0.5.3
249
+
250
+ * bug fix
251
+ * MongoMapper now converts DateTime to Time
252
+ * Ensure all controllers are unloadable
253
+
254
+ * enhancements
255
+ * [#35] Moved friendly_token to Devise
256
+ * Added Devise.all, so you can freeze your app strategies
257
+ * Added Devise.apply_schema, so you can turn it to false in Datamapper or MongoMapper
258
+ in cases you don't want it be handlded automatically
259
+
260
+ == 0.5.2
261
+
262
+ * enhancements
263
+ * [#28] Improved sign_in and sign_out helpers to accepts resources
264
+ * [#28] Added stored_location_for as a helper
265
+ * [#20] Added test helpers
266
+
267
+ == 0.5.1
268
+
269
+ * enhancements
270
+ * Added serializers based on Warden ones
271
+ * Allow authentication keys to be set
272
+
273
+ == 0.5.0
274
+
275
+ * bug fix
276
+ * Fixed a bug where remember me module was not working properly
277
+
278
+ * enhancements
279
+ * Moved encryption strategy into the Encryptors module to allow several algorithms (by github.com/mhfs)
280
+ * Implemented encryptors for Clearance, Authlogic and Restful-Authentication (by github.com/mhfs)
281
+ * Added support for MongoMapper (by github.com/shingara)
282
+
283
+ == 0.4.3
284
+
285
+ * bug fix
286
+ * [#29] Authentication just fails if user cannot be serialized from session, without raising errors;
287
+ * Default configuration values should not overwrite user values;
288
+
289
+ == 0.4.2
290
+
291
+ * deprecations
292
+ * Renamed mail_sender to mailer_sender
293
+
294
+ * enhancements
295
+ * skip_before_filter added in Devise controllers
296
+ * Use home_or_root_path on require_no_authentication as well
297
+ * Added devise_controller?, useful to select or reject filters in ApplicationController
298
+ * Allow :path_prefix to be given to devise_for
299
+ * Allow default_url_options to be configured through devise (:path_prefix => "/:locale" is now supported)
300
+
301
+ == 0.4.1
302
+
303
+ * bug fix
304
+ * [#21] Ensure options can be set even if models were not loaded
305
+
306
+ == 0.4.0
307
+
308
+ * deprecations
309
+ * Notifier is deprecated, use DeviseMailer instead. Remember to rename
310
+ app/views/notifier to app/views/devise_mailer and I18n key from
311
+ devise.notifier to devise.mailer
312
+ * :authenticable calls are deprecated, use :authenticatable instead
313
+
314
+ * enhancements
315
+ * [#16] Allow devise to be more agnostic and do not require ActiveRecord to be loaded
316
+ * Allow Warden::Manager to be configured through Devise
317
+ * Created a generator which creates an initializer
318
+
319
+ == 0.3.0
320
+
321
+ * bug fix
322
+ * [#15] Allow yml messages to be configured by not using engine locales
323
+
324
+ * deprecations
325
+ * Renamed confirm_in to confirm_within
326
+ * [#14] Do not send confirmation messages when user changes his e-mail
327
+ * [#13] Renamed authenticable to authenticatable and added deprecation warnings
328
+
329
+ == 0.2.3
330
+
331
+ * enhancements
332
+ * Ensure fail! works inside strategies
333
+ * [#12] Make unauthenticated message (when you haven't signed in) different from invalid message
334
+
335
+ * bug fix
336
+ * Do not redirect on invalid authenticate
337
+ * Allow model configuration to be set to nil
338
+
339
+ == 0.2.2
340
+
341
+ * bug fix
342
+ * [#9] Fix a bug when using customized resources
343
+
344
+ == 0.2.1
345
+
346
+ * refactor
347
+ * Clean devise_views generator to use devise existing views
348
+
349
+ * enhancements
350
+ * [#7] Create instance variables (like @user) for each devise controller
351
+ * Use Devise::Controller::Helpers only internally
352
+
353
+ * bug fix
354
+ * [#6] Fix a bug with Mongrel and Ruby 1.8.6
355
+
356
+ == 0.2.0
357
+
358
+ * enhancements
359
+ * [#4] Allow option :null => true in authenticable migration
360
+ * [#3] Remove attr_accessible calls from devise modules
361
+ * Customizable time frame for rememberable with :remember_for config
362
+ * Customizable time frame for confirmable with :confirm_in config
363
+ * Generators for creating a resource and copy views
364
+
365
+ * optimize
366
+ * Do not load hooks or strategies if they are not used
367
+
368
+ * bug fixes
369
+ * [#2] Fixed requiring devise strategies
370
+
371
+ == 0.1.1
372
+
373
+ * bug fixes
374
+ * [#1] Fixed requiring devise mapping
375
+
376
+ == 0.1.0
377
+
378
+ * Devise::Authenticable
379
+ * Devise::Confirmable
380
+ * Devise::Recoverable
381
+ * Devise::Validatable
382
+ * Devise::Migratable
383
+ * Devise::Rememberable
384
+
385
+ * SessionsController
386
+ * PasswordsController
387
+ * ConfirmationsController
388
+
389
+ * Create an example app
390
+ * devise :all, :except => :rememberable
391
+ * Use sign_in and sign_out in SessionsController
392
+
393
+ * Mailer subjects namespaced by model
394
+ * Allow stretches and pepper per model
395
+
396
+ * Store session[:return_to] in session
397
+ * Sign user in automatically after confirming or changing it's password
data/INSTALL ADDED
@@ -0,0 +1,94 @@
1
+ Instructions d'installation du plugin Devise traduit par Ennder
2
+ ---------------------------------------------------------------
3
+
4
+ 1) Installation du Gem :
5
+ Le Gem warden en version 0.10.7 jusqu'à 0.10.9 doit-être installé sur votre serveur.
6
+
7
+ Pour installer devise ennder :
8
+ gem install devise_ennder
9
+ Ce Gem est généré par le Gem jeweler :
10
+ gem install jeweler
11
+ rake release
12
+
13
+
14
+ 2) Le modèle User :
15
+ Utiliser la tâche devise_ennder:sync_migrations pour installer le fichier de migration
16
+ Attention au nom du fichier de migration, par rapport à sa date.
17
+
18
+ Utiliser la tâche devise_ennder:sync_user_model pour installer le modèle User
19
+ Ce n'est qu'après que vous pourrez le personnaliser.
20
+ Notamment en y ajoutant vos relations, vos attributs additionnels.
21
+
22
+ Vous pouvez aussi sélectionner parmi les 12 sous-fonctionnalités de Devise,
23
+ mais attention, il peut y avoir des champs à rajouter dans le fichier de migration.
24
+
25
+ Le plugin apporte :
26
+ - Les vues traduites
27
+ - Un partiel _user_nav qui apporte les liens se connecter, s'inscrire etc...
28
+ - Un message d'erreur si l'on essaye de supprimer l'utilisateur administrateur
29
+ - Un modèle User pré-généré à recopier avec une tâche rake
30
+ - Un fichier de migration à recopier avec une tâche rake
31
+ - Un fichier .gitignore pour la génération du Gem
32
+ - Un guide d'installation (INSTALL)
33
+
34
+ TODO A VERIFIER
35
+ - les routes
36
+ - les traductions
37
+
38
+ Et retire :
39
+ - Les générateurs
40
+
41
+
42
+ 3) Ensuite il y a des paramètres à fixer dans le fichier de configuration :
43
+
44
+ 3.1) L'adresse qui envoie les mails d'enregistrement :
45
+ Ajouter un fichier config/initialiers/devise.rb, qui contient :
46
+
47
+ __________________________________________
48
+ Devise.setup do |config|
49
+ config.mailer_sender = 'mail@domaine.com'
50
+
51
+ # Ajout login par nom d'utilisateur : nécéssite un attribut attr_accessible username dans le modèle user
52
+ # config.authentication_keys = [ :email, :username ]
53
+ end
54
+ ___________________________________________
55
+
56
+
57
+ 3.2) En développement vous pouvez activer la remontée des erreurs dans l'interface en commentant la ligne suivante
58
+ config.action_mailer.raise_delivery_errors = false
59
+
60
+ 3.3) Il vous faut aussi fixer l'URL suivante :
61
+ config.action_mailer.default_url_options = { :host => 'serveur.domaine.com:80' }
62
+
63
+ 3.4) La configuration SMTP :
64
+ config.action_mailer.smtp_settings = {
65
+ :address => 'serveur_smtp.domaine_du_fai.com',
66
+ :port => 25,
67
+ :domain => "domaine_du_fai.com"
68
+ }
69
+
70
+
71
+ 4) Ajouter un before_filter au Controlleur de l'application :
72
+
73
+ before_filter :authenticate_user!, :unless => :authenticate_user_exception?
74
+
75
+ #Méthode ajoutée qui permet de désactiver l'authentifications sur certains controlleurs
76
+ def authenticate_user_exception?
77
+ return (controller_name == "produits")
78
+ end
79
+
80
+
81
+ 5) Enfin vous pouvez aussi surcharger les vues en les recopiant depuis le plugin :
82
+
83
+
84
+ Utilisation :
85
+ -------------
86
+ Pour savoir si l'utilisateur en cours est authentifié, vous pouvez utiliser :
87
+ user_signed_in?
88
+
89
+ Pour obtenir l'utilisateur courant :
90
+ current_user
91
+
92
+ Et sa session :
93
+ user_session
94
+
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2011 Ennder http://www.ennder.fr
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.