sunrise-core 0.1.5 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (499) hide show
  1. data/Gemfile +38 -0
  2. data/README.rdoc +13 -3
  3. data/Rakefile +4 -20
  4. data/app/controllers/manage/base_controller.rb +1 -9
  5. data/app/controllers/manage/users_controller.rb +10 -8
  6. data/app/views/manage/shared/_head.html.erb +1 -1
  7. data/app/views/manage/shared/_notice.html.erb +1 -1
  8. data/app/views/manage/shared/_panel.html.erb +1 -1
  9. data/app/views/manage/structures/_form.html.erb +1 -0
  10. data/app/views/manage/structures/_structure.html.erb +5 -5
  11. data/app/views/manage/users/_model_filter.html.erb +14 -11
  12. data/app/views/manage/users/_user.html.erb +2 -2
  13. data/config/locales/manage/en.yml +25 -0
  14. data/config/locales/manage/ru.yml +25 -0
  15. data/config/locales/manage/uk.yml +26 -1
  16. data/lib/generators/sunrise/install_generator.rb +31 -5
  17. data/lib/generators/sunrise/templates/config/nginx-config-passenger +18 -9
  18. data/lib/generators/sunrise/templates/config/seeds.rb +1 -1
  19. data/lib/generators/sunrise/templates/helpers/manage/base_helper.rb +7 -5
  20. data/lib/generators/sunrise/templates/images/alert.png +0 -0
  21. data/lib/generators/sunrise/templates/images/cross_ico.png +0 -0
  22. data/lib/generators/sunrise/templates/images/manage/{ico_del.gif → ico_delete.gif} +0 -0
  23. data/lib/generators/sunrise/templates/models/defaults/asset.rb +3 -1
  24. data/lib/generators/sunrise/templates/models/defaults/attachment_file.rb +2 -4
  25. data/lib/generators/sunrise/templates/models/defaults/avatar.rb +6 -9
  26. data/lib/generators/sunrise/templates/models/defaults/picture.rb +6 -10
  27. data/lib/generators/sunrise/templates/rspec +2 -0
  28. data/lib/generators/sunrise/templates/spec/controllers/pages_controller_spec.rb +22 -0
  29. data/lib/generators/sunrise/templates/spec/controllers/welcome_controller_spec.rb +18 -0
  30. data/lib/generators/sunrise/templates/spec/factories/structure_factory.rb +22 -0
  31. data/lib/generators/sunrise/templates/spec/factories/user_factory.rb +60 -0
  32. data/lib/generators/sunrise/templates/spec/spec_helper.rb +37 -0
  33. data/lib/generators/sunrise/templates/spec/support/helpers/controller_macros.rb +51 -0
  34. data/lib/generators/sunrise/templates/stylesheets/alert.css +26 -0
  35. data/lib/generators/sunrise/templates/uploaders/attachment_file_uploader.rb +5 -0
  36. data/lib/generators/sunrise/templates/uploaders/avatar_uploader.rb +17 -0
  37. data/lib/generators/sunrise/templates/uploaders/picture_uploader.rb +17 -0
  38. data/lib/generators/sunrise/templates/views/layouts/application.html.erb +2 -4
  39. data/lib/sunrise/carrier_wave/base_uploader.rb +65 -0
  40. data/lib/sunrise/carrier_wave/file_size_validator.rb +70 -0
  41. data/lib/sunrise/carrier_wave/glue.rb +29 -0
  42. data/lib/sunrise/controllers/manage.rb +52 -0
  43. data/lib/sunrise/controllers/model_filter.rb +76 -0
  44. data/lib/sunrise/core.rb +8 -1
  45. data/lib/sunrise/engine.rb +2 -6
  46. data/lib/sunrise/models/asset.rb +9 -38
  47. data/lib/sunrise/models/role.rb +2 -0
  48. data/lib/sunrise/models/structure.rb +8 -1
  49. data/lib/sunrise/models/user.rb +8 -5
  50. data/lib/sunrise/version.rb +1 -1
  51. data/lib/tasks/assets.rake +20 -0
  52. data/spec/controllers/manage/assets_controller_spec.rb +65 -0
  53. data/spec/controllers/manage/pages_controller_spec.rb +75 -0
  54. data/spec/controllers/manage/settings_controller_spec.rb +34 -0
  55. data/spec/controllers/manage/structures_controller_spec.rb +97 -0
  56. data/spec/controllers/manage/users_controller_spec.rb +158 -0
  57. data/spec/controllers/pages_controller_spec.rb +28 -0
  58. data/spec/dummy/Rakefile +7 -0
  59. data/spec/dummy/app/controllers/application_controller.rb +4 -0
  60. data/spec/dummy/app/controllers/welcome_controller.rb +4 -0
  61. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  62. data/spec/dummy/app/helpers/manage/assets_helper.rb +2 -0
  63. data/spec/dummy/app/helpers/manage/base_helper.rb +83 -0
  64. data/spec/dummy/app/helpers/manage/pages_helper.rb +2 -0
  65. data/spec/dummy/app/helpers/manage/settings_helper.rb +2 -0
  66. data/spec/dummy/app/helpers/manage/structures_helper.rb +12 -0
  67. data/spec/dummy/app/helpers/manage/users_helper.rb +6 -0
  68. data/spec/dummy/app/views/layouts/application.html.erb +37 -0
  69. data/spec/dummy/app/views/pages/show.html.erb +2 -0
  70. data/spec/dummy/app/views/shared/_notice.html.erb +17 -0
  71. data/spec/dummy/app/views/welcome/index.html.erb +0 -0
  72. data/spec/dummy/config.ru +4 -0
  73. data/spec/dummy/config/application.rb +42 -0
  74. data/spec/dummy/config/application.yml +3 -0
  75. data/spec/dummy/config/application.yml.sample +4 -0
  76. data/spec/dummy/config/boot.rb +10 -0
  77. data/spec/dummy/config/database.yml +34 -0
  78. data/spec/dummy/config/database.yml.sample +34 -0
  79. data/spec/dummy/config/environment.rb +5 -0
  80. data/spec/dummy/config/environments/development.rb +27 -0
  81. data/spec/dummy/config/environments/production.rb +49 -0
  82. data/spec/dummy/config/environments/test.rb +35 -0
  83. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  84. data/spec/dummy/config/initializers/devise.rb +194 -0
  85. data/spec/dummy/config/initializers/inflections.rb +10 -0
  86. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  87. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  88. data/spec/dummy/config/initializers/session_store.rb +8 -0
  89. data/spec/dummy/config/initializers/simple_form.rb +93 -0
  90. data/spec/dummy/config/initializers/sunrise.rb +7 -0
  91. data/spec/dummy/config/locales/devise.en.yml +50 -0
  92. data/spec/dummy/config/locales/en.yml +5 -0
  93. data/spec/dummy/config/locales/simple_form.en.yml +24 -0
  94. data/spec/dummy/config/logrotate-config.sample +9 -0
  95. data/spec/dummy/config/nginx-config-passenger.sample +51 -0
  96. data/spec/dummy/config/routes.rb +7 -0
  97. data/spec/dummy/db/migrate/20110616102556_sunrise_create_users.rb +29 -0
  98. data/spec/dummy/db/migrate/20110616102656_sunrise_create_roles.rb +16 -0
  99. data/spec/dummy/db/migrate/20110616102756_sunrise_create_structures.rb +27 -0
  100. data/spec/dummy/db/migrate/20110616102856_sunrise_create_pages.rb +17 -0
  101. data/spec/dummy/db/migrate/20110616102956_sunrise_create_assets.rb +28 -0
  102. data/spec/dummy/db/migrate/20110616103056_sunrise_create_headers.rb +20 -0
  103. data/spec/dummy/db/schema.rb +110 -0
  104. data/spec/dummy/db/seeds.rb +25 -0
  105. data/spec/dummy/lib/templates/erb/scaffold/_form.html.erb +13 -0
  106. data/spec/dummy/log/development.log +134 -0
  107. data/spec/dummy/log/production.log +0 -0
  108. data/spec/dummy/log/server.log +0 -0
  109. data/spec/dummy/log/test.log +41472 -0
  110. data/spec/dummy/public/404.html +26 -0
  111. data/spec/dummy/public/422.html +26 -0
  112. data/spec/dummy/public/500.html +26 -0
  113. data/spec/dummy/public/favicon.ico +0 -0
  114. data/spec/dummy/public/images/manage/add_post_bot.gif +0 -0
  115. data/spec/dummy/public/images/manage/add_post_top.gif +0 -0
  116. data/spec/dummy/public/images/manage/add_white_bot.gif +0 -0
  117. data/spec/dummy/public/images/manage/add_white_top.gif +0 -0
  118. data/spec/dummy/public/images/manage/arrow.png +0 -0
  119. data/spec/dummy/public/images/manage/back_but_lc.gif +0 -0
  120. data/spec/dummy/public/images/manage/back_but_rc.gif +0 -0
  121. data/spec/dummy/public/images/manage/bot_corn.gif +0 -0
  122. data/spec/dummy/public/images/manage/bot_duo_corn.gif +0 -0
  123. data/spec/dummy/public/images/manage/but_bg.png +0 -0
  124. data/spec/dummy/public/images/manage/but_block_lc.gif +0 -0
  125. data/spec/dummy/public/images/manage/but_block_rc.gif +0 -0
  126. data/spec/dummy/public/images/manage/but_freze_lc.gif +0 -0
  127. data/spec/dummy/public/images/manage/but_freze_rc.gif +0 -0
  128. data/spec/dummy/public/images/manage/but_gr.gif +0 -0
  129. data/spec/dummy/public/images/manage/but_gr_l.gif +0 -0
  130. data/spec/dummy/public/images/manage/but_gr_r.gif +0 -0
  131. data/spec/dummy/public/images/manage/but_search.gif +0 -0
  132. data/spec/dummy/public/images/manage/but_unfreze_lc.gif +0 -0
  133. data/spec/dummy/public/images/manage/but_unfreze_rc.gif +0 -0
  134. data/spec/dummy/public/images/manage/button_add_foto.gif +0 -0
  135. data/spec/dummy/public/images/manage/button_add_foto_ru.gif +0 -0
  136. data/spec/dummy/public/images/manage/button_add_foto_ua.gif +0 -0
  137. data/spec/dummy/public/images/manage/button_add_foto_uk.gif +0 -0
  138. data/spec/dummy/public/images/manage/cancelbutton.gif +0 -0
  139. data/spec/dummy/public/images/manage/dark_arr.gif +0 -0
  140. data/spec/dummy/public/images/manage/dark_arr_left.gif +0 -0
  141. data/spec/dummy/public/images/manage/dark_cross_ico.gif +0 -0
  142. data/spec/dummy/public/images/manage/dot.gif +0 -0
  143. data/spec/dummy/public/images/manage/duo_bg.gif +0 -0
  144. data/spec/dummy/public/images/manage/duo_bg_small.gif +0 -0
  145. data/spec/dummy/public/images/manage/duo_bg_small_blocked.gif +0 -0
  146. data/spec/dummy/public/images/manage/duo_bg_small_frozed.gif +0 -0
  147. data/spec/dummy/public/images/manage/duo_bg_small_notact.gif +0 -0
  148. data/spec/dummy/public/images/manage/duo_bot_small.gif +0 -0
  149. data/spec/dummy/public/images/manage/duo_bot_small_blocked.gif +0 -0
  150. data/spec/dummy/public/images/manage/duo_bot_small_frozed.gif +0 -0
  151. data/spec/dummy/public/images/manage/duo_bot_small_notact.gif +0 -0
  152. data/spec/dummy/public/images/manage/duo_top_small.gif +0 -0
  153. data/spec/dummy/public/images/manage/duo_top_small_blocked.gif +0 -0
  154. data/spec/dummy/public/images/manage/duo_top_small_frozed.gif +0 -0
  155. data/spec/dummy/public/images/manage/duo_top_small_notact.gif +0 -0
  156. data/spec/dummy/public/images/manage/edit_white_top.gif +0 -0
  157. data/spec/dummy/public/images/manage/empty.gif +0 -0
  158. data/spec/dummy/public/images/manage/filter_bot_bg.gif +0 -0
  159. data/spec/dummy/public/images/manage/filter_top_bg.gif +0 -0
  160. data/spec/dummy/public/images/manage/flag_en.gif +0 -0
  161. data/spec/dummy/public/images/manage/flag_en_nonact.gif +0 -0
  162. data/spec/dummy/public/images/manage/flag_ru.gif +0 -0
  163. data/spec/dummy/public/images/manage/flag_ru_nonact.gif +0 -0
  164. data/spec/dummy/public/images/manage/flag_ua.gif +0 -0
  165. data/spec/dummy/public/images/manage/flag_ua_nonact.gif +0 -0
  166. data/spec/dummy/public/images/manage/foto.jpg +0 -0
  167. data/spec/dummy/public/images/manage/ico_add.gif +0 -0
  168. data/spec/dummy/public/images/manage/ico_del.gif +0 -0
  169. data/spec/dummy/public/images/manage/ico_down.gif +0 -0
  170. data/spec/dummy/public/images/manage/ico_edit.gif +0 -0
  171. data/spec/dummy/public/images/manage/ico_settings.gif +0 -0
  172. data/spec/dummy/public/images/manage/ico_up.gif +0 -0
  173. data/spec/dummy/public/images/manage/input_bg.gif +0 -0
  174. data/spec/dummy/public/images/manage/l_but_corn.gif +0 -0
  175. data/spec/dummy/public/images/manage/minimise_but.gif +0 -0
  176. data/spec/dummy/public/images/manage/mp3.png +0 -0
  177. data/spec/dummy/public/images/manage/page_arr_hover.png +0 -0
  178. data/spec/dummy/public/images/manage/page_next_arr.gif +0 -0
  179. data/spec/dummy/public/images/manage/page_num_hover.gif +0 -0
  180. data/spec/dummy/public/images/manage/page_prev_arr.gif +0 -0
  181. data/spec/dummy/public/images/manage/panel/l_but_corn.gif +0 -0
  182. data/spec/dummy/public/images/manage/panel/maximise_but.gif +0 -0
  183. data/spec/dummy/public/images/manage/panel/r_but_corn.gif +0 -0
  184. data/spec/dummy/public/images/manage/panel/top_menu_arr.gif +0 -0
  185. data/spec/dummy/public/images/manage/panel/user_pic.gif +0 -0
  186. data/spec/dummy/public/images/manage/preloader.gif +0 -0
  187. data/spec/dummy/public/images/manage/r_but_corn.gif +0 -0
  188. data/spec/dummy/public/images/manage/select_bg.gif +0 -0
  189. data/spec/dummy/public/images/manage/select_corn.gif +0 -0
  190. data/spec/dummy/public/images/manage/struct_corn_lg.gif +0 -0
  191. data/spec/dummy/public/images/manage/struct_corn_llg.gif +0 -0
  192. data/spec/dummy/public/images/manage/struct_corn_lw.gif +0 -0
  193. data/spec/dummy/public/images/manage/struct_corn_rg.gif +0 -0
  194. data/spec/dummy/public/images/manage/struct_corn_rlg.gif +0 -0
  195. data/spec/dummy/public/images/manage/struct_corn_rw.gif +0 -0
  196. data/spec/dummy/public/images/manage/tab_gl.gif +0 -0
  197. data/spec/dummy/public/images/manage/tab_gr.gif +0 -0
  198. data/spec/dummy/public/images/manage/tab_wl.gif +0 -0
  199. data/spec/dummy/public/images/manage/tab_wr.gif +0 -0
  200. data/spec/dummy/public/images/manage/top_corn.gif +0 -0
  201. data/spec/dummy/public/images/manage/top_duo_corn.gif +0 -0
  202. data/spec/dummy/public/images/manage/top_menu_arr.gif +0 -0
  203. data/spec/dummy/public/images/manage/transp_cross.png +0 -0
  204. data/spec/dummy/public/images/manage/upload_progress.gif +0 -0
  205. data/spec/dummy/public/images/manage/user_act_lc.gif +0 -0
  206. data/spec/dummy/public/images/manage/user_act_rc.gif +0 -0
  207. data/spec/dummy/public/images/manage/user_ico.gif +0 -0
  208. data/spec/dummy/public/images/manage/user_pic.gif +0 -0
  209. data/spec/dummy/public/images/manage/user_pic_small.gif +0 -0
  210. data/spec/dummy/public/images/manage/user_pic_thumb.gif +0 -0
  211. data/spec/dummy/public/javascripts/application.js +2 -0
  212. data/spec/dummy/public/javascripts/controls.js +965 -0
  213. data/spec/dummy/public/javascripts/datepicker/jquery-ui-i18n.js +1176 -0
  214. data/spec/dummy/public/javascripts/datepicker/jquery.ui.datepicker-ru.js +37 -0
  215. data/spec/dummy/public/javascripts/datepicker/jquery.ui.datepicker-uk.js +37 -0
  216. data/spec/dummy/public/javascripts/dragdrop.js +974 -0
  217. data/spec/dummy/public/javascripts/effects.js +1123 -0
  218. data/spec/dummy/public/javascripts/fileupload/fileuploader-input.js +217 -0
  219. data/spec/dummy/public/javascripts/fileupload/fileuploader.css +31 -0
  220. data/spec/dummy/public/javascripts/fileupload/fileuploader.js +1288 -0
  221. data/spec/dummy/public/javascripts/jquery-ui-timepicker-addon.js +911 -0
  222. data/spec/dummy/public/javascripts/jquery.cookie.js +97 -0
  223. data/spec/dummy/public/javascripts/jquery.fancybox-1.3.4.pack.js +46 -0
  224. data/spec/dummy/public/javascripts/jquery.tmpl.min.js +10 -0
  225. data/spec/dummy/public/javascripts/manage-fileuploader.js +182 -0
  226. data/spec/dummy/public/javascripts/manage.js +294 -0
  227. data/spec/dummy/public/javascripts/preloader.js +47 -0
  228. data/spec/dummy/public/javascripts/prototype.js +6001 -0
  229. data/spec/dummy/public/javascripts/rails.js +316 -0
  230. data/spec/dummy/public/stylesheets/application.css +1 -0
  231. data/spec/dummy/public/stylesheets/fancybox/images/blank.gif +0 -0
  232. data/spec/dummy/public/stylesheets/fancybox/images/fancy_close.png +0 -0
  233. data/spec/dummy/public/stylesheets/fancybox/images/fancy_loading.png +0 -0
  234. data/spec/dummy/public/stylesheets/fancybox/images/fancy_nav_left.png +0 -0
  235. data/spec/dummy/public/stylesheets/fancybox/images/fancy_nav_right.png +0 -0
  236. data/spec/dummy/public/stylesheets/fancybox/images/fancy_shadow_e.png +0 -0
  237. data/spec/dummy/public/stylesheets/fancybox/images/fancy_shadow_n.png +0 -0
  238. data/spec/dummy/public/stylesheets/fancybox/images/fancy_shadow_ne.png +0 -0
  239. data/spec/dummy/public/stylesheets/fancybox/images/fancy_shadow_nw.png +0 -0
  240. data/spec/dummy/public/stylesheets/fancybox/images/fancy_shadow_s.png +0 -0
  241. data/spec/dummy/public/stylesheets/fancybox/images/fancy_shadow_se.png +0 -0
  242. data/spec/dummy/public/stylesheets/fancybox/images/fancy_shadow_sw.png +0 -0
  243. data/spec/dummy/public/stylesheets/fancybox/images/fancy_shadow_w.png +0 -0
  244. data/spec/dummy/public/stylesheets/fancybox/images/fancy_title_left.png +0 -0
  245. data/spec/dummy/public/stylesheets/fancybox/images/fancy_title_main.png +0 -0
  246. data/spec/dummy/public/stylesheets/fancybox/images/fancy_title_over.png +0 -0
  247. data/spec/dummy/public/stylesheets/fancybox/images/fancy_title_right.png +0 -0
  248. data/spec/dummy/public/stylesheets/fancybox/images/fancybox-x.png +0 -0
  249. data/spec/dummy/public/stylesheets/fancybox/images/fancybox-y.png +0 -0
  250. data/spec/dummy/public/stylesheets/fancybox/images/fancybox.png +0 -0
  251. data/spec/dummy/public/stylesheets/fancybox/jquery.fancybox-1.3.4.css +359 -0
  252. data/spec/dummy/public/stylesheets/manage/buttons.css +42 -0
  253. data/spec/dummy/public/stylesheets/manage/ie.css +16 -0
  254. data/spec/dummy/public/stylesheets/manage/main.css +1085 -0
  255. data/spec/dummy/public/stylesheets/manage/panel.css +126 -0
  256. data/spec/dummy/public/stylesheets/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  257. data/spec/dummy/public/stylesheets/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  258. data/spec/dummy/public/stylesheets/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  259. data/spec/dummy/public/stylesheets/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  260. data/spec/dummy/public/stylesheets/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  261. data/spec/dummy/public/stylesheets/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  262. data/spec/dummy/public/stylesheets/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  263. data/spec/dummy/public/stylesheets/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  264. data/spec/dummy/public/stylesheets/smoothness/images/ui-icons_222222_256x240.png +0 -0
  265. data/spec/dummy/public/stylesheets/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  266. data/spec/dummy/public/stylesheets/smoothness/images/ui-icons_454545_256x240.png +0 -0
  267. data/spec/dummy/public/stylesheets/smoothness/images/ui-icons_888888_256x240.png +0 -0
  268. data/spec/dummy/public/stylesheets/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  269. data/spec/dummy/public/stylesheets/smoothness/jquery-ui-1.8.13.custom.css +578 -0
  270. data/spec/dummy/public/uploads/avatar/4/rails.png +0 -0
  271. data/spec/dummy/public/uploads/avatar/4/thumb_rails.png +0 -0
  272. data/spec/dummy/public/uploads/avatar/5/rails.png +0 -0
  273. data/spec/dummy/public/uploads/avatar/5/thumb_rails.png +0 -0
  274. data/spec/dummy/public/uploads/avatar/6/rails.png +0 -0
  275. data/spec/dummy/public/uploads/avatar/6/thumb_rails.png +0 -0
  276. data/spec/dummy/public/uploads/avatar/7/rails.png +0 -0
  277. data/spec/dummy/public/uploads/avatar/7/thumb_rails.png +0 -0
  278. data/spec/dummy/public/uploads/avatar/8/rails.png +0 -0
  279. data/spec/dummy/public/uploads/avatar/8/thumb_rails.png +0 -0
  280. data/spec/dummy/public/uploads/tmp/20110819-1743-19227-1016/silicon_valley.jpg +0 -0
  281. data/spec/dummy/public/uploads/tmp/20110819-1743-19227-1016/thumb_silicon_valley.jpg +0 -0
  282. data/spec/dummy/public/uploads/tmp/20110819-1744-19584-0221/silicon_valley.jpg +0 -0
  283. data/spec/dummy/public/uploads/tmp/20110819-1744-19584-0221/thumb_silicon_valley.jpg +0 -0
  284. data/spec/dummy/script/rails +6 -0
  285. data/spec/dummy/test/fixtures/files/rails.png +0 -0
  286. data/spec/factories/asset_factory.rb +10 -0
  287. data/spec/factories/files/rails.png +0 -0
  288. data/spec/factories/files/silicon_valley.jpg +0 -0
  289. data/spec/factories/page_factory.rb +5 -0
  290. data/spec/factories/structure_factory.rb +19 -0
  291. data/spec/factories/user_factory.rb +46 -0
  292. data/spec/generators/install_generator_spec.rb +69 -0
  293. data/spec/integration/navigation_spec.rb +9 -0
  294. data/spec/integration/users_spec.rb +32 -0
  295. data/spec/models/avatar_spec.rb +69 -0
  296. data/spec/models/structure_spec.rb +83 -0
  297. data/spec/models/user_spec.rb +72 -0
  298. data/spec/spec.opts +2 -0
  299. data/spec/spec_helper.rb +70 -0
  300. data/spec/sunrise_spec.rb +17 -0
  301. data/spec/support/helpers/controller_macros.rb +40 -0
  302. data/spec/tmp/app/helpers/manage/assets_helper.rb +2 -0
  303. data/spec/tmp/app/helpers/manage/base_helper.rb +83 -0
  304. data/spec/tmp/app/helpers/manage/pages_helper.rb +2 -0
  305. data/spec/tmp/app/helpers/manage/settings_helper.rb +2 -0
  306. data/spec/tmp/app/helpers/manage/structures_helper.rb +12 -0
  307. data/spec/tmp/app/helpers/manage/users_helper.rb +6 -0
  308. data/spec/tmp/app/models/defaults/ability.rb +39 -0
  309. data/spec/tmp/app/models/defaults/asset.rb +9 -0
  310. data/spec/tmp/app/models/defaults/attachment_file.rb +31 -0
  311. data/spec/tmp/app/models/defaults/avatar.rb +34 -0
  312. data/spec/tmp/app/models/defaults/header.rb +5 -0
  313. data/spec/tmp/app/models/defaults/page.rb +5 -0
  314. data/spec/tmp/app/models/defaults/picture.rb +31 -0
  315. data/spec/tmp/app/models/defaults/position_type.rb +7 -0
  316. data/spec/tmp/app/models/defaults/role.rb +20 -0
  317. data/spec/tmp/app/models/defaults/role_type.rb +8 -0
  318. data/spec/tmp/app/models/defaults/structure.rb +9 -0
  319. data/spec/tmp/app/models/defaults/structure_type.rb +9 -0
  320. data/spec/tmp/app/models/defaults/user.rb +47 -0
  321. data/spec/tmp/app/uploaders/attachment_file_uploader.rb +5 -0
  322. data/spec/tmp/app/uploaders/avatar_uploader.rb +13 -0
  323. data/spec/tmp/app/uploaders/picture_uploader.rb +17 -0
  324. data/spec/tmp/app/views/layouts/application.html.erb +35 -0
  325. data/spec/tmp/app/views/pages/show.html.erb +2 -0
  326. data/spec/tmp/app/views/shared/_notice.html.erb +17 -0
  327. data/spec/tmp/config/application.rb +47 -0
  328. data/spec/tmp/config/application.yml.sample +4 -0
  329. data/spec/tmp/config/database.yml.sample +34 -0
  330. data/spec/tmp/config/initializers/sunrise.rb +7 -0
  331. data/spec/tmp/config/logrotate-config.sample +9 -0
  332. data/spec/tmp/config/nginx-config-passenger.sample +60 -0
  333. data/spec/tmp/config/routes.rb +7 -0
  334. data/spec/tmp/db/migrate/20110819144550_sunrise_create_users.rb +29 -0
  335. data/spec/tmp/db/migrate/20110819144650_sunrise_create_roles.rb +16 -0
  336. data/spec/tmp/db/migrate/20110819144750_sunrise_create_structures.rb +27 -0
  337. data/spec/tmp/db/migrate/20110819144850_sunrise_create_pages.rb +17 -0
  338. data/spec/tmp/db/migrate/20110819144950_sunrise_create_assets.rb +28 -0
  339. data/spec/tmp/db/migrate/20110819145050_sunrise_create_headers.rb +20 -0
  340. data/spec/tmp/db/seeds.rb +25 -0
  341. data/spec/tmp/public/images/alert.png +0 -0
  342. data/spec/tmp/public/images/cross_ico.png +0 -0
  343. data/spec/tmp/public/images/manage/add_post_bot.gif +0 -0
  344. data/spec/tmp/public/images/manage/add_post_top.gif +0 -0
  345. data/spec/tmp/public/images/manage/add_white_bot.gif +0 -0
  346. data/spec/tmp/public/images/manage/add_white_top.gif +0 -0
  347. data/spec/tmp/public/images/manage/arrow.png +0 -0
  348. data/spec/tmp/public/images/manage/back_but_lc.gif +0 -0
  349. data/spec/tmp/public/images/manage/back_but_rc.gif +0 -0
  350. data/spec/tmp/public/images/manage/bot_corn.gif +0 -0
  351. data/spec/tmp/public/images/manage/bot_duo_corn.gif +0 -0
  352. data/spec/tmp/public/images/manage/but_bg.png +0 -0
  353. data/spec/tmp/public/images/manage/but_block_lc.gif +0 -0
  354. data/spec/tmp/public/images/manage/but_block_rc.gif +0 -0
  355. data/spec/tmp/public/images/manage/but_freze_lc.gif +0 -0
  356. data/spec/tmp/public/images/manage/but_freze_rc.gif +0 -0
  357. data/spec/tmp/public/images/manage/but_gr.gif +0 -0
  358. data/spec/tmp/public/images/manage/but_gr_l.gif +0 -0
  359. data/spec/tmp/public/images/manage/but_gr_r.gif +0 -0
  360. data/spec/tmp/public/images/manage/but_search.gif +0 -0
  361. data/spec/tmp/public/images/manage/but_unfreze_lc.gif +0 -0
  362. data/spec/tmp/public/images/manage/but_unfreze_rc.gif +0 -0
  363. data/spec/tmp/public/images/manage/button_add_foto.gif +0 -0
  364. data/spec/tmp/public/images/manage/button_add_foto_ru.gif +0 -0
  365. data/spec/tmp/public/images/manage/button_add_foto_ua.gif +0 -0
  366. data/spec/tmp/public/images/manage/button_add_foto_uk.gif +0 -0
  367. data/spec/tmp/public/images/manage/cancelbutton.gif +0 -0
  368. data/spec/tmp/public/images/manage/dark_arr.gif +0 -0
  369. data/spec/tmp/public/images/manage/dark_arr_left.gif +0 -0
  370. data/spec/tmp/public/images/manage/dark_cross_ico.gif +0 -0
  371. data/spec/tmp/public/images/manage/dot.gif +0 -0
  372. data/spec/tmp/public/images/manage/duo_bg.gif +0 -0
  373. data/spec/tmp/public/images/manage/duo_bg_small.gif +0 -0
  374. data/spec/tmp/public/images/manage/duo_bg_small_blocked.gif +0 -0
  375. data/spec/tmp/public/images/manage/duo_bg_small_frozed.gif +0 -0
  376. data/spec/tmp/public/images/manage/duo_bg_small_notact.gif +0 -0
  377. data/spec/tmp/public/images/manage/duo_bot_small.gif +0 -0
  378. data/spec/tmp/public/images/manage/duo_bot_small_blocked.gif +0 -0
  379. data/spec/tmp/public/images/manage/duo_bot_small_frozed.gif +0 -0
  380. data/spec/tmp/public/images/manage/duo_bot_small_notact.gif +0 -0
  381. data/spec/tmp/public/images/manage/duo_top_small.gif +0 -0
  382. data/spec/tmp/public/images/manage/duo_top_small_blocked.gif +0 -0
  383. data/spec/tmp/public/images/manage/duo_top_small_frozed.gif +0 -0
  384. data/spec/tmp/public/images/manage/duo_top_small_notact.gif +0 -0
  385. data/spec/tmp/public/images/manage/edit_white_top.gif +0 -0
  386. data/spec/tmp/public/images/manage/empty.gif +0 -0
  387. data/spec/tmp/public/images/manage/filter_bot_bg.gif +0 -0
  388. data/spec/tmp/public/images/manage/filter_top_bg.gif +0 -0
  389. data/spec/tmp/public/images/manage/flag_en.gif +0 -0
  390. data/spec/tmp/public/images/manage/flag_en_nonact.gif +0 -0
  391. data/spec/tmp/public/images/manage/flag_ru.gif +0 -0
  392. data/spec/tmp/public/images/manage/flag_ru_nonact.gif +0 -0
  393. data/spec/tmp/public/images/manage/flag_ua.gif +0 -0
  394. data/spec/tmp/public/images/manage/flag_ua_nonact.gif +0 -0
  395. data/spec/tmp/public/images/manage/foto.jpg +0 -0
  396. data/spec/tmp/public/images/manage/ico_add.gif +0 -0
  397. data/spec/tmp/public/images/manage/ico_delete.gif +0 -0
  398. data/spec/tmp/public/images/manage/ico_down.gif +0 -0
  399. data/spec/tmp/public/images/manage/ico_edit.gif +0 -0
  400. data/spec/tmp/public/images/manage/ico_settings.gif +0 -0
  401. data/spec/tmp/public/images/manage/ico_up.gif +0 -0
  402. data/spec/tmp/public/images/manage/input_bg.gif +0 -0
  403. data/spec/tmp/public/images/manage/l_but_corn.gif +0 -0
  404. data/spec/tmp/public/images/manage/minimise_but.gif +0 -0
  405. data/spec/tmp/public/images/manage/mp3.png +0 -0
  406. data/spec/tmp/public/images/manage/page_arr_hover.png +0 -0
  407. data/spec/tmp/public/images/manage/page_next_arr.gif +0 -0
  408. data/spec/tmp/public/images/manage/page_num_hover.gif +0 -0
  409. data/spec/tmp/public/images/manage/page_prev_arr.gif +0 -0
  410. data/spec/tmp/public/images/manage/panel/l_but_corn.gif +0 -0
  411. data/spec/tmp/public/images/manage/panel/maximise_but.gif +0 -0
  412. data/spec/tmp/public/images/manage/panel/r_but_corn.gif +0 -0
  413. data/spec/tmp/public/images/manage/panel/top_menu_arr.gif +0 -0
  414. data/spec/tmp/public/images/manage/panel/user_pic.gif +0 -0
  415. data/spec/tmp/public/images/manage/preloader.gif +0 -0
  416. data/spec/tmp/public/images/manage/r_but_corn.gif +0 -0
  417. data/spec/tmp/public/images/manage/select_bg.gif +0 -0
  418. data/spec/tmp/public/images/manage/select_corn.gif +0 -0
  419. data/spec/tmp/public/images/manage/struct_corn_lg.gif +0 -0
  420. data/spec/tmp/public/images/manage/struct_corn_llg.gif +0 -0
  421. data/spec/tmp/public/images/manage/struct_corn_lw.gif +0 -0
  422. data/spec/tmp/public/images/manage/struct_corn_rg.gif +0 -0
  423. data/spec/tmp/public/images/manage/struct_corn_rlg.gif +0 -0
  424. data/spec/tmp/public/images/manage/struct_corn_rw.gif +0 -0
  425. data/spec/tmp/public/images/manage/tab_gl.gif +0 -0
  426. data/spec/tmp/public/images/manage/tab_gr.gif +0 -0
  427. data/spec/tmp/public/images/manage/tab_wl.gif +0 -0
  428. data/spec/tmp/public/images/manage/tab_wr.gif +0 -0
  429. data/spec/tmp/public/images/manage/top_corn.gif +0 -0
  430. data/spec/tmp/public/images/manage/top_duo_corn.gif +0 -0
  431. data/spec/tmp/public/images/manage/top_menu_arr.gif +0 -0
  432. data/spec/tmp/public/images/manage/transp_cross.png +0 -0
  433. data/spec/tmp/public/images/manage/upload_progress.gif +0 -0
  434. data/spec/tmp/public/images/manage/user_act_lc.gif +0 -0
  435. data/spec/tmp/public/images/manage/user_act_rc.gif +0 -0
  436. data/spec/tmp/public/images/manage/user_ico.gif +0 -0
  437. data/spec/tmp/public/images/manage/user_pic.gif +0 -0
  438. data/spec/tmp/public/images/manage/user_pic_small.gif +0 -0
  439. data/spec/tmp/public/images/manage/user_pic_thumb.gif +0 -0
  440. data/spec/tmp/public/javascripts/datepicker/jquery-ui-i18n.js +1176 -0
  441. data/spec/tmp/public/javascripts/datepicker/jquery.ui.datepicker-ru.js +37 -0
  442. data/spec/tmp/public/javascripts/datepicker/jquery.ui.datepicker-uk.js +37 -0
  443. data/spec/tmp/public/javascripts/jquery-ui-timepicker-addon.js +911 -0
  444. data/spec/tmp/public/javascripts/jquery.cookie.js +97 -0
  445. data/spec/tmp/public/javascripts/jquery.fancybox-1.3.4.pack.js +46 -0
  446. data/spec/tmp/public/javascripts/jquery.tmpl.min.js +10 -0
  447. data/spec/tmp/public/javascripts/manage-fileuploader.js +182 -0
  448. data/spec/tmp/public/javascripts/manage.js +294 -0
  449. data/spec/tmp/public/javascripts/preloader.js +47 -0
  450. data/spec/tmp/public/javascripts/rails.js +331 -0
  451. data/spec/tmp/public/stylesheets/alert.css +26 -0
  452. data/spec/tmp/public/stylesheets/application.css +1 -0
  453. data/spec/tmp/public/stylesheets/fancybox/images/blank.gif +0 -0
  454. data/spec/tmp/public/stylesheets/fancybox/images/fancy_close.png +0 -0
  455. data/spec/tmp/public/stylesheets/fancybox/images/fancy_loading.png +0 -0
  456. data/spec/tmp/public/stylesheets/fancybox/images/fancy_nav_left.png +0 -0
  457. data/spec/tmp/public/stylesheets/fancybox/images/fancy_nav_right.png +0 -0
  458. data/spec/tmp/public/stylesheets/fancybox/images/fancy_shadow_e.png +0 -0
  459. data/spec/tmp/public/stylesheets/fancybox/images/fancy_shadow_n.png +0 -0
  460. data/spec/tmp/public/stylesheets/fancybox/images/fancy_shadow_ne.png +0 -0
  461. data/spec/tmp/public/stylesheets/fancybox/images/fancy_shadow_nw.png +0 -0
  462. data/spec/tmp/public/stylesheets/fancybox/images/fancy_shadow_s.png +0 -0
  463. data/spec/tmp/public/stylesheets/fancybox/images/fancy_shadow_se.png +0 -0
  464. data/spec/tmp/public/stylesheets/fancybox/images/fancy_shadow_sw.png +0 -0
  465. data/spec/tmp/public/stylesheets/fancybox/images/fancy_shadow_w.png +0 -0
  466. data/spec/tmp/public/stylesheets/fancybox/images/fancy_title_left.png +0 -0
  467. data/spec/tmp/public/stylesheets/fancybox/images/fancy_title_main.png +0 -0
  468. data/spec/tmp/public/stylesheets/fancybox/images/fancy_title_over.png +0 -0
  469. data/spec/tmp/public/stylesheets/fancybox/images/fancy_title_right.png +0 -0
  470. data/spec/tmp/public/stylesheets/fancybox/images/fancybox-x.png +0 -0
  471. data/spec/tmp/public/stylesheets/fancybox/images/fancybox-y.png +0 -0
  472. data/spec/tmp/public/stylesheets/fancybox/images/fancybox.png +0 -0
  473. data/spec/tmp/public/stylesheets/fancybox/jquery.fancybox-1.3.4.css +359 -0
  474. data/spec/tmp/public/stylesheets/manage/buttons.css +42 -0
  475. data/spec/tmp/public/stylesheets/manage/ie.css +16 -0
  476. data/spec/tmp/public/stylesheets/manage/main.css +1108 -0
  477. data/spec/tmp/public/stylesheets/manage/panel.css +126 -0
  478. data/spec/tmp/public/stylesheets/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  479. data/spec/tmp/public/stylesheets/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  480. data/spec/tmp/public/stylesheets/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  481. data/spec/tmp/public/stylesheets/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  482. data/spec/tmp/public/stylesheets/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  483. data/spec/tmp/public/stylesheets/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  484. data/spec/tmp/public/stylesheets/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  485. data/spec/tmp/public/stylesheets/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  486. data/spec/tmp/public/stylesheets/smoothness/images/ui-icons_222222_256x240.png +0 -0
  487. data/spec/tmp/public/stylesheets/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  488. data/spec/tmp/public/stylesheets/smoothness/images/ui-icons_454545_256x240.png +0 -0
  489. data/spec/tmp/public/stylesheets/smoothness/images/ui-icons_888888_256x240.png +0 -0
  490. data/spec/tmp/public/stylesheets/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  491. data/spec/tmp/public/stylesheets/smoothness/jquery-ui-1.8.13.custom.css +578 -0
  492. data/spec/tmp/spec/controllers/pages_controller_spec.rb +22 -0
  493. data/spec/tmp/spec/controllers/welcome_controller_spec.rb +18 -0
  494. data/spec/tmp/spec/factories/structure_factory.rb +22 -0
  495. data/spec/tmp/spec/factories/user_factory.rb +60 -0
  496. data/spec/tmp/spec/spec_helper.rb +37 -0
  497. data/spec/tmp/spec/support/helpers/controller_macros.rb +51 -0
  498. metadata +1270 -1326
  499. data/lib/sunrise/model_filter.rb +0 -158
@@ -0,0 +1,3 @@
1
+ --- !map:Sunrise::SystemSettings
2
+ mailer: !map:ActiveSupport::HashWithIndifferentAccess
3
+ subject_prefix: Test
@@ -0,0 +1,4 @@
1
+ mailer:
2
+ subject_prefix: "[dummy] "
3
+ from: "no-reply@aimbulance.com"
4
+ reply_to: "info@aimbulance.com"
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ gemfile = File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ if File.exist?(gemfile)
5
+ ENV['BUNDLE_GEMFILE'] = gemfile
6
+ require 'bundler'
7
+ Bundler.setup
8
+ end
9
+
10
+ $:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,34 @@
1
+ # And be sure to use new-style password hashing:
2
+ # http://dev.mysql.com/doc/refman/5.0/en/old-client.html
3
+ development:
4
+ adapter: mysql2
5
+ encoding: utf8
6
+ reconnect: false
7
+ database: sunrise_dummy
8
+ pool: 5
9
+ username: root
10
+ password:
11
+ socket: /var/run/mysqld/mysqld.sock
12
+
13
+ # Warning: The database defined as "test" will be erased and
14
+ # re-generated from your development database when you run "rake".
15
+ # Do not set this db to the same as development or production.
16
+ test:
17
+ adapter: mysql2
18
+ encoding: utf8
19
+ reconnect: false
20
+ database: sunrise_dummy_test
21
+ pool: 5
22
+ username: root
23
+ password:
24
+ socket: /var/run/mysqld/mysqld.sock
25
+
26
+ production:
27
+ adapter: mysql2
28
+ encoding: utf8
29
+ reconnect: true
30
+ database: sunrise_dummy
31
+ pool: 5
32
+ username: root
33
+ password:
34
+ socket: /var/run/mysqld/mysqld.sock
@@ -0,0 +1,34 @@
1
+ # And be sure to use new-style password hashing:
2
+ # http://dev.mysql.com/doc/refman/5.0/en/old-client.html
3
+ development:
4
+ adapter: mysql2
5
+ encoding: utf8
6
+ reconnect: false
7
+ database: dummy
8
+ pool: 5
9
+ username: root
10
+ password:
11
+ socket: /var/run/mysqld/mysqld.sock
12
+
13
+ # Warning: The database defined as "test" will be erased and
14
+ # re-generated from your development database when you run "rake".
15
+ # Do not set this db to the same as development or production.
16
+ test:
17
+ adapter: mysql2
18
+ encoding: utf8
19
+ reconnect: false
20
+ database: dummy_test
21
+ pool: 5
22
+ username: root
23
+ password:
24
+ socket: /var/run/mysqld/mysqld.sock
25
+
26
+ production:
27
+ adapter: mysql2
28
+ encoding: utf8
29
+ reconnect: true
30
+ database: dummy
31
+ pool: 5
32
+ username: root
33
+ password:
34
+ socket: /var/run/mysqld/mysqld.sock
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Dummy::Application.initialize!
@@ -0,0 +1,27 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the webserver when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Log error messages when you accidentally call methods on nil.
10
+ config.whiny_nils = true
11
+
12
+ # Show full error reports and disable caching
13
+ config.consider_all_requests_local = true
14
+ config.action_view.debug_rjs = true
15
+ config.action_controller.perform_caching = false
16
+
17
+ # Don't care if the mailer can't send
18
+ config.action_mailer.raise_delivery_errors = false
19
+
20
+ # Print deprecation notices to the Rails logger
21
+ config.active_support.deprecation = :log
22
+
23
+ # Only use best-standards-support built into browsers
24
+ config.action_dispatch.best_standards_support = :builtin
25
+
26
+ config.action_mailer.default_url_options = { :host => 'localhost:3000' }
27
+ end
@@ -0,0 +1,49 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # The production environment is meant for finished, "live" apps.
5
+ # Code is not reloaded between requests
6
+ config.cache_classes = true
7
+
8
+ # Full error reports are disabled and caching is turned on
9
+ config.consider_all_requests_local = false
10
+ config.action_controller.perform_caching = true
11
+
12
+ # Specifies the header that your server uses for sending files
13
+ config.action_dispatch.x_sendfile_header = "X-Sendfile"
14
+
15
+ # For nginx:
16
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
17
+
18
+ # If you have no front-end server that supports something like X-Sendfile,
19
+ # just comment this out and Rails will serve the files
20
+
21
+ # See everything in the log (default is :info)
22
+ # config.log_level = :debug
23
+
24
+ # Use a different logger for distributed setups
25
+ # config.logger = SyslogLogger.new
26
+
27
+ # Use a different cache store in production
28
+ # config.cache_store = :mem_cache_store
29
+
30
+ # Disable Rails's static asset server
31
+ # In production, Apache or nginx will already do this
32
+ config.serve_static_assets = false
33
+
34
+ # Enable serving of images, stylesheets, and javascripts from an asset server
35
+ # config.action_controller.asset_host = "http://assets.example.com"
36
+
37
+ # Disable delivery errors, bad email addresses will be ignored
38
+ # config.action_mailer.raise_delivery_errors = false
39
+
40
+ # Enable threaded mode
41
+ # config.threadsafe!
42
+
43
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
44
+ # the I18n.default_locale when a translation can not be found)
45
+ config.i18n.fallbacks = true
46
+
47
+ # Send deprecation notices to registered listeners
48
+ config.active_support.deprecation = :notify
49
+ end
@@ -0,0 +1,35 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Log error messages when you accidentally call methods on nil.
11
+ config.whiny_nils = true
12
+
13
+ # Show full error reports and disable caching
14
+ config.consider_all_requests_local = true
15
+ config.action_controller.perform_caching = false
16
+
17
+ # Raise exceptions instead of rendering exception templates
18
+ config.action_dispatch.show_exceptions = false
19
+
20
+ # Disable request forgery protection in test environment
21
+ config.action_controller.allow_forgery_protection = false
22
+
23
+ # Tell Action Mailer not to deliver emails to the real world.
24
+ # The :test delivery method accumulates sent emails in the
25
+ # ActionMailer::Base.deliveries array.
26
+ config.action_mailer.delivery_method = :test
27
+
28
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
29
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
30
+ # like if you have constraints or database-specific column types
31
+ # config.active_record.schema_format = :sql
32
+
33
+ # Print deprecation notices to the stderr
34
+ config.active_support.deprecation = :stderr
35
+ end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,194 @@
1
+ # Use this hook to configure devise mailer, warden hooks and so forth. The first
2
+ # four configuration values can also be set straight in your models.
3
+ Devise.setup do |config|
4
+ # ==> Mailer Configuration
5
+ # Configure the e-mail address which will be shown in DeviseMailer.
6
+ config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
7
+
8
+ # Configure the class responsible to send e-mails.
9
+ # config.mailer = "Devise::Mailer"
10
+
11
+ # ==> ORM configuration
12
+ # Load and configure the ORM. Supports :active_record (default) and
13
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
14
+ # available as additional gems.
15
+ require 'devise/orm/active_record'
16
+
17
+ # ==> Configuration for any authentication mechanism
18
+ # Configure which keys are used when authenticating a user. The default is
19
+ # just :email. You can configure it to use [:username, :subdomain], so for
20
+ # authenticating a user, both parameters are required. Remember that those
21
+ # parameters are used only when authenticating and not when retrieving from
22
+ # session. If you need permissions, you should implement that in a before filter.
23
+ # You can also supply a hash where the value is a boolean determining whether
24
+ # or not authentication should be aborted when the value is not present.
25
+ # config.authentication_keys = [ :email ]
26
+
27
+ # Configure parameters from the request object used for authentication. Each entry
28
+ # given should be a request method and it will automatically be passed to the
29
+ # find_for_authentication method and considered in your model lookup. For instance,
30
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
31
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
32
+ # config.request_keys = []
33
+
34
+ # Configure which authentication keys should be case-insensitive.
35
+ # These keys will be downcased upon creating or modifying a user and when used
36
+ # to authenticate or find a user. Default is :email.
37
+ config.case_insensitive_keys = [ :email ]
38
+
39
+ # Tell if authentication through request.params is enabled. True by default.
40
+ # config.params_authenticatable = true
41
+
42
+ # Tell if authentication through HTTP Basic Auth is enabled. False by default.
43
+ # config.http_authenticatable = false
44
+
45
+ # If http headers should be returned for AJAX requests. True by default.
46
+ # config.http_authenticatable_on_xhr = true
47
+
48
+ # The realm used in Http Basic Authentication. "Application" by default.
49
+ # config.http_authentication_realm = "Application"
50
+
51
+ # ==> Configuration for :database_authenticatable
52
+ # For bcrypt, this is the cost for hashing the password and defaults to 10. If
53
+ # using other encryptors, it sets how many times you want the password re-encrypted.
54
+ config.stretches = 10
55
+
56
+ # Setup a pepper to generate the encrypted password.
57
+ # config.pepper = "0deda83519bde3c467bcccb85aed5bf767689862e9b04630e894591e184b3020a2c659d49d0c0ce5aff44d553977e73219c3b95e42b336153b7bd6a0681f6807"
58
+
59
+ # ==> Configuration for :confirmable
60
+ # The time you want to give your user to confirm his account. During this time
61
+ # he will be able to access your application without confirming. Default is 0.days
62
+ # When confirm_within is zero, the user won't be able to sign in without confirming.
63
+ # You can use this to let your user access some features of your application
64
+ # without confirming the account, but blocking it after a certain period
65
+ # (ie 2 days).
66
+ # config.confirm_within = 2.days
67
+
68
+ # Defines which key will be used when confirming an account
69
+ # config.confirmation_keys = [ :email ]
70
+
71
+ # ==> Configuration for :rememberable
72
+ # The time the user will be remembered without asking for credentials again.
73
+ # config.remember_for = 2.weeks
74
+
75
+ # If true, a valid remember token can be re-used between multiple browsers.
76
+ # config.remember_across_browsers = true
77
+
78
+ # If true, extends the user's remember period when remembered via cookie.
79
+ # config.extend_remember_period = false
80
+
81
+ # If true, uses the password salt as remember token. This should be turned
82
+ # to false if you are not using database authenticatable.
83
+ config.use_salt_as_remember_token = true
84
+
85
+ # Options to be passed to the created cookie. For instance, you can set
86
+ # :secure => true in order to force SSL only cookies.
87
+ # config.cookie_options = {}
88
+
89
+ # ==> Configuration for :validatable
90
+ # Range for password length. Default is 6..128.
91
+ # config.password_length = 6..128
92
+
93
+ # Regex to use to validate the email address
94
+ # config.email_regexp = /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i
95
+
96
+ # ==> Configuration for :timeoutable
97
+ # The time you want to timeout the user session without activity. After this
98
+ # time the user will be asked for credentials again. Default is 30 minutes.
99
+ # config.timeout_in = 30.minutes
100
+
101
+ # ==> Configuration for :lockable
102
+ # Defines which strategy will be used to lock an account.
103
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
104
+ # :none = No lock strategy. You should handle locking by yourself.
105
+ config.lock_strategy = :failed_attempts
106
+
107
+ # Defines which key will be used when locking and unlocking an account
108
+ # config.unlock_keys = [ :email ]
109
+
110
+ # Defines which strategy will be used to unlock an account.
111
+ # :email = Sends an unlock link to the user email
112
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
113
+ # :both = Enables both strategies
114
+ # :none = No unlock strategy. You should handle unlocking by yourself.
115
+ config.unlock_strategy = :time
116
+
117
+ # Number of authentication tries before locking an account if lock_strategy
118
+ # is failed attempts.
119
+ # config.maximum_attempts = 20
120
+
121
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
122
+ config.unlock_in = 1.hour
123
+
124
+ # ==> Configuration for :recoverable
125
+ #
126
+ # Defines which key will be used when recovering the password for an account
127
+ # config.reset_password_keys = [ :email ]
128
+
129
+ # Time interval you can reset your password with a reset password key.
130
+ # Don't put a too small interval or your users won't have the time to
131
+ # change their passwords.
132
+ config.reset_password_within = 2.hours
133
+
134
+ # ==> Configuration for :encryptable
135
+ # Allow you to use another encryption algorithm besides bcrypt (default). You can use
136
+ # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
137
+ # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
138
+ # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
139
+ # REST_AUTH_SITE_KEY to pepper)
140
+ # config.encryptor = :sha512
141
+
142
+ # ==> Configuration for :token_authenticatable
143
+ # Defines name of the authentication token params key
144
+ # config.token_authentication_key = :auth_token
145
+
146
+ # If true, authentication through token does not store user in session and needs
147
+ # to be supplied on each request. Useful if you are using the token as API token.
148
+ # config.stateless_token = false
149
+
150
+ # ==> Scopes configuration
151
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
152
+ # "users/sessions/new". It's turned off by default because it's slower if you
153
+ # are using only default views.
154
+ # config.scoped_views = false
155
+
156
+ # Configure the default scope given to Warden. By default it's the first
157
+ # devise role declared in your routes (usually :user).
158
+ # config.default_scope = :user
159
+
160
+ # Configure sign_out behavior.
161
+ # Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
162
+ # The default is true, which means any logout action will sign out all active scopes.
163
+ # config.sign_out_all_scopes = true
164
+
165
+ # ==> Navigation configuration
166
+ # Lists the formats that should be treated as navigational. Formats like
167
+ # :html, should redirect to the sign in page when the user does not have
168
+ # access, but formats like :xml or :json, should return 401.
169
+ #
170
+ # If you have any extra navigational formats, like :iphone or :mobile, you
171
+ # should add them to the navigational formats lists.
172
+ #
173
+ # The :"*/*" and "*/*" formats below is required to match Internet
174
+ # Explorer requests.
175
+ # config.navigational_formats = [:"*/*", "*/*", :html]
176
+
177
+ # The default HTTP method used to sign out a resource. Default is :get.
178
+ # config.sign_out_via = :get
179
+
180
+ # ==> OmniAuth
181
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
182
+ # up on your models and hooks.
183
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
184
+
185
+ # ==> Warden configuration
186
+ # If you want to use other strategies, that are not supported by Devise, or
187
+ # change the failure app, you can configure them inside the config.warden block.
188
+ #
189
+ # config.warden do |manager|
190
+ # manager.failure_app = AnotherApp
191
+ # manager.intercept_401 = false
192
+ # manager.default_strategies(:scope => :user).unshift :some_external_strategy
193
+ # end
194
+ end
@@ -0,0 +1,10 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format
4
+ # (all these examples are active by default):
5
+ # ActiveSupport::Inflector.inflections do |inflect|
6
+ # inflect.plural /^(ox)$/i, '\1en'
7
+ # inflect.singular /^(ox)en/i, '\1'
8
+ # inflect.irregular 'person', 'people'
9
+ # inflect.uncountable %w( fish sheep )
10
+ # end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ Dummy::Application.config.secret_token = 'feddbd8fa74b480bc3cc36efb93589d8f3adb5123f41c9b801bedce74f9c4d9b4e88131710b1edb384c462c76609518a85a5ba29169455d34c8da3bccd7310a7'