rubber_ring 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (472) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +239 -0
  4. data/Rakefile +34 -0
  5. data/app/assets/images/glyphicons-halflings-white.png +0 -0
  6. data/app/assets/images/glyphicons-halflings.png +0 -0
  7. data/app/assets/javascripts/libs/dropzone.js +1258 -0
  8. data/app/assets/javascripts/libs/h5utils.js +65 -0
  9. data/app/assets/javascripts/rubber_ring/application.js +17 -0
  10. data/app/assets/javascripts/rubber_ring/attachment_dragger.coffee +45 -0
  11. data/app/assets/javascripts/rubber_ring/attachment_manager.coffee +23 -0
  12. data/app/assets/javascripts/rubber_ring/attachment_uploader.coffee +27 -0
  13. data/app/assets/javascripts/rubber_ring/dropdown_menu.coffee +10 -0
  14. data/app/assets/javascripts/rubber_ring/editor.coffee +92 -0
  15. data/app/assets/javascripts/rubber_ring/link_editor.coffee +47 -0
  16. data/app/assets/javascripts/rubber_ring/persistence_manager.coffee +74 -0
  17. data/app/assets/javascripts/rubber_ring/template_editor.coffee +76 -0
  18. data/app/assets/javascripts/rubber_ring/util.coffee +22 -0
  19. data/app/assets/stylesheets/libs/bootstrap.scss.erb +6163 -0
  20. data/app/assets/stylesheets/rubber_ring/application.css +14 -0
  21. data/app/assets/stylesheets/rubber_ring/cms.scss +183 -0
  22. data/app/concerns/rubber_ring/build.rb +31 -0
  23. data/app/concerns/rubber_ring/publish.rb +9 -0
  24. data/app/concerns/rubber_ring/util.rb +75 -0
  25. data/app/controllers/rubber_ring/attachments_controller.rb +52 -0
  26. data/app/controllers/rubber_ring/cms_controller.rb +41 -0
  27. data/app/controllers/rubber_ring/rubber_ring_controller.rb +67 -0
  28. data/app/controllers/rubber_ring/sessions_controller.rb +21 -0
  29. data/app/helpers/rubber_ring/cms_helper.rb +122 -0
  30. data/app/models/rubber_ring/page.rb +126 -0
  31. data/app/models/rubber_ring/page_content.rb +5 -0
  32. data/app/models/rubber_ring/page_template.rb +5 -0
  33. data/app/views/layouts/rubber_ring/application.html.erb +22 -0
  34. data/app/views/rubber_ring/_application.html.erb +106 -0
  35. data/app/views/rubber_ring/_head.html.erb +4 -0
  36. data/app/views/rubber_ring/_template_control.html.erb +20 -0
  37. data/app/views/rubber_ring/sessions/new.html.erb +8 -0
  38. data/config/routes.rb +20 -0
  39. data/db/migrate/20130520170602_create_pages.rubber_ring.rb +11 -0
  40. data/db/migrate/20130520170603_create_rubber_ring_page_contents.rubber_ring.rb +11 -0
  41. data/db/migrate/20130520170604_create_rubber_ring_page_templates.rubber_ring.rb +14 -0
  42. data/db/seeds.rb +7 -0
  43. data/lib/generators/rubber_ring/install/USAGE +10 -0
  44. data/lib/generators/rubber_ring/install/install_generator.rb +35 -0
  45. data/lib/generators/rubber_ring/install/templates/application.js +6 -0
  46. data/lib/generators/rubber_ring/install/templates/layout.html.erb +22 -0
  47. data/lib/generators/rubber_ring/install/templates/publish_template.yml +12 -0
  48. data/lib/generators/rubber_ring/install/templates/settings_template.rb +2 -0
  49. data/lib/generators/rubber_ring/page/USAGE +12 -0
  50. data/lib/generators/rubber_ring/page/page_generator.rb +32 -0
  51. data/lib/generators/rubber_ring/page/templates/action.html.erb +3 -0
  52. data/lib/generators/rubber_ring/page/templates/controller.rb +11 -0
  53. data/lib/rubber_ring.rb +5 -0
  54. data/lib/rubber_ring/engine.rb +11 -0
  55. data/lib/rubber_ring/version.rb +3 -0
  56. data/lib/tasks/rubber_ring_tasks.rake +4 -0
  57. data/spec/concerns/util_spec.rb +20 -0
  58. data/spec/controllers/attachments_controller_spec.rb +20 -0
  59. data/spec/controllers/cms_controller_spec.rb +150 -0
  60. data/spec/controllers/sessions_controller_spec.rb +25 -0
  61. data/spec/helpers/cms_helper_spec.rb +63 -0
  62. data/spec/javascripts/fixtures/duplicate_fields.html +2 -0
  63. data/spec/javascripts/fixtures/editable_fields.html +15 -0
  64. data/spec/javascripts/fixtures/templates.html +21 -0
  65. data/spec/javascripts/helpers/fixtures.js +22 -0
  66. data/spec/javascripts/helpers/jasmine-jquery.js +658 -0
  67. data/spec/javascripts/persistence_manager_spec.coffee +18 -0
  68. data/spec/javascripts/template_editor_spec.coffee +29 -0
  69. data/spec/javascripts/util_spec.coffee +13 -0
  70. data/spec/karma.conf.js +86 -0
  71. data/spec/models/page_spec.rb +196 -0
  72. data/spec/spec_helper.rb +88 -0
  73. data/test/dummy/README.rdoc +28 -0
  74. data/test/dummy/Rakefile +6 -0
  75. data/test/dummy/app/assets/images/baws.jpg +0 -0
  76. data/test/dummy/app/assets/javascripts/application.js +6 -0
  77. data/test/dummy/app/assets/stylesheets/application.css +17 -0
  78. data/test/dummy/app/controllers/application_controller.rb +5 -0
  79. data/test/dummy/app/controllers/example_controller.rb +15 -0
  80. data/test/dummy/app/helpers/application_helper.rb +2 -0
  81. data/test/dummy/app/views/example/page.html.erb +20 -0
  82. data/test/dummy/app/views/example/page2.html.erb +13 -0
  83. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  84. data/test/dummy/app/views/layouts/rubber_ring/layout.html.erb +22 -0
  85. data/test/dummy/app/views/templates/_article.html.erb +7 -0
  86. data/test/dummy/app/views/templates/_blog_post.html.erb +1 -0
  87. data/test/dummy/bin/bundle +3 -0
  88. data/test/dummy/bin/rails +4 -0
  89. data/test/dummy/bin/rake +4 -0
  90. data/test/dummy/config.ru +4 -0
  91. data/test/dummy/config/application.rb +24 -0
  92. data/test/dummy/config/boot.rb +9 -0
  93. data/test/dummy/config/database.yml +16 -0
  94. data/test/dummy/config/environment.rb +5 -0
  95. data/test/dummy/config/environments/development.rb +27 -0
  96. data/test/dummy/config/environments/production.rb +81 -0
  97. data/test/dummy/config/environments/test.rb +36 -0
  98. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  99. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  100. data/test/dummy/config/initializers/inflections.rb +16 -0
  101. data/test/dummy/config/initializers/mime_types.rb +5 -0
  102. data/test/dummy/config/initializers/rubber_ring.rb +2 -0
  103. data/test/dummy/config/initializers/secret_token.rb +12 -0
  104. data/test/dummy/config/initializers/session_store.rb +3 -0
  105. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  106. data/test/dummy/config/locales/en.yml +23 -0
  107. data/test/dummy/config/publish.yml +12 -0
  108. data/test/dummy/config/routes.rb +6 -0
  109. data/test/dummy/db/development.sqlite3 +0 -0
  110. data/test/dummy/db/migrate/20130524163154_create_pages.rubber_ring.rb +12 -0
  111. data/test/dummy/db/migrate/20130524163155_create_rubber_ring_page_contents.rubber_ring.rb +12 -0
  112. data/test/dummy/db/migrate/20130524163156_create_rubber_ring_page_templates.rubber_ring.rb +15 -0
  113. data/test/dummy/db/production.sqlite3 +0 -0
  114. data/test/dummy/db/schema.rb +47 -0
  115. data/test/dummy/db/test.sqlite3 +0 -0
  116. data/test/dummy/log/development.log +41349 -0
  117. data/test/dummy/log/production.log +2835 -0
  118. data/test/dummy/log/test.log +45546 -0
  119. data/test/dummy/public/404.html +27 -0
  120. data/test/dummy/public/422.html +26 -0
  121. data/test/dummy/public/500.html +26 -0
  122. data/test/dummy/public/assets/application-4e268cfccc1f26318c22a87c9e6b9095.js +1 -0
  123. data/test/dummy/public/assets/application-4e268cfccc1f26318c22a87c9e6b9095.js.gz +0 -0
  124. data/test/dummy/public/assets/application-e006d1eddf81edb7ed682d933d95167f.css +18 -0
  125. data/test/dummy/public/assets/application-e006d1eddf81edb7ed682d933d95167f.css.gz +0 -0
  126. data/test/dummy/public/assets/baws-27045628978f5e419d534d01c63ab3d6.jpg +0 -0
  127. data/test/dummy/public/assets/glyphicons-halflings-b47b2b03ec961163432b4cfe22cd6f31.png +0 -0
  128. data/test/dummy/public/assets/glyphicons-halflings-white-ec01567c9d4e5aba3fd3efa6e3054574.png +0 -0
  129. data/test/dummy/public/assets/manifest-d64ae8f73d13a404515a9c833b8ea4d7.json +1 -0
  130. data/test/dummy/public/assets/rubber_ring/application-166bd1c30eaa1f5b77c159a552ca0d1d.js +4 -0
  131. data/test/dummy/public/assets/rubber_ring/application-166bd1c30eaa1f5b77c159a552ca0d1d.js.gz +0 -0
  132. data/test/dummy/public/assets/rubber_ring/application-2211071c03381f99bd440671529d6d2d.css +4358 -0
  133. data/test/dummy/public/assets/rubber_ring/application-2211071c03381f99bd440671529d6d2d.css.gz +0 -0
  134. data/test/dummy/public/assets/rubber_ring/application-4ba3fedbf9929e7910c6f1497a82c4d1.css +4380 -0
  135. data/test/dummy/public/assets/rubber_ring/application-4ba3fedbf9929e7910c6f1497a82c4d1.css.gz +0 -0
  136. data/test/dummy/public/assets/rubber_ring/application-9b07b9a701e0e3a8bb9f2af9749adbac.js +4 -0
  137. data/test/dummy/public/assets/rubber_ring/application-9b07b9a701e0e3a8bb9f2af9749adbac.js.gz +0 -0
  138. data/test/dummy/public/build/assets/application-4e268cfccc1f26318c22a87c9e6b9095.js +1 -0
  139. data/test/dummy/public/build/assets/application-4e268cfccc1f26318c22a87c9e6b9095.js.gz +0 -0
  140. data/test/dummy/public/build/assets/application-e006d1eddf81edb7ed682d933d95167f.css +18 -0
  141. data/test/dummy/public/build/assets/application-e006d1eddf81edb7ed682d933d95167f.css.gz +0 -0
  142. data/test/dummy/public/build/assets/application.css +17 -0
  143. data/test/dummy/public/build/assets/application.js +6 -0
  144. data/test/dummy/public/build/assets/assets/images/baws.jpg +0 -0
  145. data/test/dummy/public/build/assets/assets/javascripts/application.js +6 -0
  146. data/test/dummy/public/build/assets/assets/stylesheets/application.css +17 -0
  147. data/test/dummy/public/build/assets/baws-27045628978f5e419d534d01c63ab3d6.jpg +0 -0
  148. data/test/dummy/public/build/assets/baws.jpg +0 -0
  149. data/test/dummy/public/build/assets/controllers/application_controller.rb +5 -0
  150. data/test/dummy/public/build/assets/controllers/example_controller.rb +15 -0
  151. data/test/dummy/public/build/assets/glyphicons-halflings-b47b2b03ec961163432b4cfe22cd6f31.png +0 -0
  152. data/test/dummy/public/build/assets/glyphicons-halflings-white-ec01567c9d4e5aba3fd3efa6e3054574.png +0 -0
  153. data/test/dummy/public/build/assets/helpers/application_helper.rb +2 -0
  154. data/test/dummy/public/build/assets/images/baws.jpg +0 -0
  155. data/test/dummy/public/build/assets/javascripts/application.js +6 -0
  156. data/test/dummy/public/build/assets/manifest-d64ae8f73d13a404515a9c833b8ea4d7.json +1 -0
  157. data/test/dummy/public/build/assets/rubber_ring/application-166bd1c30eaa1f5b77c159a552ca0d1d.js +4 -0
  158. data/test/dummy/public/build/assets/rubber_ring/application-166bd1c30eaa1f5b77c159a552ca0d1d.js.gz +0 -0
  159. data/test/dummy/public/build/assets/rubber_ring/application-2211071c03381f99bd440671529d6d2d.css +4358 -0
  160. data/test/dummy/public/build/assets/rubber_ring/application-2211071c03381f99bd440671529d6d2d.css.gz +0 -0
  161. data/test/dummy/public/build/assets/rubber_ring/application-4ba3fedbf9929e7910c6f1497a82c4d1.css +4380 -0
  162. data/test/dummy/public/build/assets/rubber_ring/application-4ba3fedbf9929e7910c6f1497a82c4d1.css.gz +0 -0
  163. data/test/dummy/public/build/assets/rubber_ring/application-9b07b9a701e0e3a8bb9f2af9749adbac.js +4 -0
  164. data/test/dummy/public/build/assets/rubber_ring/application-9b07b9a701e0e3a8bb9f2af9749adbac.js.gz +0 -0
  165. data/test/dummy/public/build/assets/stylesheets/application.css +17 -0
  166. data/test/dummy/public/build/assets/views/example/page.html.erb +31 -0
  167. data/test/dummy/public/build/assets/views/example/page2.html.erb +10 -0
  168. data/test/dummy/public/build/assets/views/layouts/application.html.erb +14 -0
  169. data/test/dummy/public/build/assets/views/layouts/rubber_ring/application.html.erb +22 -0
  170. data/test/dummy/public/build/assets/views/templates/_article.html.erb +9 -0
  171. data/test/dummy/public/build/upload/example/page/attachments/dbvis.license +11 -0
  172. data/test/dummy/public/build/upload/example/page/images/nutella.jpg +0 -0
  173. data/test/dummy/public/favicon.ico +0 -0
  174. data/test/dummy/public/upload/en/example/page2/images/snb.jpg +0 -0
  175. data/test/dummy/public/upload/example/page/attachments/BoobyTrap.pdf +0 -0
  176. data/test/dummy/public/upload/example/page/attachments/main.html +29 -0
  177. data/test/dummy/public/upload/example/page/images/nutella.jpg +0 -0
  178. data/test/dummy/public/upload/example/page/images/snb.jpg +0 -0
  179. data/test/dummy/script/rails +6 -0
  180. data/test/dummy/tmp/cache/assets/development/sass/144bb07df25732886de34fc892b7c84d418ab110/cms.scss.erbc +0 -0
  181. data/test/dummy/tmp/cache/assets/development/sass/144bb07df25732886de34fc892b7c84d418ab110/cms.scssc +0 -0
  182. data/test/dummy/tmp/cache/assets/development/sass/5df77a09e28ee5e99b029d061fc8c7aa74ed8701/bootstrap.scss.erbc +0 -0
  183. data/test/dummy/tmp/cache/assets/development/sass/8185f37c4f7dd19815b19559200f49fbf25b143a/cms.scssc +0 -0
  184. data/test/dummy/tmp/cache/assets/development/sass/9ef9c546be1f15bd909c4626b18ec56c75aac0ce/cms.scss.erbc +0 -0
  185. data/test/dummy/tmp/cache/assets/development/sass/9ef9c546be1f15bd909c4626b18ec56c75aac0ce/cms.scssc +0 -0
  186. data/test/dummy/tmp/cache/assets/development/sass/c8e2efff656b76a26ac2cc5b5528e2ab9741b52a/bootstrap.scss.erbc +0 -0
  187. data/test/dummy/tmp/cache/assets/development/sprockets/005eccb32211a5ffdf41aad3484bbbb4 +0 -0
  188. data/test/dummy/tmp/cache/assets/development/sprockets/00dfd740f227e8eacf8dc70e8923aa30 +0 -0
  189. data/test/dummy/tmp/cache/assets/development/sprockets/0218b228ced412bf87b02ca1b6be60b3 +0 -0
  190. data/test/dummy/tmp/cache/assets/development/sprockets/021d5ce446187b362f442c81dbc04f33 +0 -0
  191. data/test/dummy/tmp/cache/assets/development/sprockets/03d17cbcdf5da1d77daae00a93e1d8eb +0 -0
  192. data/test/dummy/tmp/cache/assets/development/sprockets/052ccadc06984b221f1af051c32e613a +0 -0
  193. data/test/dummy/tmp/cache/assets/development/sprockets/0894458794b51b17900c3d7abefc2aa5 +0 -0
  194. data/test/dummy/tmp/cache/assets/development/sprockets/0ceefdff5c5f03895722be20f6ddc26b +0 -0
  195. data/test/dummy/tmp/cache/assets/development/sprockets/0dd47da3f882e810b77e341b2bcd8abc +0 -0
  196. data/test/dummy/tmp/cache/assets/development/sprockets/0de91e83e7c32c81d59a95bccdedb34f +0 -0
  197. data/test/dummy/tmp/cache/assets/development/sprockets/0f096a9239d1b8b3c0d7f0a079ba8dc6 +0 -0
  198. data/test/dummy/tmp/cache/assets/development/sprockets/0f7e8127f53c92f853b2d1f7f3887b25 +0 -0
  199. data/test/dummy/tmp/cache/assets/development/sprockets/0fa97a19dba2b30d1269220457488770 +0 -0
  200. data/test/dummy/tmp/cache/assets/development/sprockets/10c6f6553bf3c14d2073a1dc826c4a03 +0 -0
  201. data/test/dummy/tmp/cache/assets/development/sprockets/11eedd47a993ae43b134c4a8323fe16d +0 -0
  202. data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  203. data/test/dummy/tmp/cache/assets/development/sprockets/14e730b33d5c77e57ef1d749d3f59d09 +0 -0
  204. data/test/dummy/tmp/cache/assets/development/sprockets/15c9e067f0a919861ad0e339ccabb55b +0 -0
  205. data/test/dummy/tmp/cache/assets/development/sprockets/162e101507dda2e6e16d3b6d20ac7155 +0 -0
  206. data/test/dummy/tmp/cache/assets/development/sprockets/16aa40bf8985a2f1f3e5dea5d72e6218 +0 -0
  207. data/test/dummy/tmp/cache/assets/development/sprockets/17ea4d79d21b1f083c77f59ba9b3372d +0 -0
  208. data/test/dummy/tmp/cache/assets/development/sprockets/1893a62d9206a1fb9d89578a47e6dba8 +0 -0
  209. data/test/dummy/tmp/cache/assets/development/sprockets/19686f8659e57712f166b6b342155e6c +0 -0
  210. data/test/dummy/tmp/cache/assets/development/sprockets/1cb5879c7320b989a214a03dbb87bf33 +0 -0
  211. data/test/dummy/tmp/cache/assets/development/sprockets/1de6a759b14c2e99ab1641cad5521433 +0 -0
  212. data/test/dummy/tmp/cache/assets/development/sprockets/1f634c9d68d6c31855bf84ecb8e9d3a1 +0 -0
  213. data/test/dummy/tmp/cache/assets/development/sprockets/22a5108e690ae432a7d96ad27ae23356 +0 -0
  214. data/test/dummy/tmp/cache/assets/development/sprockets/22b9081ba2ffde46760b70110d440b5c +0 -0
  215. data/test/dummy/tmp/cache/assets/development/sprockets/25b52470f85dd54b7db5010558291a3a +0 -0
  216. data/test/dummy/tmp/cache/assets/development/sprockets/2bdc67c643c8348c3a0c294004f0fc35 +0 -0
  217. data/test/dummy/tmp/cache/assets/development/sprockets/2bf91fb337440bb9de78c2e6c6bcb95f +0 -0
  218. data/test/dummy/tmp/cache/assets/development/sprockets/2ee41f98f4c10cf8d2f5bd28d3bd1b96 +0 -0
  219. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  220. data/test/dummy/tmp/cache/assets/development/sprockets/3052b99e985fcef75d109bb00139ebd3 +0 -0
  221. data/test/dummy/tmp/cache/assets/development/sprockets/33e002f0b7946cd298562302f71fdd77 +0 -0
  222. data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  223. data/test/dummy/tmp/cache/assets/development/sprockets/37ffa56a3e6b08a7683a7b180bac45e9 +0 -0
  224. data/test/dummy/tmp/cache/assets/development/sprockets/3beaa45c69e3414a2f8cdd63b39787a2 +0 -0
  225. data/test/dummy/tmp/cache/assets/development/sprockets/3f68640e722ec4648c55f987c372bd1f +0 -0
  226. data/test/dummy/tmp/cache/assets/development/sprockets/3fcb125156ac9a61f029c8a3ea0f9c40 +0 -0
  227. data/test/dummy/tmp/cache/assets/development/sprockets/4081dfc5b927754129b209331c267441 +0 -0
  228. data/test/dummy/tmp/cache/assets/development/sprockets/41b539dab4032aeab4acc677841be9e1 +0 -0
  229. data/test/dummy/tmp/cache/assets/development/sprockets/449d8c2f5dfa78068e85472dcee833fc +0 -0
  230. data/test/dummy/tmp/cache/assets/development/sprockets/47086b08a2d4af414320d0316d43636b +0 -0
  231. data/test/dummy/tmp/cache/assets/development/sprockets/4d0e945a1aeffabb6ecbe4e9cfbe9900 +0 -0
  232. data/test/dummy/tmp/cache/assets/development/sprockets/4ff563d50fe6491dbd10a9d82abbfdfb +0 -0
  233. data/test/dummy/tmp/cache/assets/development/sprockets/50b7c4b1c7e9124299cdd60ed2bf24fb +0 -0
  234. data/test/dummy/tmp/cache/assets/development/sprockets/5158a96c0f825e9f03cb852177150660 +0 -0
  235. data/test/dummy/tmp/cache/assets/development/sprockets/5343637e2648daefcbb5f6da93e22170 +0 -0
  236. data/test/dummy/tmp/cache/assets/development/sprockets/53ba99192c5668743a46c5d52532ab35 +0 -0
  237. data/test/dummy/tmp/cache/assets/development/sprockets/5449d7c21a154077e042b276efcfe346 +0 -0
  238. data/test/dummy/tmp/cache/assets/development/sprockets/5588d8e326c1909734ec317c6068a8b0 +0 -0
  239. data/test/dummy/tmp/cache/assets/development/sprockets/5698b010ec22ef0139df1ec7921bada0 +0 -0
  240. data/test/dummy/tmp/cache/assets/development/sprockets/573028956728676e330972a5f5b14ce1 +0 -0
  241. data/test/dummy/tmp/cache/assets/development/sprockets/5802a1804470ed3a7258b19b52db2a15 +0 -0
  242. data/test/dummy/tmp/cache/assets/development/sprockets/593143829da9d8a11949cdea62925830 +0 -0
  243. data/test/dummy/tmp/cache/assets/development/sprockets/5a3608849ffcf6b5ffd0e0c519899b0f +0 -0
  244. data/test/dummy/tmp/cache/assets/development/sprockets/5b28ba105943c3d7648e1c3a64497d6a +0 -0
  245. data/test/dummy/tmp/cache/assets/development/sprockets/5cceba1f5466432ddc1ca00d96bb6af2 +0 -0
  246. data/test/dummy/tmp/cache/assets/development/sprockets/5d5fb516cc13d631c73d6ba74527c7fd +0 -0
  247. data/test/dummy/tmp/cache/assets/development/sprockets/613c2f7728f24118bf60b70e5467b04e +0 -0
  248. data/test/dummy/tmp/cache/assets/development/sprockets/62a837ae3a144323a69c9c742a0d338e +0 -0
  249. data/test/dummy/tmp/cache/assets/development/sprockets/62dc9541d46ef8f45853e3dca50132d8 +0 -0
  250. data/test/dummy/tmp/cache/assets/development/sprockets/6386e7f696b5dd6b1588f8051bf78083 +0 -0
  251. data/test/dummy/tmp/cache/assets/development/sprockets/6428de878f492d768cfef210554eb78e +0 -0
  252. data/test/dummy/tmp/cache/assets/development/sprockets/65e9bcd0c838633f8992701c9486752f +0 -0
  253. data/test/dummy/tmp/cache/assets/development/sprockets/66c2afe997efeeb00c23f320cd5154b1 +0 -0
  254. data/test/dummy/tmp/cache/assets/development/sprockets/672160928c4f356614c3b08e4dd18959 +0 -0
  255. data/test/dummy/tmp/cache/assets/development/sprockets/68e88a76cf0ae3b9def99df2da275d32 +0 -0
  256. data/test/dummy/tmp/cache/assets/development/sprockets/69088615f9cef33446fa9ce9af0cbfcb +0 -0
  257. data/test/dummy/tmp/cache/assets/development/sprockets/69c591a2e6598aef38bce6f1bfd9a583 +0 -0
  258. data/test/dummy/tmp/cache/assets/development/sprockets/6a460bdc2d2ee57d882a40d6fbd9b706 +0 -0
  259. data/test/dummy/tmp/cache/assets/development/sprockets/6c0e89bb1f1dd6fef016f0f030b155a4 +0 -0
  260. data/test/dummy/tmp/cache/assets/development/sprockets/716625880a04396476f184c7f6088be0 +0 -0
  261. data/test/dummy/tmp/cache/assets/development/sprockets/74d99242046d9e80efe6e63d318f0d23 +0 -0
  262. data/test/dummy/tmp/cache/assets/development/sprockets/75ec5eefcca62d9bfa875ebb00e5acae +0 -0
  263. data/test/dummy/tmp/cache/assets/development/sprockets/764217b04b89871d5a19d639ad08d652 +0 -0
  264. data/test/dummy/tmp/cache/assets/development/sprockets/7647442e68634bf506ceb6529c964ff8 +0 -0
  265. data/test/dummy/tmp/cache/assets/development/sprockets/77c132a2a2cf0e255033066a80db84e5 +0 -0
  266. data/test/dummy/tmp/cache/assets/development/sprockets/7b3469b8a6587d3fdde5168bcadc1829 +0 -0
  267. data/test/dummy/tmp/cache/assets/development/sprockets/7b89b96229652f6b39b4956713d83fb3 +0 -0
  268. data/test/dummy/tmp/cache/assets/development/sprockets/7bb9867f00636aa2e82aab7c8cde1156 +0 -0
  269. data/test/dummy/tmp/cache/assets/development/sprockets/7bd7316976b72a4351629802d0d996ac +0 -0
  270. data/test/dummy/tmp/cache/assets/development/sprockets/7d185042919d487db4ba3415054bf46b +0 -0
  271. data/test/dummy/tmp/cache/assets/development/sprockets/7d541dc935739c00601285ef558dc186 +0 -0
  272. data/test/dummy/tmp/cache/assets/development/sprockets/7d643ed86fb6b4f4bc4cbc1573edf562 +0 -0
  273. data/test/dummy/tmp/cache/assets/development/sprockets/7d7c5e1189ffb57c1027fbb1f4849056 +0 -0
  274. data/test/dummy/tmp/cache/assets/development/sprockets/7e0a659f836bf08aa7e86a3b3bd64a0a +0 -0
  275. data/test/dummy/tmp/cache/assets/development/sprockets/8085921c00ddb46d86508243dd466f7a +0 -0
  276. data/test/dummy/tmp/cache/assets/development/sprockets/808e7e23c256ba7b4ae032c997b7f7d1 +0 -0
  277. data/test/dummy/tmp/cache/assets/development/sprockets/813778cca328c7d9a71e6ad9bd6b5b93 +0 -0
  278. data/test/dummy/tmp/cache/assets/development/sprockets/82af58bd517f6c898e82655012e662f3 +0 -0
  279. data/test/dummy/tmp/cache/assets/development/sprockets/851829daaa9bf188f9e6265fd060a111 +0 -0
  280. data/test/dummy/tmp/cache/assets/development/sprockets/896e0a59c127f026ecc3ce390c394c6d +0 -0
  281. data/test/dummy/tmp/cache/assets/development/sprockets/898c074f26089ae77019f6bb0d7b87c3 +0 -0
  282. data/test/dummy/tmp/cache/assets/development/sprockets/8a58cdb1fd183189a813cb45de9b5ecb +0 -0
  283. data/test/dummy/tmp/cache/assets/development/sprockets/8aa0c86835fc92349a71e76dfa064cf0 +0 -0
  284. data/test/dummy/tmp/cache/assets/development/sprockets/8b74d8c3afdb7163f50f52e10b198290 +0 -0
  285. data/test/dummy/tmp/cache/assets/development/sprockets/8c20ea028e7ef9e18ab2517785615d32 +0 -0
  286. data/test/dummy/tmp/cache/assets/development/sprockets/8d50fa8e9c1035cb3fbf50bcd2dad220 +0 -0
  287. data/test/dummy/tmp/cache/assets/development/sprockets/8dda9084ddc7e1b0ce01887b1bfbf7ad +0 -0
  288. data/test/dummy/tmp/cache/assets/development/sprockets/91307c7344a9f3f6f727226a87aaf6b1 +0 -0
  289. data/test/dummy/tmp/cache/assets/development/sprockets/95234f56258851aba6ec6fdab79bccb6 +0 -0
  290. data/test/dummy/tmp/cache/assets/development/sprockets/954bb101caefd0c65eaffd0806b60fe2 +0 -0
  291. data/test/dummy/tmp/cache/assets/development/sprockets/977b0e7fd460cd4ebb7482e0bc5dae0d +0 -0
  292. data/test/dummy/tmp/cache/assets/development/sprockets/980857c735dc36c6448aa7f0a63d5775 +0 -0
  293. data/test/dummy/tmp/cache/assets/development/sprockets/9a27bf15ceccd6156c4fbddfe430431f +0 -0
  294. data/test/dummy/tmp/cache/assets/development/sprockets/9bbfa312e4f834114c0d7fcf15e9d591 +0 -0
  295. data/test/dummy/tmp/cache/assets/development/sprockets/9e4856eaccd8050e2cce8f2726bd1ff9 +0 -0
  296. data/test/dummy/tmp/cache/assets/development/sprockets/a0ddccdbb865754a76b131fa64932582 +0 -0
  297. data/test/dummy/tmp/cache/assets/development/sprockets/a1f2a21fb4036d971dd7f36cbfaf3320 +0 -0
  298. data/test/dummy/tmp/cache/assets/development/sprockets/a2719663651c4c47fea4601da97f674b +0 -0
  299. data/test/dummy/tmp/cache/assets/development/sprockets/a30c5479ead2031a2e521cbfa989dca8 +0 -0
  300. data/test/dummy/tmp/cache/assets/development/sprockets/a54698289dfb98cb1c3314d66baf5f91 +0 -0
  301. data/test/dummy/tmp/cache/assets/development/sprockets/a5fc721c5e049fa401638dbbe6f01666 +0 -0
  302. data/test/dummy/tmp/cache/assets/development/sprockets/a6324741c7289fc944f62b446136cf36 +0 -0
  303. data/test/dummy/tmp/cache/assets/development/sprockets/a6f3ccbc9cf1cae48fad3c83ffea2dd8 +0 -0
  304. data/test/dummy/tmp/cache/assets/development/sprockets/a804717f8c355bf77d84f50220f6b66f +0 -0
  305. data/test/dummy/tmp/cache/assets/development/sprockets/aac96aa095d26ef97f58eb4126da0bf7 +0 -0
  306. data/test/dummy/tmp/cache/assets/development/sprockets/aafab1cd25c75cd144df598aa4d48858 +0 -0
  307. data/test/dummy/tmp/cache/assets/development/sprockets/ab136f8b2c696dd4d96e4899a0e8a4ac +0 -0
  308. data/test/dummy/tmp/cache/assets/development/sprockets/ac74145f99b8dab2053e9ae97ab30b59 +0 -0
  309. data/test/dummy/tmp/cache/assets/development/sprockets/b064391743404352c0d06d1dae692bbc +0 -0
  310. data/test/dummy/tmp/cache/assets/development/sprockets/b0b79f650d323d7f80a4c7456dfce684 +0 -0
  311. data/test/dummy/tmp/cache/assets/development/sprockets/b0e2ed0167a71948529cf8507015a638 +0 -0
  312. data/test/dummy/tmp/cache/assets/development/sprockets/b2bf0c4531b78b65440c4c84908149fe +0 -0
  313. data/test/dummy/tmp/cache/assets/development/sprockets/b344975ddf3cba471441e737f3ca0570 +0 -0
  314. data/test/dummy/tmp/cache/assets/development/sprockets/b4da7dedc3efa1b2420734a75da1402f +0 -0
  315. data/test/dummy/tmp/cache/assets/development/sprockets/b5d99651fe9edd91970e38aaf098c3b6 +0 -0
  316. data/test/dummy/tmp/cache/assets/development/sprockets/b81f49d8cf1dbae0f6d1ac4d9d923f17 +0 -0
  317. data/test/dummy/tmp/cache/assets/development/sprockets/b8acda462092c7c76b1322856f8e39ca +0 -0
  318. data/test/dummy/tmp/cache/assets/development/sprockets/b8bfca64ea01caaf52a8ad9336eba057 +0 -0
  319. data/test/dummy/tmp/cache/assets/development/sprockets/bf9bfc00456efae4900ccf4afcb76b1a +0 -0
  320. data/test/dummy/tmp/cache/assets/development/sprockets/c01f86af98746d42cda25607438cc39f +0 -0
  321. data/test/dummy/tmp/cache/assets/development/sprockets/c0625d8a0a68787afb029146355062df +0 -0
  322. data/test/dummy/tmp/cache/assets/development/sprockets/c10a1994812cf191cd2ee4ef1f979bf0 +0 -0
  323. data/test/dummy/tmp/cache/assets/development/sprockets/c1bea1ba92a5304ffd28cc0af4b325d9 +0 -0
  324. data/test/dummy/tmp/cache/assets/development/sprockets/c28f157f3954955f1bc4ca11b085e5f1 +0 -0
  325. data/test/dummy/tmp/cache/assets/development/sprockets/c38b7c525999d0c070c974f0e1858073 +0 -0
  326. data/test/dummy/tmp/cache/assets/development/sprockets/c3fbb5f0690b2b69916c7cdfa2e6290b +0 -0
  327. data/test/dummy/tmp/cache/assets/development/sprockets/c4393dff2f5bbfb3db980d09f116e865 +0 -0
  328. data/test/dummy/tmp/cache/assets/development/sprockets/c64c25da8d01c54ccf41dc956d9c9b44 +0 -0
  329. data/test/dummy/tmp/cache/assets/development/sprockets/c6a502787893c3368f02209006ef3c3a +0 -0
  330. data/test/dummy/tmp/cache/assets/development/sprockets/c6fc4a60aef7967d11f2188d3a8317e8 +0 -0
  331. data/test/dummy/tmp/cache/assets/development/sprockets/c76f44b59338c92655cdb50acd5a51b7 +0 -0
  332. data/test/dummy/tmp/cache/assets/development/sprockets/c843fdb2b33bf3e87833b23027a9adb9 +0 -0
  333. data/test/dummy/tmp/cache/assets/development/sprockets/c8c8b769bfa8c90477013dc463dce8dd +0 -0
  334. data/test/dummy/tmp/cache/assets/development/sprockets/c9d60e346e8632bb3945f7e94cce0036 +0 -0
  335. data/test/dummy/tmp/cache/assets/development/sprockets/cb676c28d1dce8658c2ce261c40ff62d +0 -0
  336. data/test/dummy/tmp/cache/assets/development/sprockets/cbb7cfa2a375a0ec163c71490071ae70 +0 -0
  337. data/test/dummy/tmp/cache/assets/development/sprockets/cbfd1cdcc8926af0e015fd6e4a8cfe95 +0 -0
  338. data/test/dummy/tmp/cache/assets/development/sprockets/cc2b3e15e75ad21a379b54186f0b3e63 +0 -0
  339. data/test/dummy/tmp/cache/assets/development/sprockets/ce0f026a8f35c2824e68416229e502b0 +0 -0
  340. data/test/dummy/tmp/cache/assets/development/sprockets/cf38200dbb3ee3a9d4dd84cc1d98ada2 +0 -0
  341. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  342. data/test/dummy/tmp/cache/assets/development/sprockets/d06332ce072d0af8fda4bb34381370ef +0 -0
  343. data/test/dummy/tmp/cache/assets/development/sprockets/d1734506eed8ef7a8e5c73e599b0debb +0 -0
  344. data/test/dummy/tmp/cache/assets/development/sprockets/d3a4fc418bcc8c28e1477d8ae5981e44 +0 -0
  345. data/test/dummy/tmp/cache/assets/development/sprockets/d60ab8b8e8ff9e6df6e04cb335e79e38 +0 -0
  346. data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  347. data/test/dummy/tmp/cache/assets/development/sprockets/d786e75d26229c39c37d842fb4de0479 +0 -0
  348. data/test/dummy/tmp/cache/assets/development/sprockets/d9a230b2c36f01509e607c6fc423b04f +0 -0
  349. data/test/dummy/tmp/cache/assets/development/sprockets/da3b6190521b537ef46190c99c630173 +0 -0
  350. data/test/dummy/tmp/cache/assets/development/sprockets/dc3d91ae1d7f973c1354a745e97076dd +0 -0
  351. data/test/dummy/tmp/cache/assets/development/sprockets/dcef36a5aee30ad53443ea58149b5c8d +0 -0
  352. data/test/dummy/tmp/cache/assets/development/sprockets/dcf2f012e3f4d3ecc9b1a2f21290fefd +0 -0
  353. data/test/dummy/tmp/cache/assets/development/sprockets/de3b887062709ecbae0f43a1967507b3 +0 -0
  354. data/test/dummy/tmp/cache/assets/development/sprockets/de7818edd5229ecc4f5808d25aea085d +0 -0
  355. data/test/dummy/tmp/cache/assets/development/sprockets/dfd54ce2610fa0bdcd51a47ebe236db4 +0 -0
  356. data/test/dummy/tmp/cache/assets/development/sprockets/e010156bdbfaae9098512ae86bf0288b +0 -0
  357. data/test/dummy/tmp/cache/assets/development/sprockets/e0c1faca0fe3b99790f1467965b76234 +0 -0
  358. data/test/dummy/tmp/cache/assets/development/sprockets/e0d30e94a53fc0d324ec29d883efd5a0 +0 -0
  359. data/test/dummy/tmp/cache/assets/development/sprockets/e0e949e3a882294df1ac6efb53555963 +0 -0
  360. data/test/dummy/tmp/cache/assets/development/sprockets/e508a5da5b2a6ba14eaabe1fc9987f1b +0 -0
  361. data/test/dummy/tmp/cache/assets/development/sprockets/e64df0317c02ea3aaf0c6ac14b3c1994 +0 -0
  362. data/test/dummy/tmp/cache/assets/development/sprockets/ea3fbcf111211cf25a1e84abd8890069 +0 -0
  363. data/test/dummy/tmp/cache/assets/development/sprockets/ea97af2f7f945b7c87258b2338f5bc0c +0 -0
  364. data/test/dummy/tmp/cache/assets/development/sprockets/eb0dcd1f1d9812e1f7eb10b58e6b1ac9 +0 -0
  365. data/test/dummy/tmp/cache/assets/development/sprockets/eca6e114f4db2379855c8af72fafaa45 +0 -0
  366. data/test/dummy/tmp/cache/assets/development/sprockets/eeccfebd3c89a085ade5e49efa39fad9 +0 -0
  367. data/test/dummy/tmp/cache/assets/development/sprockets/f2137fda0185692d9909c6bde77f6ac5 +0 -0
  368. data/test/dummy/tmp/cache/assets/development/sprockets/f270587a206c85bb7163b16529b5ff69 +0 -0
  369. data/test/dummy/tmp/cache/assets/development/sprockets/f5630318facff40bd4c26746561e91a5 +0 -0
  370. data/test/dummy/tmp/cache/assets/development/sprockets/f7147d2e3eeeaef3c6adef2176a6e9bf +0 -0
  371. data/test/dummy/tmp/cache/assets/development/sprockets/f72f9d88e28ad73485fcc24ef00be1f0 +0 -0
  372. data/test/dummy/tmp/cache/assets/development/sprockets/f7428da6a5bd069f4c521897f2ff0549 +0 -0
  373. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  374. data/test/dummy/tmp/cache/assets/development/sprockets/fa7d07347669600716cb3cb894127454 +0 -0
  375. data/test/dummy/tmp/cache/assets/development/sprockets/fe4a3fb260cf70c451034496362792e4 +0 -0
  376. data/test/dummy/tmp/cache/assets/development/sprockets/ffa3b9093369ac4b2758f390b0cafab4 +0 -0
  377. data/test/dummy/tmp/cache/assets/production/sass/144bb07df25732886de34fc892b7c84d418ab110/cms.scss.erbc +0 -0
  378. data/test/dummy/tmp/cache/assets/production/sass/144bb07df25732886de34fc892b7c84d418ab110/cms.scssc +0 -0
  379. data/test/dummy/tmp/cache/assets/production/sass/5df77a09e28ee5e99b029d061fc8c7aa74ed8701/bootstrap.scss.erbc +0 -0
  380. data/test/dummy/tmp/cache/assets/production/sass/9ef9c546be1f15bd909c4626b18ec56c75aac0ce/cms.scss.erbc +0 -0
  381. data/test/dummy/tmp/cache/assets/production/sass/c8e2efff656b76a26ac2cc5b5528e2ab9741b52a/bootstrap.scss.erbc +0 -0
  382. data/test/dummy/tmp/cache/assets/production/sprockets/00dfd740f227e8eacf8dc70e8923aa30 +0 -0
  383. data/test/dummy/tmp/cache/assets/production/sprockets/021d5ce446187b362f442c81dbc04f33 +0 -0
  384. data/test/dummy/tmp/cache/assets/production/sprockets/052ccadc06984b221f1af051c32e613a +0 -0
  385. data/test/dummy/tmp/cache/assets/production/sprockets/0894458794b51b17900c3d7abefc2aa5 +0 -0
  386. data/test/dummy/tmp/cache/assets/production/sprockets/0ceefdff5c5f03895722be20f6ddc26b +0 -0
  387. data/test/dummy/tmp/cache/assets/production/sprockets/0dd47da3f882e810b77e341b2bcd8abc +0 -0
  388. data/test/dummy/tmp/cache/assets/production/sprockets/0f096a9239d1b8b3c0d7f0a079ba8dc6 +0 -0
  389. data/test/dummy/tmp/cache/assets/production/sprockets/0f7e8127f53c92f853b2d1f7f3887b25 +0 -0
  390. data/test/dummy/tmp/cache/assets/production/sprockets/11eedd47a993ae43b134c4a8323fe16d +0 -0
  391. data/test/dummy/tmp/cache/assets/production/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  392. data/test/dummy/tmp/cache/assets/production/sprockets/14e730b33d5c77e57ef1d749d3f59d09 +0 -0
  393. data/test/dummy/tmp/cache/assets/production/sprockets/16aa40bf8985a2f1f3e5dea5d72e6218 +0 -0
  394. data/test/dummy/tmp/cache/assets/production/sprockets/17ea4d79d21b1f083c77f59ba9b3372d +0 -0
  395. data/test/dummy/tmp/cache/assets/production/sprockets/1893a62d9206a1fb9d89578a47e6dba8 +0 -0
  396. data/test/dummy/tmp/cache/assets/production/sprockets/1de6a759b14c2e99ab1641cad5521433 +0 -0
  397. data/test/dummy/tmp/cache/assets/production/sprockets/22a5108e690ae432a7d96ad27ae23356 +0 -0
  398. data/test/dummy/tmp/cache/assets/production/sprockets/2bf91fb337440bb9de78c2e6c6bcb95f +0 -0
  399. data/test/dummy/tmp/cache/assets/production/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  400. data/test/dummy/tmp/cache/assets/production/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  401. data/test/dummy/tmp/cache/assets/production/sprockets/37ffa56a3e6b08a7683a7b180bac45e9 +0 -0
  402. data/test/dummy/tmp/cache/assets/production/sprockets/3f68640e722ec4648c55f987c372bd1f +0 -0
  403. data/test/dummy/tmp/cache/assets/production/sprockets/41b539dab4032aeab4acc677841be9e1 +0 -0
  404. data/test/dummy/tmp/cache/assets/production/sprockets/4d0e945a1aeffabb6ecbe4e9cfbe9900 +0 -0
  405. data/test/dummy/tmp/cache/assets/production/sprockets/5343637e2648daefcbb5f6da93e22170 +0 -0
  406. data/test/dummy/tmp/cache/assets/production/sprockets/5698b010ec22ef0139df1ec7921bada0 +0 -0
  407. data/test/dummy/tmp/cache/assets/production/sprockets/593143829da9d8a11949cdea62925830 +0 -0
  408. data/test/dummy/tmp/cache/assets/production/sprockets/5a3608849ffcf6b5ffd0e0c519899b0f +0 -0
  409. data/test/dummy/tmp/cache/assets/production/sprockets/5cceba1f5466432ddc1ca00d96bb6af2 +0 -0
  410. data/test/dummy/tmp/cache/assets/production/sprockets/613c2f7728f24118bf60b70e5467b04e +0 -0
  411. data/test/dummy/tmp/cache/assets/production/sprockets/6428de878f492d768cfef210554eb78e +0 -0
  412. data/test/dummy/tmp/cache/assets/production/sprockets/65e9bcd0c838633f8992701c9486752f +0 -0
  413. data/test/dummy/tmp/cache/assets/production/sprockets/66c2afe997efeeb00c23f320cd5154b1 +0 -0
  414. data/test/dummy/tmp/cache/assets/production/sprockets/672160928c4f356614c3b08e4dd18959 +0 -0
  415. data/test/dummy/tmp/cache/assets/production/sprockets/69088615f9cef33446fa9ce9af0cbfcb +0 -0
  416. data/test/dummy/tmp/cache/assets/production/sprockets/69c591a2e6598aef38bce6f1bfd9a583 +0 -0
  417. data/test/dummy/tmp/cache/assets/production/sprockets/6c0e89bb1f1dd6fef016f0f030b155a4 +0 -0
  418. data/test/dummy/tmp/cache/assets/production/sprockets/74d99242046d9e80efe6e63d318f0d23 +0 -0
  419. data/test/dummy/tmp/cache/assets/production/sprockets/77c132a2a2cf0e255033066a80db84e5 +0 -0
  420. data/test/dummy/tmp/cache/assets/production/sprockets/7b3469b8a6587d3fdde5168bcadc1829 +0 -0
  421. data/test/dummy/tmp/cache/assets/production/sprockets/7b89b96229652f6b39b4956713d83fb3 +0 -0
  422. data/test/dummy/tmp/cache/assets/production/sprockets/7bb9867f00636aa2e82aab7c8cde1156 +0 -0
  423. data/test/dummy/tmp/cache/assets/production/sprockets/7d185042919d487db4ba3415054bf46b +0 -0
  424. data/test/dummy/tmp/cache/assets/production/sprockets/7d541dc935739c00601285ef558dc186 +0 -0
  425. data/test/dummy/tmp/cache/assets/production/sprockets/7e0a659f836bf08aa7e86a3b3bd64a0a +0 -0
  426. data/test/dummy/tmp/cache/assets/production/sprockets/8085921c00ddb46d86508243dd466f7a +0 -0
  427. data/test/dummy/tmp/cache/assets/production/sprockets/808e7e23c256ba7b4ae032c997b7f7d1 +0 -0
  428. data/test/dummy/tmp/cache/assets/production/sprockets/82af58bd517f6c898e82655012e662f3 +0 -0
  429. data/test/dummy/tmp/cache/assets/production/sprockets/896e0a59c127f026ecc3ce390c394c6d +0 -0
  430. data/test/dummy/tmp/cache/assets/production/sprockets/8aa0c86835fc92349a71e76dfa064cf0 +0 -0
  431. data/test/dummy/tmp/cache/assets/production/sprockets/8c20ea028e7ef9e18ab2517785615d32 +0 -0
  432. data/test/dummy/tmp/cache/assets/production/sprockets/91307c7344a9f3f6f727226a87aaf6b1 +0 -0
  433. data/test/dummy/tmp/cache/assets/production/sprockets/977b0e7fd460cd4ebb7482e0bc5dae0d +0 -0
  434. data/test/dummy/tmp/cache/assets/production/sprockets/9e4856eaccd8050e2cce8f2726bd1ff9 +0 -0
  435. data/test/dummy/tmp/cache/assets/production/sprockets/a0ddccdbb865754a76b131fa64932582 +0 -0
  436. data/test/dummy/tmp/cache/assets/production/sprockets/aac96aa095d26ef97f58eb4126da0bf7 +0 -0
  437. data/test/dummy/tmp/cache/assets/production/sprockets/ab136f8b2c696dd4d96e4899a0e8a4ac +0 -0
  438. data/test/dummy/tmp/cache/assets/production/sprockets/ac74145f99b8dab2053e9ae97ab30b59 +0 -0
  439. data/test/dummy/tmp/cache/assets/production/sprockets/b0e2ed0167a71948529cf8507015a638 +0 -0
  440. data/test/dummy/tmp/cache/assets/production/sprockets/b2bf0c4531b78b65440c4c84908149fe +0 -0
  441. data/test/dummy/tmp/cache/assets/production/sprockets/b81f49d8cf1dbae0f6d1ac4d9d923f17 +0 -0
  442. data/test/dummy/tmp/cache/assets/production/sprockets/bf9bfc00456efae4900ccf4afcb76b1a +0 -0
  443. data/test/dummy/tmp/cache/assets/production/sprockets/c01f86af98746d42cda25607438cc39f +0 -0
  444. data/test/dummy/tmp/cache/assets/production/sprockets/c0625d8a0a68787afb029146355062df +0 -0
  445. data/test/dummy/tmp/cache/assets/production/sprockets/c28f157f3954955f1bc4ca11b085e5f1 +0 -0
  446. data/test/dummy/tmp/cache/assets/production/sprockets/c4393dff2f5bbfb3db980d09f116e865 +0 -0
  447. data/test/dummy/tmp/cache/assets/production/sprockets/c6a502787893c3368f02209006ef3c3a +0 -0
  448. data/test/dummy/tmp/cache/assets/production/sprockets/c76f44b59338c92655cdb50acd5a51b7 +0 -0
  449. data/test/dummy/tmp/cache/assets/production/sprockets/c8c8b769bfa8c90477013dc463dce8dd +0 -0
  450. data/test/dummy/tmp/cache/assets/production/sprockets/c9d60e346e8632bb3945f7e94cce0036 +0 -0
  451. data/test/dummy/tmp/cache/assets/production/sprockets/cbfd1cdcc8926af0e015fd6e4a8cfe95 +0 -0
  452. data/test/dummy/tmp/cache/assets/production/sprockets/cc2b3e15e75ad21a379b54186f0b3e63 +0 -0
  453. data/test/dummy/tmp/cache/assets/production/sprockets/ce0f026a8f35c2824e68416229e502b0 +0 -0
  454. data/test/dummy/tmp/cache/assets/production/sprockets/cf38200dbb3ee3a9d4dd84cc1d98ada2 +0 -0
  455. data/test/dummy/tmp/cache/assets/production/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  456. data/test/dummy/tmp/cache/assets/production/sprockets/d60ab8b8e8ff9e6df6e04cb335e79e38 +0 -0
  457. data/test/dummy/tmp/cache/assets/production/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  458. data/test/dummy/tmp/cache/assets/production/sprockets/d786e75d26229c39c37d842fb4de0479 +0 -0
  459. data/test/dummy/tmp/cache/assets/production/sprockets/da3b6190521b537ef46190c99c630173 +0 -0
  460. data/test/dummy/tmp/cache/assets/production/sprockets/dcf2f012e3f4d3ecc9b1a2f21290fefd +0 -0
  461. data/test/dummy/tmp/cache/assets/production/sprockets/de3b887062709ecbae0f43a1967507b3 +0 -0
  462. data/test/dummy/tmp/cache/assets/production/sprockets/e010156bdbfaae9098512ae86bf0288b +0 -0
  463. data/test/dummy/tmp/cache/assets/production/sprockets/e0e949e3a882294df1ac6efb53555963 +0 -0
  464. data/test/dummy/tmp/cache/assets/production/sprockets/e508a5da5b2a6ba14eaabe1fc9987f1b +0 -0
  465. data/test/dummy/tmp/cache/assets/production/sprockets/f2137fda0185692d9909c6bde77f6ac5 +0 -0
  466. data/test/dummy/tmp/cache/assets/production/sprockets/f5630318facff40bd4c26746561e91a5 +0 -0
  467. data/test/dummy/tmp/cache/assets/production/sprockets/f72f9d88e28ad73485fcc24ef00be1f0 +0 -0
  468. data/test/dummy/tmp/cache/assets/production/sprockets/f7428da6a5bd069f4c521897f2ff0549 +0 -0
  469. data/test/dummy/tmp/cache/assets/production/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  470. data/test/dummy/tmp/cache/assets/production/sprockets/fa7d07347669600716cb3cb894127454 +0 -0
  471. data/test/dummy/tmp/cache/assets/production/sprockets/ffa3b9093369ac4b2758f390b0cafab4 +0 -0
  472. metadata +1097 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3b2baf1750ad522511f98b8828adfe1900ae6f75
4
+ data.tar.gz: 0760fe6c1d2c1b7f34322f03b42a8deb38fb01c2
5
+ SHA512:
6
+ metadata.gz: df4a3f44a94f23bddd27ab69402a627c6e2db2382f62b6c7474f024de0ded64984e9b6f6520e60c701a95e4f0158cfd33e2d3bb5f90abfe7d865435a837a29e5
7
+ data.tar.gz: 58cbbd5781cdb2b63a4b8407f3c55f0e970ddf08a9b9f6714e01170eab609b4bc12ed4cc828abdab53249f0f4045167f99b41856698db30fd04e5311445136b7
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2013 Žiga Vidic
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,239 @@
1
+ # Rubber Ring - simple content editable CMS
2
+ [![Code Climate](https://codeclimate.com/github/zigomir/rubber_ring.png)](https://codeclimate.com/github/zigomir/rubber_ring)
3
+
4
+ ## About
5
+
6
+ This CMS helps you build editable pages fast. You define which content
7
+ (`text`, `image`, `attachment`, ...) should be editable for your users.
8
+ Limitation, that only developer sets what page parts are editable is good for
9
+ keeping the design intact. It is basically backend for saving `contenteditable` content.
10
+ When done editing, only static assets will be published to production server
11
+ where you only need a web server like Apache or Nginx.
12
+
13
+ Named by The Smiths [song](http://www.youtube.com/watch?v=Cpf6gJU3520).
14
+
15
+ ## Benefits over other content editable CMSes
16
+
17
+ - optimized for developers and quick setup
18
+ - simple to use for customers. They should not be able to break design (a lot)
19
+ - customer doesn't need application server and/or database. Only plain web server for static HTML serving will do
20
+
21
+ ### This CMS is not good for
22
+ sites, where **editor** wants to create new pages and control each part of every page,
23
+ change fonts and text style
24
+
25
+ ## Software prerequisites
26
+
27
+ * Ruby `2.0.0-p0`
28
+ * Rails `4.0.0.rc1`
29
+ * imagemagick
30
+
31
+ ### Browser support
32
+
33
+ Firefox and Chrome. IE drag and drop doesn't work for now.
34
+
35
+ ## Setup
36
+
37
+ ### Dependencies
38
+ To install `imagemagick` and `sqlite3` on `Ubuntu`
39
+
40
+ sudo apt-get install imagemagick
41
+ sudo apt-get install libsqlite3-dev
42
+
43
+ ### Setting up new Rails project
44
+
45
+ Add it to your `Gemfile`
46
+
47
+ gem 'rubber_ring', :git => 'git://github.com/zigomir/rubber_ring.git'
48
+
49
+ Create/migrate database
50
+
51
+ rake rubber_ring:install:migrations
52
+ rake db:migrate
53
+
54
+ Update `development.rb` to enable caching
55
+
56
+ config.action_controller.perform_caching = true
57
+
58
+ Remove `//= require jquery` and `//= require jquery_ujs` from `application.js` because
59
+ Rubber Ring is already including jQuery for you.
60
+
61
+ ### Setup config files
62
+
63
+ Generate initialize settings file for admin and settings for publishing pages
64
+ on production server
65
+
66
+ rails generate rubber_ring:install
67
+
68
+ This will generate
69
+
70
+ 1. app/config/publish.yml
71
+ 2. app/config/initializers/rubber_ring.rb
72
+ 3. app/views/layouts/rubber_ring/layout.html.erb
73
+ 4. app/assets/javascripts/application.js
74
+ 5. public/.htaccess
75
+
76
+ 1. Set your production server name and path. You will need SSH access and your public key
77
+ on server. If you tend to use Rubber Ring as part of web application you can ignore this
78
+ file.
79
+ 2. Set admin password and application type in `app/config/initializers/rubber_ring.rb`.
80
+ 3. `app/views/layouts/rubber_ring/layout.html.erb` is here for you to override it,
81
+ so you have complete control over your markup.
82
+ 4. This is copied because default Rails `application.js` includes `jquery` which is
83
+ already included for you by Rubber Ring (avoiding clashes).
84
+ 5. Apaches access config. Including rules so you can access all published pages. It will
85
+ look for `.html` files first and enter sub directories later. Example: we have page with
86
+ route `/en` and `/en/example`. When published, `en.html` and `en/example.html` will be
87
+ generated and synced with production server. To serve them both we need this `.htaccess` file.
88
+
89
+ ### Static pages or Rails application?
90
+
91
+ * If you only want to use Rubber Ring to generate static pages, leave
92
+ `RubberRing.static_only = true` intact. This will leave you with options to
93
+ `preview` and `publish` html pages and other assets to production server. Otherwise set
94
+ this option to false.
95
+
96
+ # Usage
97
+
98
+ ## As an editor I want to easily edit content on my site
99
+
100
+ Login (`/rubber_ring`) with password which was set by developer in the install stage.
101
+
102
+ Editing content is easy as clicking inside green boxes and start editing.
103
+ Developer sets what content is editable/repeatable/link/multi line...
104
+
105
+ For changing images click on `Image manager` in the upper menu.
106
+ Drag and drop the image you need to drop zone. After uploading the image you can drag
107
+ and drop it on the image you wanted to change. Image will be automatically resized
108
+ to the size that was set by developer/designer.
109
+
110
+ ### Build and publish your pages
111
+
112
+ `Preview` option in the menu will output entire page to `public/build` directory. `Publish` will upload current page to your production server, set in `publish.yml` file.
113
+
114
+ ## As a developer I want to quickly setup editable pages
115
+
116
+ Rails generator for new pages
117
+
118
+ rails generate rubber_ring:page home action1 action2
119
+
120
+ This will create files and new routes to `routes.rb` file
121
+
122
+ create app/controllers/home_controller.rb
123
+ create app/views/home/action1.html.erb
124
+ create app/views/home/action2.html.erb
125
+ route get 'home/action1'
126
+ route get 'home/action2'
127
+
128
+ ### Rubber Ring helpers
129
+
130
+ CMS fields are made of tag, key and `@page` which holds content for all the page keys/value pairs.
131
+
132
+ Examples
133
+
134
+ <%= editable_field(:h1, {key: 'header'}, @page) do %>
135
+ I'm editable content in one line.
136
+ <% end %>
137
+
138
+ <%= editable_field(:div, {key: 'first_content', class: 'multi-line'}, @page) do %>
139
+ I'm editable content in
140
+ multi lines...
141
+ <% end %>
142
+
143
+ <%= editable_link({class: 'rubber_ring_attachment', key: 'attachment-link', href: '/link-to-something'}, @page) do %>
144
+ Link to PDF
145
+ <% end %>
146
+
147
+ <%= editable_image({key: 'header_image', src: image_path('baws.jpg'), height: '360'}, @page) %>
148
+
149
+ ## Templates
150
+
151
+ Allows you to set up repeating and sortable templates. Example
152
+
153
+ <% template([
154
+ {template: 'article', tclass: 'article', element: 'article'},
155
+ {template: 'blog_post', tclass: 'blog', element: 'div'}
156
+ ],
157
+ {key: 'template_key', wrap_element: 'div', wrap_class: 'templates'}, @page)
158
+ %>
159
+
160
+
161
+ This means, that you need to create new view for each template in
162
+ `app/views/templates/`. Example
163
+
164
+ `app/views/templates/_article.html.erb`
165
+
166
+ Convention
167
+
168
+ ...
169
+ {template: 'article', ...
170
+ ...
171
+
172
+ means that you need a view, saved like:
173
+
174
+ `app/views/templates/_article.html.erb`
175
+
176
+ **Inside templates** you can use all other helpers. **BUT**, you need to
177
+ assemble your key correctly or otherwise you will be overwriting your own content.
178
+ You can use `key_prefix`, which is assembled the way which will help you to prevent key overwites. Example:
179
+
180
+ <%= editable_field(:h2, {key: "#{key_prefix}_title"}, @page) do %>
181
+ Article Title
182
+ <% end %>
183
+
184
+ ### Helper options
185
+
186
+ Each helper needs to specify unique `key`. These are holding values in the database.
187
+ Also each helper needs to include `@page` object as their last parameter.
188
+ This object holds all the editable content of the page in a hash data structure.
189
+
190
+ #### already used keys which you must not use
191
+
192
+ - `page_title`
193
+
194
+ #### helper arguments for all editable fields
195
+ - `key` key to hold the value **(must be unique)**
196
+ - `class` html class attribute (optional)
197
+ - class value with `multi-line` will enable editing in multi lines
198
+ - `id` html id attribute (optional)
199
+ - `@page` object for holding page content
200
+
201
+ #### specific arguments for each field
202
+ - `editable_image`
203
+ - `src` image source attribute
204
+ - `width` image width
205
+ - `height` image height
206
+ - `editable_field`
207
+ - no specific arguments
208
+ - `editable_link`
209
+ - `href` specifies link to page / file
210
+ - if you set or add a class called `rubber_ring_attachment` to `editable_link` you can drop new attachments to it
211
+
212
+ ### Assets (stylesheets and javascripts)
213
+
214
+ You can use, like in any other Rails application,
215
+ [sprockets directives](https://github.com/sstephenson/sprockets#the-directive-processor)
216
+ to include assets to your app.
217
+ Please remove `//= require jquery` and `//= require jquery_ujs` from `application.js`
218
+ because rubber ring is already including `jquery` which you can reuse in your
219
+ pages as well.
220
+
221
+ ## Philosophy
222
+
223
+ * user should not be able to break design
224
+ * you can not build robust system without limitations
225
+ * system may stretch only to certain point until it breaks. Like a rubber ring!
226
+
227
+ ## Inspired by
228
+
229
+ - [Mercury Editor](http://jejacks0n.github.io/mercury/)
230
+ - [Raptor Editor](http://www.raptor-editor.com/)
231
+ - [Copybar](https://copybar.io)
232
+ - [Perch](http://grabaperch.com/)
233
+ - [CopyCopter](http://copycopter.com)
234
+ - [SimpleCMS](http://www.simplecms.com)
235
+ - [Squarespace](http://www.squarespace.com/)
236
+ - [contenteditable editors](http://stackoverflow.com/questions/6756407/what-contenteditable-editors-are-there)
237
+
238
+ ---
239
+ This project uses MIT-LICENSE. Copyright 2013 Žiga Vidic
data/Rakefile ADDED
@@ -0,0 +1,34 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'RubberRing'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+
21
+
22
+ Bundler::GemHelper.install_tasks
23
+
24
+ require 'rake/testtask'
25
+
26
+ Rake::TestTask.new(:test) do |t|
27
+ t.libs << 'lib'
28
+ t.libs << 'test'
29
+ t.pattern = 'test/**/*_test.rb'
30
+ t.verbose = false
31
+ end
32
+
33
+
34
+ task default: :test
@@ -0,0 +1,1258 @@
1
+ ;(function(){
2
+
3
+
4
+ /**
5
+ * hasOwnProperty.
6
+ */
7
+
8
+ var has = Object.prototype.hasOwnProperty;
9
+
10
+ /**
11
+ * Require the given path.
12
+ *
13
+ * @param {String} path
14
+ * @return {Object} exports
15
+ * @api public
16
+ */
17
+
18
+ function require(path, parent, orig) {
19
+ var resolved = require.resolve(path);
20
+
21
+ // lookup failed
22
+ if (null == resolved) {
23
+ orig = orig || path;
24
+ parent = parent || 'root';
25
+ var err = new Error('Failed to require "' + orig + '" from "' + parent + '"');
26
+ err.path = orig;
27
+ err.parent = parent;
28
+ err.require = true;
29
+ throw err;
30
+ }
31
+
32
+ var module = require.modules[resolved];
33
+
34
+ // perform real require()
35
+ // by invoking the module's
36
+ // registered function
37
+ if (!module.exports) {
38
+ module.exports = {};
39
+ module.client = module.component = true;
40
+ module.call(this, module.exports, require.relative(resolved), module);
41
+ }
42
+
43
+ return module.exports;
44
+ }
45
+
46
+ /**
47
+ * Registered modules.
48
+ */
49
+
50
+ require.modules = {};
51
+
52
+ /**
53
+ * Registered aliases.
54
+ */
55
+
56
+ require.aliases = {};
57
+
58
+ /**
59
+ * Resolve `path`.
60
+ *
61
+ * Lookup:
62
+ *
63
+ * - PATH/index.js
64
+ * - PATH.js
65
+ * - PATH
66
+ *
67
+ * @param {String} path
68
+ * @return {String} path or null
69
+ * @api private
70
+ */
71
+
72
+ require.resolve = function(path) {
73
+ if (path.charAt(0) === '/') path = path.slice(1);
74
+ var index = path + '/index.js';
75
+
76
+ var paths = [
77
+ path,
78
+ path + '.js',
79
+ path + '.json',
80
+ path + '/index.js',
81
+ path + '/index.json'
82
+ ];
83
+
84
+ for (var i = 0; i < paths.length; i++) {
85
+ var path = paths[i];
86
+ if (has.call(require.modules, path)) return path;
87
+ }
88
+
89
+ if (has.call(require.aliases, index)) {
90
+ return require.aliases[index];
91
+ }
92
+ };
93
+
94
+ /**
95
+ * Normalize `path` relative to the current path.
96
+ *
97
+ * @param {String} curr
98
+ * @param {String} path
99
+ * @return {String}
100
+ * @api private
101
+ */
102
+
103
+ require.normalize = function(curr, path) {
104
+ var segs = [];
105
+
106
+ if ('.' != path.charAt(0)) return path;
107
+
108
+ curr = curr.split('/');
109
+ path = path.split('/');
110
+
111
+ for (var i = 0; i < path.length; ++i) {
112
+ if ('..' == path[i]) {
113
+ curr.pop();
114
+ } else if ('.' != path[i] && '' != path[i]) {
115
+ segs.push(path[i]);
116
+ }
117
+ }
118
+
119
+ return curr.concat(segs).join('/');
120
+ };
121
+
122
+ /**
123
+ * Register module at `path` with callback `definition`.
124
+ *
125
+ * @param {String} path
126
+ * @param {Function} definition
127
+ * @api private
128
+ */
129
+
130
+ require.register = function(path, definition) {
131
+ require.modules[path] = definition;
132
+ };
133
+
134
+ /**
135
+ * Alias a module definition.
136
+ *
137
+ * @param {String} from
138
+ * @param {String} to
139
+ * @api private
140
+ */
141
+
142
+ require.alias = function(from, to) {
143
+ if (!has.call(require.modules, from)) {
144
+ throw new Error('Failed to alias "' + from + '", it does not exist');
145
+ }
146
+ require.aliases[to] = from;
147
+ };
148
+
149
+ /**
150
+ * Return a require function relative to the `parent` path.
151
+ *
152
+ * @param {String} parent
153
+ * @return {Function}
154
+ * @api private
155
+ */
156
+
157
+ require.relative = function(parent) {
158
+ var p = require.normalize(parent, '..');
159
+
160
+ /**
161
+ * lastIndexOf helper.
162
+ */
163
+
164
+ function lastIndexOf(arr, obj) {
165
+ var i = arr.length;
166
+ while (i--) {
167
+ if (arr[i] === obj) return i;
168
+ }
169
+ return -1;
170
+ }
171
+
172
+ /**
173
+ * The relative require() itself.
174
+ */
175
+
176
+ function localRequire(path) {
177
+ var resolved = localRequire.resolve(path);
178
+ return require(resolved, parent, path);
179
+ }
180
+
181
+ /**
182
+ * Resolve relative to the parent.
183
+ */
184
+
185
+ localRequire.resolve = function(path) {
186
+ var c = path.charAt(0);
187
+ if ('/' == c) return path.slice(1);
188
+ if ('.' == c) return require.normalize(p, path);
189
+
190
+ // resolve deps by returning
191
+ // the dep in the nearest "deps"
192
+ // directory
193
+ var segs = parent.split('/');
194
+ var i = lastIndexOf(segs, 'deps') + 1;
195
+ if (!i) i = 0;
196
+ path = segs.slice(0, i + 1).join('/') + '/deps/' + path;
197
+ return path;
198
+ };
199
+
200
+ /**
201
+ * Check if module is defined at `path`.
202
+ */
203
+
204
+ localRequire.exists = function(path) {
205
+ return has.call(require.modules, localRequire.resolve(path));
206
+ };
207
+
208
+ return localRequire;
209
+ };
210
+ require.register("component-emitter/index.js", function(exports, require, module){
211
+
212
+ /**
213
+ * Expose `Emitter`.
214
+ */
215
+
216
+ module.exports = Emitter;
217
+
218
+ /**
219
+ * Initialize a new `Emitter`.
220
+ *
221
+ * @api public
222
+ */
223
+
224
+ function Emitter(obj) {
225
+ if (obj) return mixin(obj);
226
+ };
227
+
228
+ /**
229
+ * Mixin the emitter properties.
230
+ *
231
+ * @param {Object} obj
232
+ * @return {Object}
233
+ * @api private
234
+ */
235
+
236
+ function mixin(obj) {
237
+ for (var key in Emitter.prototype) {
238
+ obj[key] = Emitter.prototype[key];
239
+ }
240
+ return obj;
241
+ }
242
+
243
+ /**
244
+ * Listen on the given `event` with `fn`.
245
+ *
246
+ * @param {String} event
247
+ * @param {Function} fn
248
+ * @return {Emitter}
249
+ * @api public
250
+ */
251
+
252
+ Emitter.prototype.on = function(event, fn){
253
+ this._callbacks = this._callbacks || {};
254
+ (this._callbacks[event] = this._callbacks[event] || [])
255
+ .push(fn);
256
+ return this;
257
+ };
258
+
259
+ /**
260
+ * Adds an `event` listener that will be invoked a single
261
+ * time then automatically removed.
262
+ *
263
+ * @param {String} event
264
+ * @param {Function} fn
265
+ * @return {Emitter}
266
+ * @api public
267
+ */
268
+
269
+ Emitter.prototype.once = function(event, fn){
270
+ var self = this;
271
+ this._callbacks = this._callbacks || {};
272
+
273
+ function on() {
274
+ self.off(event, on);
275
+ fn.apply(this, arguments);
276
+ }
277
+
278
+ fn._off = on;
279
+ this.on(event, on);
280
+ return this;
281
+ };
282
+
283
+ /**
284
+ * Remove the given callback for `event` or all
285
+ * registered callbacks.
286
+ *
287
+ * @param {String} event
288
+ * @param {Function} fn
289
+ * @return {Emitter}
290
+ * @api public
291
+ */
292
+
293
+ Emitter.prototype.off =
294
+ Emitter.prototype.removeListener =
295
+ Emitter.prototype.removeAllListeners = function(event, fn){
296
+ this._callbacks = this._callbacks || {};
297
+ var callbacks = this._callbacks[event];
298
+ if (!callbacks) return this;
299
+
300
+ // remove all handlers
301
+ if (1 == arguments.length) {
302
+ delete this._callbacks[event];
303
+ return this;
304
+ }
305
+
306
+ // remove specific handler
307
+ var i = callbacks.indexOf(fn._off || fn);
308
+ if (~i) callbacks.splice(i, 1);
309
+ return this;
310
+ };
311
+
312
+ /**
313
+ * Emit `event` with the given args.
314
+ *
315
+ * @param {String} event
316
+ * @param {Mixed} ...
317
+ * @return {Emitter}
318
+ */
319
+
320
+ Emitter.prototype.emit = function(event){
321
+ this._callbacks = this._callbacks || {};
322
+ var args = [].slice.call(arguments, 1)
323
+ , callbacks = this._callbacks[event];
324
+
325
+ if (callbacks) {
326
+ callbacks = callbacks.slice(0);
327
+ for (var i = 0, len = callbacks.length; i < len; ++i) {
328
+ callbacks[i].apply(this, args);
329
+ }
330
+ }
331
+
332
+ return this;
333
+ };
334
+
335
+ /**
336
+ * Return array of callbacks for `event`.
337
+ *
338
+ * @param {String} event
339
+ * @return {Array}
340
+ * @api public
341
+ */
342
+
343
+ Emitter.prototype.listeners = function(event){
344
+ this._callbacks = this._callbacks || {};
345
+ return this._callbacks[event] || [];
346
+ };
347
+
348
+ /**
349
+ * Check if this emitter has `event` handlers.
350
+ *
351
+ * @param {String} event
352
+ * @return {Boolean}
353
+ * @api public
354
+ */
355
+
356
+ Emitter.prototype.hasListeners = function(event){
357
+ return !! this.listeners(event).length;
358
+ };
359
+
360
+ });
361
+ require.register("dropzone/index.js", function(exports, require, module){
362
+
363
+
364
+ /**
365
+ * Exposing dropzone
366
+ */
367
+ module.exports = require("./lib/dropzone.js");
368
+
369
+ });
370
+ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
371
+ /*
372
+ #
373
+ # More info at [www.dropzonejs.com](http://www.dropzonejs.com)
374
+ #
375
+ # Copyright (c) 2012, Matias Meno
376
+ #
377
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
378
+ # of this software and associated documentation files (the "Software"), to deal
379
+ # in the Software without restriction, including without limitation the rights
380
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
381
+ # copies of the Software, and to permit persons to whom the Software is
382
+ # furnished to do so, subject to the following conditions:
383
+ #
384
+ # The above copyright notice and this permission notice shall be included in
385
+ # all copies or substantial portions of the Software.
386
+ #
387
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
388
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
389
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
390
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
391
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
392
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
393
+ # THE SOFTWARE.
394
+ #
395
+ */
396
+
397
+
398
+ (function() {
399
+ var Dropzone, Em, camelize, contentLoaded, noop, without,
400
+ __hasProp = {}.hasOwnProperty,
401
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
402
+ __slice = [].slice,
403
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
404
+
405
+ Em = typeof Emitter !== "undefined" && Emitter !== null ? Emitter : require("emitter");
406
+
407
+ noop = function() {};
408
+
409
+ Dropzone = (function(_super) {
410
+ __extends(Dropzone, _super);
411
+
412
+ /*
413
+ This is a list of all available events you can register on a dropzone object.
414
+
415
+ You can register an event handler like this:
416
+
417
+ dropzone.on("dragEnter", function() { });
418
+ */
419
+
420
+
421
+ Dropzone.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "selectedfiles", "addedfile", "removedfile", "thumbnail", "error", "processingfile", "uploadprogress", "sending", "success", "complete", "reset"];
422
+
423
+ Dropzone.prototype.defaultOptions = {
424
+ url: null,
425
+ method: "post",
426
+ parallelUploads: 2,
427
+ maxFilesize: 256,
428
+ paramName: "file",
429
+ createImageThumbnails: true,
430
+ maxThumbnailFilesize: 2,
431
+ thumbnailWidth: 100,
432
+ thumbnailHeight: 100,
433
+ params: {},
434
+ clickable: true,
435
+ enqueueForUpload: true,
436
+ previewsContainer: null,
437
+ dictDefaultMessage: "Drop files here to upload",
438
+ dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.",
439
+ dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.",
440
+ accept: function(file, done) {
441
+ return done();
442
+ },
443
+ init: function() {
444
+ return noop;
445
+ },
446
+ forceFallback: false,
447
+ fallback: function() {
448
+ var child, messageElement, span, _i, _len, _ref;
449
+
450
+ this.element.className = "" + this.element.className + " browser-not-supported";
451
+ _ref = this.element.getElementsByTagName("div");
452
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
453
+ child = _ref[_i];
454
+ if (/(^| )message($| )/.test(child.className)) {
455
+ messageElement = child;
456
+ child.className = "message";
457
+ continue;
458
+ }
459
+ }
460
+ if (!messageElement) {
461
+ messageElement = Dropzone.createElement("<div class=\"message\"><span></span></div>");
462
+ this.element.appendChild(messageElement);
463
+ }
464
+ span = messageElement.getElementsByTagName("span")[0];
465
+ if (span) {
466
+ span.textContent = this.options.dictFallbackMessage;
467
+ }
468
+ return this.element.appendChild(this.getFallbackForm());
469
+ },
470
+ /*
471
+ Those functions register themselves to the events on init and handle all
472
+ the user interface specific stuff. Overwriting them won't break the upload
473
+ but can break the way it's displayed.
474
+ You can overwrite them if you don't like the default behavior. If you just
475
+ want to add an additional event handler, register it on the dropzone object
476
+ and don't overwrite those options.
477
+ */
478
+
479
+ drop: function(e) {
480
+ return this.element.classList.remove("drag-hover");
481
+ },
482
+ dragstart: noop,
483
+ dragend: function(e) {
484
+ return this.element.classList.remove("drag-hover");
485
+ },
486
+ dragenter: function(e) {
487
+ return this.element.classList.add("drag-hover");
488
+ },
489
+ dragover: function(e) {
490
+ return this.element.classList.add("drag-hover");
491
+ },
492
+ dragleave: function(e) {
493
+ return this.element.classList.remove("drag-hover");
494
+ },
495
+ selectedfiles: function(files) {
496
+ if (this.element === this.previewsContainer) {
497
+ return this.element.classList.add("started");
498
+ }
499
+ },
500
+ reset: function() {
501
+ return this.element.classList.remove("started");
502
+ },
503
+ addedfile: function(file) {
504
+ file.previewTemplate = Dropzone.createElement(this.options.previewTemplate);
505
+ this.previewsContainer.appendChild(file.previewTemplate);
506
+ file.previewTemplate.querySelector(".filename span").textContent = file.name;
507
+ return file.previewTemplate.querySelector(".details").appendChild(Dropzone.createElement("<div class=\"size\">" + (this.filesize(file.size)) + "</div>"));
508
+ },
509
+ removedfile: function(file) {
510
+ return file.previewTemplate.parentNode.removeChild(file.previewTemplate);
511
+ },
512
+ thumbnail: function(file, dataUrl) {
513
+ file.previewTemplate.classList.remove("file-preview");
514
+ file.previewTemplate.classList.add("image-preview");
515
+ return file.previewTemplate.querySelector(".details").appendChild(Dropzone.createElement("<img alt=\"" + file.name + "\" src=\"" + dataUrl + "\"/>"));
516
+ },
517
+ error: function(file, message) {
518
+ file.previewTemplate.classList.add("error");
519
+ return file.previewTemplate.querySelector(".error-message span").textContent = message;
520
+ },
521
+ processingfile: function(file) {
522
+ return file.previewTemplate.classList.add("processing");
523
+ },
524
+ uploadprogress: function(file, progress) {
525
+ return file.previewTemplate.querySelector(".progress .upload").style.width = "" + progress + "%";
526
+ },
527
+ sending: noop,
528
+ success: function(file) {
529
+ return file.previewTemplate.classList.add("success");
530
+ },
531
+ complete: noop,
532
+ previewTemplate: "<div class=\"preview file-preview\">\n <div class=\"details\">\n <div class=\"filename\"><span></span></div>\n </div>\n <div class=\"progress\"><span class=\"upload\"></span></div>\n <div class=\"success-mark\"><span>✔</span></div>\n <div class=\"error-mark\"><span>✘</span></div>\n <div class=\"error-message\"><span></span></div>\n</div>"
533
+ };
534
+
535
+ function Dropzone(element, options) {
536
+ var elementOptions, extend, fallback, _ref;
537
+
538
+ this.element = element;
539
+ this.version = Dropzone.version;
540
+ this.defaultOptions.previewTemplate = this.defaultOptions.previewTemplate.replace(/\n*/g, "");
541
+ if (typeof this.element === "string") {
542
+ this.element = document.querySelector(this.element);
543
+ }
544
+ if (!(this.element && (this.element.nodeType != null))) {
545
+ throw new Error("Invalid dropzone element.");
546
+ }
547
+ if (this.element.dropzone) {
548
+ throw new Error("Dropzone already attached.");
549
+ }
550
+ Dropzone.instances.push(this);
551
+ element.dropzone = this;
552
+ elementOptions = (_ref = Dropzone.optionsForElement(this.element)) != null ? _ref : {};
553
+ extend = function() {
554
+ var key, object, objects, target, val, _i, _len;
555
+
556
+ target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
557
+ for (_i = 0, _len = objects.length; _i < _len; _i++) {
558
+ object = objects[_i];
559
+ for (key in object) {
560
+ val = object[key];
561
+ target[key] = val;
562
+ }
563
+ }
564
+ return target;
565
+ };
566
+ this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {});
567
+ if (this.options.url == null) {
568
+ this.options.url = this.element.action;
569
+ }
570
+ if (!this.options.url) {
571
+ throw new Error("No URL provided.");
572
+ }
573
+ this.options.method = this.options.method.toUpperCase();
574
+ if (this.options.forceFallback || !Dropzone.isBrowserSupported()) {
575
+ return this.options.fallback.call(this);
576
+ }
577
+ if ((fallback = this.getExistingFallback()) && fallback.parentNode) {
578
+ fallback.parentNode.removeChild(fallback);
579
+ }
580
+ if (this.options.previewsContainer) {
581
+ if (typeof this.options.previewsContainer === "string") {
582
+ this.previewsContainer = document.querySelector(this.options.previewsContainer);
583
+ } else if (this.options.previewsContainer.nodeType != null) {
584
+ this.previewsContainer = this.options.previewsContainer;
585
+ }
586
+ if (this.previewsContainer == null) {
587
+ throw new Error("Invalid `previewsContainer` option provided. Please provide a CSS selector or a plain HTML element.");
588
+ }
589
+ } else {
590
+ this.previewsContainer = this.element;
591
+ }
592
+ if (this.options.clickable) {
593
+ if (this.options.clickable === true) {
594
+ this.clickableElement = this.element;
595
+ } else if (typeof this.options.clickable === "string") {
596
+ this.clickableElement = document.querySelector(this.options.clickable);
597
+ } else if (this.options.clickable.nodeType != null) {
598
+ this.clickableElement = this.options.clickable;
599
+ }
600
+ if (!this.clickableElement) {
601
+ throw new Error("Invalid `clickable` element provided. Please set it to `true`, a plain HTML element or a valid CSS selector.");
602
+ }
603
+ }
604
+ this.init();
605
+ }
606
+
607
+ Dropzone.prototype.init = function() {
608
+ var eventName, noPropagation, setupHiddenFileInput, _i, _len, _ref, _ref1,
609
+ _this = this;
610
+
611
+ if (this.element.tagName === "form") {
612
+ this.element.setAttribute("enctype", "multipart/form-data");
613
+ }
614
+ if (this.element.classList.contains("dropzone") && !this.element.querySelector(".message")) {
615
+ this.element.appendChild(Dropzone.createElement("<div class=\"default message\"><span>" + this.options.dictDefaultMessage + "</span></div>"));
616
+ }
617
+ if (this.clickableElement) {
618
+ setupHiddenFileInput = function() {
619
+ if (_this.hiddenFileInput) {
620
+ document.body.removeChild(_this.hiddenFileInput);
621
+ }
622
+ _this.hiddenFileInput = document.createElement("input");
623
+ _this.hiddenFileInput.setAttribute("type", "file");
624
+ _this.hiddenFileInput.setAttribute("multiple", "multiple");
625
+ _this.hiddenFileInput.style.display = "none";
626
+ document.body.appendChild(_this.hiddenFileInput);
627
+ return _this.hiddenFileInput.addEventListener("change", function() {
628
+ var files;
629
+
630
+ files = _this.hiddenFileInput.files;
631
+ if (files.length) {
632
+ _this.emit("selectedfiles", files);
633
+ _this.handleFiles(files);
634
+ }
635
+ return setupHiddenFileInput();
636
+ });
637
+ };
638
+ setupHiddenFileInput();
639
+ }
640
+ this.files = [];
641
+ this.filesQueue = [];
642
+ this.filesProcessing = [];
643
+ this.URL = (_ref = window.URL) != null ? _ref : window.webkitURL;
644
+ _ref1 = this.events;
645
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
646
+ eventName = _ref1[_i];
647
+ this.on(eventName, this.options[eventName]);
648
+ }
649
+ noPropagation = function(e) {
650
+ e.stopPropagation();
651
+ if (e.preventDefault) {
652
+ return e.preventDefault();
653
+ } else {
654
+ return e.returnValue = false;
655
+ }
656
+ };
657
+ this.listeners = [
658
+ {
659
+ element: this.element,
660
+ events: {
661
+ "dragstart": function(e) {
662
+ return _this.emit("dragstart", e);
663
+ },
664
+ "dragenter": function(e) {
665
+ noPropagation(e);
666
+ return _this.emit("dragenter", e);
667
+ },
668
+ "dragover": function(e) {
669
+ noPropagation(e);
670
+ return _this.emit("dragover", e);
671
+ },
672
+ "dragleave": function(e) {
673
+ return _this.emit("dragleave", e);
674
+ },
675
+ "drop": function(e) {
676
+ noPropagation(e);
677
+ _this.drop(e);
678
+ return _this.emit("drop", e);
679
+ },
680
+ "dragend": function(e) {
681
+ return _this.emit("dragend", e);
682
+ }
683
+ }
684
+ }
685
+ ];
686
+ if (this.clickableElement) {
687
+ this.listeners.push({
688
+ element: this.clickableElement,
689
+ events: {
690
+ "click": function(evt) {
691
+ if ((_this.clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(".message")))) {
692
+ return _this.hiddenFileInput.click();
693
+ }
694
+ }
695
+ }
696
+ });
697
+ }
698
+ this.enable();
699
+ return this.options.init.call(this);
700
+ };
701
+
702
+ Dropzone.prototype.getFallbackForm = function() {
703
+ var existingFallback, fields, fieldsString, form;
704
+
705
+ if (existingFallback = this.getExistingFallback()) {
706
+ return existingFallback;
707
+ }
708
+ fieldsString = "<div class=\"fallback\">";
709
+ if (this.options.dictFallbackText) {
710
+ fieldsString += "<p>" + this.options.dictFallbackText + "</p>";
711
+ }
712
+ fieldsString += "<input type=\"file\" name=\"" + this.options.paramName + "\" multiple=\"multiple\" /><button type=\"submit\">Upload!</button></div>";
713
+ fields = Dropzone.createElement(fieldsString);
714
+ if (this.element.tagName !== "FORM") {
715
+ form = Dropzone.createElement("<form action=\"" + this.options.url + "\" enctype=\"multipart/form-data\" method=\"" + this.options.method + "\"></form>");
716
+ form.appendChild(fields);
717
+ } else {
718
+ this.element.setAttribute("enctype", "multipart/form-data");
719
+ this.element.setAttribute("method", this.options.method);
720
+ }
721
+ return form != null ? form : fields;
722
+ };
723
+
724
+ Dropzone.prototype.getExistingFallback = function() {
725
+ var fallback, getFallback, tagName, _i, _len, _ref;
726
+
727
+ getFallback = function(elements) {
728
+ var el, _i, _len;
729
+
730
+ for (_i = 0, _len = elements.length; _i < _len; _i++) {
731
+ el = elements[_i];
732
+ if (/(^| )fallback($| )/.test(el.className)) {
733
+ return el;
734
+ }
735
+ }
736
+ };
737
+ _ref = ["div", "form"];
738
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
739
+ tagName = _ref[_i];
740
+ if (fallback = getFallback(this.element.getElementsByTagName("div"))) {
741
+ return fallback;
742
+ }
743
+ }
744
+ };
745
+
746
+ Dropzone.prototype.setupEventListeners = function() {
747
+ var elementListeners, event, listener, _i, _len, _ref, _results;
748
+
749
+ _ref = this.listeners;
750
+ _results = [];
751
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
752
+ elementListeners = _ref[_i];
753
+ _results.push((function() {
754
+ var _ref1, _results1;
755
+
756
+ _ref1 = elementListeners.events;
757
+ _results1 = [];
758
+ for (event in _ref1) {
759
+ listener = _ref1[event];
760
+ _results1.push(elementListeners.element.addEventListener(event, listener, false));
761
+ }
762
+ return _results1;
763
+ })());
764
+ }
765
+ return _results;
766
+ };
767
+
768
+ Dropzone.prototype.removeEventListeners = function() {
769
+ var elementListeners, event, listener, _i, _len, _ref, _results;
770
+
771
+ _ref = this.listeners;
772
+ _results = [];
773
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
774
+ elementListeners = _ref[_i];
775
+ _results.push((function() {
776
+ var _ref1, _results1;
777
+
778
+ _ref1 = elementListeners.events;
779
+ _results1 = [];
780
+ for (event in _ref1) {
781
+ listener = _ref1[event];
782
+ _results1.push(elementListeners.element.removeEventListener(event, listener, false));
783
+ }
784
+ return _results1;
785
+ })());
786
+ }
787
+ return _results;
788
+ };
789
+
790
+ Dropzone.prototype.disable = function() {
791
+ if (this.clickableElement === this.element) {
792
+ this.element.classList.remove("clickable");
793
+ }
794
+ this.removeEventListeners();
795
+ this.filesProcessing = [];
796
+ return this.filesQueue = [];
797
+ };
798
+
799
+ Dropzone.prototype.enable = function() {
800
+ if (this.clickableElement === this.element) {
801
+ this.element.classList.add("clickable");
802
+ }
803
+ return this.setupEventListeners();
804
+ };
805
+
806
+ Dropzone.prototype.filesize = function(size) {
807
+ var string;
808
+
809
+ if (size >= 100000000000) {
810
+ size = size / 100000000000;
811
+ string = "TB";
812
+ } else if (size >= 100000000) {
813
+ size = size / 100000000;
814
+ string = "GB";
815
+ } else if (size >= 100000) {
816
+ size = size / 100000;
817
+ string = "MB";
818
+ } else if (size >= 100) {
819
+ size = size / 100;
820
+ string = "KB";
821
+ } else {
822
+ size = size * 10;
823
+ string = "b";
824
+ }
825
+ return "<strong>" + (Math.round(size) / 10) + "</strong> " + string;
826
+ };
827
+
828
+ Dropzone.prototype.drop = function(e) {
829
+ var files;
830
+
831
+ if (!e.dataTransfer) {
832
+ return;
833
+ }
834
+ files = e.dataTransfer.files;
835
+ this.emit("selectedfiles", files);
836
+ if (files.length) {
837
+ return this.handleFiles(files);
838
+ }
839
+ };
840
+
841
+ Dropzone.prototype.handleFiles = function(files) {
842
+ var file, _i, _len, _results;
843
+
844
+ _results = [];
845
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
846
+ file = files[_i];
847
+ _results.push(this.addFile(file));
848
+ }
849
+ return _results;
850
+ };
851
+
852
+ Dropzone.prototype.accept = function(file, done) {
853
+ if (file.size > this.options.maxFilesize * 1024 * 1024) {
854
+ return done("File is too big (" + (Math.round(file.size / 1024 / 10.24) / 100) + "MB). Max filesize: " + this.options.maxFilesize + "MB");
855
+ } else {
856
+ return this.options.accept.call(this, file, done);
857
+ }
858
+ };
859
+
860
+ Dropzone.prototype.addFile = function(file) {
861
+ var _this = this;
862
+
863
+ this.files.push(file);
864
+ this.emit("addedfile", file);
865
+ if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) {
866
+ this.createThumbnail(file);
867
+ }
868
+ return this.accept(file, function(error) {
869
+ if (error) {
870
+ return _this.errorProcessing(file, error);
871
+ } else {
872
+ if (_this.options.enqueueForUpload) {
873
+ _this.filesQueue.push(file);
874
+ return _this.processQueue();
875
+ }
876
+ }
877
+ });
878
+ };
879
+
880
+ Dropzone.prototype.removeFile = function(file) {
881
+ if (file.processing) {
882
+ throw new Error("Can't remove file currently processing");
883
+ }
884
+ this.files = without(this.files, file);
885
+ this.filesQueue = without(this.filesQueue, file);
886
+ this.emit("removedfile", file);
887
+ if (this.files.length === 0) {
888
+ return this.emit("reset");
889
+ }
890
+ };
891
+
892
+ Dropzone.prototype.removeAllFiles = function() {
893
+ var file, _i, _len, _ref;
894
+
895
+ _ref = this.files.slice();
896
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
897
+ file = _ref[_i];
898
+ if (__indexOf.call(this.filesProcessing, file) < 0) {
899
+ this.removeFile(file);
900
+ }
901
+ }
902
+ return null;
903
+ };
904
+
905
+ Dropzone.prototype.createThumbnail = function(file) {
906
+ var fileReader,
907
+ _this = this;
908
+
909
+ fileReader = new FileReader;
910
+ fileReader.onload = function() {
911
+ var img;
912
+
913
+ img = new Image;
914
+ img.onload = function() {
915
+ var canvas, ctx, srcHeight, srcRatio, srcWidth, srcX, srcY, thumbnail, trgHeight, trgRatio, trgWidth, trgX, trgY;
916
+
917
+ canvas = document.createElement("canvas");
918
+ ctx = canvas.getContext("2d");
919
+ srcX = 0;
920
+ srcY = 0;
921
+ srcWidth = img.width;
922
+ srcHeight = img.height;
923
+ canvas.width = _this.options.thumbnailWidth;
924
+ canvas.height = _this.options.thumbnailHeight;
925
+ trgX = 0;
926
+ trgY = 0;
927
+ trgWidth = canvas.width;
928
+ trgHeight = canvas.height;
929
+ srcRatio = img.width / img.height;
930
+ trgRatio = canvas.width / canvas.height;
931
+ if (img.height < canvas.height || img.width < canvas.width) {
932
+ trgHeight = srcHeight;
933
+ trgWidth = srcWidth;
934
+ } else {
935
+ if (srcRatio > trgRatio) {
936
+ srcHeight = img.height;
937
+ srcWidth = srcHeight * trgRatio;
938
+ } else {
939
+ srcWidth = img.width;
940
+ srcHeight = srcWidth / trgRatio;
941
+ }
942
+ }
943
+ srcX = (img.width - srcWidth) / 2;
944
+ srcY = (img.height - srcHeight) / 2;
945
+ trgY = (canvas.height - trgHeight) / 2;
946
+ trgX = (canvas.width - trgWidth) / 2;
947
+ ctx.drawImage(img, srcX, srcY, srcWidth, srcHeight, trgX, trgY, trgWidth, trgHeight);
948
+ thumbnail = canvas.toDataURL("image/png");
949
+ return _this.emit("thumbnail", file, thumbnail);
950
+ };
951
+ return img.src = fileReader.result;
952
+ };
953
+ return fileReader.readAsDataURL(file);
954
+ };
955
+
956
+ Dropzone.prototype.processQueue = function() {
957
+ var i, parallelUploads, processingLength;
958
+
959
+ parallelUploads = this.options.parallelUploads;
960
+ processingLength = this.filesProcessing.length;
961
+ i = processingLength;
962
+ while (i < parallelUploads) {
963
+ if (!this.filesQueue.length) {
964
+ return;
965
+ }
966
+ this.processFile(this.filesQueue.shift());
967
+ i++;
968
+ }
969
+ };
970
+
971
+ Dropzone.prototype.processFile = function(file) {
972
+ this.filesProcessing.push(file);
973
+ file.processing = true;
974
+ this.emit("processingfile", file);
975
+ return this.uploadFile(file);
976
+ };
977
+
978
+ Dropzone.prototype.uploadFile = function(file) {
979
+ var formData, handleError, input, inputName, inputType, key, progressObj, value, xhr, _i, _len, _ref, _ref1, _ref2,
980
+ _this = this;
981
+
982
+ xhr = new XMLHttpRequest();
983
+ xhr.open(this.options.method, this.options.url, true);
984
+ handleError = function() {
985
+ return _this.errorProcessing(file, xhr.responseText || ("Server responded with " + xhr.status + " code."));
986
+ };
987
+ xhr.onload = function(e) {
988
+ var response, _ref;
989
+
990
+ if (!((200 <= (_ref = xhr.status) && _ref < 300))) {
991
+ return handleError();
992
+ } else {
993
+ _this.emit("uploadprogress", file, 100);
994
+ response = xhr.responseText;
995
+ if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) {
996
+ response = JSON.parse(response);
997
+ }
998
+ return _this.finished(file, response, e);
999
+ }
1000
+ };
1001
+ xhr.onerror = function() {
1002
+ return handleError();
1003
+ };
1004
+ progressObj = (_ref = xhr.upload) != null ? _ref : xhr;
1005
+ progressObj.onprogress = function(e) {
1006
+ return _this.emit("uploadprogress", file, Math.max(0, Math.min(100, (e.loaded / e.total) * 100)));
1007
+ };
1008
+ xhr.setRequestHeader("Accept", "application/json");
1009
+ xhr.setRequestHeader("Cache-Control", "no-cache");
1010
+ xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
1011
+ xhr.setRequestHeader("X-File-Name", file.name);
1012
+ formData = new FormData();
1013
+ if (this.options.params) {
1014
+ _ref1 = this.options.params;
1015
+ for (key in _ref1) {
1016
+ value = _ref1[key];
1017
+ formData.append(key, value);
1018
+ }
1019
+ }
1020
+ if (this.element.tagName === "FORM") {
1021
+ _ref2 = this.element.querySelectorAll("input, textarea, select, button");
1022
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
1023
+ input = _ref2[_i];
1024
+ inputName = input.getAttribute("name");
1025
+ inputType = input.getAttribute("type");
1026
+ if (!inputType || inputType.toLowerCase() !== "checkbox" || input.checked) {
1027
+ formData.append(inputName, input.value);
1028
+ }
1029
+ }
1030
+ }
1031
+ this.emit("sending", file, xhr, formData);
1032
+ formData.append(this.options.paramName, file);
1033
+ return xhr.send(formData);
1034
+ };
1035
+
1036
+ Dropzone.prototype.finished = function(file, responseText, e) {
1037
+ this.filesProcessing = without(this.filesProcessing, file);
1038
+ file.processing = false;
1039
+ this.processQueue();
1040
+ this.emit("success", file, responseText, e);
1041
+ this.emit("finished", file, responseText, e);
1042
+ return this.emit("complete", file);
1043
+ };
1044
+
1045
+ Dropzone.prototype.errorProcessing = function(file, message) {
1046
+ this.filesProcessing = without(this.filesProcessing, file);
1047
+ file.processing = false;
1048
+ this.processQueue();
1049
+ this.emit("error", file, message);
1050
+ return this.emit("complete", file);
1051
+ };
1052
+
1053
+ return Dropzone;
1054
+
1055
+ })(Em);
1056
+
1057
+ Dropzone.version = "2.0.12";
1058
+
1059
+ Dropzone.options = {};
1060
+
1061
+ Dropzone.optionsForElement = function(element) {
1062
+ if (element.id) {
1063
+ return Dropzone.options[camelize(element.id)];
1064
+ } else {
1065
+ return void 0;
1066
+ }
1067
+ };
1068
+
1069
+ Dropzone.instances = [];
1070
+
1071
+ Dropzone.forElement = function(element) {
1072
+ var _ref;
1073
+
1074
+ if (typeof element === "string") {
1075
+ element = document.querySelector(element);
1076
+ }
1077
+ return (_ref = element.dropzone) != null ? _ref : null;
1078
+ };
1079
+
1080
+ Dropzone.autoDiscover = true;
1081
+
1082
+ Dropzone.discover = function() {
1083
+ var checkElements, dropzone, dropzones, _i, _len, _results;
1084
+
1085
+ if (!Dropzone.autoDiscover) {
1086
+ return;
1087
+ }
1088
+ if (document.querySelectorAll) {
1089
+ dropzones = document.querySelectorAll(".dropzone");
1090
+ } else {
1091
+ dropzones = [];
1092
+ checkElements = function(elements) {
1093
+ var el, _i, _len, _results;
1094
+
1095
+ _results = [];
1096
+ for (_i = 0, _len = elements.length; _i < _len; _i++) {
1097
+ el = elements[_i];
1098
+ if (/(^| )dropzone($| )/.test(el.className)) {
1099
+ _results.push(dropzones.push(el));
1100
+ } else {
1101
+ _results.push(void 0);
1102
+ }
1103
+ }
1104
+ return _results;
1105
+ };
1106
+ checkElements(document.getElementsByTagName("div"));
1107
+ checkElements(document.getElementsByTagName("form"));
1108
+ }
1109
+ _results = [];
1110
+ for (_i = 0, _len = dropzones.length; _i < _len; _i++) {
1111
+ dropzone = dropzones[_i];
1112
+ if (Dropzone.optionsForElement(dropzone) !== false) {
1113
+ _results.push(new Dropzone(dropzone));
1114
+ } else {
1115
+ _results.push(void 0);
1116
+ }
1117
+ }
1118
+ return _results;
1119
+ };
1120
+
1121
+ Dropzone.blacklistedBrowsers = [/opera.*Macintosh.*version\/12/i];
1122
+
1123
+ Dropzone.isBrowserSupported = function() {
1124
+ var capableBrowser, regex, _i, _len, _ref;
1125
+
1126
+ capableBrowser = true;
1127
+ if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) {
1128
+ if (!("classList" in document.createElement("a"))) {
1129
+ capableBrowser = false;
1130
+ } else {
1131
+ _ref = Dropzone.blacklistedBrowsers;
1132
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1133
+ regex = _ref[_i];
1134
+ if (regex.test(navigator.userAgent)) {
1135
+ capableBrowser = false;
1136
+ continue;
1137
+ }
1138
+ }
1139
+ }
1140
+ } else {
1141
+ capableBrowser = false;
1142
+ }
1143
+ return capableBrowser;
1144
+ };
1145
+
1146
+ without = function(list, rejectedItem) {
1147
+ var item, _i, _len, _results;
1148
+
1149
+ _results = [];
1150
+ for (_i = 0, _len = list.length; _i < _len; _i++) {
1151
+ item = list[_i];
1152
+ if (item !== rejectedItem) {
1153
+ _results.push(item);
1154
+ }
1155
+ }
1156
+ return _results;
1157
+ };
1158
+
1159
+ camelize = function(str) {
1160
+ return str.replace(/[\-_](\w)/g, function(match) {
1161
+ return match[1].toUpperCase();
1162
+ });
1163
+ };
1164
+
1165
+ Dropzone.createElement = function(string) {
1166
+ var div;
1167
+
1168
+ div = document.createElement("div");
1169
+ div.innerHTML = string;
1170
+ return div.childNodes[0];
1171
+ };
1172
+
1173
+ Dropzone.elementInside = function(element, container) {
1174
+ if (element === container) {
1175
+ return true;
1176
+ }
1177
+ while (element = element.parentNode) {
1178
+ if (element === container) {
1179
+ return true;
1180
+ }
1181
+ }
1182
+ return false;
1183
+ };
1184
+
1185
+ if (typeof jQuery !== "undefined" && jQuery !== null) {
1186
+ jQuery.fn.dropzone = function(options) {
1187
+ return this.each(function() {
1188
+ return new Dropzone(this, options);
1189
+ });
1190
+ };
1191
+ }
1192
+
1193
+ if (typeof module !== "undefined" && module !== null) {
1194
+ module.exports = Dropzone;
1195
+ } else {
1196
+ window.Dropzone = Dropzone;
1197
+ }
1198
+
1199
+ contentLoaded = function(win, fn) {
1200
+ var add, doc, done, init, poll, pre, rem, root, top;
1201
+
1202
+ done = false;
1203
+ top = true;
1204
+ doc = win.document;
1205
+ root = doc.documentElement;
1206
+ add = (doc.addEventListener ? "addEventListener" : "attachEvent");
1207
+ rem = (doc.addEventListener ? "removeEventListener" : "detachEvent");
1208
+ pre = (doc.addEventListener ? "" : "on");
1209
+ init = function(e) {
1210
+ if (e.type === "readystatechange" && doc.readyState !== "complete") {
1211
+ return;
1212
+ }
1213
+ (e.type === "load" ? win : doc)[rem](pre + e.type, init, false);
1214
+ if (!done && (done = true)) {
1215
+ return fn.call(win, e.type || e);
1216
+ }
1217
+ };
1218
+ poll = function() {
1219
+ var e;
1220
+
1221
+ try {
1222
+ root.doScroll("left");
1223
+ } catch (_error) {
1224
+ e = _error;
1225
+ setTimeout(poll, 50);
1226
+ return;
1227
+ }
1228
+ return init("poll");
1229
+ };
1230
+ if (doc.readyState !== "complete") {
1231
+ if (doc.createEventObject && root.doScroll) {
1232
+ try {
1233
+ top = !win.frameElement;
1234
+ } catch (_error) {}
1235
+ if (top) {
1236
+ poll();
1237
+ }
1238
+ }
1239
+ doc[add](pre + "DOMContentLoaded", init, false);
1240
+ doc[add](pre + "readystatechange", init, false);
1241
+ return win[add](pre + "load", init, false);
1242
+ }
1243
+ };
1244
+
1245
+ contentLoaded(window, Dropzone.discover);
1246
+
1247
+ }).call(this);
1248
+
1249
+ });
1250
+ require.alias("component-emitter/index.js", "dropzone/deps/emitter/index.js");
1251
+
1252
+ if (typeof exports == "object") {
1253
+ module.exports = require("dropzone");
1254
+ } else if (typeof define == "function" && define.amd) {
1255
+ define(function(){ return require("dropzone"); });
1256
+ } else {
1257
+ window["Dropzone"] = require("dropzone");
1258
+ }})();