jc_cms 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (264) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +40 -0
  4. data/app/assets/images/jc_cms/ok.png +0 -0
  5. data/app/assets/javascripts/jc_cms/application.js +16 -0
  6. data/app/assets/javascripts/jc_cms/bootstrap.js.coffee +4 -0
  7. data/app/assets/javascripts/jc_cms/dashboard/dashboard.js +2 -0
  8. data/app/assets/javascripts/jc_cms/dashboard/pages.js.coffee +3 -0
  9. data/app/assets/javascripts/jc_cms/home.js.coffee +3 -0
  10. data/app/assets/stylesheets/jc_cms/application.css +18 -0
  11. data/app/assets/stylesheets/jc_cms/bootstrap_and_overrides.css.less +34 -0
  12. data/app/assets/stylesheets/jc_cms/bootswatch.css.less +181 -0
  13. data/app/assets/stylesheets/jc_cms/dashboard/dashboard.css +4 -0
  14. data/app/assets/stylesheets/jc_cms/dashboard/pages.css.scss +3 -0
  15. data/app/assets/stylesheets/jc_cms/home.css.scss +3 -0
  16. data/app/assets/stylesheets/jc_cms/variables.css.less +301 -0
  17. data/app/cells/page/show.html.haml +4 -0
  18. data/app/cells/page_cell.rb +7 -0
  19. data/app/cells/pages_menu/show.html.haml +7 -0
  20. data/app/cells/pages_menu_cell.rb +8 -0
  21. data/app/controllers/jc_cms/application_controller.rb +17 -0
  22. data/app/controllers/jc_cms/dashboard/dashboard_controller.rb +10 -0
  23. data/app/controllers/jc_cms/dashboard/pages_controller.rb +42 -0
  24. data/app/controllers/jc_cms/home_controller.rb +6 -0
  25. data/app/helpers/jc_cms/application_helper.rb +4 -0
  26. data/app/helpers/jc_cms/dashboard/dashboard_helper.rb +4 -0
  27. data/app/models/ckeditor/asset.rb +7 -0
  28. data/app/models/ckeditor/attachment_file.rb +7 -0
  29. data/app/models/ckeditor/picture.rb +7 -0
  30. data/app/models/jc_cms/page.rb +11 -0
  31. data/app/models/jc_cms/user.rb +13 -0
  32. data/app/uploaders/ckeditor_attachment_file_uploader.rb +44 -0
  33. data/app/uploaders/ckeditor_picture_uploader.rb +55 -0
  34. data/app/views/jc_cms/dashboard/dashboard/index.html.erb +1 -0
  35. data/app/views/jc_cms/dashboard/pages/_form.html.haml +14 -0
  36. data/app/views/jc_cms/dashboard/pages/edit.html.haml +2 -0
  37. data/app/views/jc_cms/dashboard/pages/index.html.haml +25 -0
  38. data/app/views/jc_cms/dashboard/pages/new.html.haml +2 -0
  39. data/app/views/jc_cms/dashboard/pages/show.html.haml +2 -0
  40. data/app/views/jc_cms/home/index.html.haml +1 -0
  41. data/app/views/jc_cms/users/confirmations/new.html.erb +15 -0
  42. data/app/views/jc_cms/users/mailer/confirmation_instructions.html.erb +5 -0
  43. data/app/views/jc_cms/users/mailer/reset_password_instructions.html.erb +8 -0
  44. data/app/views/jc_cms/users/mailer/unlock_instructions.html.erb +7 -0
  45. data/app/views/jc_cms/users/passwords/edit.html.erb +19 -0
  46. data/app/views/jc_cms/users/passwords/new.html.erb +15 -0
  47. data/app/views/jc_cms/users/registrations/edit.html.erb +22 -0
  48. data/app/views/jc_cms/users/registrations/new.html.erb +17 -0
  49. data/app/views/jc_cms/users/sessions/new.html.erb +13 -0
  50. data/app/views/jc_cms/users/shared/_links.erb +25 -0
  51. data/app/views/jc_cms/users/unlocks/new.html.erb +15 -0
  52. data/app/views/layouts/jc_cms/application.html.erb +90 -0
  53. data/app/views/layouts/jc_cms/jc_cms.html.erb +86 -0
  54. data/config/application.rb +63 -0
  55. data/config/boot.rb +6 -0
  56. data/config/environment.rb +5 -0
  57. data/config/initializers/backtrace_silencers.rb +7 -0
  58. data/config/initializers/ckeditor.rb +18 -0
  59. data/config/initializers/devise.rb +233 -0
  60. data/config/initializers/inflections.rb +15 -0
  61. data/config/initializers/mime_types.rb +5 -0
  62. data/config/initializers/simple_form.rb +142 -0
  63. data/config/initializers/simple_form_bootstrap.rb +45 -0
  64. data/config/initializers/wrap_parameters.rb +14 -0
  65. data/config/locales/devise.en.yml +58 -0
  66. data/config/locales/devise.pl.yml +62 -0
  67. data/config/locales/en.yml +5 -0
  68. data/config/locales/pl.yml +246 -0
  69. data/config/locales/simple_form.en.yml +26 -0
  70. data/config/locales/simple_form.pl.yml +36 -0
  71. data/config/routes.rb +14 -0
  72. data/db/migrate/20121107230840_create_pages.rb +20 -0
  73. data/db/migrate/20121112234336_create_ckeditor_assets.rb +26 -0
  74. data/db/migrate/20121118205852_devise_create_cms_users.rb +46 -0
  75. data/lib/jc_cms/engine.rb +5 -0
  76. data/lib/jc_cms/version.rb +3 -0
  77. data/lib/jc_cms.rb +4 -0
  78. data/lib/tasks/jc_cms_tasks.rake +4 -0
  79. data/test/dummy/README.rdoc +261 -0
  80. data/test/dummy/Rakefile +7 -0
  81. data/test/dummy/app/assets/javascripts/application.js +15 -0
  82. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  83. data/test/dummy/app/controllers/application_controller.rb +3 -0
  84. data/test/dummy/app/helpers/application_helper.rb +2 -0
  85. data/test/dummy/app/models/ckeditor/asset.rb +7 -0
  86. data/test/dummy/app/models/ckeditor/attachment_file.rb +7 -0
  87. data/test/dummy/app/models/ckeditor/picture.rb +7 -0
  88. data/test/dummy/app/uploaders/ckeditor_attachment_file_uploader.rb +42 -0
  89. data/test/dummy/app/uploaders/ckeditor_picture_uploader.rb +53 -0
  90. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  91. data/test/dummy/config/application.rb +60 -0
  92. data/test/dummy/config/boot.rb +10 -0
  93. data/test/dummy/config/database.yml +25 -0
  94. data/test/dummy/config/environment.rb +5 -0
  95. data/test/dummy/config/environments/development.rb +37 -0
  96. data/test/dummy/config/environments/production.rb +67 -0
  97. data/test/dummy/config/environments/test.rb +37 -0
  98. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  99. data/test/dummy/config/initializers/ckeditor.rb +18 -0
  100. data/test/dummy/config/initializers/inflections.rb +15 -0
  101. data/test/dummy/config/initializers/mime_types.rb +5 -0
  102. data/test/dummy/config/initializers/secret_token.rb +7 -0
  103. data/test/dummy/config/initializers/session_store.rb +8 -0
  104. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  105. data/test/dummy/config/locales/en.yml +5 -0
  106. data/test/dummy/config/routes.rb +6 -0
  107. data/test/dummy/config.ru +4 -0
  108. data/test/dummy/db/development.sqlite3 +0 -0
  109. data/test/dummy/db/migrate/20121216213708_create_locations.jc_cms.rb +15 -0
  110. data/test/dummy/db/migrate/20121216213709_create_pages.jc_cms.rb +22 -0
  111. data/test/dummy/db/migrate/20121216213710_create_ckeditor_assets.jc_cms.rb +27 -0
  112. data/test/dummy/db/migrate/20121216213711_devise_create_cms_users.jc_cms.rb +47 -0
  113. data/test/dummy/db/migrate/20121216224201_create_ckeditor_assets.rb +26 -0
  114. data/test/dummy/db/schema.rb +70 -0
  115. data/test/dummy/log/development.log +21503 -0
  116. data/test/dummy/public/404.html +26 -0
  117. data/test/dummy/public/422.html +26 -0
  118. data/test/dummy/public/500.html +25 -0
  119. data/test/dummy/public/favicon.ico +0 -0
  120. data/test/dummy/public/uploads/ckeditor/pictures/1/Zrzut_ekranu_z_2012-11-13_22_39_26.png +0 -0
  121. data/test/dummy/public/uploads/ckeditor/pictures/1/content_Zrzut_ekranu_z_2012-11-13_22_39_26.png +0 -0
  122. data/test/dummy/public/uploads/ckeditor/pictures/1/thumb_Zrzut_ekranu_z_2012-11-13_22_39_26.png +0 -0
  123. data/test/dummy/public/uploads/ckeditor/pictures/2/Zrzut_ekranu_z_2012-11-13_22_39_26.png +0 -0
  124. data/test/dummy/public/uploads/ckeditor/pictures/2/content_Zrzut_ekranu_z_2012-11-13_22_39_26.png +0 -0
  125. data/test/dummy/public/uploads/ckeditor/pictures/2/thumb_Zrzut_ekranu_z_2012-11-13_22_39_26.png +0 -0
  126. data/test/dummy/script/rails +6 -0
  127. data/test/dummy/tmp/cache/assets/C07/8C0/sprockets%2F64646b098528c9808ce15815c4496607 +0 -0
  128. data/test/dummy/tmp/cache/assets/C09/B90/sprockets%2F72126398325c80c78fd6678718473a84 +0 -0
  129. data/test/dummy/tmp/cache/assets/C46/520/sprockets%2Fee0865a4980d56313339e053a1218f20 +0 -0
  130. data/test/dummy/tmp/cache/assets/C59/490/sprockets%2F9600e95c2208a04b71582af3e8688854 +0 -0
  131. data/test/dummy/tmp/cache/assets/C5A/E90/sprockets%2F6d94f48b07e6690559f54061152154fa +0 -0
  132. data/test/dummy/tmp/cache/assets/C5D/6E0/sprockets%2F27494740406c86656742cf4e3128b9ce +0 -0
  133. data/test/dummy/tmp/cache/assets/C5E/310/sprockets%2Ff149155a6c5a09834cf158617963676a +0 -0
  134. data/test/dummy/tmp/cache/assets/C64/7E0/sprockets%2F4347701f6cd7118799d285377f38a5d2 +0 -0
  135. data/test/dummy/tmp/cache/assets/C66/760/sprockets%2Fc335e045119111f98632e9f62f6888f8 +0 -0
  136. data/test/dummy/tmp/cache/assets/C67/FE0/sprockets%2F67f52995585deb28a55c25394d601757 +0 -0
  137. data/test/dummy/tmp/cache/assets/C79/540/sprockets%2Fd40ecc5f0532937936b7c83101e43614 +0 -0
  138. data/test/dummy/tmp/cache/assets/C87/890/sprockets%2F6093c36edd443ed062379a9966c55023 +0 -0
  139. data/test/dummy/tmp/cache/assets/C8B/D60/sprockets%2Fa42a3175cd067427e36648605ee69f84 +0 -0
  140. data/test/dummy/tmp/cache/assets/C8E/6E0/sprockets%2Fa8b21b14c23c038a2473c2b58304530c +0 -0
  141. data/test/dummy/tmp/cache/assets/C92/500/sprockets%2F1058b7805167e75c2b97121d78e97de7 +0 -0
  142. data/test/dummy/tmp/cache/assets/CA3/130/sprockets%2F469beac37850c6141bf41882018b601b +0 -0
  143. data/test/dummy/tmp/cache/assets/CA7/3B0/sprockets%2Ffd1e83a3755907b8a606f30a41307a19 +0 -0
  144. data/test/dummy/tmp/cache/assets/CB0/F70/sprockets%2Fd9043423e669960cf03ae665c5b427a3 +0 -0
  145. data/test/dummy/tmp/cache/assets/CB4/4B0/sprockets%2F5847a771ed4b27500f51e73a91e6b934 +0 -0
  146. data/test/dummy/tmp/cache/assets/CB9/650/sprockets%2Fec2d52e0987701dd208d18c8996e3351 +0 -0
  147. data/test/dummy/tmp/cache/assets/CBB/D10/sprockets%2F1b2c89754d436451d980455e8fca09a7 +0 -0
  148. data/test/dummy/tmp/cache/assets/CBB/F10/sprockets%2F5ebb0567b58c43c0773b686546b295c8 +0 -0
  149. data/test/dummy/tmp/cache/assets/CC7/A50/sprockets%2F81f095124c73bdb22433c6a65a3d10c3 +0 -0
  150. data/test/dummy/tmp/cache/assets/CC9/B70/sprockets%2Ff9856126986468185e48fbc6b2da155e +0 -0
  151. data/test/dummy/tmp/cache/assets/CCD/E70/sprockets%2Fb6162d50af74a01c7cd2565082d3e181 +0 -0
  152. data/test/dummy/tmp/cache/assets/CD0/070/sprockets%2F5412439eb13284f0a3b08c28273febd1 +0 -0
  153. data/test/dummy/tmp/cache/assets/CD0/5B0/sprockets%2F681bb88d099369e235d531892e9d9a8f +0 -0
  154. data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  155. data/test/dummy/tmp/cache/assets/CD9/D10/sprockets%2F33ba9401ac4819f676d06ea642e614d3 +0 -0
  156. data/test/dummy/tmp/cache/assets/CDE/F50/sprockets%2Fa7e186ae00816cf344cae8394246a087 +0 -0
  157. data/test/dummy/tmp/cache/assets/CDF/0D0/sprockets%2Fe45b3bd832715a12e9c1f6cc91470838 +0 -0
  158. data/test/dummy/tmp/cache/assets/CE2/8E0/sprockets%2F9b322b80baee847d191297c1be634863 +0 -0
  159. data/test/dummy/tmp/cache/assets/CE4/0B0/sprockets%2F58e822726dd1560cff2cd626542c5c74 +0 -0
  160. data/test/dummy/tmp/cache/assets/CE9/8E0/sprockets%2Fd2c16c246539568db289da6c98fc1026 +0 -0
  161. data/test/dummy/tmp/cache/assets/CEB/010/sprockets%2F84229e36d60efb34c64354c4c9eb3938 +0 -0
  162. data/test/dummy/tmp/cache/assets/CEC/D50/sprockets%2F92c13f7d07456dad81dd5246bd859349 +0 -0
  163. data/test/dummy/tmp/cache/assets/CEE/CA0/sprockets%2Feda89fff0c47312925a8918192e178c2 +0 -0
  164. data/test/dummy/tmp/cache/assets/CEF/E90/sprockets%2F92f31af9445568181cf8068a5a5a9f4e +0 -0
  165. data/test/dummy/tmp/cache/assets/CF4/520/sprockets%2F1114f42d76e827c6a9758966bf9dbb45 +0 -0
  166. data/test/dummy/tmp/cache/assets/D00/DB0/sprockets%2F88e2ffc1c52a23d43921baf530d71315 +0 -0
  167. data/test/dummy/tmp/cache/assets/D01/170/sprockets%2F0b5555cc3795f64eaaab40272c9a0443 +0 -0
  168. data/test/dummy/tmp/cache/assets/D03/780/sprockets%2F397bfee3e1000d0581f8c375bb0245a7 +0 -0
  169. data/test/dummy/tmp/cache/assets/D03/C60/sprockets%2F97f47db90e6fc62c4d7c6387828397d5 +0 -0
  170. data/test/dummy/tmp/cache/assets/D08/060/sprockets%2F69dde8caa562064090b325ae8045bc92 +0 -0
  171. data/test/dummy/tmp/cache/assets/D09/2C0/sprockets%2F360a0f84dbf6b2a3106df55d0d881469 +0 -0
  172. data/test/dummy/tmp/cache/assets/D0D/560/sprockets%2Fae539b122faaf679d9e32247e050682a +0 -0
  173. data/test/dummy/tmp/cache/assets/D0F/C80/sprockets%2F5780677e72a94f1af9da0e24a30e84c0 +0 -0
  174. data/test/dummy/tmp/cache/assets/D11/0A0/sprockets%2Ff05fb4198cd543304f9cd14a412be969 +0 -0
  175. data/test/dummy/tmp/cache/assets/D11/DA0/sprockets%2F601da0adf47d60282972e473b64eeb97 +0 -0
  176. data/test/dummy/tmp/cache/assets/D15/2C0/sprockets%2Fdeb34df73f715b491c843655606b06ee +0 -0
  177. data/test/dummy/tmp/cache/assets/D17/690/sprockets%2Fa75ae0c2703ef284758d27620f84ef6d +0 -0
  178. data/test/dummy/tmp/cache/assets/D1E/950/sprockets%2F91d9e2e8575267cea4a2cb342669d67c +0 -0
  179. data/test/dummy/tmp/cache/assets/D20/670/sprockets%2F5f24e9ae131b4909f779ead84d4474a7 +0 -0
  180. data/test/dummy/tmp/cache/assets/D28/AA0/sprockets%2Fe9f5960dc9465591182cd6c1ff1a98c8 +0 -0
  181. data/test/dummy/tmp/cache/assets/D2A/1B0/sprockets%2F042e74be6a1c2862c1fbdd433a1127d6 +0 -0
  182. data/test/dummy/tmp/cache/assets/D2A/5F0/sprockets%2Ff4dcb9ce765ea4667a6925613c68289f +0 -0
  183. data/test/dummy/tmp/cache/assets/D2C/CB0/sprockets%2F12d3089b5b4aed1055b9413ee05cfd04 +0 -0
  184. data/test/dummy/tmp/cache/assets/D2F/6A0/sprockets%2Fbe0da0721240eba9ec280c3f65595d42 +0 -0
  185. data/test/dummy/tmp/cache/assets/D30/BA0/sprockets%2F7434264acdbb0a912f2325a92dd625ee +0 -0
  186. data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  187. data/test/dummy/tmp/cache/assets/D36/A00/sprockets%2F794a48f8e74df2f775ab5e289f385a87 +0 -0
  188. data/test/dummy/tmp/cache/assets/D36/C00/sprockets%2F31d5b05a9ef64c11c99038b8f3ea024c +0 -0
  189. data/test/dummy/tmp/cache/assets/D39/370/sprockets%2F8617aa36e80a726daf01548abecf7514 +0 -0
  190. data/test/dummy/tmp/cache/assets/D3B/D80/sprockets%2Fb54b6d7431d3fa350fd4860ec48376ba +0 -0
  191. data/test/dummy/tmp/cache/assets/D3C/2F0/sprockets%2F51cdd57d7fb8dd62a0c62c76b3185621 +0 -0
  192. data/test/dummy/tmp/cache/assets/D44/880/sprockets%2F4a4c96693e3a1a39c3f8b91228eeb54c +0 -0
  193. data/test/dummy/tmp/cache/assets/D44/BF0/sprockets%2Fa595dfd60f55332e66ed0e2a536883ad +0 -0
  194. data/test/dummy/tmp/cache/assets/D45/960/sprockets%2F36d2078b56c85b2e7e83bb1ebc3509f8 +0 -0
  195. data/test/dummy/tmp/cache/assets/D45/B00/sprockets%2Fc738c84515abd254264ebce779ed63d0 +0 -0
  196. data/test/dummy/tmp/cache/assets/D45/F80/sprockets%2Fe43ea8a1ded751a980c53a850889de33 +0 -0
  197. data/test/dummy/tmp/cache/assets/D48/7D0/sprockets%2F36f7c25f24e292b18fde7638f08aa9c0 +0 -0
  198. data/test/dummy/tmp/cache/assets/D48/C10/sprockets%2F6fcf9db784da5ae76551831162eb76c1 +0 -0
  199. data/test/dummy/tmp/cache/assets/D4C/860/sprockets%2F7e45fa7bc38e7fe824e248f2a496f300 +0 -0
  200. data/test/dummy/tmp/cache/assets/D4C/E70/sprockets%2Fd925ba6277eb18ccee7826175149d5ce +0 -0
  201. data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  202. data/test/dummy/tmp/cache/assets/D52/550/sprockets%2F0e729ff182c56eac9cb66f61885ac746 +0 -0
  203. data/test/dummy/tmp/cache/assets/D53/720/sprockets%2F06e82479780b08ef39ee251d5ff1ecf8 +0 -0
  204. data/test/dummy/tmp/cache/assets/D54/A00/sprockets%2F3df92468167df36c8fe4985fca50cd16 +0 -0
  205. data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  206. data/test/dummy/tmp/cache/assets/D5E/CC0/sprockets%2F11ff861f4f3307eb12da5333f34a9aba +0 -0
  207. data/test/dummy/tmp/cache/assets/D5F/F70/sprockets%2F4b083a83b2d19280ecf82d80cb0ec35a +0 -0
  208. data/test/dummy/tmp/cache/assets/D60/D30/sprockets%2Ff42c2090b3b42edbb29b14b8ca8c9381 +0 -0
  209. data/test/dummy/tmp/cache/assets/D63/FE0/sprockets%2F7c06e0b1e3f36943b4b6ac29ea2f03b8 +0 -0
  210. data/test/dummy/tmp/cache/assets/D70/260/sprockets%2Fec4232a583d51ebb6f61f3733dfe773d +0 -0
  211. data/test/dummy/tmp/cache/assets/D70/E40/sprockets%2F9be15c072df1cf29447f13c75fcea462 +0 -0
  212. data/test/dummy/tmp/cache/assets/D72/8B0/sprockets%2Fa6a44539fe3bd2f93df1d758acc81640 +0 -0
  213. data/test/dummy/tmp/cache/assets/D72/E50/sprockets%2F9fb77b92c0d85bef0e58e52d1c4202b9 +0 -0
  214. data/test/dummy/tmp/cache/assets/D73/5A0/sprockets%2F7c6389b8bb1dd2a68aa4c36734cb98e0 +0 -0
  215. data/test/dummy/tmp/cache/assets/D75/360/sprockets%2F293ef946e8f2bd1c0302fd97cc43ea39 +0 -0
  216. data/test/dummy/tmp/cache/assets/D7A/B20/sprockets%2F4fae9bff57ef326bc3263b7864730b5f +0 -0
  217. data/test/dummy/tmp/cache/assets/D7B/9A0/sprockets%2F769e91c33d9359c2dc9a1aa64ebf89b0 +0 -0
  218. data/test/dummy/tmp/cache/assets/D7D/C10/sprockets%2Fb0b77d34568b99bf0e1bf912ec8cf378 +0 -0
  219. data/test/dummy/tmp/cache/assets/D7E/DD0/sprockets%2F971cab035c4a28fc46bb20ab01a8c14c +0 -0
  220. data/test/dummy/tmp/cache/assets/D84/9E0/sprockets%2F57ec681758c9ce6c50bad69b835bf9c3 +0 -0
  221. data/test/dummy/tmp/cache/assets/D8D/E00/sprockets%2Ff08e1adc2ab7550fabf4210b7cf21587 +0 -0
  222. data/test/dummy/tmp/cache/assets/D8E/E50/sprockets%2F3a83cb2dd3c1df4c4e45037bef17a244 +0 -0
  223. data/test/dummy/tmp/cache/assets/D94/C30/sprockets%2Fec42b5f7ac9042dd6d3ce26f002de616 +0 -0
  224. data/test/dummy/tmp/cache/assets/D98/380/sprockets%2Fcf1c474c0bb8c73996ac31a5db5465ac +0 -0
  225. data/test/dummy/tmp/cache/assets/D99/BE0/sprockets%2Fd7a16c2e0d6d3b4265bb4d6eb5be7484 +0 -0
  226. data/test/dummy/tmp/cache/assets/D9F/7A0/sprockets%2F419e4ca288cce5faa35ec702cce63674 +0 -0
  227. data/test/dummy/tmp/cache/assets/DA0/CE0/sprockets%2F9f2b2767dfb1bbfd32ed538278a0f72a +0 -0
  228. data/test/dummy/tmp/cache/assets/DA1/480/sprockets%2F4c7b27d4ebedd93a0da0628e36f6809c +0 -0
  229. data/test/dummy/tmp/cache/assets/DA2/CD0/sprockets%2Fa99c7b02f4a462d48f68ac7a1d24dbf7 +0 -0
  230. data/test/dummy/tmp/cache/assets/DA3/F20/sprockets%2Fc05a73e30703be304fd9fe8db4cf598e +0 -0
  231. data/test/dummy/tmp/cache/assets/DB9/3D0/sprockets%2F02571f86c7cfe0fc11bfc3d1bbb1c208 +0 -0
  232. data/test/dummy/tmp/cache/assets/DC4/540/sprockets%2Fadee232b4e5d1dc4537d796d64ac2ac1 +0 -0
  233. data/test/dummy/tmp/cache/assets/DC4/590/sprockets%2F2dc05e1dc0a167e4735ac1dd76dafa97 +0 -0
  234. data/test/dummy/tmp/cache/assets/DC5/FE0/sprockets%2Fe41e0b207ecd4cd2e8284cfbb30e557e +0 -0
  235. data/test/dummy/tmp/cache/assets/DC7/100/sprockets%2F11ac5c4013dd9e91fde638af50c3f1ff +0 -0
  236. data/test/dummy/tmp/cache/assets/DC7/990/sprockets%2F5c956d26ecca1dfe4fb9eaa394301f01 +0 -0
  237. data/test/dummy/tmp/cache/assets/DCA/190/sprockets%2F18a3206d6ecdd1eb90afb684ae9ec345 +0 -0
  238. data/test/dummy/tmp/cache/assets/DCE/380/sprockets%2Fb8f50d4e2dedd941e46a4bc23dd7e391 +0 -0
  239. data/test/dummy/tmp/cache/assets/DDA/D50/sprockets%2F61e799bee7414e75bafc34fae4bd049f +0 -0
  240. data/test/dummy/tmp/cache/assets/DDB/B60/sprockets%2Fb9f5599ad317c420899cebe81bbefa3d +0 -0
  241. data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  242. data/test/dummy/tmp/cache/assets/DDD/EA0/sprockets%2Ff7ece9144ddb7c4e33667f76caa8d3b6 +0 -0
  243. data/test/dummy/tmp/cache/assets/DFF/1B0/sprockets%2Fc12c9bb21df8b6797b49adc1c7aaf8e2 +0 -0
  244. data/test/dummy/tmp/cache/assets/E04/5E0/sprockets%2F38bfd5bbb49de4a45f5a51971cdf6be5 +0 -0
  245. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  246. data/test/dummy/tmp/cache/assets/E05/CD0/sprockets%2Fc8ea7dcae5c0f1974e75cbf110d9ca99 +0 -0
  247. data/test/dummy/tmp/cache/assets/E06/F80/sprockets%2Fc89d2b450fccd9e2efcdcb0446b4679d +0 -0
  248. data/test/dummy/tmp/cache/assets/E08/BA0/sprockets%2Fbe24d2682f98eea5a7fa60fa62fded56 +0 -0
  249. data/test/dummy/tmp/cache/assets/E1F/2A0/sprockets%2F0cf165eccecfa19ad5dc2944403a1cfd +0 -0
  250. data/test/dummy/tmp/cache/assets/E26/430/sprockets%2Fc2823ee45c2582bcec34a905fcacbdef +0 -0
  251. data/test/dummy/tmp/cache/assets/E2B/A30/sprockets%2Fdccc7eaad9b961b83f453b65b4b5cc0f +0 -0
  252. data/test/dummy/tmp/cache/assets/E39/4E0/sprockets%2Fee2fd1f87ee7cd516ea52e8c1ebc9e16 +0 -0
  253. data/test/dummy/tmp/cache/assets/E3B/EB0/sprockets%2Fa8e36f0a9d6869490d5da55cbcfccfec +0 -0
  254. data/test/dummy/tmp/cache/assets/E58/840/sprockets%2Fadeedcbe177fa92bf217db08f504d5bd +0 -0
  255. data/test/dummy/tmp/cache/assets/E7B/380/sprockets%2F1bccb9b3a0bf0b9d92f3fad21fafca56 +0 -0
  256. data/test/dummy/tmp/pids/server.pid +1 -0
  257. data/test/fixtures/jc_cms/cms_users.yml +11 -0
  258. data/test/functional/jc_cms/dashboard/dashboard_controller_test.rb +11 -0
  259. data/test/integration/navigation_test.rb +10 -0
  260. data/test/jc_cms_test.rb +7 -0
  261. data/test/test_helper.rb +15 -0
  262. data/test/unit/helpers/jc_cms/dashboard/dashboard_helper_test.rb +6 -0
  263. data/test/unit/jc_cms/cms_user_test.rb +9 -0
  264. metadata +525 -0
@@ -0,0 +1,261 @@
1
+ == Welcome to Rails
2
+
3
+ Rails is a web-application framework that includes everything needed to create
4
+ database-backed web applications according to the Model-View-Control pattern.
5
+
6
+ This pattern splits the view (also called the presentation) into "dumb"
7
+ templates that are primarily responsible for inserting pre-built data in between
8
+ HTML tags. The model contains the "smart" domain objects (such as Account,
9
+ Product, Person, Post) that holds all the business logic and knows how to
10
+ persist themselves to a database. The controller handles the incoming requests
11
+ (such as Save New Account, Update Product, Show Post) by manipulating the model
12
+ and directing data to the view.
13
+
14
+ In Rails, the model is handled by what's called an object-relational mapping
15
+ layer entitled Active Record. This layer allows you to present the data from
16
+ database rows as objects and embellish these data objects with business logic
17
+ methods. You can read more about Active Record in
18
+ link:files/vendor/rails/activerecord/README.html.
19
+
20
+ The controller and view are handled by the Action Pack, which handles both
21
+ layers by its two parts: Action View and Action Controller. These two layers
22
+ are bundled in a single package due to their heavy interdependence. This is
23
+ unlike the relationship between the Active Record and Action Pack that is much
24
+ more separate. Each of these packages can be used independently outside of
25
+ Rails. You can read more about Action Pack in
26
+ link:files/vendor/rails/actionpack/README.html.
27
+
28
+
29
+ == Getting Started
30
+
31
+ 1. At the command prompt, create a new Rails application:
32
+ <tt>rails new myapp</tt> (where <tt>myapp</tt> is the application name)
33
+
34
+ 2. Change directory to <tt>myapp</tt> and start the web server:
35
+ <tt>cd myapp; rails server</tt> (run with --help for options)
36
+
37
+ 3. Go to http://localhost:3000/ and you'll see:
38
+ "Welcome aboard: You're riding Ruby on Rails!"
39
+
40
+ 4. Follow the guidelines to start developing your application. You can find
41
+ the following resources handy:
42
+
43
+ * The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
44
+ * Ruby on Rails Tutorial Book: http://www.railstutorial.org/
45
+
46
+
47
+ == Debugging Rails
48
+
49
+ Sometimes your application goes wrong. Fortunately there are a lot of tools that
50
+ will help you debug it and get it back on the rails.
51
+
52
+ First area to check is the application log files. Have "tail -f" commands
53
+ running on the server.log and development.log. Rails will automatically display
54
+ debugging and runtime information to these files. Debugging info will also be
55
+ shown in the browser on requests from 127.0.0.1.
56
+
57
+ You can also log your own messages directly into the log file from your code
58
+ using the Ruby logger class from inside your controllers. Example:
59
+
60
+ class WeblogController < ActionController::Base
61
+ def destroy
62
+ @weblog = Weblog.find(params[:id])
63
+ @weblog.destroy
64
+ logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
65
+ end
66
+ end
67
+
68
+ The result will be a message in your log file along the lines of:
69
+
70
+ Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1!
71
+
72
+ More information on how to use the logger is at http://www.ruby-doc.org/core/
73
+
74
+ Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are
75
+ several books available online as well:
76
+
77
+ * Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe)
78
+ * Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
79
+
80
+ These two books will bring you up to speed on the Ruby language and also on
81
+ programming in general.
82
+
83
+
84
+ == Debugger
85
+
86
+ Debugger support is available through the debugger command when you start your
87
+ Mongrel or WEBrick server with --debugger. This means that you can break out of
88
+ execution at any point in the code, investigate and change the model, and then,
89
+ resume execution! You need to install ruby-debug to run the server in debugging
90
+ mode. With gems, use <tt>sudo gem install ruby-debug</tt>. Example:
91
+
92
+ class WeblogController < ActionController::Base
93
+ def index
94
+ @posts = Post.all
95
+ debugger
96
+ end
97
+ end
98
+
99
+ So the controller will accept the action, run the first line, then present you
100
+ with a IRB prompt in the server window. Here you can do things like:
101
+
102
+ >> @posts.inspect
103
+ => "[#<Post:0x14a6be8
104
+ @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>,
105
+ #<Post:0x14a6620
106
+ @attributes={"title"=>"Rails", "body"=>"Only ten..", "id"=>"2"}>]"
107
+ >> @posts.first.title = "hello from a debugger"
108
+ => "hello from a debugger"
109
+
110
+ ...and even better, you can examine how your runtime objects actually work:
111
+
112
+ >> f = @posts.first
113
+ => #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
114
+ >> f.
115
+ Display all 152 possibilities? (y or n)
116
+
117
+ Finally, when you're ready to resume execution, you can enter "cont".
118
+
119
+
120
+ == Console
121
+
122
+ The console is a Ruby shell, which allows you to interact with your
123
+ application's domain model. Here you'll have all parts of the application
124
+ configured, just like it is when the application is running. You can inspect
125
+ domain models, change values, and save to the database. Starting the script
126
+ without arguments will launch it in the development environment.
127
+
128
+ To start the console, run <tt>rails console</tt> from the application
129
+ directory.
130
+
131
+ Options:
132
+
133
+ * Passing the <tt>-s, --sandbox</tt> argument will rollback any modifications
134
+ made to the database.
135
+ * Passing an environment name as an argument will load the corresponding
136
+ environment. Example: <tt>rails console production</tt>.
137
+
138
+ To reload your controllers and models after launching the console run
139
+ <tt>reload!</tt>
140
+
141
+ More information about irb can be found at:
142
+ link:http://www.rubycentral.org/pickaxe/irb.html
143
+
144
+
145
+ == dbconsole
146
+
147
+ You can go to the command line of your database directly through <tt>rails
148
+ dbconsole</tt>. You would be connected to the database with the credentials
149
+ defined in database.yml. Starting the script without arguments will connect you
150
+ to the development database. Passing an argument will connect you to a different
151
+ database, like <tt>rails dbconsole production</tt>. Currently works for MySQL,
152
+ PostgreSQL and SQLite 3.
153
+
154
+ == Description of Contents
155
+
156
+ The default directory structure of a generated Ruby on Rails application:
157
+
158
+ |-- app
159
+ | |-- assets
160
+ | |-- images
161
+ | |-- javascripts
162
+ | `-- stylesheets
163
+ | |-- controllers
164
+ | |-- helpers
165
+ | |-- mailers
166
+ | |-- models
167
+ | `-- views
168
+ | `-- layouts
169
+ |-- config
170
+ | |-- environments
171
+ | |-- initializers
172
+ | `-- locales
173
+ |-- db
174
+ |-- doc
175
+ |-- lib
176
+ | `-- tasks
177
+ |-- log
178
+ |-- public
179
+ |-- script
180
+ |-- test
181
+ | |-- fixtures
182
+ | |-- functional
183
+ | |-- integration
184
+ | |-- performance
185
+ | `-- unit
186
+ |-- tmp
187
+ | |-- cache
188
+ | |-- pids
189
+ | |-- sessions
190
+ | `-- sockets
191
+ `-- vendor
192
+ |-- assets
193
+ `-- stylesheets
194
+ `-- plugins
195
+
196
+ app
197
+ Holds all the code that's specific to this particular application.
198
+
199
+ app/assets
200
+ Contains subdirectories for images, stylesheets, and JavaScript files.
201
+
202
+ app/controllers
203
+ Holds controllers that should be named like weblogs_controller.rb for
204
+ automated URL mapping. All controllers should descend from
205
+ ApplicationController which itself descends from ActionController::Base.
206
+
207
+ app/models
208
+ Holds models that should be named like post.rb. Models descend from
209
+ ActiveRecord::Base by default.
210
+
211
+ app/views
212
+ Holds the template files for the view that should be named like
213
+ weblogs/index.html.erb for the WeblogsController#index action. All views use
214
+ eRuby syntax by default.
215
+
216
+ app/views/layouts
217
+ Holds the template files for layouts to be used with views. This models the
218
+ common header/footer method of wrapping views. In your views, define a layout
219
+ using the <tt>layout :default</tt> and create a file named default.html.erb.
220
+ Inside default.html.erb, call <% yield %> to render the view using this
221
+ layout.
222
+
223
+ app/helpers
224
+ Holds view helpers that should be named like weblogs_helper.rb. These are
225
+ generated for you automatically when using generators for controllers.
226
+ Helpers can be used to wrap functionality for your views into methods.
227
+
228
+ config
229
+ Configuration files for the Rails environment, the routing map, the database,
230
+ and other dependencies.
231
+
232
+ db
233
+ Contains the database schema in schema.rb. db/migrate contains all the
234
+ sequence of Migrations for your schema.
235
+
236
+ doc
237
+ This directory is where your application documentation will be stored when
238
+ generated using <tt>rake doc:app</tt>
239
+
240
+ lib
241
+ Application specific libraries. Basically, any kind of custom code that
242
+ doesn't belong under controllers, models, or helpers. This directory is in
243
+ the load path.
244
+
245
+ public
246
+ The directory available for the web server. Also contains the dispatchers and the
247
+ default HTML files. This should be set as the DOCUMENT_ROOT of your web
248
+ server.
249
+
250
+ script
251
+ Helper scripts for automation and generation.
252
+
253
+ test
254
+ Unit and functional tests along with fixtures. When using the rails generate
255
+ command, template test files will be generated for you and placed in this
256
+ directory.
257
+
258
+ vendor
259
+ External libraries that the application depends on. Also includes the plugins
260
+ subdirectory. If the app has frozen rails, those gems also go here, under
261
+ vendor/rails/. This directory is in the load path.
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env rake
2
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
3
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4
+
5
+ require File.expand_path('../config/application', __FILE__)
6
+
7
+ Dummy::Application.load_tasks
@@ -0,0 +1,15 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // the compiled file.
9
+ //
10
+ // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
+ // GO AFTER THE REQUIRES BELOW.
12
+ //
13
+ //= require jquery
14
+ //= require jquery_ujs
15
+ //= require_tree .
@@ -0,0 +1,13 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require_tree .
13
+ */
@@ -0,0 +1,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,7 @@
1
+ class Ckeditor::Asset < ActiveRecord::Base
2
+ include Ckeditor::Orm::ActiveRecord::AssetBase
3
+
4
+ delegate :url, :current_path, :size, :content_type, :filename, :to => :data
5
+
6
+ validates_presence_of :data
7
+ end
@@ -0,0 +1,7 @@
1
+ class Ckeditor::AttachmentFile < Ckeditor::Asset
2
+ mount_uploader :data, CkeditorAttachmentFileUploader, :mount_on => :data_file_name
3
+
4
+ def url_thumb
5
+ @url_thumb ||= Ckeditor::Utils.filethumb(filename)
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ class Ckeditor::Picture < Ckeditor::Asset
2
+ mount_uploader :data, CkeditorPictureUploader, :mount_on => :data_file_name
3
+
4
+ def url_content
5
+ url(:content)
6
+ end
7
+ end
@@ -0,0 +1,42 @@
1
+ # encoding: utf-8
2
+ class CkeditorAttachmentFileUploader < CarrierWave::Uploader::Base
3
+ include Ckeditor::Backend::CarrierWave
4
+
5
+ # Include RMagick or ImageScience support:
6
+ # include CarrierWave::RMagick
7
+ # include CarrierWave::MiniMagick
8
+ # include CarrierWave::ImageScience
9
+
10
+ # Choose what kind of storage to use for this uploader:
11
+ storage :file
12
+
13
+ # Override the directory where uploaded files will be stored.
14
+ # This is a sensible default for uploaders that are meant to be mounted:
15
+ def store_dir
16
+ "uploads/ckeditor/attachments/#{model.id}"
17
+ end
18
+
19
+ # Provide a default URL as a default if there hasn't been a file uploaded:
20
+ # def default_url
21
+ # "/images/fallback/" + [version_name, "default.png"].compact.join('_')
22
+ # end
23
+
24
+ # Process files as they are uploaded:
25
+ # process :scale => [200, 300]
26
+ #
27
+ # def scale(width, height)
28
+ # # do something
29
+ # end
30
+
31
+ # Add a white list of extensions which are allowed to be uploaded.
32
+ # For images you might use something like this:
33
+ def extension_white_list
34
+ Ckeditor.attachment_file_types
35
+ end
36
+
37
+ # Override the filename of the uploaded files:
38
+ # Avoid using model.id or version_name here, see uploader/store.rb for details.
39
+ # def filename
40
+ # "something.jpg" if original_filename
41
+ # end
42
+ end
@@ -0,0 +1,53 @@
1
+ # encoding: utf-8
2
+ class CkeditorPictureUploader < CarrierWave::Uploader::Base
3
+ include Ckeditor::Backend::CarrierWave
4
+
5
+ # Include RMagick or ImageScience support:
6
+ # include CarrierWave::RMagick
7
+ include CarrierWave::MiniMagick
8
+ # include CarrierWave::ImageScience
9
+
10
+ # Choose what kind of storage to use for this uploader:
11
+ storage :file
12
+
13
+ # Override the directory where uploaded files will be stored.
14
+ # This is a sensible default for uploaders that are meant to be mounted:
15
+ def store_dir
16
+ "uploads/ckeditor/pictures/#{model.id}"
17
+ end
18
+
19
+ # Provide a default URL as a default if there hasn't been a file uploaded:
20
+ # def default_url
21
+ # "/images/fallback/" + [version_name, "default.png"].compact.join('_')
22
+ # end
23
+
24
+ # Process files as they are uploaded:
25
+ # process :scale => [200, 300]
26
+ #
27
+ # def scale(width, height)
28
+ # # do something
29
+ # end
30
+
31
+ process :read_dimensions
32
+
33
+ # Create different versions of your uploaded files:
34
+ version :thumb do
35
+ process :resize_to_fill => [118, 100]
36
+ end
37
+
38
+ version :content do
39
+ process :resize_to_limit => [800, 800]
40
+ end
41
+
42
+ # Add a white list of extensions which are allowed to be uploaded.
43
+ # For images you might use something like this:
44
+ def extension_white_list
45
+ Ckeditor.image_file_types
46
+ end
47
+
48
+ # Override the filename of the uploaded files:
49
+ # Avoid using model.id or version_name here, see uploader/store.rb for details.
50
+ # def filename
51
+ # "something.jpg" if original_filename
52
+ # end
53
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag "application", :media => "all" %>
6
+ <%= javascript_include_tag "application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,60 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require
6
+ require "jc_cms"
7
+
8
+
9
+ module Dummy
10
+ class Application < Rails::Application
11
+ # Settings in config/environments/* take precedence over those specified here.
12
+ # Application configuration should go into files in config/initializers
13
+ # -- all .rb files in that directory are automatically loaded.
14
+
15
+ # Custom directories with classes and modules you want to be autoloadable.
16
+ # config.autoload_paths += %W(#{config.root}/extras)
17
+
18
+ # Only load the plugins named here, in the order given (default is alphabetical).
19
+ # :all can be used as a placeholder for all plugins not explicitly named.
20
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
21
+
22
+ # Activate observers that should always be running.
23
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
24
+
25
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
26
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
27
+ # config.time_zone = 'Central Time (US & Canada)'
28
+
29
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
30
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
31
+ config.i18n.default_locale = :pl
32
+
33
+ # Configure the default encoding used in templates for Ruby 1.9.
34
+ config.encoding = "utf-8"
35
+
36
+ # Configure sensitive parameters which will be filtered from the log file.
37
+ config.filter_parameters += [:password]
38
+
39
+ # Enable escaping HTML in JSON.
40
+ config.active_support.escape_html_entities_in_json = true
41
+
42
+ # Use SQL instead of Active Record's schema dumper when creating the database.
43
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
44
+ # like if you have constraints or database-specific column types
45
+ # config.active_record.schema_format = :sql
46
+
47
+ # Enforce whitelist mode for mass assignment.
48
+ # This will create an empty whitelist of attributes available for mass-assignment for all models
49
+ # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
50
+ # parameters by using an attr_accessible or attr_protected declaration.
51
+ config.active_record.whitelist_attributes = true
52
+
53
+ # Enable the asset pipeline
54
+ config.assets.enabled = true
55
+
56
+ # Version of your assets, change this if you want to expire all your assets
57
+ config.assets.version = '1.0'
58
+ end
59
+ end
60
+
@@ -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,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ development:
7
+ adapter: sqlite3
8
+ database: db/development.sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ # Warning: The database defined as "test" will be erased and
13
+ # re-generated from your development database when you run "rake".
14
+ # Do not set this db to the same as development or production.
15
+ test:
16
+ adapter: sqlite3
17
+ database: db/test.sqlite3
18
+ pool: 5
19
+ timeout: 5000
20
+
21
+ production:
22
+ adapter: sqlite3
23
+ database: db/production.sqlite3
24
+ pool: 5
25
+ timeout: 5000
@@ -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,37 @@
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 web server 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_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger
20
+ config.active_support.deprecation = :log
21
+
22
+ # Only use best-standards-support built into browsers
23
+ config.action_dispatch.best_standards_support = :builtin
24
+
25
+ # Raise exception on mass assignment protection for Active Record models
26
+ config.active_record.mass_assignment_sanitizer = :strict
27
+
28
+ # Log the query plan for queries taking more than this (works
29
+ # with SQLite, MySQL, and PostgreSQL)
30
+ config.active_record.auto_explain_threshold_in_seconds = 0.5
31
+
32
+ # Do not compress assets
33
+ config.assets.compress = false
34
+
35
+ # Expands the lines which load the assets
36
+ config.assets.debug = true
37
+ end
@@ -0,0 +1,67 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # Code is not reloaded between requests
5
+ config.cache_classes = true
6
+
7
+ # Full error reports are disabled and caching is turned on
8
+ config.consider_all_requests_local = false
9
+ config.action_controller.perform_caching = true
10
+
11
+ # Disable Rails's static asset server (Apache or nginx will already do this)
12
+ config.serve_static_assets = false
13
+
14
+ # Compress JavaScripts and CSS
15
+ config.assets.compress = true
16
+
17
+ # Don't fallback to assets pipeline if a precompiled asset is missed
18
+ config.assets.compile = false
19
+
20
+ # Generate digests for assets URLs
21
+ config.assets.digest = true
22
+
23
+ # Defaults to nil and saved in location specified by config.assets.prefix
24
+ # config.assets.manifest = YOUR_PATH
25
+
26
+ # Specifies the header that your server uses for sending files
27
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
29
+
30
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
+ # config.force_ssl = true
32
+
33
+ # See everything in the log (default is :info)
34
+ # config.log_level = :debug
35
+
36
+ # Prepend all log lines with the following tags
37
+ # config.log_tags = [ :subdomain, :uuid ]
38
+
39
+ # Use a different logger for distributed setups
40
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41
+
42
+ # Use a different cache store in production
43
+ # config.cache_store = :mem_cache_store
44
+
45
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
46
+ # config.action_controller.asset_host = "http://assets.example.com"
47
+
48
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49
+ # config.assets.precompile += %w( search.js )
50
+
51
+ # Disable delivery errors, bad email addresses will be ignored
52
+ # config.action_mailer.raise_delivery_errors = false
53
+
54
+ # Enable threaded mode
55
+ # config.threadsafe!
56
+
57
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58
+ # the I18n.default_locale when a translation can not be found)
59
+ config.i18n.fallbacks = true
60
+
61
+ # Send deprecation notices to registered listeners
62
+ config.active_support.deprecation = :notify
63
+
64
+ # Log the query plan for queries taking more than this (works
65
+ # with SQLite, MySQL, and PostgreSQL)
66
+ # config.active_record.auto_explain_threshold_in_seconds = 0.5
67
+ end