alchemy-devise 2.1.0 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (260) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -7
  3. data/app/controllers/alchemy/passwords_controller.rb +2 -2
  4. data/app/controllers/alchemy/user_sessions_controller.rb +1 -1
  5. data/lib/alchemy/devise/version.rb +1 -1
  6. data/spec/controllers/admin/users_controller_spec.rb +27 -28
  7. data/spec/controllers/user_sessions_controller_spec.rb +11 -11
  8. data/spec/dummy/config/environments/production.rb +1 -1
  9. data/spec/dummy/config/environments/test.rb +3 -1
  10. data/spec/dummy/config/initializers/devise.rb +265 -0
  11. data/spec/dummy/db/schema.rb +25 -25
  12. data/spec/dummy/db/test.sqlite3 +0 -0
  13. data/spec/dummy/log/test.log +1954 -0
  14. data/spec/dummy/tmp/cache/assets/test/sass/0add235ff4a1a73bf239edee826a292a26bac0b9/login.scssc +0 -0
  15. data/spec/dummy/tmp/cache/assets/test/sass/0add235ff4a1a73bf239edee826a292a26bac0b9/users.scssc +0 -0
  16. data/spec/dummy/tmp/cache/assets/test/sass/3ed791606e88a4aba2b10abb5f82f38e34855821/_css3.scssc +0 -0
  17. data/spec/dummy/tmp/cache/assets/test/sass/3ed791606e88a4aba2b10abb5f82f38e34855821/_support.scssc +0 -0
  18. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_animation.scssc +0 -0
  19. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_appearance.scssc +0 -0
  20. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_background-clip.scssc +0 -0
  21. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_background-origin.scssc +0 -0
  22. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_background-size.scssc +0 -0
  23. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_border-radius.scssc +0 -0
  24. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_box-shadow.scssc +0 -0
  25. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_box-sizing.scssc +0 -0
  26. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_columns.scssc +0 -0
  27. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_filter.scssc +0 -0
  28. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_flexbox.scssc +0 -0
  29. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_font-face.scssc +0 -0
  30. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_hyphenation.scssc +0 -0
  31. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_images.scssc +0 -0
  32. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_inline-block.scssc +0 -0
  33. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_opacity.scssc +0 -0
  34. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_regions.scssc +0 -0
  35. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_text-shadow.scssc +0 -0
  36. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_transform.scssc +0 -0
  37. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_transition.scssc +0 -0
  38. data/spec/dummy/tmp/cache/assets/test/sass/72e1a4f2cefd1928646dd115025ca829543fcbdf/_user-interface.scssc +0 -0
  39. data/spec/dummy/tmp/cache/assets/test/sass/7c6991f72a85d5de4d3c627b5043a458c4715359/select2.scssc +0 -0
  40. data/spec/dummy/tmp/cache/assets/test/sass/87855f72b2946e6370361fa5a9c484a5ebc66f4d/_sassy-button-gradients.sassc +0 -0
  41. data/spec/dummy/tmp/cache/assets/test/sass/87855f72b2946e6370361fa5a9c484a5ebc66f4d/_sassy-button-pseudo-states.sassc +0 -0
  42. data/spec/dummy/tmp/cache/assets/test/sass/87855f72b2946e6370361fa5a9c484a5ebc66f4d/_sassy-button-shadows.sassc +0 -0
  43. data/spec/dummy/tmp/cache/assets/test/sass/87855f72b2946e6370361fa5a9c484a5ebc66f4d/_sassy-button-styles.sassc +0 -0
  44. data/spec/dummy/tmp/cache/assets/test/sass/87855f72b2946e6370361fa5a9c484a5ebc66f4d/_sassy-button-text.sassc +0 -0
  45. data/spec/dummy/tmp/cache/assets/test/sass/9a94cf0a520ab22f3eaf3a86166797ee3fa75f56/custom.scssc +0 -0
  46. data/spec/dummy/tmp/cache/assets/test/sass/a59855a14dd43bfaee1633eb7f8fe96bef8b0979/jquery.Jcrop.min.cssc +0 -0
  47. data/spec/dummy/tmp/cache/assets/test/sass/c0d6893315ac5f5f10572a6f94327d80f4e4f238/_sassy-buttons.sassc +0 -0
  48. data/spec/dummy/tmp/cache/assets/test/sass/c2605e8539c6ba837ac790f8ee9ad944b0585bc6/alchemy-devise.scssc +0 -0
  49. data/spec/dummy/tmp/cache/assets/test/sass/c2605e8539c6ba837ac790f8ee9ad944b0585bc6/alchemy-devisec +0 -0
  50. data/spec/dummy/tmp/cache/assets/test/sass/dd44eee573943a282cb6069a8e53c64844534eba/_clearfix.scssc +0 -0
  51. data/spec/dummy/tmp/cache/assets/test/sass/dd44eee573943a282cb6069a8e53c64844534eba/_hacks.scssc +0 -0
  52. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/_defaults.scssc +0 -0
  53. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/_extends.scssc +0 -0
  54. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/_mixins.scssc +0 -0
  55. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/_variables.scssc +0 -0
  56. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/admin.scssc +0 -0
  57. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/archive.scssc +0 -0
  58. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/base.scssc +0 -0
  59. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/buttons.scssc +0 -0
  60. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/dashboard.scssc +0 -0
  61. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/dialogs.scssc +0 -0
  62. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/elements.scssc +0 -0
  63. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/errors.scssc +0 -0
  64. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/flash.scssc +0 -0
  65. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/form_fields.scssc +0 -0
  66. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/forms.scssc +0 -0
  67. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/frame.scssc +0 -0
  68. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/icon-font.scssc +0 -0
  69. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/icons.scssc +0 -0
  70. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/jquery-ui.scssc +0 -0
  71. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/modules.scssc +0 -0
  72. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/notices.scssc +0 -0
  73. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/pagination.scssc +0 -0
  74. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/print.scssc +0 -0
  75. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/search.scssc +0 -0
  76. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/selects.scssc +0 -0
  77. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/sitemap.scssc +0 -0
  78. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/tables.scssc +0 -0
  79. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/toolbar.scssc +0 -0
  80. data/spec/dummy/tmp/cache/assets/test/sass/f1a3d3c1e2d0cde088d646fd0f57216902570e72/upload.scssc +0 -0
  81. data/spec/dummy/tmp/cache/assets/test/sprockets/01b53356c20c90d2f1ebea9e1fcbb0d6 +0 -0
  82. data/spec/dummy/tmp/cache/assets/test/sprockets/0290d8d1496ed6f5c72819c51bfbdb48 +0 -0
  83. data/spec/dummy/tmp/cache/assets/test/sprockets/067f1a3cbe366af840c7fcc455ddf4f8 +0 -0
  84. data/spec/dummy/tmp/cache/assets/test/sprockets/070c0b34358ca748831e8aa221cc9e9e +0 -0
  85. data/spec/dummy/tmp/cache/assets/test/sprockets/080f2970aabe2bd1772573bdf8cf73d7 +0 -0
  86. data/spec/dummy/tmp/cache/assets/test/sprockets/082040be1431209fe6068fc1d2deeae4 +0 -0
  87. data/spec/dummy/tmp/cache/assets/test/sprockets/08949cfec04f6f6340a3617839f41b06 +0 -0
  88. data/spec/dummy/tmp/cache/assets/test/sprockets/092e2fe07fba0d7ae7a873c537149a5c +0 -0
  89. data/spec/dummy/tmp/cache/assets/test/sprockets/0dd6d59c64dc70541738829333c2a61e +0 -0
  90. data/spec/dummy/tmp/cache/assets/test/sprockets/0fc39fe395fc21d04484887ee6ecfd09 +0 -0
  91. data/spec/dummy/tmp/cache/assets/test/sprockets/1304fafcbd7bc04aeba19b2ebe031df9 +0 -0
  92. data/spec/dummy/tmp/cache/assets/test/sprockets/13e682b6b9bcda9c3230458e510f8338 +0 -0
  93. data/spec/dummy/tmp/cache/assets/test/sprockets/1479758f012f0e50b64ed3d4259a66ff +0 -0
  94. data/spec/dummy/tmp/cache/assets/test/sprockets/15281f5387ae812921f7d9b21598e56f +0 -0
  95. data/spec/dummy/tmp/cache/assets/test/sprockets/1596f4a7fa2ddacefe7446ec11f87c91 +0 -0
  96. data/spec/dummy/tmp/cache/assets/test/sprockets/16d7a5d15ac39008819a0e3ea54d104d +0 -0
  97. data/spec/dummy/tmp/cache/assets/test/sprockets/1970de0c19595e952695601d8718f663 +0 -0
  98. data/spec/dummy/tmp/cache/assets/test/sprockets/19fce564424affb27928967b98d408c6 +0 -0
  99. data/spec/dummy/tmp/cache/assets/test/sprockets/1a2ffc81942cc2ca8a73549f92cf5d58 +0 -0
  100. data/spec/dummy/tmp/cache/assets/test/sprockets/1a359c08041e3e8308d994047cbe4dc7 +0 -0
  101. data/spec/dummy/tmp/cache/assets/test/sprockets/1d6a5376473b7ed7372c21237c685ca7 +0 -0
  102. data/spec/dummy/tmp/cache/assets/test/sprockets/1fbc530056b5fa1c5d332f732612a5a5 +0 -0
  103. data/spec/dummy/tmp/cache/assets/test/sprockets/205bc28234b94c239d67b1aab8d54740 +0 -0
  104. data/spec/dummy/tmp/cache/assets/test/sprockets/22fe9b5a578c80f9795a60a02b71f99b +0 -0
  105. data/spec/dummy/tmp/cache/assets/test/sprockets/23648ace68c01d47da44933bffa67f38 +0 -0
  106. data/spec/dummy/tmp/cache/assets/test/sprockets/24aaedd514926c9afdcf915da0a571cd +0 -0
  107. data/spec/dummy/tmp/cache/assets/test/sprockets/255b73698c9afe4caf5f81e09ffd5a0e +0 -0
  108. data/spec/dummy/tmp/cache/assets/test/sprockets/2589bf68b4feb8b63da0a657277e2d5a +0 -0
  109. data/spec/dummy/tmp/cache/assets/test/sprockets/2c5ff62304bd72a92fde0a989de0f9eb +0 -0
  110. data/spec/dummy/tmp/cache/assets/test/sprockets/2ead7e6e0268dfaeb7103e5757d03d7d +0 -0
  111. data/spec/dummy/tmp/cache/assets/test/sprockets/2f4f13ae579b241594220882c477f9c9 +0 -0
  112. data/spec/dummy/tmp/cache/assets/test/sprockets/303cb7c9466191023ed149050721bc9e +0 -0
  113. data/spec/dummy/tmp/cache/assets/test/sprockets/30f6a0d49ed1620fb04fcc85db8efc39 +0 -0
  114. data/spec/dummy/tmp/cache/assets/test/sprockets/315a5c78c6e71f0d3c814371acb40bf0 +0 -0
  115. data/spec/dummy/tmp/cache/assets/test/sprockets/341f4d191f724db08d6e4fce92779122 +0 -0
  116. data/spec/dummy/tmp/cache/assets/test/sprockets/354770d76c315374a4c9d8c53e3252ab +0 -0
  117. data/spec/dummy/tmp/cache/assets/test/sprockets/355b66f80ac9249eeba2ba0e437d5c63 +0 -0
  118. data/spec/dummy/tmp/cache/assets/test/sprockets/35a1474139dd4ac0459985f1b0add0f9 +0 -0
  119. data/spec/dummy/tmp/cache/assets/test/sprockets/361f528672df9f6d5121cdc62232457e +0 -0
  120. data/spec/dummy/tmp/cache/assets/test/sprockets/3699d6d917dbbf847851c1444f286191 +0 -0
  121. data/spec/dummy/tmp/cache/assets/test/sprockets/3747e485af69ea466fa94f0592f55316 +0 -0
  122. data/spec/dummy/tmp/cache/assets/test/sprockets/39747627570913ecb0531ed386e372ee +0 -0
  123. data/spec/dummy/tmp/cache/assets/test/sprockets/399a6415b28818dd3decff1f2fcbaa4b +0 -0
  124. data/spec/dummy/tmp/cache/assets/test/sprockets/3a1cafb08fdbec1df2780ed4dfd0366e +0 -0
  125. data/spec/dummy/tmp/cache/assets/test/sprockets/3a50d6d52cc05591990f9375c72e3f01 +0 -0
  126. data/spec/dummy/tmp/cache/assets/test/sprockets/3b93c578ce939062a25236ac4a26cbf2 +0 -0
  127. data/spec/dummy/tmp/cache/assets/test/sprockets/3c80a6f6a41a6614f8f65d08f10c3bac +0 -0
  128. data/spec/dummy/tmp/cache/assets/test/sprockets/3e1d23474d59c1f412b882e4dc56c316 +0 -0
  129. data/spec/dummy/tmp/cache/assets/test/sprockets/4077de7d16befa1d898aab3ddabf221c +0 -0
  130. data/spec/dummy/tmp/cache/assets/test/sprockets/415f597e1bc6244ae9e96c7d7a740be8 +0 -0
  131. data/spec/dummy/tmp/cache/assets/test/sprockets/432af6e668b30898a22cec7e535fb39d +0 -0
  132. data/spec/dummy/tmp/cache/assets/test/sprockets/43b9de17f220b7fe13c5c1b521e74174 +0 -0
  133. data/spec/dummy/tmp/cache/assets/test/sprockets/4425fcc6ea6de31ff5877afc23891fc2 +0 -0
  134. data/spec/dummy/tmp/cache/assets/test/sprockets/45ced18f366c43f5ce0ee6df328f57f4 +0 -0
  135. data/spec/dummy/tmp/cache/assets/test/sprockets/45fdd137f8c3a99beda80c05e8bd21ec +0 -0
  136. data/spec/dummy/tmp/cache/assets/test/sprockets/48b41486d723f561e05b2728e325ffd8 +0 -0
  137. data/spec/dummy/tmp/cache/assets/test/sprockets/4a6eb994e7442fdba8aead184261b3f5 +0 -0
  138. data/spec/dummy/tmp/cache/assets/test/sprockets/4b56b12bd4b3643371fa439152dd3f5a +0 -0
  139. data/spec/dummy/tmp/cache/assets/test/sprockets/4dbf75095efa8ba837411c8dcfc0031f +0 -0
  140. data/spec/dummy/tmp/cache/assets/test/sprockets/4e95ee980412373d563f16718042b162 +0 -0
  141. data/spec/dummy/tmp/cache/assets/test/sprockets/5182ee48f6bdb372b50f7fd20bef22bd +0 -0
  142. data/spec/dummy/tmp/cache/assets/test/sprockets/524769bab89b3aab303bf1b60346e9ee +0 -0
  143. data/spec/dummy/tmp/cache/assets/test/sprockets/52d972b2e1932765897ce136b9aeffbf +0 -0
  144. data/spec/dummy/tmp/cache/assets/test/sprockets/562baeac4784984c73c503576524fd3b +0 -0
  145. data/spec/dummy/tmp/cache/assets/test/sprockets/57016019cfac508ae87195b300cb3491 +0 -0
  146. data/spec/dummy/tmp/cache/assets/test/sprockets/57153779eb33f814b78449100d3c9477 +0 -0
  147. data/spec/dummy/tmp/cache/assets/test/sprockets/5781e9086b3214ce049e167aca8e3efb +0 -0
  148. data/spec/dummy/tmp/cache/assets/test/sprockets/584fa8d8e35f14b53dfc682533f0ecad +0 -0
  149. data/spec/dummy/tmp/cache/assets/test/sprockets/591c6d924ed6d2301f6bf8ffb6ae1d0a +0 -0
  150. data/spec/dummy/tmp/cache/assets/test/sprockets/599a4782922a23344df64821dc9705ae +0 -0
  151. data/spec/dummy/tmp/cache/assets/test/sprockets/5a57392073789e41403e4ff181ff14f9 +0 -0
  152. data/spec/dummy/tmp/cache/assets/test/sprockets/5f22bb4a5eedbe51a0f9d63994f2d3ab +0 -0
  153. data/spec/dummy/tmp/cache/assets/test/sprockets/5fc5e98eadc5596ee34ccb4f5303414c +0 -0
  154. data/spec/dummy/tmp/cache/assets/test/sprockets/5fee01d3d3f81314eeeec304cce7627f +0 -0
  155. data/spec/dummy/tmp/cache/assets/test/sprockets/607176411a4e9ec8ff180d52ce6c9547 +0 -0
  156. data/spec/dummy/tmp/cache/assets/test/sprockets/60bc22e584dd910d125007e974109031 +0 -0
  157. data/spec/dummy/tmp/cache/assets/test/sprockets/67e7933a53a639ac2f4f99a1a7fb4102 +0 -0
  158. data/spec/dummy/tmp/cache/assets/test/sprockets/682c3ad047d298eea05c25219209a07d +0 -0
  159. data/spec/dummy/tmp/cache/assets/test/sprockets/69b639f3ce42eb05f774ce93a0241f78 +0 -0
  160. data/spec/dummy/tmp/cache/assets/test/sprockets/6ac38816907ea5c24698c6221bab52ee +0 -0
  161. data/spec/dummy/tmp/cache/assets/test/sprockets/6bf0c86de93d15bc7d995ed332eb5ecc +0 -0
  162. data/spec/dummy/tmp/cache/assets/test/sprockets/6e4dc0d8d8feea8fa783c57c6de69ead +0 -0
  163. data/spec/dummy/tmp/cache/assets/test/sprockets/6e569d69c823873917908fd230486a40 +0 -0
  164. data/spec/dummy/tmp/cache/assets/test/sprockets/6e8cbaf23b45e222eea02d64bee3108b +0 -0
  165. data/spec/dummy/tmp/cache/assets/test/sprockets/6f8d20b7e1bded071913bb0f077b3e23 +0 -0
  166. data/spec/dummy/tmp/cache/assets/test/sprockets/7659c833433560705dc3aa05a4fec86b +0 -0
  167. data/spec/dummy/tmp/cache/assets/test/sprockets/76f376ee3e0e0f446117b6c2fc9cb5dd +0 -0
  168. data/spec/dummy/tmp/cache/assets/test/sprockets/7a47ba6bdaca0deafd85060ea4b15d2f +0 -0
  169. data/spec/dummy/tmp/cache/assets/test/sprockets/803da586aae34831701698bfa879b561 +0 -0
  170. data/spec/dummy/tmp/cache/assets/test/sprockets/81e6d0d6783cfe14cd7e9d23def86d97 +0 -0
  171. data/spec/dummy/tmp/cache/assets/test/sprockets/840061a4b931ff14d9fc7889de223c96 +0 -0
  172. data/spec/dummy/tmp/cache/assets/test/sprockets/854309b8af664eea02895550c80b25d4 +0 -0
  173. data/spec/dummy/tmp/cache/assets/test/sprockets/8af1214a0e4b6899cee0ac95335e138d +0 -0
  174. data/spec/dummy/tmp/cache/assets/test/sprockets/8affd82f2f1036b2becf625f0c871a79 +0 -0
  175. data/spec/dummy/tmp/cache/assets/test/sprockets/8c02c81cbe84d564cc9ffeca746f1a8b +0 -0
  176. data/spec/dummy/tmp/cache/assets/test/sprockets/8d6d01bf04935d671c1ef1c42e08f537 +0 -0
  177. data/spec/dummy/tmp/cache/assets/test/sprockets/8e5fe149a5dc679943022d1a47b23183 +0 -0
  178. data/spec/dummy/tmp/cache/assets/test/sprockets/8e72b16563e867662d5cda2be248f1f0 +0 -0
  179. data/spec/dummy/tmp/cache/assets/test/sprockets/932c421939a6056784e2b31b7844af72 +0 -0
  180. data/spec/dummy/tmp/cache/assets/test/sprockets/94509de40cc8251483ac5c5de51db87f +0 -0
  181. data/spec/dummy/tmp/cache/assets/test/sprockets/94af149fc4ce783aec06aa2f2174e032 +0 -0
  182. data/spec/dummy/tmp/cache/assets/test/sprockets/96b3a033b6855e2cf23a02e1e0d4e228 +0 -0
  183. data/spec/dummy/tmp/cache/assets/test/sprockets/9758a06a6ea06ffa64ac77d77aadecc2 +0 -0
  184. data/spec/dummy/tmp/cache/assets/test/sprockets/98cbb4b3f461330d7c465489a975ce48 +0 -0
  185. data/spec/dummy/tmp/cache/assets/test/sprockets/9a7d269e284e9640f6b9fdbd45fef7cb +0 -0
  186. data/spec/dummy/tmp/cache/assets/test/sprockets/9c5f8aeef57cfc1657f89ae8785ae639 +0 -0
  187. data/spec/dummy/tmp/cache/assets/test/sprockets/9cbfb054ef7e73a2ce1004578b5fd77b +0 -0
  188. data/spec/dummy/tmp/cache/assets/test/sprockets/9d36b4b765a97f9d61a3fc46ce290c96 +0 -0
  189. data/spec/dummy/tmp/cache/assets/test/sprockets/9deb2daa3df636e020a4d49c5ad10521 +0 -0
  190. data/spec/dummy/tmp/cache/assets/test/sprockets/9e11ac88deb4bac178457cd9d8c5295a +0 -0
  191. data/spec/dummy/tmp/cache/assets/test/sprockets/9ec32d9b308138d6cada34e6a9ff66ae +0 -0
  192. data/spec/dummy/tmp/cache/assets/test/sprockets/a01452b4d2cfdd626128b3be140bcb6f +0 -0
  193. data/spec/dummy/tmp/cache/assets/test/sprockets/a191d879c3381304d1d878509434ec4f +0 -0
  194. data/spec/dummy/tmp/cache/assets/test/sprockets/a2e396f453472e16b59af012de09d2f4 +0 -0
  195. data/spec/dummy/tmp/cache/assets/test/sprockets/a394177189350117a3c19bce1c5ade75 +0 -0
  196. data/spec/dummy/tmp/cache/assets/test/sprockets/a45242515ecbc207ad3be1710215b774 +0 -0
  197. data/spec/dummy/tmp/cache/assets/test/sprockets/a5fc7de39f671d4afebd5a58c8aa9ab8 +0 -0
  198. data/spec/dummy/tmp/cache/assets/test/sprockets/a609d97b9b3abce4cdbbafed3b04eb63 +0 -0
  199. data/spec/dummy/tmp/cache/assets/test/sprockets/a67dc3f3d73f20335341738350ababdb +0 -0
  200. data/spec/dummy/tmp/cache/assets/test/sprockets/a955196f2d721a9d2271717ce88507f2 +0 -0
  201. data/spec/dummy/tmp/cache/assets/test/sprockets/a9a0a4eac11a8b201891c3d6d2ee8fb8 +0 -0
  202. data/spec/dummy/tmp/cache/assets/test/sprockets/aa227281ae0c59e2d71739eea02fa928 +0 -0
  203. data/spec/dummy/tmp/cache/assets/test/sprockets/aa7a6190e27091c504ef40051b4bbadb +0 -0
  204. data/spec/dummy/tmp/cache/assets/test/sprockets/ab08a1a2ad3fffc85aeb5accd15d6e7a +0 -0
  205. data/spec/dummy/tmp/cache/assets/test/sprockets/ab8d16222c3e2d8f6985530a901abd65 +0 -0
  206. data/spec/dummy/tmp/cache/assets/test/sprockets/acc77b4e16eddd8a4e4eca5e15ec502c +0 -0
  207. data/spec/dummy/tmp/cache/assets/test/sprockets/ad318f334d362ea1396a926609bd321a +0 -0
  208. data/spec/dummy/tmp/cache/assets/test/sprockets/af76146db4b25029393c71133f72cd2c +0 -0
  209. data/spec/dummy/tmp/cache/assets/test/sprockets/b01ca41a41cde6d469c1dfb1f231c52a +0 -0
  210. data/spec/dummy/tmp/cache/assets/test/sprockets/b04dc4c98ab26af691285dc201e5837a +0 -0
  211. data/spec/dummy/tmp/cache/assets/test/sprockets/b378f3b8dc607d77c29b4212367b2b8a +0 -0
  212. data/spec/dummy/tmp/cache/assets/test/sprockets/b4029852ff7eb19b8034a5e88c3f0dc5 +0 -0
  213. data/spec/dummy/tmp/cache/assets/test/sprockets/b52218e1d0adac392dd40219873bb03b +0 -0
  214. data/spec/dummy/tmp/cache/assets/test/sprockets/b5896c2bf29f222e4a3e70e47aaae471 +0 -0
  215. data/spec/dummy/tmp/cache/assets/test/sprockets/b718e950e6e54d92a860a1411f06bcee +0 -0
  216. data/spec/dummy/tmp/cache/assets/test/sprockets/b793c0fa65e590d77b37b538230d4e1a +0 -0
  217. data/spec/dummy/tmp/cache/assets/test/sprockets/b8c208820acc09643badf4381cff2a2b +0 -0
  218. data/spec/dummy/tmp/cache/assets/test/sprockets/bc92c39a3ea2e823a91b66110af8c399 +0 -0
  219. data/spec/dummy/tmp/cache/assets/test/sprockets/bebee849320f437bef29caab6896fcd5 +0 -0
  220. data/spec/dummy/tmp/cache/assets/test/sprockets/c27500b04c15a603eba9b5e280cea53f +0 -0
  221. data/spec/dummy/tmp/cache/assets/test/sprockets/c36faf83e470d8a8791403d89f6bd4e3 +0 -0
  222. data/spec/dummy/tmp/cache/assets/test/sprockets/c3b8a3d3a6a3dddc095aea11ee7a49bb +0 -0
  223. data/spec/dummy/tmp/cache/assets/test/sprockets/c7390d6b6ca935580c82880d97bedb3a +0 -0
  224. data/spec/dummy/tmp/cache/assets/test/sprockets/c892c9c80b52ef07dc0c95440a449326 +0 -0
  225. data/spec/dummy/tmp/cache/assets/test/sprockets/c9007446bdb57d8d0f8d39b2756ba40e +0 -0
  226. data/spec/dummy/tmp/cache/assets/test/sprockets/ca9fffafa7e9b19ea2f4d7cc21f313cf +0 -0
  227. data/spec/dummy/tmp/cache/assets/test/sprockets/cb6be30b58d064eb29339c4a2ca4831f +0 -0
  228. data/spec/dummy/tmp/cache/assets/test/sprockets/cd4d9f98721d8900c29829b495291220 +0 -0
  229. data/spec/dummy/tmp/cache/assets/test/sprockets/cffdd0b2df3b989fde30518604fceb49 +0 -0
  230. data/spec/dummy/tmp/cache/assets/test/sprockets/d3fc1e5a0e002a0e0bdd609b47f77f2f +0 -0
  231. data/spec/dummy/tmp/cache/assets/test/sprockets/d64941ffc9d6e3267f89e3e49d5408f2 +0 -0
  232. data/spec/dummy/tmp/cache/assets/test/sprockets/d8ec7e5a252a74936be6612aa9ea7b90 +0 -0
  233. data/spec/dummy/tmp/cache/assets/test/sprockets/db84c409f4515cd7647dbf89dc556c25 +0 -0
  234. data/spec/dummy/tmp/cache/assets/test/sprockets/dc6bbb7a20115bf15a7dcf3d2bb533f7 +0 -0
  235. data/spec/dummy/tmp/cache/assets/test/sprockets/e10d6a2dec42001499d2aa954eacfdfd +0 -0
  236. data/spec/dummy/tmp/cache/assets/test/sprockets/e125b48090d7e7fc15ad4b4bd08afe55 +0 -0
  237. data/spec/dummy/tmp/cache/assets/test/sprockets/e40b448d51d5ec710769fd1c9eb0481f +0 -0
  238. data/spec/dummy/tmp/cache/assets/test/sprockets/e9a6f6a3bf2faa3e795d3f62ce8bf960 +0 -0
  239. data/spec/dummy/tmp/cache/assets/test/sprockets/ec337609be585ec38661cf6805282699 +0 -0
  240. data/spec/dummy/tmp/cache/assets/test/sprockets/ecd538981d4814352e5cc6fddfcbffb7 +0 -0
  241. data/spec/dummy/tmp/cache/assets/test/sprockets/ecf069762138b5f849ee9131e1d247b4 +0 -0
  242. data/spec/dummy/tmp/cache/assets/test/sprockets/edf4541dcca94fa1e27987a650a0241e +0 -0
  243. data/spec/dummy/tmp/cache/assets/test/sprockets/ee6e1eb3e25b3050904b182687783ebc +0 -0
  244. data/spec/dummy/tmp/cache/assets/test/sprockets/f02bbf43e0d935b6d418daf0e66538df +0 -0
  245. data/spec/dummy/tmp/cache/assets/test/sprockets/f250ae15698d6253d959247491db25b5 +0 -0
  246. data/spec/dummy/tmp/cache/assets/test/sprockets/f352f1048c457e8d5a022f0e0b321bee +0 -0
  247. data/spec/dummy/tmp/cache/assets/test/sprockets/f440987e47e1e5293e5a2d8451d5cfa5 +0 -0
  248. data/spec/dummy/tmp/cache/assets/test/sprockets/f6119d555764e201d812de2b395d2fd5 +0 -0
  249. data/spec/dummy/tmp/cache/assets/test/sprockets/f6407b67b6adde8ee4fdd59c7502d8c7 +0 -0
  250. data/spec/dummy/tmp/cache/assets/test/sprockets/f653b5cf0263268360624b91c9957116 +0 -0
  251. data/spec/dummy/tmp/cache/assets/test/sprockets/f7d9131048761572a18ee5bc41c98f34 +0 -0
  252. data/spec/dummy/tmp/cache/assets/test/sprockets/f878059580b7ac3295c19282c647ef1f +0 -0
  253. data/spec/dummy/tmp/cache/assets/test/sprockets/fad4f2a96391a86a4b9918ceb7a94c3d +0 -0
  254. data/spec/dummy/tmp/cache/assets/test/sprockets/fbe9cfbaa243df77287aabad52c4a215 +0 -0
  255. data/spec/dummy/tmp/cache/assets/test/sprockets/fea46265db4501ade5f2d60ab96b8f03 +0 -0
  256. data/spec/dummy/tmp/cache/assets/test/sprockets/fef117f1243690b14fb7ec464e9b6545 +0 -0
  257. data/spec/features/admin/users_feature_spec.rb +1 -1
  258. data/spec/mailers/notifications_spec.rb +7 -7
  259. data/spec/spec_helper.rb +3 -3
  260. metadata +505 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4445bbbf1f3c71fe100fa2ba215e9223cab2a4a4
4
- data.tar.gz: 27e2f560506dc549e924f400343c53069b3ac383
3
+ metadata.gz: e861aed1ed59c8eb3dbb175f7843afae7997942a
4
+ data.tar.gz: bc52622d03c79a2b10070aef63ec0fc319a438f2
5
5
  SHA512:
6
- metadata.gz: e944fa7babfba8ccb9158bc9c852ea34c92a98b4b7c9eaab70fb9ea560718efb9d16cd7fd877ab8f4fda8e0c12ad19ac17b43b1dd93ddbbcd505b07ccc6d9e22
7
- data.tar.gz: f04935ec525fce203ac109f362b4ff59e46f9e63ae6e4e1699addf92a8ea54876f51d933331e4a6f48aa494c2ffaca6cab34db7b038a464da8a4e4e87c16a924
6
+ metadata.gz: 9506d411ccbeb4f2f08022a33d889b1dc5ae54aa8a745dfce99bedd86147970970fc2954ea22f877b34979ad0ee4f1175506e807e4e9b6d26ca77d6bb9be9872
7
+ data.tar.gz: d931c8633859858d2b65a38372b701b25d0db9a7e33a5d933a4e6973a3d2a277546f867ef39b99928a41a6717148092e8a59b9649a32163ec64e9805a625dd46
data/README.md CHANGED
@@ -1,12 +1,10 @@
1
- ## Devise based authentication for Alchemy 3.1
1
+ ## Devise based authentication for AlchemyCMS 3.2
2
2
 
3
- [![Build Status](https://secure.travis-ci.org/AlchemyCMS/alchemy-devise.svg?branch=2.1-stable)](http://travis-ci.org/AlchemyCMS/alchemy-devise)
3
+ [![Build Status](https://secure.travis-ci.org/AlchemyCMS/alchemy-devise.svg?branch=3.2-stable)](http://travis-ci.org/AlchemyCMS/alchemy-devise)
4
4
 
5
- [![Gem Version](https://badge.fury.io/rb/alchemy-devise.svg)](http://badge.fury.io/rb/alchemy-devise) [![Coverage Status](https://img.shields.io/coveralls/AlchemyCMS/alchemy-devise.svg)](https://coveralls.io/r/AlchemyCMS/alchemy-devise?branch=2.1-stable) [![Code Climate](https://codeclimate.com/github/AlchemyCMS/alchemy-devise.svg)](https://codeclimate.com/github/AlchemyCMS/alchemy-devise) [![security](https://hakiri.io/github/AlchemyCMS/alchemy-devise/master.svg)](https://hakiri.io/github/AlchemyCMS/alchemy-devise/master) [![Dependency Status](https://gemnasium.com/AlchemyCMS/alchemy-devise.svg)](https://gemnasium.com/AlchemyCMS/alchemy-devise)
5
+ [![Gem Version](https://badge.fury.io/rb/alchemy-devise.svg)](http://badge.fury.io/rb/alchemy-devise) [![Coverage Status](https://img.shields.io/coveralls/AlchemyCMS/alchemy-devise.svg)](https://coveralls.io/r/AlchemyCMS/alchemy-devise?branch=3.2-stable) [![Code Climate](https://codeclimate.com/github/AlchemyCMS/alchemy-devise.svg)](https://codeclimate.com/github/AlchemyCMS/alchemy-devise) [![security](https://hakiri.io/github/AlchemyCMS/alchemy-devise/3.2-stable.svg)](https://hakiri.io/github/AlchemyCMS/alchemy-devise/3.2-stable) [![Dependency Status](https://gemnasium.com/AlchemyCMS/alchemy-devise.svg)](https://gemnasium.com/AlchemyCMS/alchemy-devise)
6
6
 
7
- Alchemy 3.0 has dropped the authentication from its core. So now it is possibly to bring your own authentication and use it to authorize users in Alchemy.
8
-
9
- In order to bring the authentication from Alchemy back into your app (For instance, because you don't have your own user authorization), you can use this gem.
7
+ AlchemyCMS has no authentication in its core. So it is possibly to bring your own authentication and use it to authorize users in AlchemyCMS. If you don't have your own authentication, you can use this gem.
10
8
 
11
9
  ## Install
12
10
 
@@ -14,7 +12,7 @@ Just put the gem into your projects `Gemfile`.
14
12
 
15
13
  ```ruby
16
14
  # Gemfile
17
- gem 'alchemy-devise', github: 'AlchemyCMS/alchemy-devise', branch: '2.1-stable'
15
+ gem 'alchemy-devise', github: 'AlchemyCMS/alchemy-devise', branch: '3.2-stable'
18
16
  ```
19
17
 
20
18
  and run `bundle install`.
@@ -1,10 +1,10 @@
1
1
  module Alchemy
2
2
  class PasswordsController < ::Devise::PasswordsController
3
- include Locale
3
+ include Alchemy::Locale
4
4
 
5
5
  before_action { enforce_ssl if ssl_required? && !request.ssl? }
6
6
 
7
- helper 'Alchemy::Admin::Base', 'Alchemy::Pages'
7
+ helper 'Alchemy::Admin::Base'
8
8
 
9
9
  layout 'alchemy/login'
10
10
 
@@ -8,7 +8,7 @@ module Alchemy
8
8
 
9
9
  before_action :check_user_count, :only => :new
10
10
 
11
- helper 'Alchemy::Admin::Base', 'Alchemy::Pages'
11
+ helper 'Alchemy::Admin::Base'
12
12
 
13
13
  layout 'alchemy/login'
14
14
 
@@ -1,5 +1,5 @@
1
1
  module Alchemy
2
2
  module Devise
3
- VERSION = "2.1.0"
3
+ VERSION = "3.2.0"
4
4
  end
5
5
  end
@@ -8,30 +8,29 @@ module Alchemy
8
8
  before do
9
9
  allow(controller).to receive_messages(store_user_request_time: true)
10
10
  allow(User).to receive(:find).and_return(user)
11
- sign_in(admin)
11
+ authorize_user(admin)
12
12
  end
13
13
 
14
14
  describe '#index' do
15
- let(:users) { [] }
15
+ let(:user) { create :alchemy_user}
16
16
 
17
- before do
18
- allow(users)
19
- .to receive_message_chain(:page, :per, :order)
20
- .and_return([user])
17
+ context 'with matching search query' do
18
+ it "lists all matching users" do
19
+ alchemy_get :index, query: user.email
20
+ expect(assigns(:users)).to include(user)
21
+ end
21
22
  end
22
23
 
23
- context 'with search query' do
24
+ context 'with non-matching search query' do
24
25
  it "lists all matching users" do
25
- expect(User).to receive(:search).and_return(users)
26
- get :index, query: user.email
27
- expect(assigns(:users)).to include(user)
26
+ alchemy_get :index, query: "Tarzan"
27
+ expect(assigns(:users)).not_to include(user)
28
28
  end
29
29
  end
30
30
 
31
31
  context 'without search query' do
32
32
  it "lists all users" do
33
- allow(User).to receive(:all).and_return(users)
34
- get :index
33
+ alchemy_get :index
35
34
  expect(assigns(:users)).to include(user)
36
35
  end
37
36
  end
@@ -42,7 +41,7 @@ module Alchemy
42
41
  before { allow(User).to receive_messages(count: 1) }
43
42
 
44
43
  it "redirects to admin dashboard" do
45
- get :signup
44
+ alchemy_get :signup
46
45
  expect(response).to redirect_to(admin_dashboard_path)
47
46
  end
48
47
  end
@@ -52,7 +51,7 @@ module Alchemy
52
51
  before { ActionMailer::Base.deliveries.clear }
53
52
 
54
53
  it "creates an user record" do
55
- post :create, user: attributes_for(:alchemy_user)
54
+ alchemy_post :create, user: attributes_for(:alchemy_user)
56
55
  expect(Alchemy::User.count).to eq(1)
57
56
  end
58
57
 
@@ -60,27 +59,27 @@ module Alchemy
60
59
  before { allow(User).to receive(:count).and_return(0) }
61
60
 
62
61
  it "sets the user role to admin." do
63
- post :create, user: attributes_for(:alchemy_admin_user)
62
+ alchemy_post :create, user: attributes_for(:alchemy_admin_user)
64
63
  expect(assigns(:user).alchemy_roles).to include("admin")
65
64
  end
66
65
 
67
66
  context "with valid params" do
68
67
  it "signs the user in." do
69
68
  expect(controller).to receive(:sign_in)
70
- post :create, user: attributes_for(:alchemy_admin_user)
69
+ alchemy_post :create, user: attributes_for(:alchemy_admin_user)
71
70
  end
72
71
  end
73
72
  end
74
73
 
75
74
  context "with send_credentials set to '1'" do
76
75
  it "should send an email notification" do
77
- post :create, user: attributes_for(:alchemy_user).merge(send_credentials: '1')
76
+ alchemy_post :create, user: attributes_for(:alchemy_user).merge(send_credentials: '1')
78
77
  expect(ActionMailer::Base.deliveries).not_to be_empty
79
78
  end
80
79
 
81
80
  context 'with invalid user' do
82
81
  it "does not send an email notification" do
83
- post :create, user: {send_credentials: '1', email: ''}
82
+ alchemy_post :create, user: {send_credentials: '1', email: ''}
84
83
  expect(ActionMailer::Base.deliveries).to be_empty
85
84
  end
86
85
  end
@@ -88,14 +87,14 @@ module Alchemy
88
87
 
89
88
  context "with send_credentials set to true" do
90
89
  it "should not send an email notification" do
91
- post :create, user: attributes_for(:alchemy_user).merge(send_credentials: true)
90
+ alchemy_post :create, user: attributes_for(:alchemy_user).merge(send_credentials: true)
92
91
  expect(ActionMailer::Base.deliveries).to be_empty
93
92
  end
94
93
  end
95
94
 
96
95
  context "with send_credentials left blank" do
97
96
  it "should not send an email notification" do
98
- post :create, user: attributes_for(:alchemy_user)
97
+ alchemy_post :create, user: attributes_for(:alchemy_user)
99
98
  expect(ActionMailer::Base.deliveries).to be_empty
100
99
  end
101
100
  end
@@ -117,7 +116,7 @@ module Alchemy
117
116
  .to receive(:update_without_password)
118
117
  .with(params_hash).and_return(true)
119
118
 
120
- post :update, id: user.id, user: params_hash, format: :js
119
+ alchemy_post :update, id: user.id, user: params_hash, format: :js
121
120
  end
122
121
  end
123
122
 
@@ -130,7 +129,7 @@ module Alchemy
130
129
  }
131
130
  expect(user).to receive(:update).with(params_hash)
132
131
 
133
- post :update, id: user.id, user: params_hash, format: :js
132
+ alchemy_post :update, id: user.id, user: params_hash, format: :js
134
133
  end
135
134
  end
136
135
 
@@ -138,13 +137,13 @@ module Alchemy
138
137
  let(:user) { create(:alchemy_admin_user) }
139
138
 
140
139
  it "should send an email notification" do
141
- post :update, id: user.id, user: {send_credentials: '1'}
140
+ alchemy_post :update, id: user.id, user: {send_credentials: '1'}
142
141
  expect(ActionMailer::Base.deliveries).to_not be_empty
143
142
  end
144
143
 
145
144
  context 'with invalid user' do
146
145
  it "does not send an email notification" do
147
- post :update, id: user.id, user: {send_credentials: '1', email: ''}
146
+ alchemy_post :update, id: user.id, user: {send_credentials: '1', email: ''}
148
147
  expect(ActionMailer::Base.deliveries).to be_empty
149
148
  end
150
149
  end
@@ -154,7 +153,7 @@ module Alchemy
154
153
  let(:user) { create(:alchemy_admin_user) }
155
154
 
156
155
  it "should not send an email notification" do
157
- post :update, id: user.id, user: {email: user.email}
156
+ alchemy_post :update, id: user.id, user: {email: user.email}
158
157
  expect(ActionMailer::Base.deliveries).to be_empty
159
158
  end
160
159
  end
@@ -171,7 +170,7 @@ module Alchemy
171
170
  expect(user)
172
171
  .to receive(:update_without_password)
173
172
  .with({'alchemy_roles' => ['Administrator']})
174
- post :update, id: user.id, user: {alchemy_roles: ['Administrator']}, format: :js
173
+ alchemy_post :update, id: user.id, user: {alchemy_roles: ['Administrator']}, format: :js
175
174
  end
176
175
  end
177
176
 
@@ -185,7 +184,7 @@ module Alchemy
185
184
 
186
185
  it "updates user without role" do
187
186
  expect(user).to receive(:update_without_password).with({})
188
- post :update, id: user.id, user: {alchemy_roles: ['Administrator']}, format: :js
187
+ alchemy_post :update, id: user.id, user: {alchemy_roles: ['Administrator']}, format: :js
189
188
  end
190
189
  end
191
190
  end
@@ -193,7 +192,7 @@ module Alchemy
193
192
  describe '#destroy' do
194
193
  it "redirects to users list" do
195
194
  expect(user).to receive(:destroy).and_return(true)
196
- delete :destroy, id: user.id
195
+ alchemy_delete :destroy, id: user.id
197
196
  expect(response).to redirect_to(admin_users_path)
198
197
  end
199
198
  end
@@ -8,7 +8,7 @@ describe Alchemy::UserSessionsController do
8
8
  context 'without users present' do
9
9
  describe '#new' do
10
10
  it "redirects to signup form" do
11
- get :new
11
+ alchemy_get :new
12
12
  is_expected.to redirect_to(admin_signup_path)
13
13
  end
14
14
 
@@ -18,7 +18,7 @@ describe Alchemy::UserSessionsController do
18
18
  end
19
19
 
20
20
  it 'redirects to https' do
21
- get :new
21
+ alchemy_get :new
22
22
  is_expected.to redirect_to(
23
23
  login_url(protocol: 'https', host: "test.host")
24
24
  )
@@ -39,7 +39,7 @@ describe Alchemy::UserSessionsController do
39
39
 
40
40
  context 'without redirect path in session' do
41
41
  it "redirects to dashboard" do
42
- post :create, user: user_params
42
+ alchemy_post :create, user: user_params
43
43
  expect(response).to redirect_to(admin_dashboard_path)
44
44
  end
45
45
  end
@@ -47,19 +47,19 @@ describe Alchemy::UserSessionsController do
47
47
  context 'with redirect path in session' do
48
48
  it "redirects to these params" do
49
49
  session[:redirect_path] = admin_users_path
50
- post :create, user: user_params
50
+ alchemy_post :create, user: user_params
51
51
  expect(response).to redirect_to(admin_users_path)
52
52
  end
53
53
  end
54
54
 
55
55
  it "stores users screen size" do
56
- post :create, user: user_params, user_screensize: screen_size
56
+ alchemy_post :create, user: user_params, user_screensize: screen_size
57
57
  expect(session[:screen_size]).to eq(screen_size)
58
58
  end
59
59
 
60
60
  context 'without valid params' do
61
61
  it "renders login form" do
62
- post :create, user: {login: ''}
62
+ alchemy_post :create, user: {login: ''}
63
63
  is_expected.to render_template(:new)
64
64
  end
65
65
  end
@@ -72,12 +72,12 @@ describe Alchemy::UserSessionsController do
72
72
  allow(controller)
73
73
  .to receive(:all_signed_out?)
74
74
  .and_return(false)
75
- sign_in(user)
75
+ authorize_user(user)
76
76
  end
77
77
 
78
78
  it "should unlock all pages" do
79
79
  expect(user).to receive(:unlock_pages!)
80
- delete :destroy
80
+ alchemy_delete :destroy
81
81
  end
82
82
 
83
83
  context 'comming from admin area' do
@@ -88,7 +88,7 @@ describe Alchemy::UserSessionsController do
88
88
  end
89
89
 
90
90
  it "redirects to root" do
91
- delete :destroy
91
+ alchemy_delete :destroy
92
92
  is_expected.to redirect_to(root_path)
93
93
  end
94
94
  end
@@ -101,7 +101,7 @@ describe Alchemy::UserSessionsController do
101
101
  end
102
102
 
103
103
  it "redirects to root" do
104
- delete :destroy
104
+ alchemy_delete :destroy
105
105
  is_expected.to redirect_to(root_path)
106
106
  end
107
107
  end
@@ -114,7 +114,7 @@ describe Alchemy::UserSessionsController do
114
114
  end
115
115
 
116
116
  it "redirects to root" do
117
- delete :destroy
117
+ alchemy_delete :destroy
118
118
  is_expected.to redirect_to('/imprint')
119
119
  end
120
120
  end
@@ -20,7 +20,7 @@ Dummy::Application.configure do
20
20
  # config.action_dispatch.rack_cache = true
21
21
 
22
22
  # Disable Rails's static asset server (Apache or nginx will already do this).
23
- config.serve_static_assets = false
23
+ config.serve_static_files = false
24
24
 
25
25
  # Compress JavaScripts and CSS.
26
26
  config.assets.js_compressor = :uglifier
@@ -13,7 +13,7 @@ Dummy::Application.configure do
13
13
  config.eager_load = false
14
14
 
15
15
  # Configure static asset server for tests with Cache-Control for performance.
16
- config.serve_static_assets = true
16
+ config.serve_static_files = true
17
17
  config.static_cache_control = "public, max-age=3600"
18
18
 
19
19
  # Show full error reports and disable caching.
@@ -33,4 +33,6 @@ Dummy::Application.configure do
33
33
 
34
34
  # Print deprecation notices to the stderr.
35
35
  config.active_support.deprecation = :stderr
36
+
37
+ config.active_support.test_order = :random
36
38
  end
@@ -0,0 +1,265 @@
1
+ # Use this hook to configure devise mailer, warden hooks and so forth.
2
+ # Many of these configuration options can be set straight in your model.
3
+ Devise.setup do |config|
4
+ # The secret key used by Devise. Devise uses this key to generate
5
+ # random tokens. Changing this key will render invalid all existing
6
+ # confirmation, reset password and unlock tokens in the database.
7
+
8
+ # By default, Devise will use your Application's secret_key_base as its
9
+ # secret_key. You can override it here by uncommenting the following
10
+ # line. Remember to keep this file out of source control if you do that.
11
+ # config.secret_key = "228738e15f1211b1a7f41461aa428e9750a1c9e9f763db122c290b37e97a294562808e3b79ff745e9fe05deb0697eb9fa196"
12
+
13
+ # ==> Mailer Configuration
14
+ # Configure the e-mail address which will be shown in Devise::Mailer,
15
+ # note that it will be overwritten if you use your own mailer class
16
+ # with default "from" parameter.
17
+ config.mailer_sender = Alchemy::Config.get(:mailer)['mail_from']
18
+
19
+ # Configure the class responsible to send e-mails.
20
+ config.mailer = "Alchemy::Notifications"
21
+
22
+ # ==> ORM configuration
23
+ # Load and configure the ORM. Supports :active_record (default) and
24
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
25
+ # available as additional gems.
26
+ require 'devise/orm/active_record'
27
+
28
+ config.parent_controller = "Alchemy::BaseController"
29
+
30
+ # ==> Configuration for any authentication mechanism
31
+ # Configure which keys are used when authenticating a user. The default is
32
+ # just :email. You can configure it to use [:username, :subdomain], so for
33
+ # authenticating a user, both parameters are required. Remember that those
34
+ # parameters are used only when authenticating and not when retrieving from
35
+ # session. If you need permissions, you should implement that in a before filter.
36
+ # You can also supply a hash where the value is a boolean determining whether
37
+ # or not authentication should be aborted when the value is not present.
38
+ config.authentication_keys = [:login]
39
+
40
+ # Configure parameters from the request object used for authentication. Each entry
41
+ # given should be a request method and it will automatically be passed to the
42
+ # find_for_authentication method and considered in your model lookup. For instance,
43
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
44
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
45
+ # config.request_keys = []
46
+
47
+ # Configure which authentication keys should be case-insensitive.
48
+ # These keys will be downcased upon creating or modifying a user and when used
49
+ # to authenticate or find a user. Default is :email.
50
+ config.case_insensitive_keys = [:login]
51
+
52
+ # Configure which authentication keys should have whitespace stripped.
53
+ # These keys will have whitespace before and after removed upon creating or
54
+ # modifying a user and when used to authenticate or find a user. Default is :email.
55
+ config.strip_whitespace_keys = [:login]
56
+
57
+ # Tell if authentication through request.params is enabled. True by default.
58
+ # It can be set to an array that will enable params authentication only for the
59
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
60
+ # enable it only for database (email + password) authentication.
61
+ # config.params_authenticatable = true
62
+
63
+ # Tell if authentication through HTTP Auth is enabled. False by default.
64
+ # It can be set to an array that will enable http authentication only for the
65
+ # given strategies, for example, `config.http_authenticatable = [:database]` will
66
+ # enable it only for database authentication. The supported strategies are:
67
+ # :database = Support basic authentication with authentication key + password
68
+ config.http_authenticatable = true
69
+
70
+ # If 401 status code should be returned for AJAX requests. True by default.
71
+ config.http_authenticatable_on_xhr = true
72
+
73
+ # The realm used in Http Basic Authentication. 'Application' by default.
74
+ config.http_authentication_realm = 'Alchemy CMS'
75
+
76
+ # It will change confirmation, password recovery and other workflows
77
+ # to behave the same regardless if the e-mail provided was right or wrong.
78
+ # Does not affect registerable.
79
+ # config.paranoid = true
80
+
81
+ # By default Devise will store the user in session. You can skip storage for
82
+ # particular strategies by setting this option.
83
+ # Notice that if you are skipping storage for all authentication paths, you
84
+ # may want to disable generating routes to Devise's sessions controller by
85
+ # passing skip: :sessions to `devise_for` in your config/routes.rb
86
+ config.skip_session_storage = [:http_auth]
87
+
88
+ # By default, Devise cleans up the CSRF token on authentication to
89
+ # avoid CSRF token fixation attacks. This means that, when using AJAX
90
+ # requests for sign in and sign up, you need to get a new CSRF token
91
+ # from the server. You can disable this option at your own risk.
92
+ # config.clean_up_csrf_token_on_authentication = true
93
+
94
+ # ==> Configuration for :database_authenticatable
95
+ # For bcrypt, this is the cost for hashing the password and defaults to 10. If
96
+ # using other encryptors, it sets how many times you want the password re-encrypted.
97
+ #
98
+ # Limiting the stretches to just one in testing will increase the performance of
99
+ # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
100
+ # a value less than 10 in other environments. Note that, for bcrypt (the default
101
+ # encryptor), the cost increases exponentially with the number of stretches (e.g.
102
+ # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
103
+ config.stretches = Rails.env.test? ? 1 : 10
104
+
105
+ # Setup a pepper to generate the encrypted password.
106
+ # config.pepper = "f6ad5581dc3564a633026f1f48d90152ee3ddcced8fd6aa9d1c36cf3823b8eef211913890babfd4b95935caa49ee99c2da01"
107
+
108
+ # ==> Configuration for :confirmable
109
+ # A period that the user is allowed to access the website even without
110
+ # confirming their account. For instance, if set to 2.days, the user will be
111
+ # able to access the website for two days without confirming their account,
112
+ # access will be blocked just in the third day. Default is 0.days, meaning
113
+ # the user cannot access the website without confirming their account.
114
+ # config.allow_unconfirmed_access_for = 2.days
115
+
116
+ # A period that the user is allowed to confirm their account before their
117
+ # token becomes invalid. For example, if set to 3.days, the user can confirm
118
+ # their account within 3 days after the mail was sent, but on the fourth day
119
+ # their account can't be confirmed with the token any more.
120
+ # Default is nil, meaning there is no restriction on how long a user can take
121
+ # before confirming their account.
122
+ # config.confirm_within = 3.days
123
+
124
+ # If true, requires any email changes to be confirmed (exactly the same way as
125
+ # initial account confirmation) to be applied. Requires additional unconfirmed_email
126
+ # db field (see migrations). Until confirmed, new email is stored in
127
+ # unconfirmed_email column, and copied to email column on successful confirmation.
128
+ config.reconfirmable = false
129
+
130
+ # Defines which key will be used when confirming an account
131
+ # config.confirmation_keys = [ :email ]
132
+
133
+ # ==> Configuration for :rememberable
134
+ # The time the user will be remembered without asking for credentials again.
135
+ # config.remember_for = 2.weeks
136
+
137
+ # Invalidates all the remember me tokens when the user signs out.
138
+ config.expire_all_remember_me_on_sign_out = true
139
+
140
+ # If true, extends the user's remember period when remembered via cookie.
141
+ # config.extend_remember_period = false
142
+
143
+ # Options to be passed to the created cookie. For instance, you can set
144
+ # secure: true in order to force SSL only cookies.
145
+ # config.rememberable_options = {}
146
+
147
+ # ==> Configuration for :validatable
148
+ # Range for password length.
149
+ config.password_length = 6..128
150
+
151
+ # Email regex used to validate email formats. It simply asserts that
152
+ # one (and only one) @ exists in the given string. This is mainly
153
+ # to give user feedback and not to assert the e-mail validity.
154
+ # config.email_regexp = /\A[^@]+@[^@]+\z/
155
+
156
+ # ==> Configuration for :timeoutable
157
+ # The time you want to timeout the user session without activity. After this
158
+ # time the user will be asked for credentials again. Default is 30 minutes.
159
+ config.timeout_in = Rails.env.development? ? nil : Alchemy::Config.get(:auto_logout_time).minutes
160
+
161
+ # If true, expires auth token on session timeout.
162
+ # config.expire_auth_token_on_timeout = false
163
+
164
+ # ==> Configuration for :lockable
165
+ # Defines which strategy will be used to lock an account.
166
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
167
+ # :none = No lock strategy. You should handle locking by yourself.
168
+ # config.lock_strategy = :failed_attempts
169
+
170
+ # Defines which key will be used when locking and unlocking an account
171
+ # config.unlock_keys = [ :email ]
172
+
173
+ # Defines which strategy will be used to unlock an account.
174
+ # :email = Sends an unlock link to the user email
175
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
176
+ # :both = Enables both strategies
177
+ # :none = No unlock strategy. You should handle unlocking by yourself.
178
+ # config.unlock_strategy = :both
179
+
180
+ # Number of authentication tries before locking an account if lock_strategy
181
+ # is failed attempts.
182
+ # config.maximum_attempts = 20
183
+
184
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
185
+ # config.unlock_in = 1.hour
186
+
187
+ # Warn on the last attempt before the account is locked.
188
+ config.last_attempt_warning = true
189
+
190
+ # ==> Configuration for :recoverable
191
+ #
192
+ # Defines which key will be used when recovering the password for an account
193
+ # config.reset_password_keys = [ :email ]
194
+
195
+ # Time interval you can reset your password with a reset password key.
196
+ # Don't put a too small interval or your users won't have the time to
197
+ # change their passwords.
198
+ config.reset_password_within = 6.hours
199
+
200
+ # ==> Configuration for :encryptable
201
+ # Allow you to use another encryption algorithm besides bcrypt (default). You can use
202
+ # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
203
+ # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
204
+ # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
205
+ # REST_AUTH_SITE_KEY to pepper).
206
+ #
207
+ # Require the `devise-encryptable` gem when using anything other than bcrypt
208
+ # config.encryptor = :sha512
209
+
210
+ # ==> Scopes configuration
211
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
212
+ # "users/sessions/new". It's turned off by default because it's slower if you
213
+ # are using only default views.
214
+ # config.scoped_views = false
215
+
216
+ # Configure the default scope given to Warden. By default it's the first
217
+ # devise role declared in your routes (usually :user).
218
+ # config.default_scope = :user
219
+
220
+ # Set this configuration to false if you want /users/sign_out to sign out
221
+ # only the current scope. By default, Devise signs out all scopes.
222
+ # config.sign_out_all_scopes = true
223
+
224
+ # ==> Navigation configuration
225
+ # Lists the formats that should be treated as navigational. Formats like
226
+ # :html, should redirect to the sign in page when the user does not have
227
+ # access, but formats like :xml or :json, should return 401.
228
+ #
229
+ # If you have any extra navigational formats, like :iphone or :mobile, you
230
+ # should add them to the navigational formats lists.
231
+ #
232
+ # The "*/*" below is required to match Internet Explorer requests.
233
+ # config.navigational_formats = ['*/*', :html]
234
+
235
+ # The default HTTP method used to sign out a resource. Default is :delete.
236
+ config.sign_out_via = :delete
237
+
238
+ # ==> OmniAuth
239
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
240
+ # up on your models and hooks.
241
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
242
+
243
+ # ==> Warden configuration
244
+ # If you want to use other strategies, that are not supported by Devise, or
245
+ # change the failure app, you can configure them inside the config.warden block.
246
+ #
247
+ # config.warden do |manager|
248
+ # manager.intercept_401 = false
249
+ # manager.default_strategies(scope: :user).unshift :some_external_strategy
250
+ # end
251
+
252
+ # ==> Mountable engine configurations
253
+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
254
+ # is mountable, there are some extra configurations to be taken into account.
255
+ # The following options are available, assuming the engine is mounted as:
256
+ #
257
+ # mount MyEngine, at: '/my_engine'
258
+ #
259
+ # The router that invoked `devise_for`, in the example above, would be:
260
+ # config.router_name = :my_engine
261
+ #
262
+ # When using omniauth, Devise cannot automatically set Omniauth path,
263
+ # so you need to do it manually. For the users scope, it would be:
264
+ # config.omniauth_path_prefix = '/my_engine/users/auth'
265
+ end