refinerycms 0.9.6.19 → 0.9.6.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (385) hide show
  1. data/.gems +0 -8
  2. data/.gitignore +3 -1
  3. data/Rakefile +1 -5
  4. data/VERSION +1 -1
  5. data/bin/refinery-update-core +11 -2
  6. data/config/application.rb +6 -1
  7. data/config/environments/development.rb +10 -6
  8. data/config/settings.rb +3 -0
  9. data/db/migrate/20100305023036_change_users_columns_for_authlogic.rb +46 -0
  10. data/db/migrate/20100305023037_remove_unused_users_columns.rb +16 -0
  11. data/db/migrate/20100312155331_make_user_perishable_token_nullable.rb +13 -0
  12. data/db/migrate/20100312160327_make_user_persistence_token_nullable.rb +13 -0
  13. data/db/migrate/20100315203301_remove_state_from_users.rb +9 -0
  14. data/db/schema.rb +8 -21
  15. data/db/seeds.rb +5 -19
  16. data/lib/refinery/tasks/refinery.rb +1 -1
  17. data/public/javascripts/admin.js +6 -2
  18. data/public/javascripts/jquery-ui-1.8.min.js +374 -0
  19. data/public/javascripts/jquery.js +606 -444
  20. data/public/javascripts/refinery/admin.js +30 -9
  21. data/public/javascripts/refinery/boot_wym.js +4 -0
  22. data/public/javascripts/wymeditor/jquery.refinery.wymeditor.js +3 -4
  23. data/public/stylesheets/refinery/refinery.css +11 -0
  24. data/public/stylesheets/wymeditor/skins/refinery/skin.css +3 -1
  25. data/public/stylesheets/wymeditor/skins/refinery/wymiframe.css +5 -5
  26. data/readme.md +13 -10
  27. data/test/fixtures/users.yml +5 -5
  28. data/test/functional/dashboard_controller_test.rb +0 -4
  29. data/test/functional/images_controller_test.rb +0 -3
  30. data/test/test_helper.rb +7 -3
  31. data/themes/hemingway/views/layouts/application.html.erb +1 -12
  32. data/vendor/plugins/authentication/app/controllers/admin/users_controller.rb +1 -3
  33. data/vendor/plugins/authentication/app/controllers/sessions_controller.rb +3 -14
  34. data/vendor/plugins/authentication/app/controllers/users_controller.rb +26 -37
  35. data/vendor/plugins/authentication/app/models/user.rb +29 -112
  36. data/vendor/plugins/authentication/app/models/user_mailer.rb +8 -5
  37. data/vendor/plugins/authentication/app/models/user_session.rb +9 -0
  38. data/vendor/plugins/authentication/app/views/admin/users/index.html.erb +1 -1
  39. data/vendor/plugins/authentication/app/views/sessions/new.html.erb +5 -4
  40. data/vendor/plugins/authentication/lib/authenticated_system.rb +40 -30
  41. data/vendor/plugins/authentication/rails/init.rb +9 -0
  42. data/vendor/plugins/authlogic/CHANGELOG.rdoc +345 -0
  43. data/vendor/plugins/authlogic/LICENSE +20 -0
  44. data/vendor/plugins/authlogic/README.rdoc +246 -0
  45. data/vendor/plugins/authlogic/Rakefile +42 -0
  46. data/vendor/plugins/authlogic/VERSION.yml +5 -0
  47. data/vendor/plugins/authlogic/authlogic.gemspec +217 -0
  48. data/vendor/plugins/authlogic/generators/session/session_generator.rb +9 -0
  49. data/vendor/plugins/authlogic/generators/session/templates/session.rb +2 -0
  50. data/vendor/plugins/authlogic/init.rb +1 -0
  51. data/vendor/plugins/authlogic/lib/authlogic.rb +64 -0
  52. data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/base.rb +107 -0
  53. data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/email.rb +110 -0
  54. data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/logged_in_status.rb +60 -0
  55. data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/login.rb +141 -0
  56. data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/magic_columns.rb +24 -0
  57. data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/password.rb +355 -0
  58. data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/perishable_token.rb +105 -0
  59. data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/persistence_token.rb +68 -0
  60. data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/restful_authentication.rb +61 -0
  61. data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/session_maintenance.rb +139 -0
  62. data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/single_access_token.rb +65 -0
  63. data/vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/validations_scope.rb +32 -0
  64. data/vendor/plugins/authlogic/lib/authlogic/authenticates_many/association.rb +42 -0
  65. data/vendor/plugins/authlogic/lib/authlogic/authenticates_many/base.rb +55 -0
  66. data/vendor/plugins/authlogic/lib/authlogic/controller_adapters/abstract_adapter.rb +67 -0
  67. data/vendor/plugins/authlogic/lib/authlogic/controller_adapters/merb_adapter.rb +30 -0
  68. data/vendor/plugins/authlogic/lib/authlogic/controller_adapters/rails_adapter.rb +48 -0
  69. data/vendor/plugins/authlogic/lib/authlogic/controller_adapters/sinatra_adapter.rb +61 -0
  70. data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/aes256.rb +43 -0
  71. data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/bcrypt.rb +90 -0
  72. data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/md5.rb +34 -0
  73. data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/sha1.rb +35 -0
  74. data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/sha256.rb +50 -0
  75. data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/sha512.rb +50 -0
  76. data/vendor/plugins/authlogic/lib/authlogic/crypto_providers/wordpress.rb +43 -0
  77. data/vendor/plugins/authlogic/lib/authlogic/i18n.rb +83 -0
  78. data/vendor/plugins/authlogic/lib/authlogic/i18n/translator.rb +15 -0
  79. data/vendor/plugins/authlogic/lib/authlogic/random.rb +33 -0
  80. data/vendor/plugins/authlogic/lib/authlogic/regex.rb +25 -0
  81. data/vendor/plugins/authlogic/lib/authlogic/session/activation.rb +58 -0
  82. data/vendor/plugins/authlogic/lib/authlogic/session/active_record_trickery.rb +64 -0
  83. data/vendor/plugins/authlogic/lib/authlogic/session/base.rb +37 -0
  84. data/vendor/plugins/authlogic/lib/authlogic/session/brute_force_protection.rb +96 -0
  85. data/vendor/plugins/authlogic/lib/authlogic/session/callbacks.rb +99 -0
  86. data/vendor/plugins/authlogic/lib/authlogic/session/cookies.rb +130 -0
  87. data/vendor/plugins/authlogic/lib/authlogic/session/existence.rb +93 -0
  88. data/vendor/plugins/authlogic/lib/authlogic/session/foundation.rb +63 -0
  89. data/vendor/plugins/authlogic/lib/authlogic/session/http_auth.rb +58 -0
  90. data/vendor/plugins/authlogic/lib/authlogic/session/id.rb +41 -0
  91. data/vendor/plugins/authlogic/lib/authlogic/session/klass.rb +78 -0
  92. data/vendor/plugins/authlogic/lib/authlogic/session/magic_columns.rb +95 -0
  93. data/vendor/plugins/authlogic/lib/authlogic/session/magic_states.rb +59 -0
  94. data/vendor/plugins/authlogic/lib/authlogic/session/params.rb +101 -0
  95. data/vendor/plugins/authlogic/lib/authlogic/session/password.rb +240 -0
  96. data/vendor/plugins/authlogic/lib/authlogic/session/perishable_token.rb +18 -0
  97. data/vendor/plugins/authlogic/lib/authlogic/session/persistence.rb +70 -0
  98. data/vendor/plugins/authlogic/lib/authlogic/session/priority_record.rb +34 -0
  99. data/vendor/plugins/authlogic/lib/authlogic/session/scopes.rb +101 -0
  100. data/vendor/plugins/authlogic/lib/authlogic/session/session.rb +62 -0
  101. data/vendor/plugins/authlogic/lib/authlogic/session/timeout.rb +82 -0
  102. data/vendor/plugins/authlogic/lib/authlogic/session/unauthorized_record.rb +50 -0
  103. data/vendor/plugins/authlogic/lib/authlogic/session/validation.rb +82 -0
  104. data/vendor/plugins/authlogic/lib/authlogic/test_case.rb +120 -0
  105. data/vendor/plugins/authlogic/lib/authlogic/test_case/mock_controller.rb +45 -0
  106. data/vendor/plugins/authlogic/lib/authlogic/test_case/mock_cookie_jar.rb +14 -0
  107. data/vendor/plugins/authlogic/lib/authlogic/test_case/mock_logger.rb +10 -0
  108. data/vendor/plugins/authlogic/lib/authlogic/test_case/mock_request.rb +19 -0
  109. data/vendor/plugins/authlogic/lib/authlogic/test_case/rails_request_adapter.rb +30 -0
  110. data/vendor/plugins/authlogic/rails/init.rb +1 -0
  111. data/vendor/plugins/authlogic/shoulda_macros/authlogic.rb +69 -0
  112. data/vendor/plugins/authlogic/test/acts_as_authentic_test/base_test.rb +18 -0
  113. data/vendor/plugins/authlogic/test/acts_as_authentic_test/email_test.rb +97 -0
  114. data/vendor/plugins/authlogic/test/acts_as_authentic_test/logged_in_status_test.rb +36 -0
  115. data/vendor/plugins/authlogic/test/acts_as_authentic_test/login_test.rb +109 -0
  116. data/vendor/plugins/authlogic/test/acts_as_authentic_test/magic_columns_test.rb +27 -0
  117. data/vendor/plugins/authlogic/test/acts_as_authentic_test/password_test.rb +236 -0
  118. data/vendor/plugins/authlogic/test/acts_as_authentic_test/perishable_token_test.rb +90 -0
  119. data/vendor/plugins/authlogic/test/acts_as_authentic_test/persistence_token_test.rb +55 -0
  120. data/vendor/plugins/authlogic/test/acts_as_authentic_test/restful_authentication_test.rb +40 -0
  121. data/vendor/plugins/authlogic/test/acts_as_authentic_test/session_maintenance_test.rb +84 -0
  122. data/vendor/plugins/authlogic/test/acts_as_authentic_test/single_access_test.rb +44 -0
  123. data/vendor/plugins/authlogic/test/authenticates_many_test.rb +16 -0
  124. data/vendor/plugins/authlogic/test/crypto_provider_test/aes256_test.rb +14 -0
  125. data/vendor/plugins/authlogic/test/crypto_provider_test/bcrypt_test.rb +14 -0
  126. data/vendor/plugins/authlogic/test/crypto_provider_test/sha1_test.rb +23 -0
  127. data/vendor/plugins/authlogic/test/crypto_provider_test/sha256_test.rb +14 -0
  128. data/vendor/plugins/authlogic/test/crypto_provider_test/sha512_test.rb +14 -0
  129. data/vendor/plugins/authlogic/test/fixtures/companies.yml +5 -0
  130. data/vendor/plugins/authlogic/test/fixtures/employees.yml +17 -0
  131. data/vendor/plugins/authlogic/test/fixtures/projects.yml +3 -0
  132. data/vendor/plugins/authlogic/test/fixtures/users.yml +24 -0
  133. data/vendor/plugins/authlogic/test/i18n_test.rb +33 -0
  134. data/vendor/plugins/authlogic/test/libs/affiliate.rb +7 -0
  135. data/vendor/plugins/authlogic/test/libs/company.rb +6 -0
  136. data/vendor/plugins/authlogic/test/libs/employee.rb +7 -0
  137. data/vendor/plugins/authlogic/test/libs/employee_session.rb +2 -0
  138. data/vendor/plugins/authlogic/test/libs/ldaper.rb +3 -0
  139. data/vendor/plugins/authlogic/test/libs/ordered_hash.rb +9 -0
  140. data/vendor/plugins/authlogic/test/libs/project.rb +3 -0
  141. data/vendor/plugins/authlogic/test/libs/user.rb +5 -0
  142. data/vendor/plugins/authlogic/test/libs/user_session.rb +6 -0
  143. data/vendor/plugins/authlogic/test/random_test.rb +49 -0
  144. data/vendor/plugins/authlogic/test/session_test/activation_test.rb +43 -0
  145. data/vendor/plugins/authlogic/test/session_test/active_record_trickery_test.rb +36 -0
  146. data/vendor/plugins/authlogic/test/session_test/brute_force_protection_test.rb +101 -0
  147. data/vendor/plugins/authlogic/test/session_test/callbacks_test.rb +6 -0
  148. data/vendor/plugins/authlogic/test/session_test/cookies_test.rb +112 -0
  149. data/vendor/plugins/authlogic/test/session_test/credentials_test.rb +0 -0
  150. data/vendor/plugins/authlogic/test/session_test/existence_test.rb +64 -0
  151. data/vendor/plugins/authlogic/test/session_test/http_auth_test.rb +28 -0
  152. data/vendor/plugins/authlogic/test/session_test/id_test.rb +17 -0
  153. data/vendor/plugins/authlogic/test/session_test/klass_test.rb +40 -0
  154. data/vendor/plugins/authlogic/test/session_test/magic_columns_test.rb +62 -0
  155. data/vendor/plugins/authlogic/test/session_test/magic_states_test.rb +60 -0
  156. data/vendor/plugins/authlogic/test/session_test/params_test.rb +53 -0
  157. data/vendor/plugins/authlogic/test/session_test/password_test.rb +106 -0
  158. data/vendor/plugins/authlogic/test/session_test/perishability_test.rb +15 -0
  159. data/vendor/plugins/authlogic/test/session_test/persistence_test.rb +21 -0
  160. data/vendor/plugins/authlogic/test/session_test/scopes_test.rb +60 -0
  161. data/vendor/plugins/authlogic/test/session_test/session_test.rb +59 -0
  162. data/vendor/plugins/authlogic/test/session_test/timeout_test.rb +52 -0
  163. data/vendor/plugins/authlogic/test/session_test/unauthorized_record_test.rb +13 -0
  164. data/vendor/plugins/authlogic/test/session_test/validation_test.rb +23 -0
  165. data/vendor/plugins/authlogic/test/test_helper.rb +182 -0
  166. data/vendor/plugins/dashboard/app/helpers/admin/dashboard_helper.rb +1 -1
  167. data/vendor/plugins/friendly_id/Changelog.md +243 -0
  168. data/vendor/plugins/friendly_id/Contributors.md +30 -0
  169. data/vendor/plugins/friendly_id/Gemfile +2 -0
  170. data/vendor/plugins/friendly_id/Guide.md +509 -0
  171. data/vendor/plugins/friendly_id/LICENSE +19 -0
  172. data/vendor/plugins/friendly_id/README.md +76 -0
  173. data/vendor/plugins/friendly_id/Rakefile +68 -0
  174. data/vendor/plugins/friendly_id/extras/README.txt +3 -0
  175. data/vendor/plugins/friendly_id/extras/bench.rb +59 -0
  176. data/vendor/plugins/friendly_id/extras/extras.rb +31 -0
  177. data/vendor/plugins/friendly_id/extras/prof.rb +14 -0
  178. data/vendor/plugins/friendly_id/extras/template-gem.rb +26 -0
  179. data/vendor/plugins/friendly_id/extras/template-plugin.rb +28 -0
  180. data/vendor/plugins/friendly_id/friendly_id.gemspec +40 -0
  181. data/vendor/plugins/friendly_id/generators/friendly_id/friendly_id_generator.rb +28 -0
  182. data/vendor/plugins/friendly_id/generators/friendly_id/templates/create_slugs.rb +18 -0
  183. data/vendor/plugins/friendly_id/lib/friendly_id.rb +67 -0
  184. data/vendor/plugins/friendly_id/lib/friendly_id/active_record2.rb +47 -0
  185. data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/configuration.rb +66 -0
  186. data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/finders.rb +140 -0
  187. data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/simple_model.rb +162 -0
  188. data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/slug.rb +111 -0
  189. data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/slugged_model.rb +323 -0
  190. data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/tasks.rb +66 -0
  191. data/vendor/plugins/friendly_id/lib/friendly_id/active_record2/tasks/friendly_id.rake +19 -0
  192. data/vendor/plugins/friendly_id/lib/friendly_id/configuration.rb +132 -0
  193. data/vendor/plugins/friendly_id/lib/friendly_id/finders.rb +106 -0
  194. data/vendor/plugins/friendly_id/lib/friendly_id/slug_string.rb +292 -0
  195. data/vendor/plugins/friendly_id/lib/friendly_id/slugged.rb +91 -0
  196. data/vendor/plugins/friendly_id/lib/friendly_id/status.rb +35 -0
  197. data/vendor/plugins/friendly_id/lib/friendly_id/test.rb +175 -0
  198. data/vendor/plugins/friendly_id/lib/friendly_id/version.rb +8 -0
  199. data/vendor/plugins/friendly_id/rails/init.rb +2 -0
  200. data/vendor/plugins/friendly_id/test/active_record2/basic_slugged_model_test.rb +14 -0
  201. data/vendor/plugins/friendly_id/test/active_record2/cached_slug_test.rb +61 -0
  202. data/vendor/plugins/friendly_id/test/active_record2/core.rb +93 -0
  203. data/vendor/plugins/friendly_id/test/active_record2/custom_normalizer_test.rb +20 -0
  204. data/vendor/plugins/friendly_id/test/active_record2/custom_table_name_test.rb +22 -0
  205. data/vendor/plugins/friendly_id/test/active_record2/deprecated_test.rb +23 -0
  206. data/vendor/plugins/friendly_id/test/active_record2/scoped_model_test.rb +111 -0
  207. data/vendor/plugins/friendly_id/test/active_record2/simple_test.rb +59 -0
  208. data/vendor/plugins/friendly_id/test/active_record2/slug_test.rb +34 -0
  209. data/vendor/plugins/friendly_id/test/active_record2/slugged.rb +30 -0
  210. data/vendor/plugins/friendly_id/test/active_record2/slugged_status_test.rb +61 -0
  211. data/vendor/plugins/friendly_id/test/active_record2/sti_test.rb +22 -0
  212. data/vendor/plugins/friendly_id/test/active_record2/support/database.mysql.yml +4 -0
  213. data/vendor/plugins/friendly_id/test/active_record2/support/database.postgres.yml +6 -0
  214. data/vendor/plugins/friendly_id/test/active_record2/support/database.sqlite3.yml +2 -0
  215. data/vendor/plugins/friendly_id/test/active_record2/support/models.rb +78 -0
  216. data/vendor/plugins/friendly_id/test/active_record2/tasks_test.rb +82 -0
  217. data/vendor/plugins/friendly_id/test/active_record2/test_helper.rb +114 -0
  218. data/vendor/plugins/friendly_id/test/friendly_id_test.rb +60 -0
  219. data/vendor/plugins/friendly_id/test/slug_string_test.rb +78 -0
  220. data/vendor/plugins/friendly_id/test/test_helper.rb +9 -0
  221. data/vendor/plugins/hpricot/CHANGELOG +88 -0
  222. data/vendor/plugins/hpricot/COPYING +18 -0
  223. data/vendor/plugins/hpricot/README +275 -0
  224. data/vendor/plugins/hpricot/Rakefile +272 -0
  225. data/vendor/plugins/hpricot/ext/fast_xs/FastXsService.java +1030 -0
  226. data/vendor/plugins/hpricot/ext/fast_xs/extconf.rb +4 -0
  227. data/vendor/plugins/hpricot/ext/fast_xs/fast_xs.c +201 -0
  228. data/vendor/plugins/hpricot/ext/hpricot_scan/HpricotCss.java +831 -0
  229. data/vendor/plugins/hpricot/ext/hpricot_scan/HpricotScanService.java +2086 -0
  230. data/vendor/plugins/hpricot/ext/hpricot_scan/MANIFEST +0 -0
  231. data/vendor/plugins/hpricot/ext/hpricot_scan/extconf.rb +6 -0
  232. data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_common.rl +76 -0
  233. data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_css.c +3503 -0
  234. data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_css.java.rl +155 -0
  235. data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_css.rl +115 -0
  236. data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_scan.c +6927 -0
  237. data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_scan.h +79 -0
  238. data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_scan.java.rl +1152 -0
  239. data/vendor/plugins/hpricot/ext/hpricot_scan/hpricot_scan.rl +788 -0
  240. data/vendor/plugins/hpricot/extras/mingw-rbconfig.rb +176 -0
  241. data/vendor/plugins/hpricot/hpricot.gemspec +17 -0
  242. data/vendor/plugins/hpricot/lib/hpricot.rb +26 -0
  243. data/vendor/plugins/hpricot/lib/hpricot/blankslate.rb +63 -0
  244. data/vendor/plugins/hpricot/lib/hpricot/builder.rb +216 -0
  245. data/vendor/plugins/hpricot/lib/hpricot/elements.rb +510 -0
  246. data/vendor/plugins/hpricot/lib/hpricot/htmlinfo.rb +691 -0
  247. data/vendor/plugins/hpricot/lib/hpricot/inspect.rb +103 -0
  248. data/vendor/plugins/hpricot/lib/hpricot/modules.rb +40 -0
  249. data/vendor/plugins/hpricot/lib/hpricot/parse.rb +38 -0
  250. data/vendor/plugins/hpricot/lib/hpricot/tag.rb +219 -0
  251. data/vendor/plugins/hpricot/lib/hpricot/tags.rb +164 -0
  252. data/vendor/plugins/hpricot/lib/hpricot/traverse.rb +839 -0
  253. data/vendor/plugins/hpricot/lib/hpricot/xchar.rb +94 -0
  254. data/vendor/plugins/hpricot/setup.rb +1585 -0
  255. data/vendor/plugins/hpricot/test/files/basic.xhtml +17 -0
  256. data/vendor/plugins/hpricot/test/files/boingboing.html +2266 -0
  257. data/vendor/plugins/hpricot/test/files/cy0.html +3653 -0
  258. data/vendor/plugins/hpricot/test/files/immob.html +400 -0
  259. data/vendor/plugins/hpricot/test/files/pace_application.html +1320 -0
  260. data/vendor/plugins/hpricot/test/files/tenderlove.html +16 -0
  261. data/vendor/plugins/hpricot/test/files/uswebgen.html +220 -0
  262. data/vendor/plugins/hpricot/test/files/utf8.html +1054 -0
  263. data/vendor/plugins/hpricot/test/files/week9.html +1723 -0
  264. data/vendor/plugins/hpricot/test/files/why.xml +19 -0
  265. data/vendor/plugins/hpricot/test/load_files.rb +7 -0
  266. data/vendor/plugins/hpricot/test/nokogiri-bench.rb +64 -0
  267. data/vendor/plugins/hpricot/test/test_alter.rb +96 -0
  268. data/vendor/plugins/hpricot/test/test_builder.rb +37 -0
  269. data/vendor/plugins/hpricot/test/test_parser.rb +428 -0
  270. data/vendor/plugins/hpricot/test/test_paths.rb +25 -0
  271. data/vendor/plugins/hpricot/test/test_preserved.rb +88 -0
  272. data/vendor/plugins/hpricot/test/test_xml.rb +28 -0
  273. data/vendor/plugins/inquiries/app/controllers/admin/inquiries_controller.rb +1 -6
  274. data/vendor/plugins/inquiries/app/helpers/inquiries_helper.rb +0 -11
  275. data/vendor/plugins/inquiries/app/views/admin/inquiries/_inquiry.html.erb +10 -6
  276. data/vendor/plugins/inquiries/app/views/inquiry_mailer/confirmation.html.erb +1 -1
  277. data/vendor/plugins/inquiries/config/routes.rb +1 -1
  278. data/vendor/plugins/pages/app/controllers/admin/pages_controller.rb +16 -3
  279. data/vendor/plugins/pages/app/models/page_part.rb +9 -0
  280. data/vendor/plugins/rails_indexes/lib/indexer.rb +0 -2
  281. data/vendor/plugins/refinery/app/views/admin/_head.html.erb +2 -1
  282. data/vendor/plugins/refinery/app/views/shared/_head.html.erb +0 -1
  283. data/vendor/plugins/refinery/app/views/shared/_ie6check.html.erb +23 -11
  284. data/vendor/plugins/refinery/app/views/welcome.html.erb +1 -1
  285. data/vendor/plugins/refinery/app/views/wymiframe.html.erb +2 -1
  286. data/vendor/plugins/refinery/lib/generators/refinery/USAGE +1 -1
  287. data/vendor/plugins/refinery/lib/generators/refinery/templates/migration.rb +2 -2
  288. data/vendor/plugins/refinery/lib/generators/refinery/templates/model.rb +4 -0
  289. data/vendor/plugins/refinery/lib/generators/refinery/templates/views/admin/_form.html.erb +6 -0
  290. data/vendor/plugins/refinery/lib/generators/refinery/templates/views/show.html.erb +5 -3
  291. data/vendor/plugins/refinery/lib/refinery/application_helper.rb +2 -2
  292. data/vendor/plugins/refinery/lib/refinery/initializer.rb +4 -41
  293. data/vendor/plugins/refinery_settings/app/models/refinery_setting.rb +7 -3
  294. data/vendor/plugins/slim_scrooge/README.textile +112 -0
  295. data/vendor/plugins/slim_scrooge/Rakefile +29 -0
  296. data/vendor/plugins/slim_scrooge/VERSION.yml +5 -0
  297. data/vendor/plugins/slim_scrooge/ext/Rakefile +42 -0
  298. data/vendor/plugins/slim_scrooge/ext/extconf.rb +5 -0
  299. data/vendor/plugins/slim_scrooge/lib/slim_scrooge.rb +16 -0
  300. data/vendor/plugins/slim_scrooge/lib/slim_scrooge/callsite.rb +96 -0
  301. data/vendor/plugins/slim_scrooge/lib/slim_scrooge/callsites.rb +70 -0
  302. data/vendor/plugins/slim_scrooge/lib/slim_scrooge/monitored_hash.rb +103 -0
  303. data/vendor/plugins/slim_scrooge/lib/slim_scrooge/result_set.rb +38 -0
  304. data/vendor/plugins/slim_scrooge/lib/slim_scrooge/simple_set.rb +34 -0
  305. data/vendor/plugins/slim_scrooge/lib/slim_scrooge/slim_scrooge.rb +46 -0
  306. data/vendor/plugins/slim_scrooge/rails/init.rb +8 -0
  307. data/vendor/plugins/slim_scrooge/slim_scrooge.gemspec +62 -0
  308. data/vendor/plugins/slim_scrooge/slim_scrooge_windows.gemspec +59 -0
  309. data/vendor/plugins/slim_scrooge/test/active_record_setup.rb +3 -0
  310. data/vendor/plugins/slim_scrooge/test/helper.rb +91 -0
  311. data/vendor/plugins/slim_scrooge/test/models/course.rb +2 -0
  312. data/vendor/plugins/slim_scrooge/test/schema/schema.rb +5 -0
  313. data/vendor/plugins/slim_scrooge/test/setup.rb +5 -0
  314. data/vendor/plugins/themes/app/models/theme.rb +7 -0
  315. data/vendor/plugins/themes/lib/theme_server.rb +3 -1
  316. data/vendor/plugins/themes/rails/init.rb +16 -13
  317. data/vendor/plugins/will_paginate/.manifest +43 -0
  318. data/vendor/plugins/will_paginate/CHANGELOG.rdoc +139 -0
  319. data/vendor/plugins/will_paginate/LICENSE +18 -0
  320. data/vendor/plugins/will_paginate/README.rdoc +107 -0
  321. data/vendor/plugins/will_paginate/Rakefile +53 -0
  322. data/vendor/plugins/will_paginate/examples/apple-circle.gif +0 -0
  323. data/vendor/plugins/will_paginate/examples/index.haml +69 -0
  324. data/vendor/plugins/will_paginate/examples/index.html +92 -0
  325. data/vendor/plugins/will_paginate/examples/pagination.css +90 -0
  326. data/vendor/plugins/will_paginate/examples/pagination.sass +91 -0
  327. data/vendor/plugins/will_paginate/init.rb +1 -0
  328. data/vendor/plugins/will_paginate/lib/will_paginate.rb +90 -0
  329. data/vendor/plugins/will_paginate/lib/will_paginate/array.rb +16 -0
  330. data/vendor/plugins/will_paginate/lib/will_paginate/collection.rb +146 -0
  331. data/vendor/plugins/will_paginate/lib/will_paginate/core_ext.rb +43 -0
  332. data/vendor/plugins/will_paginate/lib/will_paginate/finder.rb +264 -0
  333. data/vendor/plugins/will_paginate/lib/will_paginate/named_scope.rb +170 -0
  334. data/vendor/plugins/will_paginate/lib/will_paginate/named_scope_patch.rb +37 -0
  335. data/vendor/plugins/will_paginate/lib/will_paginate/version.rb +9 -0
  336. data/vendor/plugins/will_paginate/lib/will_paginate/view_helpers.rb +408 -0
  337. data/vendor/plugins/will_paginate/test/boot.rb +21 -0
  338. data/vendor/plugins/will_paginate/test/collection_test.rb +143 -0
  339. data/vendor/plugins/will_paginate/test/console +8 -0
  340. data/vendor/plugins/will_paginate/test/database.yml +22 -0
  341. data/vendor/plugins/will_paginate/test/finder_test.rb +473 -0
  342. data/vendor/plugins/will_paginate/test/fixtures/admin.rb +3 -0
  343. data/vendor/plugins/will_paginate/test/fixtures/developer.rb +14 -0
  344. data/vendor/plugins/will_paginate/test/fixtures/developers_projects.yml +13 -0
  345. data/vendor/plugins/will_paginate/test/fixtures/project.rb +15 -0
  346. data/vendor/plugins/will_paginate/test/fixtures/projects.yml +6 -0
  347. data/vendor/plugins/will_paginate/test/fixtures/replies.yml +29 -0
  348. data/vendor/plugins/will_paginate/test/fixtures/reply.rb +7 -0
  349. data/vendor/plugins/will_paginate/test/fixtures/schema.rb +38 -0
  350. data/vendor/plugins/will_paginate/test/fixtures/topic.rb +10 -0
  351. data/vendor/plugins/will_paginate/test/fixtures/topics.yml +30 -0
  352. data/vendor/plugins/will_paginate/test/fixtures/user.rb +2 -0
  353. data/vendor/plugins/will_paginate/test/fixtures/users.yml +35 -0
  354. data/vendor/plugins/will_paginate/test/helper.rb +37 -0
  355. data/vendor/plugins/will_paginate/test/lib/activerecord_test_case.rb +43 -0
  356. data/vendor/plugins/will_paginate/test/lib/activerecord_test_connector.rb +75 -0
  357. data/vendor/plugins/will_paginate/test/lib/load_fixtures.rb +11 -0
  358. data/vendor/plugins/will_paginate/test/lib/view_test_process.rb +179 -0
  359. data/vendor/plugins/will_paginate/test/tasks.rake +59 -0
  360. data/vendor/plugins/will_paginate/test/view_test.rb +373 -0
  361. data/vendor/plugins/will_paginate/will_paginate.gemspec +19 -0
  362. metadata +308 -27
  363. data/db/migrate/20091029034951_remove_blurb_from_news_items.rb +0 -9
  364. data/public/javascripts/jquery-ui-1.8rc1.min.js +0 -375
  365. data/test/fixtures/news_items.yml +0 -14
  366. data/test/unit/news_items_test.rb +0 -33
  367. data/vendor/plugins/authentication/test/fixtures/users.yml +0 -19
  368. data/vendor/plugins/authentication/test/functional/sessions_controller_test.rb +0 -85
  369. data/vendor/plugins/authentication/test/functional/users_controller_test.rb +0 -99
  370. data/vendor/plugins/authentication/test/unit/user_test.rb +0 -164
  371. data/vendor/plugins/news/app/controllers/admin/news_items_controller.rb +0 -5
  372. data/vendor/plugins/news/app/controllers/news_items_controller.rb +0 -20
  373. data/vendor/plugins/news/app/models/news_item.rb +0 -24
  374. data/vendor/plugins/news/app/views/admin/news_items/_form.html.erb +0 -19
  375. data/vendor/plugins/news/app/views/admin/news_items/_news_item.html.erb +0 -15
  376. data/vendor/plugins/news/app/views/admin/news_items/edit.html.erb +0 -1
  377. data/vendor/plugins/news/app/views/admin/news_items/index.html.erb +0 -31
  378. data/vendor/plugins/news/app/views/admin/news_items/new.html.erb +0 -1
  379. data/vendor/plugins/news/app/views/news_items/_recent_posts.html.erb +0 -8
  380. data/vendor/plugins/news/app/views/news_items/index.html.erb +0 -17
  381. data/vendor/plugins/news/app/views/news_items/index.rss.builder +0 -26
  382. data/vendor/plugins/news/app/views/news_items/show.html.erb +0 -13
  383. data/vendor/plugins/news/config/routes.rb +0 -7
  384. data/vendor/plugins/news/news.md +0 -20
  385. data/vendor/plugins/news/rails/init.rb +0 -11
@@ -1,67 +1,41 @@
1
1
  require 'digest/sha1'
2
2
 
3
3
  class User < ActiveRecord::Base
4
+ #-------------------------------------------------------------------------------------------------
5
+ # Authentication
4
6
 
5
- # Hack: Allow "rake gems:install" to run when this class is missing its gem dependency.
6
- # For further clarification on why, refer to:
7
- # https://rails.lighthouseapp.com/projects/8994/tickets/780-rake-gems-install-doesn-t-work-if-plugins-are-missing-gem-dependencies
8
- if defined? AASM
9
- include AASM # include the library which will give us state machine functionality.
10
- aasm_column :state
11
- aasm_initial_state :pending
12
- aasm_state :passive
13
- aasm_state :pending, :enter => :make_activation_code
14
- aasm_state :active, :enter => :do_activate
15
-
16
- aasm_event :register do
17
- transitions :from => :passive, :to => :pending, :guard => Proc.new {|u| !(u.crypted_password.blank? && u.password.blank?) }
18
- end
19
-
20
- aasm_event :activate do
21
- transitions :from => :pending, :to => :active
22
- end
23
- end
24
-
25
- # Virtual attribute for the unencrypted password
26
- attr_accessor :password
7
+ # See http://rdoc.info/rdoc/binarylogic/authlogic/blob/85b2a6b3e9993b18c7fb1e4f7b9c6d01cc8b5d17/Authlogic/ActsAsAuthentic
8
+ acts_as_authentic do |c|
9
+ c.perishable_token_valid_for 10.minutes
27
10
 
28
- #validates_presence_of :login, :email # handled by other checks
29
- #validates_presence_of :password, :if => :password_required? # handled by other checks
30
- validates_presence_of :password_confirmation, :if => :password_required?
31
- validates_length_of :password, :within => 4..40, :if => :password_required?
32
- validates_confirmation_of :password, :if => :password_required?
33
- validates_length_of :login, :within => 3..40
34
- validates_length_of :email, :within => 3..100
35
- validates_uniqueness_of :login, :email, :case_sensitive => false
36
- before_save :encrypt_password
37
-
38
- serialize :plugins_column # Array # this is seriously deprecated and will be removed later.
39
-
40
- has_many :plugins, :class_name => "UserPlugin", :order => "position ASC"
11
+ # http://www.binarylogic.com/2008/11/23/tutorial-easily-migrate-from-restful_authentication-to-authlogic/
12
+ # Unfortunately, this seems to cause problems when you add Refinery to an app that already had
13
+ # an Authlogic-created users table. You may need to comment these 2 lines out if that is the case.
14
+ c.act_like_restful_authentication = true
15
+ c.transition_from_restful_authentication = true
41
16
 
42
- # prevents a user from submitting a crafted form that bypasses activation
43
- # anything else you want your user to change should be added here.
44
- attr_accessible :login, :email, :password, :password_confirmation, :plugins, :reset_code
17
+ # If users prefer to use their e-mail address to log in, change this setting to 'email' in
18
+ # config/application.rb
19
+ # This currently only affects which field is displayed in the login form. As long as we have
20
+ # find_by_login_method :find_by_login_or_email, they can still actually use either one.
21
+ c.login_field = defined?(Refinery.authentication_login_field) ? Refinery.authentication_login_field : "login"
22
+ end if self.table_exists?
45
23
 
46
- # Authenticates a user by their login name and unencrypted password. Returns the user or nil.
47
- def self.authenticate(login, password)
48
- u = find_in_state :first, :active, :conditions => {:login => login} # need to get the salt
49
- u && u.authenticated?(password) ? u : nil
24
+ # Allow users to log in with either their username *or* email, even though we only ask for one of those.
25
+ def self.find_by_login_or_email(login_or_email)
26
+ find_by_login(login_or_email) || find_by_email(login_or_email)
50
27
  end
51
28
 
52
- # Encrypts some data with the salt.
53
- def self.encrypt(password, salt)
54
- Digest::SHA1.hexdigest("--#{salt}--#{password}--")
29
+ def deliver_password_reset_instructions!(request)
30
+ reset_perishable_token!
31
+ UserMailer.deliver_reset_notification(self, request)
55
32
  end
56
33
 
57
- # Encrypts the password with the user salt
58
- def encrypt(password)
59
- self.class.encrypt(password, salt)
60
- end
34
+ #-------------------------------------------------------------------------------------------------
61
35
 
62
- def authenticated?(password)
63
- crypted_password == encrypt(password)
64
- end
36
+ serialize :plugins_column # Array # this is seriously deprecated and will be removed later.
37
+
38
+ has_many :plugins, :class_name => "UserPlugin", :order => "position ASC"
65
39
 
66
40
  def plugins=(plugin_titles)
67
41
  unless self.new_record? # don't add plugins when the user_id is NULL.
@@ -77,54 +51,8 @@ class User < ActiveRecord::Base
77
51
  self.plugins.collect {|p| p.title} | Refinery::Plugins.always_allowed.titles
78
52
  end
79
53
 
80
- def remember_token?
81
- remember_token_expires_at && Time.now.utc < remember_token_expires_at
82
- end
83
-
84
- # These create and unset the fields required for remembering users between browser closes
85
- def remember_me
86
- remember_me_for 2.weeks
87
- end
88
-
89
- def remember_me_for(time)
90
- remember_me_until time.from_now.utc
91
- end
92
-
93
- def remember_me_until(time)
94
- self.remember_token_expires_at = time
95
- self.remember_token = encrypt("#{email}--#{remember_token_expires_at}")
96
- save(false)
97
- end
98
-
99
- def forget_me
100
- self.remember_token_expires_at = nil
101
- self.remember_token = nil
102
- save(false)
103
- end
104
-
105
- # Returns true if the user has just been activated.
106
- def recently_activated?
107
- @activated
108
- end
109
-
110
- def ui_deletable?(current_user = self)
111
- !self.superuser and User.count > 1 and (current_user.nil? or self.id != current_user.id)
112
- end
113
-
114
- def create_reset_code
115
- @reset = true
116
- code = Digest::SHA1.hexdigest( Time.now.to_s.split(//).sort_by {rand}.join )
117
- self.attributes = {:reset_code => code[0..6]}
118
- save(false)
119
- end
120
-
121
- def recently_reset?
122
- @reset
123
- end
124
-
125
- def delete_reset_code
126
- self.attributes = {:reset_code => nil}
127
- save(false)
54
+ def can_delete?(other_user = self)
55
+ !other_user.superuser and User.count > 1 and (other_user.nil? or self.id != other_user.id)
128
56
  end
129
57
 
130
58
  protected
@@ -132,7 +60,7 @@ protected
132
60
  # before filter
133
61
  def encrypt_password
134
62
  return if password.blank?
135
- self.salt = Digest::SHA1.hexdigest("--#{Time.now.to_s}--#{login}--") if new_record?
63
+ self.password_salt = Digest::SHA1.hexdigest("--#{Time.now.to_s}--#{login}--") if new_record?
136
64
  self.crypted_password = encrypt(password)
137
65
  end
138
66
 
@@ -140,15 +68,4 @@ protected
140
68
  crypted_password.blank? || !password.blank?
141
69
  end
142
70
 
143
- def make_activation_code
144
- self.deleted_at = nil
145
- self.activation_code = Digest::SHA1.hexdigest( Time.now.to_s.split(//).sort_by {rand}.join )
146
- end
147
-
148
- def do_activate
149
- @activated = true
150
- self.activated_at = Time.now.utc
151
- self.deleted_at = self.activation_code = nil
152
- end
153
-
154
71
  end
@@ -2,16 +2,19 @@ class UserMailer < ActionMailer::Base
2
2
 
3
3
  def reset_notification(user, request)
4
4
  setup_email(user)
5
- @subject += 'Link to reset your password'
6
- @body[:url] = "#{request.protocol}#{request.host_with_port}/reset/#{user.reset_code}"
5
+ subject 'Link to reset your password'
6
+ @body[:url] = url_prefix(request) + "/reset/#{user.perishable_token}"
7
7
  end
8
8
 
9
9
  protected
10
10
 
11
+ def url_prefix(request)
12
+ "#{request.protocol}#{request.host_with_port}"
13
+ end
14
+
11
15
  def setup_email(user)
12
- @recipients = user.email
13
- @subject = ""
14
- @sent_on = Time.now
16
+ recipients user.email
17
+ sent_on Time.now
15
18
  @body[:user] = user
16
19
  end
17
20
 
@@ -0,0 +1,9 @@
1
+ # See http://rdoc.info/rdoc/binarylogic/authlogic/blob/85b2a6b3e9993b18c7fb1e4f7b9c6d01cc8b5d17/Authlogic/Session/Base.html
2
+ # and http://rdoc.info/rdoc/binarylogic/authlogic/blob/85b2a6b3e9993b18c7fb1e4f7b9c6d01cc8b5d17/Authlogic/Session/Password/Config.html
3
+ class UserSession < Authlogic::Session::Base
4
+ login_field Refinery.authentication_login_field
5
+
6
+ find_by_login_method :find_by_login_or_email
7
+
8
+ generalize_credentials_error_messages "Sorry, your #{Refinery.authentication_login_field} or password was incorrect."
9
+ end
@@ -15,7 +15,7 @@
15
15
  <span class='actions'>
16
16
  <%= link_to refinery_icon_tag('delete.png'), admin_user_path(user),
17
17
  :class => "cancel confirm-delete",
18
- :title => "Remove this user forever" if user.ui_deletable?(current_user) %>
18
+ :title => "Remove this user forever" if current_user.can_delete?(user) %>
19
19
  <%= link_to refinery_icon_tag('application_edit.png'), edit_admin_user_path(user),
20
20
  :title => 'Edit this user' %>
21
21
  <%= mail_to user.email, refinery_icon_tag('email_go.png'), :title => 'Email this user' %>
@@ -1,12 +1,13 @@
1
- <% form_for :session, :url => session_path do |f| -%>
1
+ <% form_for :session, @session, :url => session_path do |f| -%>
2
+ <%= f.error_messages %>
2
3
  <div class='clearfix'>
3
4
  <div class='field session_username'>
4
- <%= f.label :login %>
5
- <%= f.text_field :login %>
5
+ <%= f.label Refinery.authentication_login_field %>
6
+ <%= f.text_field Refinery.authentication_login_field %>
6
7
  </div>
7
8
  <div class='field session_password'>
8
9
  <%= f.label :password %>
9
- <%= f.password_field :password %>
10
+ <%= f.password_field :password, :autocomplete => 'off' %>
10
11
  </div>
11
12
  </div>
12
13
  <div class='field forgot_password'>
@@ -1,21 +1,35 @@
1
1
  module AuthenticatedSystem
2
2
  protected
3
+ def current_user_session
4
+ @current_user_session ||= UserSession.find
5
+ end
6
+
3
7
  # Returns true or false if the user is logged in.
4
8
  # Preloads @current_user with the user model if they're logged in.
5
9
  def logged_in?
6
10
  !!current_user
7
11
  end
8
12
 
9
- # Accesses the current user from the session.
10
- # Future calls avoid the database because nil is not equal to false.
11
13
  def current_user
12
- @current_user ||= (login_from_session || login_from_basic_auth || login_from_cookie) unless @current_user == false
14
+ @current_user ||= current_user_session && current_user_session.record
13
15
  end
14
16
 
15
- # Store the given user id in the session.
16
- def current_user=(new_user)
17
- session[:user_id] = new_user ? new_user.id : nil
18
- @current_user = new_user || false
17
+ def require_user
18
+ unless current_user
19
+ store_location
20
+ flash[:notice] = "You must be logged in to access this page"
21
+ redirect_to login_path
22
+ return false
23
+ end
24
+ end
25
+
26
+ def require_no_user
27
+ if current_user
28
+ store_location
29
+ flash[:notice] = "You must be logged out to access this page"
30
+ redirect_to account_path
31
+ return false
32
+ end
19
33
  end
20
34
 
21
35
  # Check if the user is authorized
@@ -52,6 +66,24 @@ module AuthenticatedSystem
52
66
  authorized? || access_denied
53
67
  end
54
68
 
69
+ #def require_user
70
+ # unless current_user
71
+ # store_location
72
+ # flash[:notice] = "You must be logged in to access this page"
73
+ # redirect_to login_path
74
+ # return false
75
+ # end
76
+ #end
77
+
78
+ #def require_no_user
79
+ # if current_user
80
+ # store_location
81
+ # flash[:notice] = "You must be logged out to access this page"
82
+ # redirect_to account_path
83
+ # return false
84
+ # end
85
+ #end
86
+
55
87
  # Redirect as appropriate when an access request fails.
56
88
  #
57
89
  # The default action is to redirect to the login screen.
@@ -86,30 +118,8 @@ module AuthenticatedSystem
86
118
  session[:return_to] = nil
87
119
  end
88
120
 
89
- # Inclusion hook to make #current_user and #logged_in?
90
- # available as ActionView helper methods.
91
121
  def self.included(base)
92
- base.send :helper_method, :current_user, :logged_in?
93
- end
94
-
95
- # Called from #current_user. First attempt to login by the user id stored in the session.
96
- def login_from_session
97
- self.current_user = User.find_by_id(session[:user_id]) if session[:user_id]
98
- end
99
-
100
- # Called from #current_user. Now, attempt to login by basic authentication information.
101
- def login_from_basic_auth
102
- authenticate_with_http_basic do |username, password|
103
- self.current_user = User.authenticate(username, password)
104
- end
122
+ base.send :helper_method, :current_user, :current_user_session, :logged_in? if base.respond_to? :helper_method
105
123
  end
106
124
 
107
- # Called from #current_user. Finaly, attempt to login by an expiring token in the cookie.
108
- def login_from_cookie
109
- user = cookies[:auth_token] && User.find_by_remember_token(cookies[:auth_token])
110
- if user && user.remember_token?
111
- cookies[:auth_token] = { :value => user.remember_token, :expires => user.remember_token_expires_at }
112
- self.current_user = user
113
- end
114
- end
115
125
  end
@@ -11,3 +11,12 @@ Refinery::Plugin.register do |plugin|
11
11
  :updated_image => "user_edit.png"
12
12
  }
13
13
  end
14
+
15
+ module ::Refinery
16
+ class << self
17
+ attr_accessor :authentication_login_field
18
+ def authentication_login_field
19
+ @authentication_login_field ||= 'login'
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,345 @@
1
+ == 2.1.2
2
+
3
+ * Return the newly create object for the class level create method, instead of a boolean
4
+ * Add a model_name class method for Authlogic::Session for rails 3 compatibility. Will be using ActiveModel eventually, but this should be a quick fix.
5
+
6
+ == 2.1.1 released 2009-7-04
7
+
8
+ * Use mb_chars when downcasing the login string to support international characters.
9
+ * Check for the existence of the :remember_me key before setting remember_me off of a hash.
10
+ * Added check to make sure Authlogic is not loaded too late, causing a NotActivated error.
11
+
12
+ == 2.1.0 released 2009-6-27
13
+
14
+ * Fixed bug when using act_like_restful_authentication and setting passwords, needed to add a 2nd parameter to tell if to check against the database or not.
15
+ * Don't save record if they are read only.
16
+
17
+ == 2.0.14 released 2009-6-13
18
+
19
+ * Fixed issue with using brute force protection AND generalize_credentials_error_messages. Brute force protection was looking to see if there were password errors, which generalize_credentials_error_messages was obfuscating.
20
+ * Added db_setup? method to avoid errors during rake tasks where the db might not be set up. Ex: migrations
21
+ * Stop using errors.on(key) since that is now deprecated in Rails. Use errors[key] instead.
22
+ * Use valid_password? for the method name to validate a password instead of valid_#{password_field}?.
23
+
24
+ == 2.0.13 released 2009-5-13
25
+
26
+ * Add authlogic/regex.rb to manifest
27
+
28
+ == 2.0.12 released 2009-5-13
29
+
30
+ * Added the ability to add a last_request_update_allowed? method in your controller to pragmatically tell Authlogic when and when not to update the last_request_at field in your database. This only takes effect if the method if present.
31
+ * Extracted Authlogic's regular expressions into it's own module to allow easy use of them outside of Authlogic. See Authlogic::Regex for more info.
32
+ * Made being_brute_force_protected? true for the Authlogic::Session::BruteForceProtection module.
33
+ * Added the configuration option generalize_credentials_error_messages for the Authlogic::Session::Password module. This allows you to generalize your login / password errors messages as to not reveal was the problem was when authenticating. If enabled, when an invalid login is supplied it will use the same exact error message when an invalid password is supplied.
34
+ * Update email regular expression to use A-Z0-9 instead of /w as to not allow for diacritical marks in an email address.
35
+ * Changed config() convenience method to rw_config() to be more descriptive and less vague.
36
+
37
+ == 2.0.11 released 2009-4-25
38
+
39
+ * Fix bug when password is turned off and the SingleAccessToken module calls the after_password_set callback.
40
+ * HTTP basic auth can now be toggled on or off. It also checks for the existence of a standard username and password before enabling itself.
41
+ * Added option check_passwords_against_database for Authlogic::ActsAsAuthentic::Password to toggle between checking the password against the database value or the object value. Also added the same functionality to the instance method: valid_password?("password", true), where the second argument tells Authlogic to check the password against the database value. The default for this new feature is true.
42
+ * Add a maintain_sessions configuration option to Authlogic::ActsAsAuthentic::SessionMaintenance as a "clearer" option to disable automatic session maintenance.
43
+ * single_access_allowed_request_types can also be equal to :all instead of just [:all].
44
+ * Refactor params_enabled? so that the single_access_allowed? method in controllers takes precedence.
45
+ * Added testing comments in the README and expanded on the documentation in Authlogic::TestCase
46
+
47
+ == 2.0.10 released 2009-4-21
48
+
49
+ * Mock request is now transparent to non existent methods. Since the methods calls really have no functional value when testing authlogic.
50
+ * Allow password confirmation to be disabled.
51
+ * Modified login format validation to allow for the + character since emails addresses allow that as a valid character.
52
+ * Added merge_* configuration methods for acts_as_authentic to make merging options into configuration options that default to hashes. Just a few convenience methods.
53
+
54
+ == 2.0.9 released 2009-4-9
55
+
56
+ * Fixed bug where hooks provided by the password module were called when the password module was not being used due to the fact that the password field did not exist.
57
+ * Fixed bug where the find_with_login method was not being aliased if you were using an alternate field besides login.
58
+
59
+ == 2.0.8 release 2009-4-9
60
+
61
+ * Dont reset the @password_changed instance variable to false because its halts the callback chain, instead reset it to nil.
62
+
63
+ == 2.0.7 released 2009-4-9
64
+
65
+ * Rename TestCase::ControllerAdapter to TestCase::RailsRequestAdapter to help clarify it's usage and fix a constant typo.
66
+
67
+ == 2.0.6 released 2009-4-9
68
+
69
+ * Don't use second, use [1] instead so older rails versions don't complain.
70
+ * Update email regular expression to be less TLD specific: (?:[A-Z]{2,4}|museum|travel)
71
+ * Update shoulda macro for 2.0
72
+ * validates_length_of_password_confirmation_field_options defaults to validates_confirmation_of_password_field_options
73
+ * Use MockCookieJar in tests instead of a Hash in the MockController.
74
+ * Cookies now store the record id as well, for faster lookup. Also to avoid the need to use sessions since sessions are lazily loaded in rails 2.3+
75
+ * Add configuration option for Authlogic::ActsAsAuthentic: ignore_blank_passwords
76
+ * Fix cookie_domain in rails adapter
77
+ * Make password and login fields optional. This allows you to have an alternate authentication method as your main authentication source. Such as OpenID, LDAP, or whatever you want.
78
+ * Reset the @password_changed instance variable after the record has been saved.
79
+ * Add referer and user_agent to mock requests for testing purposes.
80
+ * Add :case_sensitive => false to validates_uniqueness_of calls on the login and email fields.
81
+ * MockRequest not tries to use controller.env['REMOTE_ADDR'] for the IP address in tests.
82
+ * Add in custom find_with_email and find_with_login methods to perform case insensitive searches for databases that are case sensitive by default. This is only done if the :case_insensitive option for validates_uniqueness_of_login_field_options or validates_uniqueness_of_email_field_options is set to false. Which, as of this version, it is. If you are using MySQL this has been the default behavior all along. If you are using SQLite or Postgres this has NOT been the default behavior.
83
+ * Added in exception explaining that you are using the old configuration for acts_as_authentic with an example of the new format.
84
+
85
+ == 2.0.5 released 2009-3-30
86
+
87
+ * Stub out authenticate_with_http_basic for TestCase::ControllerAdapter.
88
+ * Added second parameter for add_acts_as_authentic module to specify the position: append or prepend.
89
+
90
+ == 2.0.4 released 2009-3-28
91
+
92
+ * Added validates_uniqueness_of_login_field_options and validates_uniqueness_of_email_field_options configuration options
93
+ * Add in checks to make sure session_class is not nil.
94
+ * Cleaned up TestCase some more and added functionality to log users in during functional tests.
95
+
96
+ == 2.0.3 released 2009-3-26
97
+
98
+ * Fixed error where default session class does not exist.
99
+ * Fixed human_name for the model to use its own human name and not delegate to the associated model. Translation should be under authlogic.models.user_session (or whatever the name of your session is).
100
+ * Fixed human_attribute_name to use Authlogic keys for translation instead of ActiveRecord: authlogic.attributes.user_session.login
101
+ * For transitioning from restful_authentication, set the REST_AUTH_SITE_KEY to '' if it doesn't exist, instead of nil.
102
+ * Completely rewrote Authlogic::Testing, it's now called Authlogic::TestCase. Testing Authlogic is much easier now. Please see Authlogic::TestCase for more info.
103
+
104
+ == 2.0.2 released 2009-3-24
105
+
106
+ * Reset failed_login_count if consecutive_failed_logins_limit has been exceed and the failed_login_ban_for has passed.
107
+ * Update test helpers to use the new configuration scheme.
108
+ * Fixed issue when logging doesn't update last_request_at, so the next persistence try would fail.
109
+
110
+ == 2.0.1 released 2009-3-23
111
+
112
+ * Validate length of password.
113
+ * Dont save sessions with a ! during session maintenance.
114
+ * Add self_and_descendants_from_active_record for Rails 2.3
115
+ * Abort acts_as_authentic if there is no DB connection or table.
116
+
117
+ == 2.0.0 released 2009-3-23
118
+
119
+ * Refactored nearly all code and tests, especially acts_as_authentic. Got rid of the meta programming and rewrote to use modules and hooks. Also moved all configuration into their related modules.
120
+ * Set up a strong API with hooks to allow you to modify behavior and most importantly, easily create "add on" modules or alternate authentication methods, etc.
121
+ * Changed configuration method for acts_as_authentic to accept a block instead of a hash.
122
+ * The record attribute will NEVER be set until after validation passes, similar to how ActiveRecord executes UPDATEs and CREATEs.
123
+ * Fixed bug with session maintenance where user would log in as new user when creating another user account, typically an admin function.
124
+ * Brute force protection is only a temporary ban by default, not a permanent one.
125
+ * Switched to Hoe for gem management instead of Echoe.
126
+ * Added MD5 crypto provider for legacy systems.
127
+ * Make password salt field optional for legacy systems.
128
+
129
+ == 1.4.4 released 2009-3-2
130
+
131
+ * Moved session maintenance to a before_save, to save on queries executed and to skip an unexpected / additional save on the user object.
132
+ * Extracted random string generation into its own class and leverages SecureRandom if it is available
133
+ * Move cookies to a higher priority when trying to find the record to help with performance since Rails 3 lazily loads the sessions
134
+ * Reset perishable token in a before_save instead of a before_validation
135
+
136
+ == 1.4.3 released 2009-2-22
137
+
138
+ * Fixed issue with brute force protection.
139
+
140
+ == 1.4.2 released 2009-2-20
141
+
142
+ * Cleaned up callbacks system to use hooks and execute in the proper order.
143
+ * Added brute force protection. See the consecutive_failed_logins_limit configuration option in Authlogic::Session::Config. Also see Authlogic::Session:BruteForceProtection
144
+ * Fixed issue with calling stale? when there is no record.
145
+ * Simon Harris fixed the issue of using lock_version with the associated record and also optimized the library for better performance.
146
+ * Implemented saving the record during the callback chain to execute as few queries as possible. This way modules can hook into Authlogic, modify the associated record, and not have to worry about saving the record.
147
+
148
+ == 1.4.1 released 2009-2-8
149
+
150
+ * Fixed I18n key misspelling.
151
+ * Added I18n keys for ORM error messages.
152
+ * Use the password_field configuration value for the alias_methods defined in acts_as_authentic/credentials.rb
153
+ * Change shoulda macros implementation to follow the shoulda documentation
154
+ * Rails >2.3 uses :domain for the session option instead of :session_domain. Authlogic now uses the proper key in the rails adapter.
155
+ * Added validate_password attribute to force password validation regardless if the password is blank. This is useful for forms explicitly changing passwords.
156
+ * The class level find method will return a session object if the session is stale. The protection is that there will be no record associated with that session. This allows you to receive an object and call the stale? method on it to determine why the user must log back in.
157
+ * Added validate callbacks in Session::Base so you can run callbacks by calling validate :my_method, just like in AR.
158
+ * Checked for blank persistence tokens when trying to validate passwords, this is where transitioning occurs. People transitioning from older systems never had a persistence token, which means it would be nil here.
159
+ * Update allowed domain name extensions for email
160
+ * Ignore default length options for validations if alternate length options are provided, since AR raises an error if 2 different length specifications are provided.
161
+
162
+ == 1.4.0 released 2009-1-28
163
+
164
+ * Added support for cookie domain, based on your frameworks session domain configuration
165
+ * Updated test helper functions to use the persistence token config value
166
+ * Check for UTC times when using Time.now for current_login_at and last_request_at
167
+ * Single access now looks for a single_access_allowed? method in your controllers to determine if single access should be allowed or not. Allowing you to define exactly when single access is allowed.
168
+ * Finding the authenticated record uses klass.primary_key instead of assuming id.
169
+ * BREAKS BACKWARDS COMPATIBILITY: New I18n solution implemented. See Authlogic::I18n for more information.
170
+
171
+ == 1.3.9 released 2009-1-9
172
+
173
+ * Added the disable_perishable_token_maintenance option to disable the automatic resetting of the perishable_token, meaning you will have to maintain this yourself.
174
+ * Changed shoulda macro to conform to standards so model is not required to be passed
175
+ * Modified method definitions for the Session class to check for already defined methods, allowing you to write your own "credential" methods, and Authlogic will not overwrite your custom methods.
176
+ * Fixed bug when passing :all to single_access_allowed_request_types
177
+ * Added logout_on_timeout configuration option for Session::Base
178
+
179
+ == 1.3.8 released 2008-12-24
180
+
181
+ * Only change persistence token if the password is not blank
182
+ * Normalize the last_request_at_threshold so that you can pass an integer or a date/time range.
183
+ * Fixed bug where password length validations were not being run because the password value was not blank. It should be run if it is a new record, the password has changed, or the password is blank.
184
+ * Added disable_magic_states option for sessions, to turn off the automatic checking of "magic states" such as active?, confirmed?, and approved?.
185
+
186
+ == 1.3.7 released 2008-11-30
187
+
188
+ * Added session generator: script/generate session UserSession
189
+ * Added Test::Unit helpers file, see testing in the README
190
+
191
+ == 1.3.6 released 2008-11-30
192
+
193
+ * Modified validates_length_of for password so that there is a fallback validation if the passed "if statement" fails
194
+
195
+ == 1.3.5 released 2008-11-30
196
+
197
+ * :transition_from_crypto_provider for acts_as_authentic now accepts an array to transition from multiple providers. Which solves the problem of a double transition.
198
+ * Added AES256 as a crypto_provider option, for those that want to use a reversible encryption method by supplying a key.
199
+ * Fixed typo for using validates_format_of_options instead of validates_length_of_options
200
+ * Fixed bug when accessing the dynamic method for accessing the session record in a namespace, since it uses class_name.underscore which replaces :: with a /
201
+ * Added minimum length requirement of 4 for the password, and removed validates_presence_of for password since validates_length_of enforces this
202
+ * Set before_validation to reset the persistence token if it is blank, since a password is not required for open id authentication
203
+
204
+ == 1.3.4 released 2008-11-24
205
+
206
+ * Delegate human_attribute_name to the ActiveRecord class to take advantage of the I18n feature.
207
+ * Fixed issue with passwords from older versions of restful_authentication, the passwords end with --
208
+
209
+ == 1.3.3 released 2008-11-23
210
+
211
+ * Updated :act_like_restful_authentication for those using the older version where no site wide key is preset (REST_AUTH_SITE_KEY), Authlogic will adjust automatically based on the presence of this constant.
212
+ * Added :transition_from_crypto_provider option for acts_as_authentic to transition your user's passwords to a new algorithm.
213
+ * Added :transition_from_restful_authentication for acts_as_authentic to transition your users from restful_authentication to the Authlogic password system. Now you can choose to keep your passwords the same by using :act_like_restful_authentication, which will *NOT* do any transitioning, or you can use :transition_from_crypto_provider which will update your users passwords as they login or new accounts are created, while still allowing users with the old password system to log in.
214
+ * Modified the "interface" for the crypto providers to only provide a class level encrypt and matches? method, instead of a class level encrypt and decrypt method.
215
+
216
+ == 1.3.2 released 2008-11-22
217
+
218
+ * Updated code to work better with BCrypt, using root level class now.
219
+
220
+ == 1.3.1 released 2008-11-22
221
+
222
+ * Fixed typo in acts_as_authentic config when passing the :scope option.
223
+ * Added :act_like_restful_authentication option for acts_as_authentic
224
+ * Added a new crypto provider: BCrypt, this is for those storing the nuclear launch codes in their apps
225
+
226
+ == 1.3.0 released 2008-11-21
227
+
228
+ * BREAKS BACKWARDS COMPATIBILITY: changed the confirm_password field to password_confirmation for acts_as_authentic, since the rails validates_confirmation_of handles creating this attribute and there is no option to change the name of this.
229
+ * BREAKS BACKWARDS COMPATIBILITY: Cleaned up all of the validation configuration for acts_as_authentic, as well as the documentation that goes with it, you can accomplish the same things as before, but this is much more flexible and much more organized. This is mainly for those implementing i18n support. Instead of :whatever_message, its now :login_field_validates_length_of_options => {:message => "your i18n friendly message"}. As a side note, with the new i18n support in rails I would not be surprised if this is already done for you since Authlogic uses the ActiveRecord validation methods.
230
+ * Got rid of simple delegator for the abstract controller, apparently this has performance issues.
231
+ * Cleaned up validations to assume ActiveRecord dirty attributes are present, I think this is a safe assumption.
232
+
233
+ == 1.2.2 released 2008-11-20
234
+
235
+ * Added allow_blank_login_and_password_field and allow_blank_email_field options to acts_as_authentic, which allows you to have alternative logins, such as OpenID
236
+ * In the session Authlogic now also stores the record id. We use this id to find the record and then check the token against the record, thus allowing for quicker database lookups, while getting the same security.
237
+ * Skip validation for reset_perishable_token!
238
+ * Added checks for uniqueness validations to only perform if the values have changed, this cuts down on DB queries
239
+ * Abstract controller adapter now uses ruby's simple delegator class
240
+ * Allow to save with a block: user_session.save { |result| }, result will either be false or self, this is useful when implementing OpenID and other methods
241
+
242
+ == 1.2.1 released 2008-11-19
243
+
244
+ * Added build method to authenticates_many association to act like AR association collections.
245
+ * Added validation boolean configuration options for acts_as_authentic: validate_field, validate_login_field, validate_password_field, validate_email_field. This turns on and off validations for their respective fields.
246
+ * Renamed all password_reset_token terms to perishable_token, including configuration, etc. I still allow for the old configurations so this will not break compatibility, but perishable token is a better name and can be used for account confirmation as well as a password reset token, or anything else you want.
247
+ * Renamed all remember_token instances to persistence_token, the term "remember token" doesn't really make sense. I still allow for the old configuration, so this will not break backwards compatibility: persistence_token fits better and makes more sense.
248
+
249
+ == 1.2.0 released 2008-11-16
250
+
251
+ * Added check for database set up in acts_as_authentic to prevent errors during migrations.
252
+ * Forced logged_in and logged_out named scopes to use seconds.
253
+ * Hardened valid_password? method to only allow raw passwords.
254
+ * controllers and scopes are no longer stored in class variables but in the Thread.current hash so their instances die out with the thread, which frees up memory.
255
+ * Removed single_access_token_field and remember_token_field from Sesson::Config, they are not needed there.
256
+ * Added password_reset_token to assist in resetting passwords.
257
+ * Added email_field, email_field_regex, email_field_regex_failed_message configuration options to acts_as_authentic. So that you can validate emails as well as a login, instead of the either-or approach.
258
+ * Added configuration for all validation messages for the session so that you can modify them and provide I18n support.
259
+
260
+ == 1.1.1 released 2008-11-13
261
+
262
+ * Removed ActiveRecord dependency.
263
+ * Removed loading shoulda macros by default, moved to shoulda_macros dir.
264
+ * Modified how params access works. Added in single_access_token_field which params now uses. See the single access section in the README. Various configuration options added as well.
265
+ * Cleaned up acts_as_authentic configuration, added new config module to do this.
266
+ * Cleaned up acts_as_authentic tests
267
+ * Moved acts_as_authentic sub modules into the proper name spaces
268
+
269
+ == 1.1.0 released 2008-11-13
270
+
271
+ * Moved Rack standards into abstract_adapter for the controllers.
272
+ * Added authenticating_with_credentials?, authenticating_with_unauthorized_record?
273
+ * Fixed typo in abstract_adapter, black to block.
274
+ * Cleaned up / reorganized tests.
275
+ * Moved ActiveRecord additions to ORM Adapters name space to make way for Data Mapper.
276
+ * Reorganized and modified acts_as_authentic to be free standing and not get info from the related session.
277
+ * The session now gets its configuration from the model, since determining which fields are present is ORM specific.
278
+ * Extracted session and cookie logic into their own modules for Session.
279
+ * Moved crypto providers into their own module and added a Sha1 provider to help with the restful_authentication transition.
280
+ * Allow the unique_token method to use the alternate crypto_provider if it is a hash algorithm, otherwise default to Sha512.
281
+ * Added last_request_at_threshold configuration option.
282
+ * Changed Scoped class to AuthenticatesManyAssociation, like AR has HasManyAssociation, etc.
283
+ * Added should_be_authentic shoulda macro.
284
+ * Removed some magic from how sessions are initialized. See the initialize documentation, this method is a little more structured now, which was required for adding in openid.
285
+ * Added in logging via a params token, which is friendly for feed URLs. Works just like cookies and sessions when persisting the session.
286
+ * Added the option to use session.user, instead of session.record. This is based off of what model your session is authenticating with.
287
+
288
+ == 1.0.0 released 2008-11-05
289
+
290
+ * Checked for blank login counts, if a default wasnt set in the migrations.
291
+ * Added check for database table in acts_as_authentic to avoid errors in initial setup.
292
+ * Completely rewrote tests to be more conventional and thorough tests, removed test_app.
293
+ * Modified how validations work so that a validate method was added as well as callbacks for that method.
294
+ * Extracted scope support into its own module to help organize code better.
295
+ * Added in salt for encryption, just like hashes and removed :crypto_provider_type option for acts_as_authentic.
296
+ * Added merb adapters.
297
+ * Improved documentation throughout.
298
+
299
+ == 0.10.4 released 2008-10-31
300
+
301
+ * Changed configuration to use inheritable attributes
302
+ * Cleaned up requires to be in their proper files
303
+ * Added in scope support.
304
+
305
+ == 0.10.3 released 2008-10-31
306
+
307
+ * Instead of raising an error when extra fields are passed in credentials=, just ignore them.
308
+ * Added remember_me config option to set the default value.
309
+ * Only call credential methods if an argument was passed.
310
+ * More unit tests
311
+ * Hardened automatic session updating. Also automatically log the user in if they change their password when logged out.
312
+
313
+ == 0.10.2 released 2008-10-24
314
+
315
+ * Added in stretches to the default Sha512 encryption algorithm.
316
+ * Use column_names instead of columns when determining if a column is present.
317
+ * Improved validation callbacks. after_validation should only be run if valid? = true. Also clear errors before the "before_validation" callback.
318
+
319
+ == 0.10.1 released 2008-10-24
320
+
321
+ * Sessions now store the "remember token" instead of the id. This is much safer and guarantees all "sessions" that are logged in are logged in with a valid password. This way stale sessions can't be persisted.
322
+ * Bumped security to Sha512 from Sha256.
323
+ * Remove attr_protected call in acts_as_authentic
324
+ * protected_password should use pasword_field configuration value
325
+ * changed magic state "inactive" to "active"
326
+
327
+ == 0.10.0 released 2008-10-24
328
+
329
+ * Do not allow instantiation if the session has not been activated with a controller object. Just like ActiveRecord won't let you do anything without a DB connection.
330
+ * Abstracted controller implementation to allow for rails, merb, etc adapters. So this is not confined to the rails framework.
331
+ * Removed create and update methods and added save, like ActiveRecord.
332
+ * after_validation should be able to change the result if it adds errors on callbacks.
333
+ * Completed tests.
334
+
335
+ == 0.9.1 released 2008-10-24
336
+
337
+ * Changed scope to id. Makes more sense to call it an id and fits better with the ActiveRecord model.
338
+ * Removed saving_from_session flag, apparently it is not needed.
339
+ * Fixed updating sessions to make more sense and be stricter.
340
+ * change last_click_at to last_request_at
341
+ * Only run "after" callbacks if the result is successful.
342
+
343
+ == 0.9.0 released 2008-10-24
344
+
345
+ * Initial release.