rich 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (233) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +163 -0
  3. data/Rakefile +39 -0
  4. data/app/assets/images/rich/images.png +0 -0
  5. data/app/assets/images/rich/plus-red.png +0 -0
  6. data/app/assets/images/rich/plus.png +0 -0
  7. data/app/assets/images/rich/x-red.png +0 -0
  8. data/app/assets/javascripts/rich/application.js +61 -0
  9. data/app/assets/javascripts/rich/base.js +51 -0
  10. data/app/assets/javascripts/rich/ckeditor_path.js +1 -0
  11. data/app/assets/javascripts/rich/uploader.js +59 -0
  12. data/app/assets/stylesheets/rich/application.css.scss +253 -0
  13. data/app/assets/stylesheets/rich/editor.css +20 -0
  14. data/app/assets/stylesheets/rich/files.css +4 -0
  15. data/app/assets/stylesheets/rich/mixins/reset.css.scss +58 -0
  16. data/app/controllers/rich/application_controller.rb +11 -0
  17. data/app/controllers/rich/files_controller.rb +107 -0
  18. data/app/helpers/rich/application_helper.rb +4 -0
  19. data/app/helpers/rich/files_helper.rb +4 -0
  20. data/app/inputs/rich_input.rb +14 -0
  21. data/app/models/rich/rich_image.rb +77 -0
  22. data/app/views/layouts/rich/application.html.erb +14 -0
  23. data/app/views/rich/files/_image.html.erb +9 -0
  24. data/app/views/rich/files/destroy.js.erb +1 -0
  25. data/app/views/rich/files/index.html.erb +29 -0
  26. data/app/views/rich/files/show.html.erb +1 -0
  27. data/config/routes.rb +5 -0
  28. data/db/migrate/20111002142937_create_rich_rich_images.rb +17 -0
  29. data/lib/generators/rich/install/install_generator.rb +34 -0
  30. data/lib/generators/rich/install/templates/rich.js +1 -0
  31. data/lib/generators/rich/install/templates/rich.rb.erb +69 -0
  32. data/lib/rich.rb +63 -0
  33. data/lib/rich/engine.rb +13 -0
  34. data/lib/rich/form_builder.rb +14 -0
  35. data/lib/rich/legacy_formtastic.rb +15 -0
  36. data/lib/rich/version.rb +3 -0
  37. data/lib/rich/view_helper.rb +48 -0
  38. data/lib/tasks/rich_tasks.rake +29 -0
  39. data/test/dummy/Rakefile +7 -0
  40. data/test/dummy/app/admin/dashboards.rb +38 -0
  41. data/test/dummy/app/admin/posts.rb +11 -0
  42. data/test/dummy/app/assets/javascripts/active_admin.js +1 -0
  43. data/test/dummy/app/assets/javascripts/application.js +9 -0
  44. data/test/dummy/app/assets/javascripts/posts.js +2 -0
  45. data/test/dummy/app/assets/javascripts/rich.js +1 -0
  46. data/test/dummy/app/assets/stylesheets/active_admin.css.scss +10 -0
  47. data/test/dummy/app/assets/stylesheets/application.css +7 -0
  48. data/test/dummy/app/assets/stylesheets/posts.css +4 -0
  49. data/test/dummy/app/assets/stylesheets/rich/editor.css +20 -0
  50. data/test/dummy/app/assets/stylesheets/scaffold.css +56 -0
  51. data/test/dummy/app/controllers/application_controller.rb +3 -0
  52. data/test/dummy/app/controllers/posts_controller.rb +83 -0
  53. data/test/dummy/app/helpers/application_helper.rb +2 -0
  54. data/test/dummy/app/helpers/posts_helper.rb +2 -0
  55. data/test/dummy/app/models/admin_user.rb +9 -0
  56. data/test/dummy/app/models/post.rb +2 -0
  57. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  58. data/test/dummy/app/views/posts/_form.html.erb +29 -0
  59. data/test/dummy/app/views/posts/_formtastic_form.html.erb +10 -0
  60. data/test/dummy/app/views/posts/edit.html.erb +6 -0
  61. data/test/dummy/app/views/posts/index.html.erb +27 -0
  62. data/test/dummy/app/views/posts/new.html.erb +5 -0
  63. data/test/dummy/app/views/posts/show.html.erb +20 -0
  64. data/test/dummy/config.ru +4 -0
  65. data/test/dummy/config/application.rb +48 -0
  66. data/test/dummy/config/boot.rb +19 -0
  67. data/test/dummy/config/database.yml +25 -0
  68. data/test/dummy/config/environment.rb +5 -0
  69. data/test/dummy/config/environments/development.rb +32 -0
  70. data/test/dummy/config/environments/production.rb +62 -0
  71. data/test/dummy/config/environments/test.rb +39 -0
  72. data/test/dummy/config/initializers/active_admin.rb +102 -0
  73. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  74. data/test/dummy/config/initializers/devise.rb +211 -0
  75. data/test/dummy/config/initializers/formtastic.rb +80 -0
  76. data/test/dummy/config/initializers/inflections.rb +10 -0
  77. data/test/dummy/config/initializers/mime_types.rb +5 -0
  78. data/test/dummy/config/initializers/rich.rb +28 -0
  79. data/test/dummy/config/initializers/secret_token.rb +7 -0
  80. data/test/dummy/config/initializers/session_store.rb +8 -0
  81. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  82. data/test/dummy/config/locales/devise.en.yml +58 -0
  83. data/test/dummy/config/locales/en.yml +5 -0
  84. data/test/dummy/config/routes.rb +13 -0
  85. data/test/dummy/db/development.sqlite3 +0 -0
  86. data/test/dummy/db/migrate/20111001122048_create_posts.rb +11 -0
  87. data/test/dummy/db/migrate/20111003150957_create_rich_rich_images.rb +17 -0
  88. data/test/dummy/db/migrate/20111014123344_devise_create_admin_users.rb +31 -0
  89. data/test/dummy/db/migrate/20111014143348_create_admin_notes.rb +16 -0
  90. data/test/dummy/db/migrate/20111014143349_move_admin_notes_to_comments.rb +25 -0
  91. data/test/dummy/db/production.sqlite3 +0 -0
  92. data/test/dummy/db/schema.rb +67 -0
  93. data/test/dummy/log/development.log +72064 -0
  94. data/test/dummy/log/production.log +2417 -0
  95. data/test/dummy/public/404.html +26 -0
  96. data/test/dummy/public/422.html +26 -0
  97. data/test/dummy/public/500.html +26 -0
  98. data/test/dummy/public/favicon.ico +0 -0
  99. data/test/dummy/public/system/test +0 -0
  100. data/test/dummy/script/rails +6 -0
  101. data/test/dummy/test/fixtures/admin_users.yml +11 -0
  102. data/test/dummy/test/fixtures/posts.yml +11 -0
  103. data/test/dummy/test/functional/posts_controller_test.rb +49 -0
  104. data/test/dummy/test/unit/admin_user_test.rb +7 -0
  105. data/test/dummy/test/unit/helpers/posts_helper_test.rb +4 -0
  106. data/test/dummy/test/unit/post_test.rb +7 -0
  107. data/test/dummy/tmp/cache/assets/C2B/5B0/sprockets%2F0c71315129cf9540624929678219ee7b +0 -0
  108. data/test/dummy/tmp/cache/assets/C32/C40/sprockets%2Ff459d7671964c49e413971720514ba68 +0 -0
  109. data/test/dummy/tmp/cache/assets/C51/3D0/sprockets%2F110c288a88ab99a1399d35171079612c +0 -0
  110. data/test/dummy/tmp/cache/assets/C53/630/sprockets%2F0680b1b2c967d3c84970e3786800641c +0 -0
  111. data/test/dummy/tmp/cache/assets/C53/680/sprockets%2F03d11661470de7443c495783330d9ee7 +0 -0
  112. data/test/dummy/tmp/cache/assets/C7F/C10/sprockets%2F356f0929a286c961448d76c12a2e14b1 +0 -0
  113. data/test/dummy/tmp/cache/assets/C8D/E30/sprockets%2F24444bdc865de860f4b693233c973844 +0 -0
  114. data/test/dummy/tmp/cache/assets/C99/430/sprockets%2F1027b261dc3bd6202585ad4d830263c6 +0 -0
  115. data/test/dummy/tmp/cache/assets/CAB/440/sprockets%2Fed2218494b3b8488b7268c00e717a0c1 +0 -0
  116. data/test/dummy/tmp/cache/assets/CB3/920/sprockets%2Fc38c48651c972cee0be83538700535b4 +0 -0
  117. data/test/dummy/tmp/cache/assets/CB4/740/sprockets%2F36fd3817633b234824bc6577f25ffe01 +0 -0
  118. data/test/dummy/tmp/cache/assets/CBE/A80/sprockets%2F60bb9087aed9745744925f6ce01525d9 +0 -0
  119. data/test/dummy/tmp/cache/assets/CC4/040/sprockets%2F83a9f5f7314b761bbd7f1858d1998045 +0 -0
  120. data/test/dummy/tmp/cache/assets/CC4/590/sprockets%2F869369b5c848f745b23ba174ca9197a6 +0 -0
  121. data/test/dummy/tmp/cache/assets/CC4/BF0/sprockets%2F93d5b131135a09e48369e02ba5c01b0a +0 -0
  122. data/test/dummy/tmp/cache/assets/CC7/5F0/sprockets%2F8bf37168fb70e08b9e4578e72739a543 +0 -0
  123. data/test/dummy/tmp/cache/assets/CD5/340/sprockets%2Fae698307143f445c5011d6ad90b4cf60 +0 -0
  124. data/test/dummy/tmp/cache/assets/CDD/D50/sprockets%2Faee2002e4369cf20946112efcb776089 +0 -0
  125. data/test/dummy/tmp/cache/assets/CE4/510/sprockets%2F3271d0cbd86553a56768f4d130ec5e59 +0 -0
  126. data/test/dummy/tmp/cache/assets/CE8/310/sprockets%2F4ab24984d5862f28160f1f4f067e2ef4 +0 -0
  127. data/test/dummy/tmp/cache/assets/CEC/1A0/sprockets%2F87fdead6014b961bb870b5931890d677 +0 -0
  128. data/test/dummy/tmp/cache/assets/CED/2E0/sprockets%2F82382552d084b0569dfd88e34d1cb7e8 +0 -0
  129. data/test/dummy/tmp/cache/assets/CF0/1D0/sprockets%2F6fc757c2c8329244ca95d6909865bbc2 +0 -0
  130. data/test/dummy/tmp/cache/assets/CF0/A80/sprockets%2Fd1de761043f6d817880d4b876a73bf87 +0 -0
  131. data/test/dummy/tmp/cache/assets/CF9/EC0/sprockets%2F04ba1f02c639d30c53eb7b51640b937a +0 -0
  132. data/test/dummy/tmp/cache/assets/CFB/870/sprockets%2Feb5658a4a2c12e389e4c405f0113a0a7 +0 -0
  133. data/test/dummy/tmp/cache/assets/D00/7A0/sprockets%2F3ee0dfa5072b54505817cb4bf934201e +0 -0
  134. data/test/dummy/tmp/cache/assets/D00/C00/sprockets%2F0a61e8d7b11a463083da24605e65d5dd +0 -0
  135. data/test/dummy/tmp/cache/assets/D07/B30/sprockets%2F0640b99ec5e303921065ac4c0ff8b7f0 +0 -0
  136. data/test/dummy/tmp/cache/assets/D11/D20/sprockets%2Fcac21eac42152981882bf9e489316af4 +0 -0
  137. data/test/dummy/tmp/cache/assets/D13/970/sprockets%2F1fd634278255bc58382a590fd5cf24cc +0 -0
  138. data/test/dummy/tmp/cache/assets/D14/980/sprockets%2F85dc72862eb259cd954ab41369bc6a32 +0 -0
  139. data/test/dummy/tmp/cache/assets/D15/F40/sprockets%2F83d1a8006e470e79f75592d63bdedc04 +0 -0
  140. data/test/dummy/tmp/cache/assets/D16/C70/sprockets%2Fd3046a8979c64b4311a728da2ee8b88b +0 -0
  141. data/test/dummy/tmp/cache/assets/D1D/1A0/sprockets%2Fc2e11e4152a31726c2cbab7333c74ba2 +0 -0
  142. data/test/dummy/tmp/cache/assets/D1D/500/sprockets%2F71e1de34b5d39e4c637f0fb0619696f7 +0 -0
  143. data/test/dummy/tmp/cache/assets/D1F/B30/sprockets%2F6351ed750b17ed0f99fa01c32ff98878 +0 -0
  144. data/test/dummy/tmp/cache/assets/D2A/FA0/sprockets%2Fa5403e1fe15018cddc4435c3cac84910 +0 -0
  145. data/test/dummy/tmp/cache/assets/D2E/090/sprockets%2Fc54283e81ce52bf9d542ab12492a01ad +0 -0
  146. data/test/dummy/tmp/cache/assets/D2F/390/sprockets%2Fa02968dd653b0e650fc202c33ff42fc0 +0 -0
  147. data/test/dummy/tmp/cache/assets/D30/E90/sprockets%2F3a19bbe0320337a6bf29177da71bf1e7 +0 -0
  148. data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  149. data/test/dummy/tmp/cache/assets/D34/080/sprockets%2Fe398005214c8d65a54fc19fca2c00c8b +0 -0
  150. data/test/dummy/tmp/cache/assets/D37/9B0/sprockets%2F0de49dd3031c50c7cf2ef74d6c392530 +0 -0
  151. data/test/dummy/tmp/cache/assets/D38/540/sprockets%2F86e1ad844bc9df4491a2a52b870421db +0 -0
  152. data/test/dummy/tmp/cache/assets/D3C/070/sprockets%2F2377eb8a729535e35abd593a6fc00ba6 +0 -0
  153. data/test/dummy/tmp/cache/assets/D3E/B20/sprockets%2F1f79ee84bd6d74d100c5cb018b662b67 +0 -0
  154. data/test/dummy/tmp/cache/assets/D40/A40/sprockets%2Feb59c65dcb7136f1cd134dac36794822 +0 -0
  155. data/test/dummy/tmp/cache/assets/D48/9F0/sprockets%2F6ed3c460867ee6d748edad50818d332a +0 -0
  156. data/test/dummy/tmp/cache/assets/D4D/650/sprockets%2Ff51d1875ad5829c7bf3ff03e920497be +0 -0
  157. data/test/dummy/tmp/cache/assets/D52/9B0/sprockets%2F736738bf59f956eb15c4bff06d980be0 +0 -0
  158. data/test/dummy/tmp/cache/assets/D54/ED0/sprockets%2F71c9fa01091d432b131da3bb73faf3d4 +0 -0
  159. data/test/dummy/tmp/cache/assets/D55/5C0/sprockets%2F97b52c1c0d1a002ac6fb9d702b7ab625 +0 -0
  160. data/test/dummy/tmp/cache/assets/D61/940/sprockets%2Fca03651b8f5fb1416c9945cda71ab22d +0 -0
  161. data/test/dummy/tmp/cache/assets/D6C/F90/sprockets%2Fcb34e531e41b981cf6ca2a5c7e70f890 +0 -0
  162. data/test/dummy/tmp/cache/assets/D78/9D0/sprockets%2Ff56eced46698105ad2e9d46b1e2ee228 +0 -0
  163. data/test/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 +0 -0
  164. data/test/dummy/tmp/cache/assets/D86/710/sprockets%2F409dbeb796f68c91b60fe29aef7817e3 +0 -0
  165. data/test/dummy/tmp/cache/assets/D95/D50/sprockets%2F15e32d81de6597aad23d67d2cd1d0b7a +0 -0
  166. data/test/dummy/tmp/cache/assets/D96/E90/sprockets%2Ff43f31dd3e2d9f8eda108c01c42bd457 +0 -0
  167. data/test/dummy/tmp/cache/assets/D98/BF0/sprockets%2F132c8dc4d7ba67c8faee429e5064a02c +0 -0
  168. data/test/dummy/tmp/cache/assets/D9C/CD0/sprockets%2Fc85016e7bbd4f3adbb7635d01f85d39b +0 -0
  169. data/test/dummy/tmp/cache/assets/DB9/240/sprockets%2F689d916cf738bdb67e176fced176e3af +0 -0
  170. data/test/dummy/tmp/cache/assets/DBA/AB0/sprockets%2F8be4208fd77cb5ef9b6f77e5fcf18670 +0 -0
  171. data/test/dummy/tmp/cache/assets/DC5/450/sprockets%2F82d256faac73d9a3ec5c4f1d11be525d +0 -0
  172. data/test/dummy/tmp/cache/assets/DC6/890/sprockets%2F41b80fcec0c085408c41ecadc877df0f +0 -0
  173. data/test/dummy/tmp/cache/assets/DCE/890/sprockets%2Ffd6332ebff4dab12cdf448e195d6b381 +0 -0
  174. data/test/dummy/tmp/cache/assets/DD7/B50/sprockets%2F7effa89c4b23ab60109f969a9a66ccbc +0 -0
  175. data/test/dummy/tmp/cache/assets/DDE/420/sprockets%2Ffb8b186d5bf0307f86f65fc787d2adeb +0 -0
  176. data/test/dummy/tmp/cache/assets/DE7/7C0/sprockets%2F75aa5c034633c20d9c4d1bffbbbdc23d +0 -0
  177. data/test/dummy/tmp/cache/assets/DF0/680/sprockets%2F5e8210564bdda6fcef1fa19aa04b5e6a +0 -0
  178. data/test/dummy/tmp/cache/assets/DFB/0C0/sprockets%2Fd35f36529da4a7a4cf67cdbe0a3bf27e +0 -0
  179. data/test/dummy/tmp/cache/assets/DFF/4D0/sprockets%2F0d7eae306cc4e83ae549e96b1b6da8db +0 -0
  180. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  181. data/test/dummy/tmp/cache/assets/E06/920/sprockets%2F6baa37d1c26468aef4fe5fe4bf982fa3 +0 -0
  182. data/test/dummy/tmp/cache/assets/E09/680/sprockets%2Fff9edf3a74399a0818b02efcff3ad0f7 +0 -0
  183. data/test/dummy/tmp/cache/assets/E0B/8B0/sprockets%2F35f64adcaf8786c81c0def5dd2ff47d3 +0 -0
  184. data/test/dummy/tmp/cache/assets/E2F/E90/sprockets%2Ff4b19e42c92a93dcaaec9fe6eae4081d +0 -0
  185. data/test/dummy/tmp/cache/sass/12aeefe9aeb071fe3d12ce952e92dfc373eac603/_base.css.scssc +0 -0
  186. data/test/dummy/tmp/cache/sass/12aeefe9aeb071fe3d12ce952e92dfc373eac603/_forms.css.scssc +0 -0
  187. data/test/dummy/tmp/cache/sass/12aeefe9aeb071fe3d12ce952e92dfc373eac603/_header.css.scssc +0 -0
  188. data/test/dummy/tmp/cache/sass/12aeefe9aeb071fe3d12ce952e92dfc373eac603/_mixins.css.scssc +0 -0
  189. data/test/dummy/tmp/cache/sass/12aeefe9aeb071fe3d12ce952e92dfc373eac603/_typography.css.scssc +0 -0
  190. data/test/dummy/tmp/cache/sass/4042a1944de48cf2066ee5650a418db4b1d7f0a1/_base.css.scssc +0 -0
  191. data/test/dummy/tmp/cache/sass/4042a1944de48cf2066ee5650a418db4b1d7f0a1/_forms.css.scssc +0 -0
  192. data/test/dummy/tmp/cache/sass/4042a1944de48cf2066ee5650a418db4b1d7f0a1/_header.css.scssc +0 -0
  193. data/test/dummy/tmp/cache/sass/4042a1944de48cf2066ee5650a418db4b1d7f0a1/_mixins.css.scssc +0 -0
  194. data/test/dummy/tmp/cache/sass/4042a1944de48cf2066ee5650a418db4b1d7f0a1/_typography.css.scssc +0 -0
  195. data/test/dummy/tmp/cache/sass/4905b1148d31ac1351d8ccf185fbd2494a596795/application.css.scssc +0 -0
  196. data/test/dummy/tmp/cache/sass/4f667cf792197ab0525ceee5448b803db81dab90/_comments.css.scssc +0 -0
  197. data/test/dummy/tmp/cache/sass/4f667cf792197ab0525ceee5448b803db81dab90/_date_picker.css.scssc +0 -0
  198. data/test/dummy/tmp/cache/sass/4f667cf792197ab0525ceee5448b803db81dab90/_flash_messages.css.scssc +0 -0
  199. data/test/dummy/tmp/cache/sass/4f667cf792197ab0525ceee5448b803db81dab90/_tables.css.scssc +0 -0
  200. data/test/dummy/tmp/cache/sass/76bbe61bc8118aa78e4db81878cf11d79a964373/_all.css.scssc +0 -0
  201. data/test/dummy/tmp/cache/sass/76bbe61bc8118aa78e4db81878cf11d79a964373/_buttons.css.scssc +0 -0
  202. data/test/dummy/tmp/cache/sass/76bbe61bc8118aa78e4db81878cf11d79a964373/_gradients.css.scssc +0 -0
  203. data/test/dummy/tmp/cache/sass/76bbe61bc8118aa78e4db81878cf11d79a964373/_icons.css.scssc +0 -0
  204. data/test/dummy/tmp/cache/sass/76bbe61bc8118aa78e4db81878cf11d79a964373/_reset.css.scssc +0 -0
  205. data/test/dummy/tmp/cache/sass/76bbe61bc8118aa78e4db81878cf11d79a964373/_rounded.css.scssc +0 -0
  206. data/test/dummy/tmp/cache/sass/76bbe61bc8118aa78e4db81878cf11d79a964373/_sections.css.scssc +0 -0
  207. data/test/dummy/tmp/cache/sass/76bbe61bc8118aa78e4db81878cf11d79a964373/_shadows.css.scssc +0 -0
  208. data/test/dummy/tmp/cache/sass/76bbe61bc8118aa78e4db81878cf11d79a964373/_utilities.scssc +0 -0
  209. data/test/dummy/tmp/cache/sass/76bbe61bc8118aa78e4db81878cf11d79a964373/_variables.css.scssc +0 -0
  210. data/test/dummy/tmp/cache/sass/9b29130c260e464c0ad2c23c77a58da7c3f9eec7/active_admin.css.scssc +0 -0
  211. data/test/dummy/tmp/cache/sass/dc62b2f303532e1c32e9571414568d9c2570f335/_all.css.scssc +0 -0
  212. data/test/dummy/tmp/cache/sass/dc62b2f303532e1c32e9571414568d9c2570f335/_buttons.css.scssc +0 -0
  213. data/test/dummy/tmp/cache/sass/dc62b2f303532e1c32e9571414568d9c2570f335/_gradients.css.scssc +0 -0
  214. data/test/dummy/tmp/cache/sass/dc62b2f303532e1c32e9571414568d9c2570f335/_icons.css.scssc +0 -0
  215. data/test/dummy/tmp/cache/sass/dc62b2f303532e1c32e9571414568d9c2570f335/_reset.css.scssc +0 -0
  216. data/test/dummy/tmp/cache/sass/dc62b2f303532e1c32e9571414568d9c2570f335/_rounded.css.scssc +0 -0
  217. data/test/dummy/tmp/cache/sass/dc62b2f303532e1c32e9571414568d9c2570f335/_sections.css.scssc +0 -0
  218. data/test/dummy/tmp/cache/sass/dc62b2f303532e1c32e9571414568d9c2570f335/_shadows.css.scssc +0 -0
  219. data/test/dummy/tmp/cache/sass/dc62b2f303532e1c32e9571414568d9c2570f335/_utilities.scssc +0 -0
  220. data/test/dummy/tmp/cache/sass/dc62b2f303532e1c32e9571414568d9c2570f335/_variables.css.scssc +0 -0
  221. data/test/dummy/tmp/cache/sass/ddba83cb438190ca32bf384b6eea0c3ef82ae9fa/reset.css.scssc +0 -0
  222. data/test/dummy/tmp/cache/sass/dde0527ffef9ea409c8e8afb2306d11f2e0b6500/_comments.css.scssc +0 -0
  223. data/test/dummy/tmp/cache/sass/dde0527ffef9ea409c8e8afb2306d11f2e0b6500/_date_picker.css.scssc +0 -0
  224. data/test/dummy/tmp/cache/sass/dde0527ffef9ea409c8e8afb2306d11f2e0b6500/_flash_messages.css.scssc +0 -0
  225. data/test/dummy/tmp/cache/sass/dde0527ffef9ea409c8e8afb2306d11f2e0b6500/_tables.css.scssc +0 -0
  226. data/test/fixtures/rich/rich_images.yml +11 -0
  227. data/test/functional/rich/files_controller_test.rb +9 -0
  228. data/test/integration/navigation_test.rb +10 -0
  229. data/test/rich_test.rb +7 -0
  230. data/test/test_helper.rb +10 -0
  231. data/test/unit/helpers/rich/files_helper_test.rb +6 -0
  232. data/test/unit/rich/rich_image_test.rb +9 -0
  233. metadata +603 -0
@@ -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,211 @@
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 Devise::Mailer,
6
+ # note that it will be overwritten if you use your own mailer class with default "from" parameter.
7
+ config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
8
+
9
+ # Configure the class responsible to send e-mails.
10
+ # config.mailer = "Devise::Mailer"
11
+
12
+ # ==> ORM configuration
13
+ # Load and configure the ORM. Supports :active_record (default) and
14
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
15
+ # available as additional gems.
16
+ require 'devise/orm/active_record'
17
+
18
+ # ==> Configuration for any authentication mechanism
19
+ # Configure which keys are used when authenticating a user. The default is
20
+ # just :email. You can configure it to use [:username, :subdomain], so for
21
+ # authenticating a user, both parameters are required. Remember that those
22
+ # parameters are used only when authenticating and not when retrieving from
23
+ # session. If you need permissions, you should implement that in a before filter.
24
+ # You can also supply a hash where the value is a boolean determining whether
25
+ # or not authentication should be aborted when the value is not present.
26
+ # config.authentication_keys = [ :email ]
27
+
28
+ # Configure parameters from the request object used for authentication. Each entry
29
+ # given should be a request method and it will automatically be passed to the
30
+ # find_for_authentication method and considered in your model lookup. For instance,
31
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
32
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
33
+ # config.request_keys = []
34
+
35
+ # Configure which authentication keys should be case-insensitive.
36
+ # These keys will be downcased upon creating or modifying a user and when used
37
+ # to authenticate or find a user. Default is :email.
38
+ config.case_insensitive_keys = [ :email ]
39
+
40
+ # Configure which authentication keys should have whitespace stripped.
41
+ # These keys will have whitespace before and after removed upon creating or
42
+ # modifying a user and when used to authenticate or find a user. Default is :email.
43
+ config.strip_whitespace_keys = [ :email ]
44
+
45
+ # Tell if authentication through request.params is enabled. True by default.
46
+ # config.params_authenticatable = true
47
+
48
+ # Tell if authentication through HTTP Basic Auth is enabled. False by default.
49
+ # config.http_authenticatable = false
50
+
51
+ # If http headers should be returned for AJAX requests. True by default.
52
+ # config.http_authenticatable_on_xhr = true
53
+
54
+ # The realm used in Http Basic Authentication. "Application" by default.
55
+ # config.http_authentication_realm = "Application"
56
+
57
+ # It will change confirmation, password recovery and other workflows
58
+ # to behave the same regardless if the e-mail provided was right or wrong.
59
+ # Does not affect registerable.
60
+ # config.paranoid = true
61
+
62
+ # ==> Configuration for :database_authenticatable
63
+ # For bcrypt, this is the cost for hashing the password and defaults to 10. If
64
+ # using other encryptors, it sets how many times you want the password re-encrypted.
65
+ #
66
+ # Limiting the stretches to just one in testing will increase the performance of
67
+ # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
68
+ # a value less than 10 in other environments.
69
+ config.stretches = Rails.env.test? ? 1 : 10
70
+
71
+ # Setup a pepper to generate the encrypted password.
72
+ # config.pepper = "0194b8f97306177c7c2a5afe538016ae1f330ae691ebe4a34f003013fa8aaa3699045aace9d9e73be742eb4c0ac779b35a897fdd99472a96ffed55bd212354a1"
73
+
74
+ # ==> Configuration for :confirmable
75
+ # The time you want to give your user to confirm his account. During this time
76
+ # he will be able to access your application without confirming. Default is 0.days
77
+ # When confirm_within is zero, the user won't be able to sign in without confirming.
78
+ # You can use this to let your user access some features of your application
79
+ # without confirming the account, but blocking it after a certain period
80
+ # (ie 2 days).
81
+ # config.confirm_within = 2.days
82
+
83
+ # Defines which key will be used when confirming an account
84
+ # config.confirmation_keys = [ :email ]
85
+
86
+ # ==> Configuration for :rememberable
87
+ # The time the user will be remembered without asking for credentials again.
88
+ # config.remember_for = 2.weeks
89
+
90
+ # If true, a valid remember token can be re-used between multiple browsers.
91
+ # config.remember_across_browsers = true
92
+
93
+ # If true, extends the user's remember period when remembered via cookie.
94
+ # config.extend_remember_period = false
95
+
96
+ # If true, uses the password salt as remember token. This should be turned
97
+ # to false if you are not using database authenticatable.
98
+ config.use_salt_as_remember_token = true
99
+
100
+ # Options to be passed to the created cookie. For instance, you can set
101
+ # :secure => true in order to force SSL only cookies.
102
+ # config.cookie_options = {}
103
+
104
+ # ==> Configuration for :validatable
105
+ # Range for password length. Default is 6..128.
106
+ # config.password_length = 6..128
107
+
108
+ # Email regex used to validate email formats. It simply asserts that
109
+ # an one (and only one) @ exists in the given string. This is mainly
110
+ # to give user feedback and not to assert the e-mail validity.
111
+ # config.email_regexp = /\A[^@]+@[^@]+\z/
112
+
113
+ # ==> Configuration for :timeoutable
114
+ # The time you want to timeout the user session without activity. After this
115
+ # time the user will be asked for credentials again. Default is 30 minutes.
116
+ # config.timeout_in = 30.minutes
117
+
118
+ # ==> Configuration for :lockable
119
+ # Defines which strategy will be used to lock an account.
120
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
121
+ # :none = No lock strategy. You should handle locking by yourself.
122
+ # config.lock_strategy = :failed_attempts
123
+
124
+ # Defines which key will be used when locking and unlocking an account
125
+ # config.unlock_keys = [ :email ]
126
+
127
+ # Defines which strategy will be used to unlock an account.
128
+ # :email = Sends an unlock link to the user email
129
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
130
+ # :both = Enables both strategies
131
+ # :none = No unlock strategy. You should handle unlocking by yourself.
132
+ # config.unlock_strategy = :both
133
+
134
+ # Number of authentication tries before locking an account if lock_strategy
135
+ # is failed attempts.
136
+ # config.maximum_attempts = 20
137
+
138
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
139
+ # config.unlock_in = 1.hour
140
+
141
+ # ==> Configuration for :recoverable
142
+ #
143
+ # Defines which key will be used when recovering the password for an account
144
+ # config.reset_password_keys = [ :email ]
145
+
146
+ # Time interval you can reset your password with a reset password key.
147
+ # Don't put a too small interval or your users won't have the time to
148
+ # change their passwords.
149
+ config.reset_password_within = 2.hours
150
+
151
+ # ==> Configuration for :encryptable
152
+ # Allow you to use another encryption algorithm besides bcrypt (default). You can use
153
+ # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
154
+ # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
155
+ # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
156
+ # REST_AUTH_SITE_KEY to pepper)
157
+ # config.encryptor = :sha512
158
+
159
+ # ==> Configuration for :token_authenticatable
160
+ # Defines name of the authentication token params key
161
+ # config.token_authentication_key = :auth_token
162
+
163
+ # If true, authentication through token does not store user in session and needs
164
+ # to be supplied on each request. Useful if you are using the token as API token.
165
+ # config.stateless_token = false
166
+
167
+ # ==> Scopes configuration
168
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
169
+ # "users/sessions/new". It's turned off by default because it's slower if you
170
+ # are using only default views.
171
+ # config.scoped_views = false
172
+
173
+ # Configure the default scope given to Warden. By default it's the first
174
+ # devise role declared in your routes (usually :user).
175
+ # config.default_scope = :user
176
+
177
+ # Configure sign_out behavior.
178
+ # Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
179
+ # The default is true, which means any logout action will sign out all active scopes.
180
+ # config.sign_out_all_scopes = true
181
+
182
+ # ==> Navigation configuration
183
+ # Lists the formats that should be treated as navigational. Formats like
184
+ # :html, should redirect to the sign in page when the user does not have
185
+ # access, but formats like :xml or :json, should return 401.
186
+ #
187
+ # If you have any extra navigational formats, like :iphone or :mobile, you
188
+ # should add them to the navigational formats lists.
189
+ #
190
+ # The :"*/*" and "*/*" formats below is required to match Internet
191
+ # Explorer requests.
192
+ # config.navigational_formats = [:"*/*", "*/*", :html]
193
+
194
+ # The default HTTP method used to sign out a resource. Default is :delete.
195
+ config.sign_out_via = :delete
196
+
197
+ # ==> OmniAuth
198
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
199
+ # up on your models and hooks.
200
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
201
+
202
+ # ==> Warden configuration
203
+ # If you want to use other strategies, that are not supported by Devise, or
204
+ # change the failure app, you can configure them inside the config.warden block.
205
+ #
206
+ # config.warden do |manager|
207
+ # manager.failure_app = AnotherApp
208
+ # manager.intercept_401 = false
209
+ # manager.default_strategies(:scope => :user).unshift :some_external_strategy
210
+ # end
211
+ end
@@ -0,0 +1,80 @@
1
+ # encoding: utf-8
2
+
3
+ # --------------------------------------------------------------------------------------------------
4
+ # Please note: If you're subclassing Formtastic::SemanticFormBuilder in a Rails 3 project,
5
+ # Formtastic uses class_attribute for these configuration attributes instead of the deprecated
6
+ # class_inheritable_attribute. The behaviour is slightly different with subclasses (especially
7
+ # around attributes with Hash or Array) values, so make sure you understand what's happening.
8
+ # See the documentation for class_attribute in ActiveSupport for more information.
9
+ # --------------------------------------------------------------------------------------------------
10
+
11
+ # Set the default text field size when input is a string. Default is nil.
12
+ # Formtastic::SemanticFormBuilder.default_text_field_size = 50
13
+
14
+ # Set the default text area height when input is a text. Default is 20.
15
+ # Formtastic::SemanticFormBuilder.default_text_area_height = 5
16
+
17
+ # Set the default text area width when input is a text. Default is nil.
18
+ # Formtastic::SemanticFormBuilder.default_text_area_width = 50
19
+
20
+ # Should all fields be considered "required" by default?
21
+ # Rails 2 only, ignored by Rails 3 because it will never fall back to this default.
22
+ # Defaults to true.
23
+ # Formtastic::SemanticFormBuilder.all_fields_required_by_default = true
24
+
25
+ # Should select fields have a blank option/prompt by default?
26
+ # Defaults to true.
27
+ # Formtastic::SemanticFormBuilder.include_blank_for_select_by_default = true
28
+
29
+ # Set the string that will be appended to the labels/fieldsets which are required
30
+ # It accepts string or procs and the default is a localized version of
31
+ # '<abbr title="required">*</abbr>'. In other words, if you configure formtastic.required
32
+ # in your locale, it will replace the abbr title properly. But if you don't want to use
33
+ # abbr tag, you can simply give a string as below
34
+ # Formtastic::SemanticFormBuilder.required_string = "(required)"
35
+
36
+ # Set the string that will be appended to the labels/fieldsets which are optional
37
+ # Defaults to an empty string ("") and also accepts procs (see required_string above)
38
+ # Formtastic::SemanticFormBuilder.optional_string = "(optional)"
39
+
40
+ # Set the way inline errors will be displayed.
41
+ # Defaults to :sentence, valid options are :sentence, :list, :first and :none
42
+ # Formtastic::SemanticFormBuilder.inline_errors = :sentence
43
+ # Formtastic uses the following classes as default for hints, inline_errors and error list
44
+
45
+ # If you override the class here, please ensure to override it in your formtastic_changes.css stylesheet as well
46
+ # Formtastic::SemanticFormBuilder.default_hint_class = "inline-hints"
47
+ # Formtastic::SemanticFormBuilder.default_inline_error_class = "inline-errors"
48
+ # Formtastic::SemanticFormBuilder.default_error_list_class = "errors"
49
+
50
+ # Set the method to call on label text to transform or format it for human-friendly
51
+ # reading when formtastic is used without object. Defaults to :humanize.
52
+ # Formtastic::SemanticFormBuilder.label_str_method = :humanize
53
+
54
+ # Set the array of methods to try calling on parent objects in :select and :radio inputs
55
+ # for the text inside each @<option>@ tag or alongside each radio @<input>@. The first method
56
+ # that is found on the object will be used.
57
+ # Defaults to ["to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
58
+ # Formtastic::SemanticFormBuilder.collection_label_methods = [
59
+ # "to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
60
+
61
+ # Formtastic by default renders inside li tags the input, hints and then
62
+ # errors messages. Sometimes you want the hints to be rendered first than
63
+ # the input, in the following order: hints, input and errors. You can
64
+ # customize it doing just as below:
65
+ # Formtastic::SemanticFormBuilder.inline_order = [:input, :hints, :errors]
66
+
67
+ # Additionally, you can customize the order for specific types of inputs.
68
+ # This is configured on a type basis and if a type is not found it will
69
+ # fall back to the default order as defined by #inline_order
70
+ # Formtastic::SemanticFormBuilder.custom_inline_order[:checkbox] = [:errors, :hints, :input]
71
+ # Formtastic::SemanticFormBuilder.custom_inline_order[:select] = [:hints, :input, :errors]
72
+
73
+ # Specifies if labels/hints for input fields automatically be looked up using I18n.
74
+ # Default value: false. Overridden for specific fields by setting value to true,
75
+ # i.e. :label => true, or :hint => true (or opposite depending on initialized value)
76
+ # Formtastic::SemanticFormBuilder.i18n_lookups_by_default = false
77
+
78
+ # You can add custom inputs or override parts of Formtastic by subclassing SemanticFormBuilder and
79
+ # specifying that class here. Defaults to SemanticFormBuilder.
80
+ # Formtastic::SemanticFormHelper.builder = MyCustomBuilder
@@ -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,28 @@
1
+ require "rich"
2
+
3
+ if Object.const_defined?("Rich")
4
+ Rich.setup do |config|
5
+
6
+ # Customize ckeditor by adding configuration to config.editor (you can use any ckeditor config directive)
7
+ # Look at the Rich source for default settings. These settings can also be overridden per editor instance.
8
+ # Example: config.editor[:skin] = 'office2003' # ill advice, but you get the idea
9
+ # Example: config.editor[:startupOutlineBlocks] = false
10
+
11
+ config.image_styles = {
12
+ :large => "500x500",
13
+ :thumb => "100x100#"
14
+ }
15
+
16
+ # config.allowed_styles = :all # this is the default - show all styles
17
+ # config.allowed_styles = [ :large, :original ]
18
+ config.allowed_styles = [ :large, :thumb ]
19
+
20
+ config.default_style = :large
21
+
22
+ config.authentication_method = :authenticate_admin_user!
23
+
24
+ end
25
+
26
+ # activate Rich
27
+ Rich.insert
28
+ end
@@ -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 = '8835aa6fec7e070a52905589556e6114653540ee7118c029c339507db310f036914a4704af7dec89496a0500763e23579a3f8f75cfc65807882e123df3c848ab'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rails generate session_migration")
8
+ # Dummy::Application.config.session_store :active_record_store
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters :format => [:json]
9
+ end
10
+
11
+ # Disable root element in JSON by default.
12
+ ActiveSupport.on_load(:active_record) do
13
+ self.include_root_in_json = false
14
+ end
@@ -0,0 +1,58 @@
1
+ # Additional translations at http://github.com/plataformatec/devise/wiki/I18n
2
+
3
+ en:
4
+ errors:
5
+ messages:
6
+ expired: "has expired, please request a new one"
7
+ not_found: "not found"
8
+ already_confirmed: "was already confirmed, please try signing in"
9
+ not_locked: "was not locked"
10
+ not_saved:
11
+ one: "1 error prohibited this %{resource} from being saved:"
12
+ other: "%{count} errors prohibited this %{resource} from being saved:"
13
+
14
+ devise:
15
+ failure:
16
+ already_authenticated: 'You are already signed in.'
17
+ unauthenticated: 'You need to sign in or sign up before continuing.'
18
+ unconfirmed: 'You have to confirm your account before continuing.'
19
+ locked: 'Your account is locked.'
20
+ invalid: 'Invalid email or password.'
21
+ invalid_token: 'Invalid authentication token.'
22
+ timeout: 'Your session expired, please sign in again to continue.'
23
+ inactive: 'Your account was not activated yet.'
24
+ sessions:
25
+ signed_in: 'Signed in successfully.'
26
+ signed_out: 'Signed out successfully.'
27
+ passwords:
28
+ send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
29
+ updated: 'Your password was changed successfully. You are now signed in.'
30
+ updated_not_active: 'Your password was changed successfully.'
31
+ send_paranoid_instructions: "If your e-mail exists on our database, you will receive a password recovery link on your e-mail"
32
+ confirmations:
33
+ send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
34
+ send_paranoid_instructions: 'If your e-mail exists on our database, you will receive an email with instructions about how to confirm your account in a few minutes.'
35
+ confirmed: 'Your account was successfully confirmed. You are now signed in.'
36
+ registrations:
37
+ signed_up: 'Welcome! You have signed up successfully.'
38
+ inactive_signed_up: 'You have signed up successfully. However, we could not sign you in because your account is %{reason}.'
39
+ updated: 'You updated your account successfully.'
40
+ destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
41
+ reasons:
42
+ inactive: 'inactive'
43
+ unconfirmed: 'unconfirmed'
44
+ locked: 'locked'
45
+ unlocks:
46
+ send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
47
+ unlocked: 'Your account was successfully unlocked. You are now signed in.'
48
+ send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.'
49
+ omniauth_callbacks:
50
+ success: 'Successfully authorized from %{kind} account.'
51
+ failure: 'Could not authorize you from %{kind} because "%{reason}".'
52
+ mailer:
53
+ confirmation_instructions:
54
+ subject: 'Confirmation instructions'
55
+ reset_password_instructions:
56
+ subject: 'Reset password instructions'
57
+ unlock_instructions:
58
+ subject: 'Unlock Instructions'
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"