fae-railsz 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (328) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +5 -0
  3. data/Rakefile +37 -0
  4. data/app/assets/fonts/fae/icons.eot +0 -0
  5. data/app/assets/fonts/fae/icons.svg +56 -0
  6. data/app/assets/fonts/fae/icons.ttf +0 -0
  7. data/app/assets/fonts/fae/icons.woff +0 -0
  8. data/app/assets/fonts/fae/lato-bold-webfont.eot +0 -0
  9. data/app/assets/fonts/fae/lato-bold-webfont.svg +4551 -0
  10. data/app/assets/fonts/fae/lato-bold-webfont.ttf +0 -0
  11. data/app/assets/fonts/fae/lato-bold-webfont.woff +0 -0
  12. data/app/assets/fonts/fae/lato-light-webfont.eot +0 -0
  13. data/app/assets/fonts/fae/lato-light-webfont.svg +4241 -0
  14. data/app/assets/fonts/fae/lato-light-webfont.ttf +0 -0
  15. data/app/assets/fonts/fae/lato-light-webfont.woff +0 -0
  16. data/app/assets/fonts/fae/lato-regular-webfont.eot +0 -0
  17. data/app/assets/fonts/fae/lato-regular-webfont.svg +4241 -0
  18. data/app/assets/fonts/fae/lato-regular-webfont.ttf +0 -0
  19. data/app/assets/fonts/fae/lato-regular-webfont.woff +0 -0
  20. data/app/assets/fonts/fae/selection.json +1334 -0
  21. data/app/assets/images/fae/error_bg.jpg +0 -0
  22. data/app/assets/images/fae/error_sad_face.png +0 -0
  23. data/app/assets/images/fae/icons/alert.svg +9 -0
  24. data/app/assets/images/fae/icons/arrow_down.svg +8 -0
  25. data/app/assets/images/fae/icons/arrow_left.svg +9 -0
  26. data/app/assets/images/fae/icons/arrow_right.svg +9 -0
  27. data/app/assets/images/fae/icons/arrow_stacked.svg +8 -0
  28. data/app/assets/images/fae/icons/arrow_up.svg +8 -0
  29. data/app/assets/images/fae/icons/calendar.svg +17 -0
  30. data/app/assets/images/fae/icons/check.svg +7 -0
  31. data/app/assets/images/fae/icons/checkmark.svg +8 -0
  32. data/app/assets/images/fae/icons/chevron_down.svg +7 -0
  33. data/app/assets/images/fae/icons/chevron_left.svg +10 -0
  34. data/app/assets/images/fae/icons/chevron_right.svg +10 -0
  35. data/app/assets/images/fae/icons/chevron_up.svg +7 -0
  36. data/app/assets/images/fae/icons/delete.svg +8 -0
  37. data/app/assets/images/fae/icons/delete_x.svg +8 -0
  38. data/app/assets/images/fae/icons/edit.svg +11 -0
  39. data/app/assets/images/fae/icons/handle.svg +13 -0
  40. data/app/assets/images/fae/icons/home.svg +10 -0
  41. data/app/assets/images/fae/icons/logout.svg +12 -0
  42. data/app/assets/images/fae/icons/magnifying_glass.svg +10 -0
  43. data/app/assets/images/fae/icons/menu.svg +11 -0
  44. data/app/assets/images/fae/icons/offlink.svg +25 -0
  45. data/app/assets/images/fae/icons/plus.svg +8 -0
  46. data/app/assets/images/fae/icons/pulldown.svg +11 -0
  47. data/app/assets/images/fae/icons/search.svg +11 -0
  48. data/app/assets/images/fae/icons/settings.svg +12 -0
  49. data/app/assets/images/fae/icons/sort.svg +11 -0
  50. data/app/assets/images/fae/icons/support.svg +15 -0
  51. data/app/assets/images/fae/icons/trash.svg +10 -0
  52. data/app/assets/images/fae/icons/trumbowyg.svg +1 -0
  53. data/app/assets/images/fae/icons/user.svg +13 -0
  54. data/app/assets/images/fae/icons/users.svg +19 -0
  55. data/app/assets/images/fae/icons/zoom.svg +12 -0
  56. data/app/assets/images/fae/tutorial_model_location.png +0 -0
  57. data/app/assets/images/fae/youtube_helper.jpg +0 -0
  58. data/app/assets/javascripts/fae/_modals.js +60 -0
  59. data/app/assets/javascripts/fae/_tables.js +403 -0
  60. data/app/assets/javascripts/fae/admin.js.erb +11 -0
  61. data/app/assets/javascripts/fae/application.js +63 -0
  62. data/app/assets/javascripts/fae/fae_init.js +8 -0
  63. data/app/assets/javascripts/fae/form/_ajax.js +380 -0
  64. data/app/assets/javascripts/fae/form/_cancel.js +38 -0
  65. data/app/assets/javascripts/fae/form/_filtering.js +276 -0
  66. data/app/assets/javascripts/fae/form/_form.js +60 -0
  67. data/app/assets/javascripts/fae/form/_slugger.js.erb +100 -0
  68. data/app/assets/javascripts/fae/form/_validator.js +459 -0
  69. data/app/assets/javascripts/fae/form/fae_chosen.js +44 -0
  70. data/app/assets/javascripts/fae/form/fileinputer.js +178 -0
  71. data/app/assets/javascripts/fae/form/hinter.js +111 -0
  72. data/app/assets/javascripts/fae/form/inputs/_checkbox.js +27 -0
  73. data/app/assets/javascripts/fae/form/inputs/_color.js +42 -0
  74. data/app/assets/javascripts/fae/form/inputs/_dates.js +78 -0
  75. data/app/assets/javascripts/fae/form/inputs/_select.js +162 -0
  76. data/app/assets/javascripts/fae/form/inputs/_text.js +118 -0
  77. data/app/assets/javascripts/fae/navigation/_global_search.js +184 -0
  78. data/app/assets/javascripts/fae/navigation/_language.js +89 -0
  79. data/app/assets/javascripts/fae/navigation/_navigation.js +206 -0
  80. data/app/assets/javascripts/fae/navigation/_subnav_highlighter.js +81 -0
  81. data/app/assets/javascripts/fae/navigation/sticky.js +186 -0
  82. data/app/assets/javascripts/fae/vendor/chosen.jquery.min.js +2 -0
  83. data/app/assets/javascripts/fae/vendor/frob_core_helpers.js +587 -0
  84. data/app/assets/javascripts/fae/vendor/fryr.js +437 -0
  85. data/app/assets/javascripts/fae/vendor/jqColorPicker.min.js +4 -0
  86. data/app/assets/javascripts/fae/vendor/jquery.daterangepicker.js +1292 -0
  87. data/app/assets/javascripts/fae/vendor/jquery.multi-select.js +534 -0
  88. data/app/assets/javascripts/fae/vendor/jquery.simplemodal.1.4.4.js +719 -0
  89. data/app/assets/javascripts/fae/vendor/jquery.tablesorter.js +1901 -0
  90. data/app/assets/javascripts/fae/vendor/js.cookie.js +139 -0
  91. data/app/assets/javascripts/fae/vendor/moment.min.js +7 -0
  92. data/app/assets/javascripts/fae/vendor/simplemde.min.js +13 -0
  93. data/app/assets/javascripts/fae/vendor/touch_punch.js +11 -0
  94. data/app/assets/javascripts/fae/vendor/trumbowyg.js.erb +4 -0
  95. data/app/assets/javascripts/fae/vendor/trumbowyg/plugins/upload/trumbowyg.upload.js +223 -0
  96. data/app/assets/javascripts/fae/vendor/trumbowyg/trumbowyg.js +1603 -0
  97. data/app/assets/stylesheets/fae/application.css +8 -0
  98. data/app/assets/stylesheets/fae/base.scss +82 -0
  99. data/app/assets/stylesheets/fae/globals/_fonts.scss +43 -0
  100. data/app/assets/stylesheets/fae/globals/_icons.scss +15 -0
  101. data/app/assets/stylesheets/fae/globals/_plugins.scss +51 -0
  102. data/app/assets/stylesheets/fae/globals/_tags.scss +68 -0
  103. data/app/assets/stylesheets/fae/globals/imports/_extends.scss +53 -0
  104. data/app/assets/stylesheets/fae/globals/imports/_mixins.scss +58 -0
  105. data/app/assets/stylesheets/fae/globals/imports/_variables.scss +165 -0
  106. data/app/assets/stylesheets/fae/globals/imports/finescss/_fine.scss +7 -0
  107. data/app/assets/stylesheets/fae/globals/imports/finescss/_fine_functions.scss +88 -0
  108. data/app/assets/stylesheets/fae/globals/imports/finescss/_fine_mixins.scss +280 -0
  109. data/app/assets/stylesheets/fae/globals/imports/finescss/_fine_variables.scss +30 -0
  110. data/app/assets/stylesheets/fae/globals/layout/_base.scss +48 -0
  111. data/app/assets/stylesheets/fae/globals/layout/_breadcrumbs.scss +45 -0
  112. data/app/assets/stylesheets/fae/globals/layout/_content-header.scss +99 -0
  113. data/app/assets/stylesheets/fae/globals/legacy/_pre-1.3.scss +659 -0
  114. data/app/assets/stylesheets/fae/globals/navigation/_base.scss +22 -0
  115. data/app/assets/stylesheets/fae/globals/navigation/_footer.scss +50 -0
  116. data/app/assets/stylesheets/fae/globals/navigation/_header.scss +149 -0
  117. data/app/assets/stylesheets/fae/globals/navigation/_mobilenav.scss +149 -0
  118. data/app/assets/stylesheets/fae/globals/navigation/_search.scss +76 -0
  119. data/app/assets/stylesheets/fae/globals/navigation/_sidenav.scss +142 -0
  120. data/app/assets/stylesheets/fae/globals/navigation/_utility.scss +95 -0
  121. data/app/assets/stylesheets/fae/modules/_alerts.scss +50 -0
  122. data/app/assets/stylesheets/fae/modules/_buttons.scss +62 -0
  123. data/app/assets/stylesheets/fae/modules/_modal.scss +78 -0
  124. data/app/assets/stylesheets/fae/modules/_toggles.scss +48 -0
  125. data/app/assets/stylesheets/fae/modules/forms/_asset-actions.scss +83 -0
  126. data/app/assets/stylesheets/fae/modules/forms/_base.scss +100 -0
  127. data/app/assets/stylesheets/fae/modules/forms/_checkbox.scss +87 -0
  128. data/app/assets/stylesheets/fae/modules/forms/_colorpicker.scss +57 -0
  129. data/app/assets/stylesheets/fae/modules/forms/_date.scss +335 -0
  130. data/app/assets/stylesheets/fae/modules/forms/_hints.scss +40 -0
  131. data/app/assets/stylesheets/fae/modules/forms/_label.scss +57 -0
  132. data/app/assets/stylesheets/fae/modules/forms/_radio.scss +69 -0
  133. data/app/assets/stylesheets/fae/modules/forms/_select.scss +317 -0
  134. data/app/assets/stylesheets/fae/modules/forms/_simple-mde.scss +29 -0
  135. data/app/assets/stylesheets/fae/modules/forms/_text.scss +62 -0
  136. data/app/assets/stylesheets/fae/modules/forms/_textarea.scss +16 -0
  137. data/app/assets/stylesheets/fae/modules/forms/_validation.scss +63 -0
  138. data/app/assets/stylesheets/fae/modules/tables/_actions.scss +41 -0
  139. data/app/assets/stylesheets/fae/modules/tables/_base.scss +63 -0
  140. data/app/assets/stylesheets/fae/modules/tables/_collapsible.scss +76 -0
  141. data/app/assets/stylesheets/fae/modules/tables/_filters.scss +61 -0
  142. data/app/assets/stylesheets/fae/modules/tables/_image.scss +21 -0
  143. data/app/assets/stylesheets/fae/modules/tables/_pagination.scss +34 -0
  144. data/app/assets/stylesheets/fae/modules/tables/_sorting.scss +58 -0
  145. data/app/assets/stylesheets/fae/modules/tables/_sticky.scss +9 -0
  146. data/app/assets/stylesheets/fae/modules/tables/_tooltips.scss +24 -0
  147. data/app/assets/stylesheets/fae/pages/_error.scss +35 -0
  148. data/app/assets/stylesheets/fae/pages/_help.scss +28 -0
  149. data/app/assets/stylesheets/fae/pages/_home.scss +18 -0
  150. data/app/assets/stylesheets/fae/pages/_login.scss +137 -0
  151. data/app/assets/stylesheets/fae/vendor/chosen.css +377 -0
  152. data/app/assets/stylesheets/fae/vendor/daterangepicker.css +227 -0
  153. data/app/assets/stylesheets/fae/vendor/reset.css +48 -0
  154. data/app/assets/stylesheets/fae/vendor/simplemde.min.css +7 -0
  155. data/app/assets/stylesheets/fae/vendor/trumbowyg.css +584 -0
  156. data/app/controllers/concerns/fae/application_controller_concern.rb +1 -0
  157. data/app/controllers/concerns/fae/asset_cloner.rb +46 -0
  158. data/app/controllers/concerns/fae/cloneable.rb +136 -0
  159. data/app/controllers/fae/application_controller.rb +123 -0
  160. data/app/controllers/fae/base_controller.rb +117 -0
  161. data/app/controllers/fae/files_controller.rb +26 -0
  162. data/app/controllers/fae/images_controller.rb +37 -0
  163. data/app/controllers/fae/nested_base_controller.rb +100 -0
  164. data/app/controllers/fae/options_controller.rb +29 -0
  165. data/app/controllers/fae/pages_controller.rb +44 -0
  166. data/app/controllers/fae/setup_controller.rb +54 -0
  167. data/app/controllers/fae/static_pages_controller.rb +54 -0
  168. data/app/controllers/fae/users_controller.rb +71 -0
  169. data/app/controllers/fae/utilities_controller.rb +61 -0
  170. data/app/helpers/fae/application_helper.rb +114 -0
  171. data/app/helpers/fae/fae_helper.rb +6 -0
  172. data/app/helpers/fae/form_helper.rb +240 -0
  173. data/app/helpers/fae/nested_form_helper.rb +39 -0
  174. data/app/helpers/fae/view_helper.rb +175 -0
  175. data/app/inputs/date_range_input.rb +17 -0
  176. data/app/inputs/radio_collection_input.rb +17 -0
  177. data/app/inputs/symbol_input.rb +5 -0
  178. data/app/models/concerns/fae/assets_validatable.rb +12 -0
  179. data/app/models/concerns/fae/authorization_concern.rb +12 -0
  180. data/app/models/concerns/fae/base_model_concern.rb +105 -0
  181. data/app/models/concerns/fae/change_concern.rb +1 -0
  182. data/app/models/concerns/fae/file_concern.rb +1 -0
  183. data/app/models/concerns/fae/image_concern.rb +1 -0
  184. data/app/models/concerns/fae/navigation_concern.rb +10 -0
  185. data/app/models/concerns/fae/option_concern.rb +1 -0
  186. data/app/models/concerns/fae/page_validatable.rb +26 -0
  187. data/app/models/concerns/fae/paper_trailer.rb +8 -0
  188. data/app/models/concerns/fae/role_concern.rb +1 -0
  189. data/app/models/concerns/fae/sortable.rb +51 -0
  190. data/app/models/concerns/fae/static_page_concern.rb +1 -0
  191. data/app/models/concerns/fae/text_area_concern.rb +1 -0
  192. data/app/models/concerns/fae/text_field_concern.rb +1 -0
  193. data/app/models/concerns/fae/trackable.rb +124 -0
  194. data/app/models/concerns/fae/user_concern.rb +7 -0
  195. data/app/models/fae/authorization.rb +8 -0
  196. data/app/models/fae/change.rb +53 -0
  197. data/app/models/fae/file.rb +24 -0
  198. data/app/models/fae/image.rb +33 -0
  199. data/app/models/fae/navigation.rb +132 -0
  200. data/app/models/fae/option.rb +38 -0
  201. data/app/models/fae/role.rb +18 -0
  202. data/app/models/fae/static_page.rb +109 -0
  203. data/app/models/fae/text_area.rb +14 -0
  204. data/app/models/fae/text_field.rb +14 -0
  205. data/app/models/fae/user.rb +67 -0
  206. data/app/uploaders/fae/file_uploader.rb +26 -0
  207. data/app/uploaders/fae/image_uploader.rb +28 -0
  208. data/app/validators/fae/cross_model_uniqueness_validator.rb +14 -0
  209. data/app/views/devise/confirmations/new.html.slim +13 -0
  210. data/app/views/devise/mailer/confirmation_instructions.html.slim +3 -0
  211. data/app/views/devise/mailer/reset_password_instructions.html.slim +5 -0
  212. data/app/views/devise/mailer/unlock_instructions.html.slim +4 -0
  213. data/app/views/devise/passwords/edit.html.slim +10 -0
  214. data/app/views/devise/passwords/new.html.slim +10 -0
  215. data/app/views/devise/registrations/edit.html.slim +22 -0
  216. data/app/views/devise/registrations/new.html.slim +15 -0
  217. data/app/views/devise/sessions/new.html.slim +7 -0
  218. data/app/views/devise/shared/_links.slim +25 -0
  219. data/app/views/devise/unlocks/new.html.slim +13 -0
  220. data/app/views/fae/application/_breadcrumb.html.slim +19 -0
  221. data/app/views/fae/application/_content_form.html.slim +55 -0
  222. data/app/views/fae/application/_credit.slim +6 -0
  223. data/app/views/fae/application/_file_uploader.html.slim +36 -0
  224. data/app/views/fae/application/_flash_messages.slim +2 -0
  225. data/app/views/fae/application/_global_search_results.html.slim +37 -0
  226. data/app/views/fae/application/_header.slim +50 -0
  227. data/app/views/fae/application/_markdown_helper.slim +41 -0
  228. data/app/views/fae/application/_mobilenav.slim +66 -0
  229. data/app/views/fae/application/_sidenav.slim +23 -0
  230. data/app/views/fae/application/_user_log.html.slim +36 -0
  231. data/app/views/fae/images/_image_uploader.html.slim +66 -0
  232. data/app/views/fae/options/_form.html.slim +16 -0
  233. data/app/views/fae/options/edit.html.slim +1 -0
  234. data/app/views/fae/pages/activity_log.html.slim +32 -0
  235. data/app/views/fae/pages/disabled_environment.html.slim +4 -0
  236. data/app/views/fae/pages/error404.html.slim +7 -0
  237. data/app/views/fae/pages/help.html.slim +35 -0
  238. data/app/views/fae/pages/home.html.slim +36 -0
  239. data/app/views/fae/setup/first_user.html.slim +11 -0
  240. data/app/views/fae/shared/_errors.slim +4 -0
  241. data/app/views/fae/shared/_form_header.html.slim +40 -0
  242. data/app/views/fae/shared/_index_header.html.slim +26 -0
  243. data/app/views/fae/shared/_nested_table.html.slim +49 -0
  244. data/app/views/fae/shared/_recent_changes.html.slim +22 -0
  245. data/app/views/fae/shared/_shared_nested_table.html.slim +46 -0
  246. data/app/views/fae/static_pages/index.html.slim +13 -0
  247. data/app/views/fae/users/_form.html.slim +19 -0
  248. data/app/views/fae/users/edit.html.slim +1 -0
  249. data/app/views/fae/users/index.html.slim +23 -0
  250. data/app/views/fae/users/new.html.slim +1 -0
  251. data/app/views/fae/users/settings.html.slim +1 -0
  252. data/app/views/kaminari/fae/_gap.html.slim +8 -0
  253. data/app/views/kaminari/fae/_next_page.html.slim +9 -0
  254. data/app/views/kaminari/fae/_page.html.slim +15 -0
  255. data/app/views/kaminari/fae/_paginator.html.slim +15 -0
  256. data/app/views/kaminari/fae/_prev_page.html.slim +9 -0
  257. data/app/views/layouts/devise.html.slim +29 -0
  258. data/app/views/layouts/fae/application.html.slim +23 -0
  259. data/app/views/layouts/fae/error.html.slim +11 -0
  260. data/config/deploy.rb +73 -0
  261. data/config/deploy/dev.rb +19 -0
  262. data/config/deploy/prod.rb +19 -0
  263. data/config/deploy/stage.rb +19 -0
  264. data/config/initializers/assets.rb +1 -0
  265. data/config/initializers/carrierwave.rb +3 -0
  266. data/config/initializers/devise.rb +258 -0
  267. data/config/initializers/devise_monkeypatch.rb +11 -0
  268. data/config/initializers/fae_judge.rb +3 -0
  269. data/config/initializers/inflections.rb +16 -0
  270. data/config/initializers/kaminari_config.rb +10 -0
  271. data/config/initializers/simple_form.rb +147 -0
  272. data/config/initializers/time_formats.rb +3 -0
  273. data/config/locales/devise.en.yml +59 -0
  274. data/config/locales/devise.zh-CN.yml +59 -0
  275. data/config/locales/fae.en.yml +10 -0
  276. data/config/locales/fae.zh-CN.yml +10 -0
  277. data/config/locales/simple_form.en.yml +26 -0
  278. data/config/locales/simple_form.zh-CN.yml +26 -0
  279. data/config/routes.rb +46 -0
  280. data/db/migrate/20140809222030_add_user_table.rb +49 -0
  281. data/db/migrate/20140822224029_create_fae_roles.rb +10 -0
  282. data/db/migrate/20141008180718_create_fae_images_table.rb +19 -0
  283. data/db/migrate/20141017194616_create_fae_options.rb +16 -0
  284. data/db/migrate/20141021181327_create_fae_files.rb +17 -0
  285. data/db/migrate/20141021183047_create_fae_text_areas.rb +16 -0
  286. data/db/migrate/20141021184311_create_fae_pages.rb +13 -0
  287. data/db/migrate/20141105214814_create_fae_text_fields.rb +15 -0
  288. data/db/migrate/20150930224821_create_fae_changes.rb +17 -0
  289. data/lib/fae-rails.rb +6 -0
  290. data/lib/fae/concerns/models/base.rb +8 -0
  291. data/lib/fae/engine.rb +37 -0
  292. data/lib/fae/options.rb +35 -0
  293. data/lib/fae/validation_helper_collection.rb +76 -0
  294. data/lib/fae/version.rb +3 -0
  295. data/lib/file_size_validator.rb +71 -0
  296. data/lib/generators/fae/base_generator.rb +156 -0
  297. data/lib/generators/fae/controller_generator.rb +13 -0
  298. data/lib/generators/fae/install_generator.rb +61 -0
  299. data/lib/generators/fae/model_generator.rb +11 -0
  300. data/lib/generators/fae/nested_index_scaffold_generator.rb +36 -0
  301. data/lib/generators/fae/nested_scaffold_generator.rb +51 -0
  302. data/lib/generators/fae/page_generator.rb +65 -0
  303. data/lib/generators/fae/scaffold_generator.rb +15 -0
  304. data/lib/generators/fae/templates/assets/fae.js +6 -0
  305. data/lib/generators/fae/templates/assets/fae.scss +2 -0
  306. data/lib/generators/fae/templates/controllers/nested_index_scaffold_controller.rb +81 -0
  307. data/lib/generators/fae/templates/controllers/nested_scaffold_controller.rb +13 -0
  308. data/lib/generators/fae/templates/controllers/scaffold_controller.rb +13 -0
  309. data/lib/generators/fae/templates/controllers/static_pages_controller.rb +10 -0
  310. data/lib/generators/fae/templates/initializers/fae.rb +63 -0
  311. data/lib/generators/fae/templates/initializers/fae_fine.rb +51 -0
  312. data/lib/generators/fae/templates/initializers/judge.rb +6 -0
  313. data/lib/generators/fae/templates/models/concerns/authorization_concern.rb +27 -0
  314. data/lib/generators/fae/templates/models/concerns/navigation_concern.rb +33 -0
  315. data/lib/generators/fae/templates/models/pages_model.rb +14 -0
  316. data/lib/generators/fae/templates/tasks/fae_tasks.rake +19 -0
  317. data/lib/generators/fae/templates/views/_form.html.slim +18 -0
  318. data/lib/generators/fae/templates/views/_form_index_nested.html.slim +13 -0
  319. data/lib/generators/fae/templates/views/_form_nested.html.slim +17 -0
  320. data/lib/generators/fae/templates/views/edit.html.slim +1 -0
  321. data/lib/generators/fae/templates/views/edit_nested.html.slim +3 -0
  322. data/lib/generators/fae/templates/views/index.html.slim +35 -0
  323. data/lib/generators/fae/templates/views/index_nested.html.slim +8 -0
  324. data/lib/generators/fae/templates/views/new.html.slim +1 -0
  325. data/lib/generators/fae/templates/views/new_nested.html.slim +3 -0
  326. data/lib/generators/fae/templates/views/static_page_form.html.slim +15 -0
  327. data/lib/generators/fae/templates/views/table_nested.html.slim +4 -0
  328. metadata +692 -0
@@ -0,0 +1,22 @@
1
+ - unless params[:action] == 'new'
2
+ .content#recent_changes
3
+ h2 Recent Changes
4
+ section.addedit-form.js-addedit-form
5
+ table
6
+ thead
7
+ tr
8
+ th User
9
+ th Type
10
+ th Attribute(s) Updated
11
+ th.-action-wide Modified
12
+ tbody
13
+ - if @item.try(:tracked_changes).present?
14
+ - @item.tracked_changes.each do |change|
15
+ tr
16
+ td = change.user.full_name if change.user.present?
17
+ td = change.change_type
18
+ td = change.updated_attributes.join(', ') if change.updated_attributes.present?
19
+ td = fae_datetime_format(change.updated_at)
20
+ - else
21
+ tr
22
+ td colspan="4" No changes recorded
@@ -0,0 +1,46 @@
1
+ ruby:
2
+ colspan = cols.length + 1
3
+ colspan += 1 if ordered
4
+ colspan += 1 if has_thumb
5
+ table_class = ordered ? 'js-sort-row' : nil
6
+
7
+ options_for_td = { cols: cols, edit_path: edit_path, edit_column: edit_column }
8
+
9
+ table class=table_class
10
+ thead
11
+ tr
12
+ - if ordered
13
+ th.th-sortable-handle
14
+ - if has_thumb
15
+ th.-thumb
16
+ - cols.each do |col|
17
+ = th_columns(col)
18
+ - if edit_column
19
+ th.-action data-sorter="false"
20
+ th.-action
21
+ tbody
22
+ - records = index ? @items : parent_item.send(assoc)
23
+ - if records.present?
24
+ - records.each do |item|
25
+ tr id=tr_id(item)
26
+ - if ordered
27
+ td.sortable-handle: i.icon-sort
28
+ - if has_thumb
29
+ td = image_tag(item.asset.thumb.url)
30
+ - cols.each do |col|
31
+ - options_for_td[:col] = col
32
+ - options_for_td[:item] = item
33
+ = td_columns(options_for_td)
34
+ - if edit_column
35
+ td
36
+ a.js-edit-link.js-tooltip.table-action title="Edit" href=self.send(edit_path, item)
37
+ i.icon-edit
38
+ td = fae_delete_button item, "/#{fae_path}/#{assoc_name}/#{item.id.to_s}", class: 'js-tooltip table-action js-delete-link', remote: true
39
+
40
+ - else
41
+ tr
42
+ - td_link = link_to 'add some', new_path, class: 'js-add-link'
43
+
44
+ td colspan=colspan.to_s No #{title} yet, #{td_link}.
45
+
46
+ .js-addedit-form-wrapper
@@ -0,0 +1,13 @@
1
+ == render 'fae/shared/index_header', title: 'Pages', breadcrumbs: false, new_button: false
2
+
3
+ main.content
4
+ table.js-sort-column
5
+ thead
6
+ tr
7
+ th Name
8
+ th.-action-wide Modified
9
+ tbody
10
+ - @items.each do |item|
11
+ tr id="fae_content_block_#{item.id}"
12
+ td = link_to item.title.titleize, fae.edit_content_block_path(item.slug)
13
+ td = fae_date_format item.updated_at
@@ -0,0 +1,19 @@
1
+ = simple_form_for(@user, html: {multipart: true, novalidate: true}) do |f|
2
+ header.content-header.js-content-header
3
+ - if params[:action] === 'settings'
4
+ h1 Your Settings
5
+ - else
6
+ = form_header @user
7
+ .content-header-buttons
8
+ - cancel_path = params[:action] == 'settings' ? root_path : users_path
9
+ a.button#js-header-cancel href=cancel_path Cancel
10
+ = f.submit 'Save'
11
+
12
+ main.content
13
+ = fae_input f, :first_name
14
+ = fae_input f, :last_name
15
+ = fae_input f, :email
16
+ = fae_input f, :password, helper_text: 'To update your password, fill out the fields below. Otherwise leave blank. Passwords must contain at least 8 characters.'
17
+ = fae_input f, :password_confirmation
18
+ - if current_user.admin? || current_user.super_admin?
19
+ = fae_association f, :role, collection: @role_collection
@@ -0,0 +1 @@
1
+ == render 'form'
@@ -0,0 +1,23 @@
1
+ - @new_path = new_user_path
2
+ == render 'fae/shared/index_header', title: 'Users', new_button: true, button_text: 'Add User', breadcrumbs: false
3
+
4
+ main.content
5
+ table.js-sort-column
6
+ thead
7
+ tr
8
+ th Name
9
+ th Email
10
+ th Role
11
+ th Last Logged In
12
+ th.-action data-sorter="false" Active
13
+ th.-action data-sorter="false"
14
+
15
+ tbody
16
+ - @users.each do |user|
17
+ tr id="fae_user_#{user.id}"
18
+ td: a href=edit_user_path(user) #{user.first_name} #{user.last_name}
19
+ td = user.email
20
+ td = user.role.name
21
+ td = fae_date_format user.last_sign_in_at if user.last_sign_in_at.present?
22
+ td = fae_toggle user, :active unless current_user == user
23
+ td = fae_delete_button user, user unless current_user == user
@@ -0,0 +1 @@
1
+ == render 'form'
@@ -0,0 +1 @@
1
+ == render 'form'
@@ -0,0 +1,8 @@
1
+ / Non-link tag that stands for skipped pages...
2
+ / - available local variables
3
+ / current_page: a page object for the currently displayed page
4
+ / total_pages: total number of pages
5
+ / per_page: number of items to fetch per page
6
+ / remote: data-remote
7
+ span.page.gap
8
+ == t('views.pagination.truncate').html_safe
@@ -0,0 +1,9 @@
1
+ / Link to the "Next" page
2
+ / - available local variables
3
+ / url: url to the next page
4
+ / current_page: a page object for the currently displayed page
5
+ / total_pages: total number of pages
6
+ / per_page: number of items to fetch per page
7
+ / remote: data-remote
8
+ span.next
9
+ a href=url rel="next" remote=remote data-page=(current_page + 1) = t('views.pagination.next').html_safe
@@ -0,0 +1,15 @@
1
+ / Link showing page number
2
+ / - available local variables
3
+ / page: a page object for "this" page
4
+ / url: url to this page
5
+ / current_page: a page object for the currently displayed page
6
+ / total_pages: total number of pages
7
+ / per_page: number of items to fetch per page
8
+ / remote: data-remote
9
+ - if page.current?
10
+ span.page.current
11
+ == page.number
12
+ - else
13
+ - rel = page.next? ? 'next' : page.prev? ? 'prev' : nil
14
+ span.page
15
+ a href=url rel=rel remote=remote data-page=page.number = page.number
@@ -0,0 +1,15 @@
1
+ / The container tag
2
+ / - available local variables
3
+ / current_page: a page object for the currently displayed page
4
+ / total_pages: total number of pages
5
+ / per_page: number of items to fetch per page
6
+ / remote: data-remote
7
+ / paginator: the paginator that renders the pagination tags inside
8
+ == paginator.render do
9
+ == prev_page_tag unless current_page.first?
10
+ - each_page do |page|
11
+ - if page.left_outer? || page.right_outer? || page.inside_window?
12
+ == page_tag page
13
+ - elsif !page.was_truncated?
14
+ == gap_tag
15
+ == next_page_tag unless current_page.last?
@@ -0,0 +1,9 @@
1
+ / Link to the "Previous" page
2
+ / - available local variables
3
+ / url: url to the previous page
4
+ / current_page: a page object for the currently displayed page
5
+ / total_pages: total number of pages
6
+ / per_page: number of items to fetch per page
7
+ / remote: data-remote
8
+ span.prev
9
+ a href=url rel="prev" remote=remote data-page=(current_page - 1) = t('views.pagination.previous').html_safe
@@ -0,0 +1,29 @@
1
+ doctype html
2
+ html
3
+ head
4
+ title Login | #{@option.title}
5
+ meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"
6
+
7
+ - if @option.favicon.present? && @option.favicon.asset.present?
8
+ link href=@option.favicon.asset_url rel="shortcut icon"
9
+ == stylesheet_link_tag "fae/application", media: "all"
10
+ == javascript_include_tag "fae/application"
11
+ == csrf_meta_tags
12
+
13
+ body.login-body
14
+ == render 'fae/application/flash_messages'
15
+
16
+ section.login-content
17
+ section.login-area
18
+ .login-logo
19
+ - if @option.logo.present? && @option.logo.asset.present?
20
+ = image_tag @option.logo.asset.url, alt: @option.title
21
+ - else
22
+ h1 = @option.title
23
+
24
+ == yield
25
+
26
+ footer.login-footer
27
+ .login-helper == render 'devise/shared/links' unless params[:controller] == 'fae/setup'
28
+
29
+ == render 'fae/application/credit'
@@ -0,0 +1,23 @@
1
+ doctype html
2
+ html
3
+ head
4
+ title = page_title
5
+ meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"
6
+ - if @option.favicon.present? && @option.favicon.asset.present?
7
+ link href=@option.favicon.asset_url rel="shortcut icon"
8
+ == stylesheet_link_tag 'fae/application', media: 'all'
9
+ == javascript_include_tag 'fae/application'
10
+ == csrf_meta_tags
11
+
12
+ body class=body_class
13
+ == render 'mobilenav'
14
+ == render 'header'
15
+ section.main-content#js-main-content
16
+ == render 'sidenav'
17
+
18
+ == yield
19
+
20
+ footer.main-footer#js-footer
21
+ == render 'credit'
22
+
23
+ == render 'markdown_helper'
@@ -0,0 +1,11 @@
1
+ doctype html
2
+ html
3
+ head
4
+ title = @page_title
5
+ meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"
6
+ = stylesheet_link_tag "fae/application", media: "all"
7
+ = csrf_meta_tags
8
+
9
+ body.error-page
10
+ section
11
+ == yield
@@ -0,0 +1,73 @@
1
+ set :application, 'fae'
2
+ set :repo_url, 'git@github.com:wearefine/fae.git'
3
+
4
+ set :scm, :git
5
+
6
+ # set :format, :pretty
7
+ # set :log_level, :debug
8
+ # set :pty, true
9
+
10
+ # set :linked_files, %w{config/database.yml}
11
+ set :linked_dirs, %w{ tmp/pids }
12
+
13
+ set :rvm_type, :system
14
+
15
+ set :keep_releases, 5
16
+
17
+ # variable for forked version of capistrano-rails
18
+ set :rails_path, 'spec/dummy'
19
+
20
+ server '54.164.40.189',
21
+ user: 'fae',
22
+ roles: %w{web app db},
23
+ port: 8022,
24
+ ssh_options: {
25
+ forward_agent: true
26
+ }
27
+
28
+ namespace :deploy do
29
+
30
+ desc 'Restart application'
31
+ task :restart do
32
+ on roles(:app), in: :sequence, wait: 5 do
33
+ # Your restart mechanism here, for example:
34
+ # execute :touch, shared_path.join('restart.txt')
35
+ end
36
+ end
37
+
38
+ desc 'Symlink secrets.yml'
39
+ task :symlink_secrets do
40
+ on roles(:app) do
41
+ execute "ln -s #{shared_path}/secrets.yml #{release_path}/config/secrets.yml"
42
+ end
43
+ end
44
+
45
+ # deploy:restart not firing, so I added this hack for now
46
+ after 'deploy:symlink:release', :restart_hack do
47
+ on roles(:app) do
48
+ execute "ln -s #{shared_path}/restart.txt #{release_path}/spec/dummy/tmp/restart.txt"
49
+ execute :touch, release_path.join('spec', 'dummy', 'tmp','restart.txt')
50
+ end
51
+ end
52
+
53
+ after 'deploy:symlink:release', :symlink_dummy_files do
54
+ on roles(:app) do
55
+ %w(log tmp/cache tmp/sockets public/system public/assets).each do |path|
56
+ execute "rm -rf #{release_path}/spec/dummy/#{path}"
57
+ execute "ln -s #{shared_path}/#{path} #{release_path}/spec/dummy/#{path}"
58
+ end
59
+ end
60
+ end
61
+
62
+ after :restart, :clear_cache do
63
+ on roles(:web), in: :groups, limit: 3, wait: 10 do
64
+ # Here we can do anything such as:
65
+ # within release_path do
66
+ # execute :rake, 'cache:clear'
67
+ # end
68
+ end
69
+ end
70
+
71
+ after :finishing, 'deploy:cleanup'
72
+
73
+ end
@@ -0,0 +1,19 @@
1
+ set :stage, :prod
2
+
3
+ set :ruby_version, "ruby-2.3.1"
4
+ set :gemset, "dev.fae.afinedevelopment.com"
5
+ set :deploy_to, "/var/www/rails/fae.afinedevelopment.com/dev"
6
+
7
+ set :rails_env, 'remote_development'
8
+
9
+ set :branch, 'dev'
10
+
11
+ set :rvm_ruby_version, "#{fetch(:ruby_version)}@#{fetch(:gemset)}"
12
+
13
+ set :default_env, {
14
+ path: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}/bin:/usr/local/rvm/bin:/usr/local/rvm/rubies/#{fetch(:ruby_version)}/bin:$PATH",
15
+ ruby_version: fetch(:ruby_version),
16
+ gem_home: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}",
17
+ gem_path: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}",
18
+ bundle_path: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}/bin" # If you are using bundler.
19
+ }
@@ -0,0 +1,19 @@
1
+ set :stage, :prod
2
+
3
+ set :ruby_version, "ruby-2.3.1"
4
+ set :gemset, "fae.afinedevelopment.com"
5
+ set :deploy_to, "/var/www/rails/fae.afinedevelopment.com/prod"
6
+
7
+ set :rails_env, 'production'
8
+
9
+ set :branch, 'master'
10
+
11
+ set :rvm_ruby_version, "#{fetch(:ruby_version)}@#{fetch(:gemset)}"
12
+
13
+ set :default_env, {
14
+ path: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}/bin:/usr/local/rvm/bin:/usr/local/rvm/rubies/#{fetch(:ruby_version)}/bin:$PATH",
15
+ ruby_version: fetch(:ruby_version),
16
+ gem_home: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}",
17
+ gem_path: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}",
18
+ bundle_path: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}/bin" # If you are using bundler.
19
+ }
@@ -0,0 +1,19 @@
1
+ set :stage, :stage
2
+
3
+ set :ruby_version, "ruby-2.3.1"
4
+ set :gemset, "stage.fae.afinedevelopment.com"
5
+ set :deploy_to, "/var/www/rails/fae.afinedevelopment.com/stage"
6
+
7
+ set :rails_env, 'stage'
8
+
9
+ set :branch, 'stage'
10
+
11
+ set :rvm_ruby_version, "#{fetch(:ruby_version)}@#{fetch(:gemset)}"
12
+
13
+ set :default_env, {
14
+ path: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}/bin:/usr/local/rvm/bin:/usr/local/rvm/rubies/#{fetch(:ruby_version)}/bin:$PATH",
15
+ ruby_version: fetch(:ruby_version),
16
+ gem_home: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}",
17
+ gem_path: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}",
18
+ bundle_path: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}/bin" # If you are using bundler.
19
+ }
@@ -0,0 +1 @@
1
+ Rails.application.config.assets.precompile += %w( html5shiv.js html5shiv-printshiv.js )
@@ -0,0 +1,3 @@
1
+ CarrierWave.configure do |config|
2
+ config.cache_dir = "#{Rails.root}/tmp/fae/uploads"
3
+ end
@@ -0,0 +1,258 @@
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
+ # config.secret_key = nil
8
+
9
+ # ==> Mailer Configuration
10
+ # Configure the e-mail address which will be shown in Devise::Mailer,
11
+ # note that it will be overwritten if you use your own mailer class
12
+ # with default "from" parameter.
13
+ # config.mailer_sender = 'change-me@example.com'
14
+
15
+ # Configure the class responsible to send e-mails.
16
+ # config.mailer = 'Devise::Mailer'
17
+
18
+ # ==> ORM configuration
19
+ # Load and configure the ORM. Supports :active_record (default) and
20
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
21
+ # available as additional gems.
22
+ require 'devise/orm/active_record'
23
+
24
+ # ==> Configuration for any authentication mechanism
25
+ # Configure which keys are used when authenticating a user. The default is
26
+ # just :email. You can configure it to use [:username, :subdomain], so for
27
+ # authenticating a user, both parameters are required. Remember that those
28
+ # parameters are used only when authenticating and not when retrieving from
29
+ # session. If you need permissions, you should implement that in a before filter.
30
+ # You can also supply a hash where the value is a boolean determining whether
31
+ # or not authentication should be aborted when the value is not present.
32
+ # config.authentication_keys = [ :email ]
33
+
34
+ # Configure parameters from the request object used for authentication. Each entry
35
+ # given should be a request method and it will automatically be passed to the
36
+ # find_for_authentication method and considered in your model lookup. For instance,
37
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
38
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
39
+ # config.request_keys = []
40
+
41
+ # Configure which authentication keys should be case-insensitive.
42
+ # These keys will be downcased upon creating or modifying a user and when used
43
+ # to authenticate or find a user. Default is :email.
44
+ config.case_insensitive_keys = [ :email ]
45
+
46
+ # Configure which authentication keys should have whitespace stripped.
47
+ # These keys will have whitespace before and after removed upon creating or
48
+ # modifying a user and when used to authenticate or find a user. Default is :email.
49
+ config.strip_whitespace_keys = [ :email ]
50
+
51
+ # Tell if authentication through request.params is enabled. True by default.
52
+ # It can be set to an array that will enable params authentication only for the
53
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
54
+ # enable it only for database (email + password) authentication.
55
+ # config.params_authenticatable = true
56
+
57
+ # Tell if authentication through HTTP Auth is enabled. False by default.
58
+ # It can be set to an array that will enable http authentication only for the
59
+ # given strategies, for example, `config.http_authenticatable = [:database]` will
60
+ # enable it only for database authentication. The supported strategies are:
61
+ # :database = Support basic authentication with authentication key + password
62
+ # config.http_authenticatable = false
63
+
64
+ # If http headers should be returned for AJAX requests. True by default.
65
+ # config.http_authenticatable_on_xhr = true
66
+
67
+ # The realm used in Http Basic Authentication. 'Application' by default.
68
+ # config.http_authentication_realm = 'Application'
69
+
70
+ # It will change confirmation, password recovery and other workflows
71
+ # to behave the same regardless if the e-mail provided was right or wrong.
72
+ # Does not affect registerable.
73
+ # config.paranoid = true
74
+
75
+ # By default Devise will store the user in session. You can skip storage for
76
+ # particular strategies by setting this option.
77
+ # Notice that if you are skipping storage for all authentication paths, you
78
+ # may want to disable generating routes to Devise's sessions controller by
79
+ # passing skip: :sessions to `devise_for` in your config/routes.rb
80
+ config.skip_session_storage = [:http_auth]
81
+
82
+ # By default, Devise cleans up the CSRF token on authentication to
83
+ # avoid CSRF token fixation attacks. This means that, when using AJAX
84
+ # requests for sign in and sign up, you need to get a new CSRF token
85
+ # from the server. You can disable this option at your own risk.
86
+ # config.clean_up_csrf_token_on_authentication = true
87
+
88
+ # ==> Configuration for :database_authenticatable
89
+ # For bcrypt, this is the cost for hashing the password and defaults to 10. If
90
+ # using other encryptors, it sets how many times you want the password re-encrypted.
91
+ #
92
+ # Limiting the stretches to just one in testing will increase the performance of
93
+ # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
94
+ # a value less than 10 in other environments. Note that, for bcrypt (the default
95
+ # encryptor), the cost increases exponentially with the number of stretches (e.g.
96
+ # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
97
+ config.stretches = Rails.env.test? ? 1 : 10
98
+
99
+ # Setup a pepper to generate the encrypted password.
100
+ # config.pepper = 'b7068c6232e51b4c4a2b9b695c2aeb937ea84d6a2a04576493141e9f804b5c979a664bdadf99f060d228a3cbd1953c9868916a62ea78fc50564304efd58bbb99'
101
+
102
+ # ==> Configuration for :confirmable
103
+ # A period that the user is allowed to access the website even without
104
+ # confirming their account. For instance, if set to 2.days, the user will be
105
+ # able to access the website for two days without confirming their account,
106
+ # access will be blocked just in the third day. Default is 0.days, meaning
107
+ # the user cannot access the website without confirming their account.
108
+ # config.allow_unconfirmed_access_for = 2.days
109
+
110
+ # A period that the user is allowed to confirm their account before their
111
+ # token becomes invalid. For example, if set to 3.days, the user can confirm
112
+ # their account within 3 days after the mail was sent, but on the fourth day
113
+ # their account can't be confirmed with the token any more.
114
+ # Default is nil, meaning there is no restriction on how long a user can take
115
+ # before confirming their account.
116
+ # config.confirm_within = 3.days
117
+
118
+ # If true, requires any email changes to be confirmed (exactly the same way as
119
+ # initial account confirmation) to be applied. Requires additional unconfirmed_email
120
+ # db field (see migrations). Until confirmed, new email is stored in
121
+ # unconfirmed_email column, and copied to email column on successful confirmation.
122
+ config.reconfirmable = true
123
+
124
+ # Defines which key will be used when confirming an account
125
+ # config.confirmation_keys = [ :email ]
126
+
127
+ # ==> Configuration for :rememberable
128
+ # The time the user will be remembered without asking for credentials again.
129
+ # config.remember_for = 2.weeks
130
+
131
+ # If true, extends the user's remember period when remembered via cookie.
132
+ # config.extend_remember_period = false
133
+
134
+ # Options to be passed to the created cookie. For instance, you can set
135
+ # secure: true in order to force SSL only cookies.
136
+ # config.rememberable_options = {}
137
+
138
+ # ==> Configuration for :validatable
139
+ # Range for password length.
140
+ config.password_length = 8..128
141
+
142
+ # Email regex used to validate email formats. It simply asserts that
143
+ # one (and only one) @ exists in the given string. This is mainly
144
+ # to give user feedback and not to assert the e-mail validity.
145
+ # config.email_regexp = /\A[^@]+@[^@]+\z/
146
+
147
+ # ==> Configuration for :timeoutable
148
+ # The time you want to timeout the user session without activity. After this
149
+ # time the user will be asked for credentials again. Default is 30 minutes.
150
+ # config.timeout_in = 30.minutes
151
+
152
+ # If true, expires auth token on session timeout.
153
+ # config.expire_auth_token_on_timeout = false
154
+
155
+ # ==> Configuration for :lockable
156
+ # Defines which strategy will be used to lock an account.
157
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
158
+ # :none = No lock strategy. You should handle locking by yourself.
159
+ # config.lock_strategy = :failed_attempts
160
+
161
+ # Defines which key will be used when locking and unlocking an account
162
+ # config.unlock_keys = [ :email ]
163
+
164
+ # Defines which strategy will be used to unlock an account.
165
+ # :email = Sends an unlock link to the user email
166
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
167
+ # :both = Enables both strategies
168
+ # :none = No unlock strategy. You should handle unlocking by yourself.
169
+ # config.unlock_strategy = :both
170
+
171
+ # Number of authentication tries before locking an account if lock_strategy
172
+ # is failed attempts.
173
+ # config.maximum_attempts = 20
174
+
175
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
176
+ # config.unlock_in = 1.hour
177
+
178
+ # Warn on the last attempt before the account is locked.
179
+ # config.last_attempt_warning = false
180
+
181
+ # ==> Configuration for :recoverable
182
+ #
183
+ # Defines which key will be used when recovering the password for an account
184
+ # config.reset_password_keys = [ :email ]
185
+
186
+ # Time interval you can reset your password with a reset password key.
187
+ # Don't put a too small interval or your users won't have the time to
188
+ # change their passwords.
189
+ config.reset_password_within = 6.hours
190
+
191
+ # ==> Configuration for :encryptable
192
+ # Allow you to use another encryption algorithm besides bcrypt (default). You can use
193
+ # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
194
+ # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
195
+ # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
196
+ # REST_AUTH_SITE_KEY to pepper).
197
+ #
198
+ # Require the `devise-encryptable` gem when using anything other than bcrypt
199
+ # config.encryptor = :sha512
200
+
201
+ # ==> Scopes configuration
202
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
203
+ # "users/sessions/new". It's turned off by default because it's slower if you
204
+ # are using only default views.
205
+ # config.scoped_views = false
206
+
207
+ # Configure the default scope given to Warden. By default it's the first
208
+ # devise role declared in your routes (usually :user).
209
+ # config.default_scope = :user
210
+
211
+ # Set this configuration to false if you want /users/sign_out to sign out
212
+ # only the current scope. By default, Devise signs out all scopes.
213
+ # config.sign_out_all_scopes = true
214
+
215
+ # ==> Navigation configuration
216
+ # Lists the formats that should be treated as navigational. Formats like
217
+ # :html, should redirect to the sign in page when the user does not have
218
+ # access, but formats like :xml or :json, should return 401.
219
+ #
220
+ # If you have any extra navigational formats, like :iphone or :mobile, you
221
+ # should add them to the navigational formats lists.
222
+ #
223
+ # The "*/*" below is required to match Internet Explorer requests.
224
+ # config.navigational_formats = ['*/*', :html]
225
+
226
+ # The default HTTP method used to sign out a resource. Default is :delete.
227
+ config.sign_out_via = :delete
228
+
229
+ # ==> OmniAuth
230
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
231
+ # up on your models and hooks.
232
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
233
+
234
+ # ==> Warden configuration
235
+ # If you want to use other strategies, that are not supported by Devise, or
236
+ # change the failure app, you can configure them inside the config.warden block.
237
+ #
238
+ # config.warden do |manager|
239
+ # manager.intercept_401 = false
240
+ # manager.default_strategies(scope: :user).unshift :some_external_strategy
241
+ # end
242
+
243
+ # ==> Mountable engine configurations
244
+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
245
+ # is mountable, there are some extra configurations to be taken into account.
246
+ # The following options are available, assuming the engine is mounted as:
247
+ #
248
+ # mount MyEngine, at: '/my_engine'
249
+ #
250
+ # The router that invoked `devise_for`, in the example above, would be:
251
+ config.router_name = :fae
252
+ # Set Fae as parent_controller
253
+ config.parent_controller = 'Fae::ApplicationController'
254
+ #
255
+ # When using omniauth, Devise cannot automatically set Omniauth path,
256
+ # so you need to do it manually. For the users scope, it would be:
257
+ # config.omniauth_path_prefix = '/my_engine/users/auth'
258
+ end