very_simple_cms 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 (331) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +34 -0
  4. data/app/assets/javascripts/very_simple_cms/application.js +13 -0
  5. data/app/assets/stylesheets/very_simple_cms/application.css +11 -0
  6. data/app/controllers/very_simple_cms/application_controller.rb +5 -0
  7. data/app/controllers/very_simple_cms/contents_controller.rb +24 -0
  8. data/app/helpers/very_simple_cms/application_helper.rb +4 -0
  9. data/app/helpers/very_simple_cms/cms_helper.rb +12 -0
  10. data/app/helpers/very_simple_cms/shared_helper.rb +11 -0
  11. data/app/models/very_simple_cms/html_block.rb +18 -0
  12. data/config/locales/en.yml +25 -0
  13. data/config/routes.rb +3 -0
  14. data/lib/generators/very_simple_cms/init_mercury/USAGE +5 -0
  15. data/lib/generators/very_simple_cms/init_mercury/init_mercury_generator.rb +23 -0
  16. data/lib/generators/very_simple_cms/install/USAGE +8 -0
  17. data/lib/generators/very_simple_cms/install/install_generator.rb +13 -0
  18. data/lib/generators/very_simple_cms/install/templates/very_simple_cms.rb +5 -0
  19. data/lib/tasks/very_simple_cms_tasks.rake +4 -0
  20. data/lib/very_simple_cms.rb +10 -0
  21. data/lib/very_simple_cms/engine.rb +12 -0
  22. data/lib/very_simple_cms/version.rb +3 -0
  23. data/test/controllers/very_simple_cms/mercury_controller_test.rb +11 -0
  24. data/test/dummy/README.rdoc +28 -0
  25. data/test/dummy/Rakefile +6 -0
  26. data/test/dummy/app/assets/javascripts/application.js +16 -0
  27. data/test/dummy/app/assets/javascripts/jquery-migrate-1.2.1.js +521 -0
  28. data/test/dummy/app/assets/javascripts/mercury.js +466 -0
  29. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  30. data/test/dummy/app/assets/stylesheets/mercury.css +24 -0
  31. data/test/dummy/app/controllers/application_controller.rb +5 -0
  32. data/test/dummy/app/controllers/home_controller.rb +8 -0
  33. data/test/dummy/app/helpers/application_helper.rb +2 -0
  34. data/test/dummy/app/views/home/index.html.erb +6 -0
  35. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  36. data/test/dummy/app/views/layouts/mercury.html.erb +23 -0
  37. data/test/dummy/bin/bundle +3 -0
  38. data/test/dummy/bin/rails +4 -0
  39. data/test/dummy/bin/rake +4 -0
  40. data/test/dummy/config.ru +4 -0
  41. data/test/dummy/config/application.rb +25 -0
  42. data/test/dummy/config/boot.rb +5 -0
  43. data/test/dummy/config/cms/en/html_blocks.yml +5 -0
  44. data/test/dummy/config/environment.rb +5 -0
  45. data/test/dummy/config/environments/development.rb +29 -0
  46. data/test/dummy/config/environments/production.rb +80 -0
  47. data/test/dummy/config/environments/test.rb +36 -0
  48. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  49. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  50. data/test/dummy/config/initializers/inflections.rb +16 -0
  51. data/test/dummy/config/initializers/mime_types.rb +5 -0
  52. data/test/dummy/config/initializers/secret_token.rb +12 -0
  53. data/test/dummy/config/initializers/session_store.rb +3 -0
  54. data/test/dummy/config/initializers/very_simple_cms.rb +5 -0
  55. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  56. data/test/dummy/config/routes.rb +6 -0
  57. data/test/dummy/db/development.sqlite3 +0 -0
  58. data/test/dummy/db/production.sqlite3 +0 -0
  59. data/test/dummy/db/test.sqlite3 +0 -0
  60. data/test/dummy/log/development.log +137166 -0
  61. data/test/dummy/public/404.html +58 -0
  62. data/test/dummy/public/422.html +58 -0
  63. data/test/dummy/public/500.html +57 -0
  64. data/test/dummy/public/favicon.ico +0 -0
  65. data/test/dummy/test/controllers/home_controller_test.rb +9 -0
  66. data/test/dummy/test/helpers/home_helper_test.rb +4 -0
  67. data/test/dummy/tmp/cache/assets/development/sprockets/00028b58c446030f0a22a1487048f26e +0 -0
  68. data/test/dummy/tmp/cache/assets/development/sprockets/0011c19b61bf0cbb75ba5e38cfbc8f4a +0 -0
  69. data/test/dummy/tmp/cache/assets/development/sprockets/0056c6a977a6621634d152495de3e50b +0 -0
  70. data/test/dummy/tmp/cache/assets/development/sprockets/03286b9cf6c6936d9e5de9e03eb90629 +0 -0
  71. data/test/dummy/tmp/cache/assets/development/sprockets/042924c8dc663a08ff4f578aae5e401a +0 -0
  72. data/test/dummy/tmp/cache/assets/development/sprockets/04610e1e97561c1369476d2cac734f96 +0 -0
  73. data/test/dummy/tmp/cache/assets/development/sprockets/0547284c2aa807a01748608afd3b246b +0 -0
  74. data/test/dummy/tmp/cache/assets/development/sprockets/05b68fdb5b2be635ca3f9127f4e6664b +0 -0
  75. data/test/dummy/tmp/cache/assets/development/sprockets/05e22fca4dc1ff6f6dd92b4876a17e12 +0 -0
  76. data/test/dummy/tmp/cache/assets/development/sprockets/069d29d8087b95440f66630c6be179c6 +0 -0
  77. data/test/dummy/tmp/cache/assets/development/sprockets/070c39c9857466a8056ee6c51eddd61a +0 -0
  78. data/test/dummy/tmp/cache/assets/development/sprockets/07e05dc6915f3c6b44c56ef93ccfd679 +0 -0
  79. data/test/dummy/tmp/cache/assets/development/sprockets/094b8a5ad28463cd36bcbf460b6fda3a +0 -0
  80. data/test/dummy/tmp/cache/assets/development/sprockets/097aab472504b7036dd50080711115d5 +0 -0
  81. data/test/dummy/tmp/cache/assets/development/sprockets/0a2f898a4ca4b7894ae835f3f4bd4dbe +0 -0
  82. data/test/dummy/tmp/cache/assets/development/sprockets/0ab32bb38bff6508b9688cc8cfa2e985 +0 -0
  83. data/test/dummy/tmp/cache/assets/development/sprockets/0abacf1cac04a2924f538dd84567fc27 +0 -0
  84. data/test/dummy/tmp/cache/assets/development/sprockets/0be22cbbb82e3ee0835cbb82e5d5afdd +0 -0
  85. data/test/dummy/tmp/cache/assets/development/sprockets/0e70e976a3755b6b9f73dbc091765298 +0 -0
  86. data/test/dummy/tmp/cache/assets/development/sprockets/0fe44f741a34c6e1728c1d18074a42bb +0 -0
  87. data/test/dummy/tmp/cache/assets/development/sprockets/111ae2afecf72d393a8ab217fd390cab +0 -0
  88. data/test/dummy/tmp/cache/assets/development/sprockets/1186f2f017052067d2688d49c58f897f +0 -0
  89. data/test/dummy/tmp/cache/assets/development/sprockets/13381ea8fe8186c9082457b1ca436a44 +0 -0
  90. data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  91. data/test/dummy/tmp/cache/assets/development/sprockets/160f8969745daeddaccd35d9865ed32c +0 -0
  92. data/test/dummy/tmp/cache/assets/development/sprockets/16309321034042426f4676685eafd9a4 +0 -0
  93. data/test/dummy/tmp/cache/assets/development/sprockets/1a2e2e0caec22ba25a62a24f56fed1ed +0 -0
  94. data/test/dummy/tmp/cache/assets/development/sprockets/1b4b0f6b69ae4c0e84721cc94aa24c27 +0 -0
  95. data/test/dummy/tmp/cache/assets/development/sprockets/1b50cf55f3ea26aa7fc741106557d2af +0 -0
  96. data/test/dummy/tmp/cache/assets/development/sprockets/1c2cc2736c7f3e0b2c1bbe84162913b7 +0 -0
  97. data/test/dummy/tmp/cache/assets/development/sprockets/1c9faaf28d05409b88ad3113374d613c +0 -0
  98. data/test/dummy/tmp/cache/assets/development/sprockets/1e1691fb0af836958c3f42d4299420ab +0 -0
  99. data/test/dummy/tmp/cache/assets/development/sprockets/1fd334d8d091ada842e3c5f244b63776 +0 -0
  100. data/test/dummy/tmp/cache/assets/development/sprockets/203f749a4445e3d5710358a0e192c356 +0 -0
  101. data/test/dummy/tmp/cache/assets/development/sprockets/2128cc4ce36f010671a73f5cc170574c +0 -0
  102. data/test/dummy/tmp/cache/assets/development/sprockets/22243978a6018f594b5c32c2d0608049 +0 -0
  103. data/test/dummy/tmp/cache/assets/development/sprockets/23ab1b58b0208524613a1cf15344ccb4 +0 -0
  104. data/test/dummy/tmp/cache/assets/development/sprockets/2414a260a1dc4173edc185b522739a96 +0 -0
  105. data/test/dummy/tmp/cache/assets/development/sprockets/24a23dea7bf76a85ea24d7dcdf012eb6 +0 -0
  106. data/test/dummy/tmp/cache/assets/development/sprockets/250850c5c73a7b377fd488ff97fda5bc +0 -0
  107. data/test/dummy/tmp/cache/assets/development/sprockets/252783037314754cd74202b1bd3c1764 +0 -0
  108. data/test/dummy/tmp/cache/assets/development/sprockets/253ea5e9ee11e9bf78ab11fbbb24aeea +0 -0
  109. data/test/dummy/tmp/cache/assets/development/sprockets/275e8c0919fd7691d77be1bb294acd8e +0 -0
  110. data/test/dummy/tmp/cache/assets/development/sprockets/27b34f6c5a9ebb842deda38918318b63 +0 -0
  111. data/test/dummy/tmp/cache/assets/development/sprockets/2822de3b22c28bd5e718c9bf500457b2 +0 -0
  112. data/test/dummy/tmp/cache/assets/development/sprockets/28bcf08e243ef91d93bb0d94ff0da92a +0 -0
  113. data/test/dummy/tmp/cache/assets/development/sprockets/2e23c0f83ead4785c49d7d22361822ec +0 -0
  114. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  115. data/test/dummy/tmp/cache/assets/development/sprockets/3011758443aae913685406ad32f1da8f +0 -0
  116. data/test/dummy/tmp/cache/assets/development/sprockets/30257b53609415ba56a0ce8d703c818b +0 -0
  117. data/test/dummy/tmp/cache/assets/development/sprockets/317605da70af48a0ef493bde3e8cf45d +0 -0
  118. data/test/dummy/tmp/cache/assets/development/sprockets/31d01c58c9c7cad25dcd83c9f5cd25f7 +0 -0
  119. data/test/dummy/tmp/cache/assets/development/sprockets/32f4a63af43b8900fcb9e0684b83f367 +0 -0
  120. data/test/dummy/tmp/cache/assets/development/sprockets/34dcbcfd24d807342f53f7506dfc8640 +0 -0
  121. data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  122. data/test/dummy/tmp/cache/assets/development/sprockets/35e64f6e8f93306394e042c8b02f2faf +0 -0
  123. data/test/dummy/tmp/cache/assets/development/sprockets/35fd2ca177cb329aa28ba615284db4ea +0 -0
  124. data/test/dummy/tmp/cache/assets/development/sprockets/36c614d095441c52f002152dceffc034 +0 -0
  125. data/test/dummy/tmp/cache/assets/development/sprockets/37dd1c0b34fa3234950dd3a2cb3d37ef +0 -0
  126. data/test/dummy/tmp/cache/assets/development/sprockets/39c98fd88d6c5d785221b6f0c7c17810 +0 -0
  127. data/test/dummy/tmp/cache/assets/development/sprockets/3ce32327a4aa979ffe948c500cd442e7 +0 -0
  128. data/test/dummy/tmp/cache/assets/development/sprockets/3d3c80668f91ee6ba9ed9794a705b4ab +0 -0
  129. data/test/dummy/tmp/cache/assets/development/sprockets/3dee23eaec5b033aeb282aa63f673f44 +0 -0
  130. data/test/dummy/tmp/cache/assets/development/sprockets/3e0fa12d0a217ab84534aea831780a62 +0 -0
  131. data/test/dummy/tmp/cache/assets/development/sprockets/40fc2f3d2a468a00e463f1d313cb1683 +0 -0
  132. data/test/dummy/tmp/cache/assets/development/sprockets/4101b8ce6db4a81c7c2f92e2a4748df6 +0 -0
  133. data/test/dummy/tmp/cache/assets/development/sprockets/43728809634137be9d0f408ff3ac00ac +0 -0
  134. data/test/dummy/tmp/cache/assets/development/sprockets/4474d5f5b3c2b54e18f90d0bfff46d4b +0 -0
  135. data/test/dummy/tmp/cache/assets/development/sprockets/447afa649a0f9543e6d6a0673d3fb90b +0 -0
  136. data/test/dummy/tmp/cache/assets/development/sprockets/46e004e51b097ec92b47cbf8dc00cd50 +0 -0
  137. data/test/dummy/tmp/cache/assets/development/sprockets/48391eb2fe95e89abb300fa22e932492 +0 -0
  138. data/test/dummy/tmp/cache/assets/development/sprockets/48fce556721c7aed1bf5aa18d05b3e4a +0 -0
  139. data/test/dummy/tmp/cache/assets/development/sprockets/4bb5b142a3a26ad5887c736365eab2b3 +0 -0
  140. data/test/dummy/tmp/cache/assets/development/sprockets/4cdca8861e5697a7b196e8894b2fad72 +0 -0
  141. data/test/dummy/tmp/cache/assets/development/sprockets/4cf155bced1ad00eca81cd38cbf6653e +0 -0
  142. data/test/dummy/tmp/cache/assets/development/sprockets/4e8df1428a05b9d4cf8ad3d869fe7c97 +0 -0
  143. data/test/dummy/tmp/cache/assets/development/sprockets/4eb985f0de8b1ca4daf53f4447fe1fbe +0 -0
  144. data/test/dummy/tmp/cache/assets/development/sprockets/4f0b190a3f75907643118cbdffaba8a6 +0 -0
  145. data/test/dummy/tmp/cache/assets/development/sprockets/4f26b3b69b612c3a20e0f9bbedeeaf94 +0 -0
  146. data/test/dummy/tmp/cache/assets/development/sprockets/4f5d00ac6c6f239ba7d62de2a8b36c8f +0 -0
  147. data/test/dummy/tmp/cache/assets/development/sprockets/50ca6135906f23cd05cfcc76cec88060 +0 -0
  148. data/test/dummy/tmp/cache/assets/development/sprockets/50f9c217b84f2a4ca760bfb4c9c58ce7 +0 -0
  149. data/test/dummy/tmp/cache/assets/development/sprockets/517b83bd35bb1c1d8441b6d1742d1edd +0 -0
  150. data/test/dummy/tmp/cache/assets/development/sprockets/53255340b736d5503b0212b2620e7366 +0 -0
  151. data/test/dummy/tmp/cache/assets/development/sprockets/58570c7fc74fa8d4fe84fe262c0318db +0 -0
  152. data/test/dummy/tmp/cache/assets/development/sprockets/59263637894c92e6b5984a836a070a7d +0 -0
  153. data/test/dummy/tmp/cache/assets/development/sprockets/5a872425c7c20380737f8b35ea98651a +0 -0
  154. data/test/dummy/tmp/cache/assets/development/sprockets/5befdfec92399ba2764396a8b88ff905 +0 -0
  155. data/test/dummy/tmp/cache/assets/development/sprockets/5c9ac835188361d529481ceb86531752 +0 -0
  156. data/test/dummy/tmp/cache/assets/development/sprockets/5ecdda1098202f0881e8956ca8cfc8a1 +0 -0
  157. data/test/dummy/tmp/cache/assets/development/sprockets/5fc9bb4a3f6c5c855b150ea9c6453d78 +0 -0
  158. data/test/dummy/tmp/cache/assets/development/sprockets/5fe00e5f355f8021c1b3cdd7b16328e8 +0 -0
  159. data/test/dummy/tmp/cache/assets/development/sprockets/6095dba6ff77f2d4d591fd4a7f5cda43 +0 -0
  160. data/test/dummy/tmp/cache/assets/development/sprockets/61a2d79a975c9ba040b9707b77d2fc6e +0 -0
  161. data/test/dummy/tmp/cache/assets/development/sprockets/625e8bf6225593d031c2eb6bbbce6191 +0 -0
  162. data/test/dummy/tmp/cache/assets/development/sprockets/63e7e4f72dff5241891a355df25c8603 +0 -0
  163. data/test/dummy/tmp/cache/assets/development/sprockets/64615a7f88ec704431cb2d1c66bdab69 +0 -0
  164. data/test/dummy/tmp/cache/assets/development/sprockets/6616eaf3a2cfb073f67ec54e34253f6e +0 -0
  165. data/test/dummy/tmp/cache/assets/development/sprockets/667caa8cc4c56de908e1f970cff05ade +0 -0
  166. data/test/dummy/tmp/cache/assets/development/sprockets/689cedf626851fe962212833d5d64c47 +0 -0
  167. data/test/dummy/tmp/cache/assets/development/sprockets/69b71774683a0b2affaba265d760d427 +0 -0
  168. data/test/dummy/tmp/cache/assets/development/sprockets/6b1d7509f56240c61db27483e81fac80 +0 -0
  169. data/test/dummy/tmp/cache/assets/development/sprockets/6ba1c49316b6f7d1b57327c9ea52409e +0 -0
  170. data/test/dummy/tmp/cache/assets/development/sprockets/6bdefc01a361f5b773bd0c74e6b85e16 +0 -0
  171. data/test/dummy/tmp/cache/assets/development/sprockets/6c17f7b897decc616d880cf1ef731320 +0 -0
  172. data/test/dummy/tmp/cache/assets/development/sprockets/6c593e78216456242fd13d025774cb7f +0 -0
  173. data/test/dummy/tmp/cache/assets/development/sprockets/708a9d2a0a4e28443ea136e3783096bb +0 -0
  174. data/test/dummy/tmp/cache/assets/development/sprockets/71150bc46bff3fa1a5dd11a28c6a071b +0 -0
  175. data/test/dummy/tmp/cache/assets/development/sprockets/71d544a8af8d6d869a805f3d1772c93f +0 -0
  176. data/test/dummy/tmp/cache/assets/development/sprockets/739435551a4e53b0b2ab94a92359982b +0 -0
  177. data/test/dummy/tmp/cache/assets/development/sprockets/75f9e7b1613516c481d205f0831aef26 +0 -0
  178. data/test/dummy/tmp/cache/assets/development/sprockets/7697ec3a4ad7f6c93a24b7c83b82c580 +0 -0
  179. data/test/dummy/tmp/cache/assets/development/sprockets/76acc0441fa1b421a0abffc1c488828c +0 -0
  180. data/test/dummy/tmp/cache/assets/development/sprockets/773640e6f537c89520a5e11439b8c50b +0 -0
  181. data/test/dummy/tmp/cache/assets/development/sprockets/7963d8da93a0fa44a418039413b13482 +0 -0
  182. data/test/dummy/tmp/cache/assets/development/sprockets/7997d8546b947030bc84ac33afb7718c +0 -0
  183. data/test/dummy/tmp/cache/assets/development/sprockets/7be9721e07140c43a1eef7aeda57151f +0 -0
  184. data/test/dummy/tmp/cache/assets/development/sprockets/7c6e3dcaf6c4ac2b38c81d5d502ecca6 +0 -0
  185. data/test/dummy/tmp/cache/assets/development/sprockets/7e6139eff3130c4bb6ca407e75d80848 +0 -0
  186. data/test/dummy/tmp/cache/assets/development/sprockets/7e8950cc26f3274854f27f98b8c223d5 +0 -0
  187. data/test/dummy/tmp/cache/assets/development/sprockets/7eac0bd722538bff660891166c1e9b53 +0 -0
  188. data/test/dummy/tmp/cache/assets/development/sprockets/7fe6fd2ee31c1d41180d60d3571e0110 +0 -0
  189. data/test/dummy/tmp/cache/assets/development/sprockets/806d337ed4d52c04650b22d66ac722f7 +0 -0
  190. data/test/dummy/tmp/cache/assets/development/sprockets/81cc7f3409821cf6b3263e7e513c2f5f +0 -0
  191. data/test/dummy/tmp/cache/assets/development/sprockets/8204f2c32be4ddb7276b3dfa8671a8cd +0 -0
  192. data/test/dummy/tmp/cache/assets/development/sprockets/83c4d0d51d3013a10d2f75db31b1db4c +0 -0
  193. data/test/dummy/tmp/cache/assets/development/sprockets/83cb1ae689fb63cc982244306079bdc8 +0 -0
  194. data/test/dummy/tmp/cache/assets/development/sprockets/841429c0109e0561ecc16135f7186b02 +0 -0
  195. data/test/dummy/tmp/cache/assets/development/sprockets/843b3747ed1d70aa603e3c81849532c0 +0 -0
  196. data/test/dummy/tmp/cache/assets/development/sprockets/84d9c3abfd9f3f3d99f1476fddc1416c +0 -0
  197. data/test/dummy/tmp/cache/assets/development/sprockets/880a65555873bb4be57309e8d9ed3a5c +0 -0
  198. data/test/dummy/tmp/cache/assets/development/sprockets/880dc5be8ff6d18d5b9ff4d4efd05bbd +0 -0
  199. data/test/dummy/tmp/cache/assets/development/sprockets/89ceb5681b3cd99eb764b881ba4400e1 +0 -0
  200. data/test/dummy/tmp/cache/assets/development/sprockets/89dd18f1230829eb2a531c7a95c6e473 +0 -0
  201. data/test/dummy/tmp/cache/assets/development/sprockets/8bb5bc1930e988adf41ce08f2a594949 +0 -0
  202. data/test/dummy/tmp/cache/assets/development/sprockets/914cdcacc0ff7e67ecc65a1b0c2bf067 +0 -0
  203. data/test/dummy/tmp/cache/assets/development/sprockets/9170d0829f2d4403620d643baa13fcb4 +0 -0
  204. data/test/dummy/tmp/cache/assets/development/sprockets/91f10278ea8b4ee3b3431bdedb0f7a86 +0 -0
  205. data/test/dummy/tmp/cache/assets/development/sprockets/92b5a0793333cfeb22dfa4fd5b2b6310 +0 -0
  206. data/test/dummy/tmp/cache/assets/development/sprockets/93ffcd15f7a59c783058c550dff53bf1 +0 -0
  207. data/test/dummy/tmp/cache/assets/development/sprockets/96e2084e5a1dcdaa48e4c3a8fefbb2c0 +0 -0
  208. data/test/dummy/tmp/cache/assets/development/sprockets/970542737e7326f868fac80bc50c3c89 +0 -0
  209. data/test/dummy/tmp/cache/assets/development/sprockets/9777128a1f39e5e33734721652515fcc +0 -0
  210. data/test/dummy/tmp/cache/assets/development/sprockets/9965e775a68466a0c06445ae181e1da2 +0 -0
  211. data/test/dummy/tmp/cache/assets/development/sprockets/998de3d617c2d6d8e43a7aa8ed832a0d +0 -0
  212. data/test/dummy/tmp/cache/assets/development/sprockets/9ab4fe4f05b539887f78500a083b98a5 +0 -0
  213. data/test/dummy/tmp/cache/assets/development/sprockets/9ac336bbd29e3a6dcb4d83ab31175409 +0 -0
  214. data/test/dummy/tmp/cache/assets/development/sprockets/9d48f0895b21d893c206ad3b4116ecce +0 -0
  215. data/test/dummy/tmp/cache/assets/development/sprockets/9dae23b2eb2b755cdd78cb66f571ec46 +0 -0
  216. data/test/dummy/tmp/cache/assets/development/sprockets/9e38d199dd0930eb63bd491e2585b561 +0 -0
  217. data/test/dummy/tmp/cache/assets/development/sprockets/a098ec3b2944d747536bec7a4dc245c6 +0 -0
  218. data/test/dummy/tmp/cache/assets/development/sprockets/a4479fef973c8052f59186ba1d4af4d1 +0 -0
  219. data/test/dummy/tmp/cache/assets/development/sprockets/a4d027bbc293c3c6d9d1e87c419c98fb +0 -0
  220. data/test/dummy/tmp/cache/assets/development/sprockets/a5606ffb50d930c124310b95834f2a4d +0 -0
  221. data/test/dummy/tmp/cache/assets/development/sprockets/a6910f8c4ba8ab19c1696dcd8851de96 +0 -0
  222. data/test/dummy/tmp/cache/assets/development/sprockets/a76c6f639bf5bf8c160266d7f9e70a98 +0 -0
  223. data/test/dummy/tmp/cache/assets/development/sprockets/a77130ae0d4adcdffac3d56b1d89d68e +0 -0
  224. data/test/dummy/tmp/cache/assets/development/sprockets/a9f028f7a492b5907ed80268be8f50f4 +0 -0
  225. data/test/dummy/tmp/cache/assets/development/sprockets/aa75ca15eb15f4f9650c0aea9e39a5f0 +0 -0
  226. data/test/dummy/tmp/cache/assets/development/sprockets/ab5a07129b7fd15d88d5d936f861ba9b +0 -0
  227. data/test/dummy/tmp/cache/assets/development/sprockets/abac9398b6ce20b4edecaf30586e3a8f +0 -0
  228. data/test/dummy/tmp/cache/assets/development/sprockets/ae35cc3853457a324107891944e6e7e5 +0 -0
  229. data/test/dummy/tmp/cache/assets/development/sprockets/aed4dba27191a711313d47a58bdaf291 +0 -0
  230. data/test/dummy/tmp/cache/assets/development/sprockets/af92c83d77100ddf17bc9270fa954c79 +0 -0
  231. data/test/dummy/tmp/cache/assets/development/sprockets/b0f28b51bc444f30b2eeb7c80d12af56 +0 -0
  232. data/test/dummy/tmp/cache/assets/development/sprockets/b27abf7dbc85cbaf33dccbbe254fbfa7 +0 -0
  233. data/test/dummy/tmp/cache/assets/development/sprockets/b287b6a93b7b56384b809becd443529a +0 -0
  234. data/test/dummy/tmp/cache/assets/development/sprockets/b2ca595f430a45eed21c908e5c85c349 +0 -0
  235. data/test/dummy/tmp/cache/assets/development/sprockets/b2ffbb1ed0fdca048006a7a06b481bd7 +0 -0
  236. data/test/dummy/tmp/cache/assets/development/sprockets/b35f1f2d72ecf1f5182797a6c1a41ffc +0 -0
  237. data/test/dummy/tmp/cache/assets/development/sprockets/b3a17ba95c8abd1b1ab1cb25e69babb2 +0 -0
  238. data/test/dummy/tmp/cache/assets/development/sprockets/b3e6a09325d8a69c99c78c2ab518bcda +0 -0
  239. data/test/dummy/tmp/cache/assets/development/sprockets/b4d7b5258ded169a5ab02611d400727f +0 -0
  240. data/test/dummy/tmp/cache/assets/development/sprockets/b5bd64a83afdc1eb8995c2514be4bf63 +0 -0
  241. data/test/dummy/tmp/cache/assets/development/sprockets/b878faf942403e313a5b103e5d80488e +0 -0
  242. data/test/dummy/tmp/cache/assets/development/sprockets/b9f602aff99fc22416cdde210a4adcb7 +0 -0
  243. data/test/dummy/tmp/cache/assets/development/sprockets/ba25ba5d88cd5822faecbcb96eaccb83 +0 -0
  244. data/test/dummy/tmp/cache/assets/development/sprockets/ba4793f1526f99fd87917a445ae24624 +0 -0
  245. data/test/dummy/tmp/cache/assets/development/sprockets/bb4b6471f09cc9d75b59e564b6134e14 +0 -0
  246. data/test/dummy/tmp/cache/assets/development/sprockets/bccd838465bcfe1b5104689e55582187 +0 -0
  247. data/test/dummy/tmp/cache/assets/development/sprockets/bcd141ebf67cc98fb6882eb82d8689b9 +0 -0
  248. data/test/dummy/tmp/cache/assets/development/sprockets/bdd93dca532d6de6a34086003dfc44f8 +0 -0
  249. data/test/dummy/tmp/cache/assets/development/sprockets/bf027344ea9f4bfb241e8e465c851c3a +0 -0
  250. data/test/dummy/tmp/cache/assets/development/sprockets/bff630c7aa970e14ddf407f04e94658d +0 -0
  251. data/test/dummy/tmp/cache/assets/development/sprockets/c02fe0360f4aa271bf6d1398d3f0552a +0 -0
  252. data/test/dummy/tmp/cache/assets/development/sprockets/c06389fc49af2bbb10efb3ca611a3b7c +0 -0
  253. data/test/dummy/tmp/cache/assets/development/sprockets/c0d6117f60ad60d57f85e5d55103eb4a +0 -0
  254. data/test/dummy/tmp/cache/assets/development/sprockets/c1b7fcd07fdbeadf93c3c2debe92beba +0 -0
  255. data/test/dummy/tmp/cache/assets/development/sprockets/c2d3f2caa64c79d33ffbad0043398fe3 +0 -0
  256. data/test/dummy/tmp/cache/assets/development/sprockets/c503600ec9cdf4b204d7d75a5edbc8eb +0 -0
  257. data/test/dummy/tmp/cache/assets/development/sprockets/c833f6867baa50c9e2459432e36bab9d +0 -0
  258. data/test/dummy/tmp/cache/assets/development/sprockets/c8f11a1b68820a03840803612bcd32a7 +0 -0
  259. data/test/dummy/tmp/cache/assets/development/sprockets/ca49e464ab73a27251187dd909165c69 +0 -0
  260. data/test/dummy/tmp/cache/assets/development/sprockets/caddd644f7d3ee375572e58a20213b35 +0 -0
  261. data/test/dummy/tmp/cache/assets/development/sprockets/cb9ece3b5d3823e47f01b97c6f018522 +0 -0
  262. data/test/dummy/tmp/cache/assets/development/sprockets/ccd5cfbec1ebd7c2d3e2d1f081193ac4 +0 -0
  263. data/test/dummy/tmp/cache/assets/development/sprockets/cce68f414ed574403bb7cfede848b78e +0 -0
  264. data/test/dummy/tmp/cache/assets/development/sprockets/cedf7b6a3921e2658c93ae686134c6e3 +0 -0
  265. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  266. data/test/dummy/tmp/cache/assets/development/sprockets/d0a0940b55e2a10317580396db3256c9 +0 -0
  267. data/test/dummy/tmp/cache/assets/development/sprockets/d0b6672a6c0b4ea31e1a6ab2e85de4b9 +0 -0
  268. data/test/dummy/tmp/cache/assets/development/sprockets/d267459f312fa4e5ecca4f94daf7560e +0 -0
  269. data/test/dummy/tmp/cache/assets/development/sprockets/d2afff46e4bf390929cffd0e71e85bfe +0 -0
  270. data/test/dummy/tmp/cache/assets/development/sprockets/d2c61b3a231107ed97e316d07f619489 +0 -0
  271. data/test/dummy/tmp/cache/assets/development/sprockets/d342ab3e8f13aa1f6a0f493c5b1ce46e +0 -0
  272. data/test/dummy/tmp/cache/assets/development/sprockets/d34c24d82badddc9ba03f204d05eaf0d +0 -0
  273. data/test/dummy/tmp/cache/assets/development/sprockets/d3c3de17681063c79cd77eac60d0274c +0 -0
  274. data/test/dummy/tmp/cache/assets/development/sprockets/d6e6146eeb1fc717dd6fea654d079083 +0 -0
  275. data/test/dummy/tmp/cache/assets/development/sprockets/d7276a1023afbb69794002b1f5b603a6 +0 -0
  276. data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  277. data/test/dummy/tmp/cache/assets/development/sprockets/d869ad2a53f75a5129de23c56264519d +0 -0
  278. data/test/dummy/tmp/cache/assets/development/sprockets/d869c0302ce3b91a207ffcff2d0aeb7f +0 -0
  279. data/test/dummy/tmp/cache/assets/development/sprockets/d8eb6cdd088e1ef9f4ff5db326895fc7 +0 -0
  280. data/test/dummy/tmp/cache/assets/development/sprockets/d90283f77a0493b539c41e3b664bbf8c +0 -0
  281. data/test/dummy/tmp/cache/assets/development/sprockets/d9313c7a91193d501b87ae6c04180b3d +0 -0
  282. data/test/dummy/tmp/cache/assets/development/sprockets/d9b5a6a505e5a5d89bd693ac6fcba773 +0 -0
  283. data/test/dummy/tmp/cache/assets/development/sprockets/db0d324ab8edb4318df4ec60695487f2 +0 -0
  284. data/test/dummy/tmp/cache/assets/development/sprockets/db6480d4fb79806aadb21318201422e7 +0 -0
  285. data/test/dummy/tmp/cache/assets/development/sprockets/dbbf9635406623ff3bcf54f61e9ff220 +0 -0
  286. data/test/dummy/tmp/cache/assets/development/sprockets/dbbfea5309666de81e34fd84a90c8199 +0 -0
  287. data/test/dummy/tmp/cache/assets/development/sprockets/dbecb399b20a9bcc813b96e1740eebf9 +0 -0
  288. data/test/dummy/tmp/cache/assets/development/sprockets/ddd1a183b4d8c54f52c1673f7bfa7f97 +0 -0
  289. data/test/dummy/tmp/cache/assets/development/sprockets/ddf5eac39c10a72904d7d2f7fcdfb37d +0 -0
  290. data/test/dummy/tmp/cache/assets/development/sprockets/de91fa09fccdb5c53ad711f62c22ba69 +0 -0
  291. data/test/dummy/tmp/cache/assets/development/sprockets/df8aaea491f36e722c969f3c11582208 +0 -0
  292. data/test/dummy/tmp/cache/assets/development/sprockets/e239ba3477f86205d48ba1b3b8ea6240 +0 -0
  293. data/test/dummy/tmp/cache/assets/development/sprockets/e3ca14e93b890ede9c281d6eb74e7fbe +0 -0
  294. data/test/dummy/tmp/cache/assets/development/sprockets/e527a968c24a6c4fb386cd68ba9b259f +0 -0
  295. data/test/dummy/tmp/cache/assets/development/sprockets/e52e91c8e44bf16e44402a285c0849f2 +0 -0
  296. data/test/dummy/tmp/cache/assets/development/sprockets/e671a27105bf981f91ad9ab34e76440a +0 -0
  297. data/test/dummy/tmp/cache/assets/development/sprockets/e68bffc7be46d1ad5b17ff900d7a6aeb +0 -0
  298. data/test/dummy/tmp/cache/assets/development/sprockets/e78dc61048d62c6251b04f36fecd09b2 +0 -0
  299. data/test/dummy/tmp/cache/assets/development/sprockets/e8ff0908f381593cd234318fedbd9344 +0 -0
  300. data/test/dummy/tmp/cache/assets/development/sprockets/e92d00a987ccf1bad18583d0945e8b27 +0 -0
  301. data/test/dummy/tmp/cache/assets/development/sprockets/e9b65cbbbbe6ddadeed072df32042baa +0 -0
  302. data/test/dummy/tmp/cache/assets/development/sprockets/eb474af33c68e37bafb705e9b552dbcc +0 -0
  303. data/test/dummy/tmp/cache/assets/development/sprockets/ebdbd594563090002d0b6d21a80812d6 +0 -0
  304. data/test/dummy/tmp/cache/assets/development/sprockets/ed1a6e00a3d9b858d7ac4c91a9830f37 +0 -0
  305. data/test/dummy/tmp/cache/assets/development/sprockets/edbef6e0d0a4742346cf479f2c522eb0 +0 -0
  306. data/test/dummy/tmp/cache/assets/development/sprockets/ef45f10846a61f9e21392e805b6d641d +0 -0
  307. data/test/dummy/tmp/cache/assets/development/sprockets/efb49c23ef255baa659719490ab15912 +0 -0
  308. data/test/dummy/tmp/cache/assets/development/sprockets/f0b7a8ce1e177c1301ae79d37219749c +0 -0
  309. data/test/dummy/tmp/cache/assets/development/sprockets/f1da9db4546c9a30394f470f1216464d +0 -0
  310. data/test/dummy/tmp/cache/assets/development/sprockets/f28c753bf8cb7b7dc27fb3ff2e967000 +0 -0
  311. data/test/dummy/tmp/cache/assets/development/sprockets/f393566de24990d79ad31cbea9787d52 +0 -0
  312. data/test/dummy/tmp/cache/assets/development/sprockets/f4f9061e48ee5a9ea5d50e158ff99a9d +0 -0
  313. data/test/dummy/tmp/cache/assets/development/sprockets/f5b58ca493a9b10e4d2052f999340598 +0 -0
  314. data/test/dummy/tmp/cache/assets/development/sprockets/f5ba8070d8a5b22c99345a3a7b80a0c9 +0 -0
  315. data/test/dummy/tmp/cache/assets/development/sprockets/f61b2c6c72d37020e009920eb142f37a +0 -0
  316. data/test/dummy/tmp/cache/assets/development/sprockets/f699d7b90862831dae589e8d29fdd5e2 +0 -0
  317. data/test/dummy/tmp/cache/assets/development/sprockets/f7a8456d35999a5d8d1ee8535fac0976 +0 -0
  318. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  319. data/test/dummy/tmp/cache/assets/development/sprockets/f8a4be08405068ee38629b5ed9175b2b +0 -0
  320. data/test/dummy/tmp/cache/assets/development/sprockets/f9a0336b589eb3a497b9b07725d26478 +0 -0
  321. data/test/dummy/tmp/cache/assets/development/sprockets/fae9990c3279fc65ae2691ca0283c38e +0 -0
  322. data/test/dummy/tmp/cache/assets/development/sprockets/fbf0091f4247e5a1692445ecf9db232a +0 -0
  323. data/test/dummy/tmp/cache/assets/development/sprockets/fc6fdc8f00670c4544a83882fb2380c2 +0 -0
  324. data/test/dummy/tmp/cache/assets/development/sprockets/fd5120ba1a2854bcecbb9cb24a69c9b6 +0 -0
  325. data/test/dummy/tmp/cache/assets/development/sprockets/fd70bc873f3fa61b20d0a8cdb0208c78 +0 -0
  326. data/test/helpers/very_simple_cms/cms_helper_test.rb +6 -0
  327. data/test/helpers/very_simple_cms/mercury_helper_test.rb +6 -0
  328. data/test/integration/navigation_test.rb +10 -0
  329. data/test/test_helper.rb +15 -0
  330. data/test/very_simple_cms_test.rb +7 -0
  331. metadata +716 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f328271b3a62073b0e97c6ff26c514a0d55066ba
4
+ data.tar.gz: 44a63c3a830484c17834b9680018da083da0d550
5
+ SHA512:
6
+ metadata.gz: 47f7408947d43ec5c181b226a80c1db4f4e322cf5d54eb70915079de212f5ab138b02a3d38a2a4f8d8d97f7e76e8b5a082f055d60597c4cf30528e3ba442d757
7
+ data.tar.gz: 9ef4e06567e85abf8d2c78fad0516640fcffba1b103dfa84d5073f684b50031e0a2b1557b0d839286146272117f6cfaa17f5b9bc99f2de08ba5ce59e32143255
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2013 YOURNAME
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/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 = 'VerySimpleCms'
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,13 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+
@@ -0,0 +1,11 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ */
@@ -0,0 +1,5 @@
1
+ module VerySimpleCms
2
+ class ApplicationController < ActionController::Base
3
+ include SharedHelper
4
+ end
5
+ end
@@ -0,0 +1,24 @@
1
+ require_dependency "very_simple_cms/application_controller"
2
+
3
+ module VerySimpleCms
4
+ class ContentsController < ApplicationController
5
+ def update
6
+ data = params['content']
7
+
8
+ data.each do |key, value|
9
+ static_text = HtmlBlock.find_by_attribute(dynamic_save_source, :title, key)
10
+ if static_text.present?
11
+ static_text.update_attributes(body: value['value'])
12
+ else
13
+ static_text = HtmlBlock.new(
14
+ dynamic_source: dynamic_save_source,
15
+ title: key,
16
+ body: value['value']
17
+ )
18
+ static_text.save
19
+ end
20
+ end
21
+ render text: ""
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,4 @@
1
+ module VerySimpleCms
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,12 @@
1
+ module VerySimpleCms
2
+ module CmsHelper
3
+ def cms_block(title)
4
+ raw(HtmlBlock.find_by_attribute(dynamic_save_source, :title, title).try(:body))
5
+ end
6
+
7
+ def cms_edit_link(advanced_class=nil)
8
+ link_to t(:edit_link, scope: [:very_simple_cms]), VerySimpleCms.editor_path + request.path,
9
+ class: "admin_edit_link #{advanced_class}", data: { save_url: very_simple_cms.content_url }
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ module VerySimpleCms
2
+ module SharedHelper
3
+ def dynamic_save_source
4
+ if VerySimpleCms.translatable
5
+ I18n.locale.to_s
6
+ else
7
+ 'default'
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,18 @@
1
+ module VerySimpleCms
2
+ class HtmlBlock < YamlRecord::Base
3
+ # Declare your properties
4
+ properties :title, :body, :dynamic_source
5
+
6
+ # Declare your adapter (local by default)
7
+ # adapter :local # or :redis
8
+ adapter VerySimpleCms.content_saving_adapter.to_sym
9
+
10
+ # Declare source file path
11
+ source Rails.root.join(VerySimpleCms.source_files_root)
12
+ source_file_name VerySimpleCms.source_file_name
13
+
14
+ def to_s
15
+ {title: title, body: body, dynamic_source: dynamic_source}.to_s
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,25 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ very_simple_cms:
24
+ edit_link: "Edit"
25
+
data/config/routes.rb ADDED
@@ -0,0 +1,3 @@
1
+ VerySimpleCms::Engine.routes.draw do
2
+ resource :content, only: [:update]
3
+ end
@@ -0,0 +1,5 @@
1
+ Description:
2
+ Add some needed code to app/assets/jsvascripts/mercury.js
3
+
4
+ Example:
5
+ rails generate very_simple_cms:init_mercury
@@ -0,0 +1,23 @@
1
+ module VerySimpleCms
2
+ class InitMercuryGenerator < Rails::Generators::Base
3
+ source_root File.expand_path('../templates', __FILE__)
4
+ def appent_to_mercury
5
+ append_to_file "app/assets/javascripts/mercury.js" do
6
+ "
7
+ $(window).on('mercury:ready', function() {
8
+ var link = $('.admin_edit_link');
9
+
10
+ if(Mercury.saveUrl !== null) {
11
+ Mercury.saveUrl = link.attr('data-save-url');
12
+ }
13
+ link.hide(Mercury.saveUrl);
14
+ });
15
+
16
+ $(window).on('mercury:saved', function() {
17
+ window.location = window.location.href.replace(/\\/editor\\//i, '/');
18
+ });
19
+ "
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,8 @@
1
+ Description:
2
+ Creates defaults config for VerySimpleCms gem
3
+
4
+ Example:
5
+ rails generate very_simple_cms:install
6
+
7
+ This will create:
8
+ config/initializers/very_simple_cms.rb
@@ -0,0 +1,13 @@
1
+ module VerySimpleCms
2
+ class InstallGenerator < Rails::Generators::Base
3
+ source_root File.expand_path('../templates', __FILE__)
4
+ def create_initializer_file
5
+ copy_file "very_simple_cms.rb", "config/initializers/very_simple_cms.rb"
6
+ end
7
+
8
+ def create_directory
9
+ empty_directory 'config/cms'
10
+ end
11
+
12
+ end
13
+ end
@@ -0,0 +1,5 @@
1
+ VerySimpleCms.editor_path = "/editor"
2
+ VerySimpleCms.translatable = true
3
+ VerySimpleCms.content_saving_adapter = "local"
4
+ VerySimpleCms.source_file_name = '/html_blocks'
5
+ VerySimpleCms.source_files_root = "config/cms/"
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :very_simple_cms do
3
+ # # Task goes here
4
+ # end
@@ -0,0 +1,10 @@
1
+ require "very_simple_cms/engine"
2
+ require "yaml_record_rails_4"
3
+
4
+ module VerySimpleCms
5
+ mattr_accessor :editor_path
6
+ mattr_accessor :translatable
7
+ mattr_accessor :content_saving_adapter
8
+ mattr_accessor :source_file_name
9
+ mattr_accessor :source_files_root
10
+ end
@@ -0,0 +1,12 @@
1
+ module VerySimpleCms
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace VerySimpleCms
4
+
5
+ initializer 'very_simple_cms.action_controller' do |app|
6
+ ActiveSupport.on_load :action_controller do
7
+ helper VerySimpleCms::CmsHelper
8
+ helper VerySimpleCms::SharedHelper
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,3 @@
1
+ module VerySimpleCms
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,11 @@
1
+ require 'test_helper'
2
+
3
+ module VerySimpleCms
4
+ class MercuryControllerTest < ActionController::TestCase
5
+ test "should get update" do
6
+ get :update
7
+ assert_response :success
8
+ end
9
+
10
+ end
11
+ end
@@ -0,0 +1,28 @@
1
+ == README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
25
+
26
+
27
+ Please feel free to use a different markup language if you do not plan to run
28
+ <tt>rake doc:app</tt>.
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+
6
+ Dummy::Application.load_tasks
@@ -0,0 +1,16 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+
14
+ //= require jquery
15
+ //= require jquery_ujs
16
+ //= require_tree .
@@ -0,0 +1,521 @@
1
+ /*!
2
+ * jQuery Migrate - v1.2.1 - 2013-05-08
3
+ * https://github.com/jquery/jquery-migrate
4
+ * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
5
+ */
6
+ (function( jQuery, window, undefined ) {
7
+ // See http://bugs.jquery.com/ticket/13335
8
+ // "use strict";
9
+
10
+
11
+ var warnedAbout = {};
12
+
13
+ // List of warnings already given; public read only
14
+ jQuery.migrateWarnings = [];
15
+
16
+ // Set to true to prevent console output; migrateWarnings still maintained
17
+ // jQuery.migrateMute = false;
18
+
19
+ // Show a message on the console so devs know we're active
20
+ if ( !jQuery.migrateMute && window.console && window.console.log ) {
21
+ window.console.log("JQMIGRATE: Logging is active");
22
+ }
23
+
24
+ // Set to false to disable traces that appear with warnings
25
+ if ( jQuery.migrateTrace === undefined ) {
26
+ jQuery.migrateTrace = true;
27
+ }
28
+
29
+ // Forget any warnings we've already given; public
30
+ jQuery.migrateReset = function() {
31
+ warnedAbout = {};
32
+ jQuery.migrateWarnings.length = 0;
33
+ };
34
+
35
+ function migrateWarn( msg) {
36
+ var console = window.console;
37
+ if ( !warnedAbout[ msg ] ) {
38
+ warnedAbout[ msg ] = true;
39
+ jQuery.migrateWarnings.push( msg );
40
+ if ( console && console.warn && !jQuery.migrateMute ) {
41
+ console.warn( "JQMIGRATE: " + msg );
42
+ if ( jQuery.migrateTrace && console.trace ) {
43
+ console.trace();
44
+ }
45
+ }
46
+ }
47
+ }
48
+
49
+ function migrateWarnProp( obj, prop, value, msg ) {
50
+ if ( Object.defineProperty ) {
51
+ // On ES5 browsers (non-oldIE), warn if the code tries to get prop;
52
+ // allow property to be overwritten in case some other plugin wants it
53
+ try {
54
+ Object.defineProperty( obj, prop, {
55
+ configurable: true,
56
+ enumerable: true,
57
+ get: function() {
58
+ migrateWarn( msg );
59
+ return value;
60
+ },
61
+ set: function( newValue ) {
62
+ migrateWarn( msg );
63
+ value = newValue;
64
+ }
65
+ });
66
+ return;
67
+ } catch( err ) {
68
+ // IE8 is a dope about Object.defineProperty, can't warn there
69
+ }
70
+ }
71
+
72
+ // Non-ES5 (or broken) browser; just set the property
73
+ jQuery._definePropertyBroken = true;
74
+ obj[ prop ] = value;
75
+ }
76
+
77
+ if ( document.compatMode === "BackCompat" ) {
78
+ // jQuery has never supported or tested Quirks Mode
79
+ migrateWarn( "jQuery is not compatible with Quirks Mode" );
80
+ }
81
+
82
+
83
+ var attrFn = jQuery( "<input/>", { size: 1 } ).attr("size") && jQuery.attrFn,
84
+ oldAttr = jQuery.attr,
85
+ valueAttrGet = jQuery.attrHooks.value && jQuery.attrHooks.value.get ||
86
+ function() { return null; },
87
+ valueAttrSet = jQuery.attrHooks.value && jQuery.attrHooks.value.set ||
88
+ function() { return undefined; },
89
+ rnoType = /^(?:input|button)$/i,
90
+ rnoAttrNodeType = /^[238]$/,
91
+ rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
92
+ ruseDefault = /^(?:checked|selected)$/i;
93
+
94
+ // jQuery.attrFn
95
+ migrateWarnProp( jQuery, "attrFn", attrFn || {}, "jQuery.attrFn is deprecated" );
96
+
97
+ jQuery.attr = function( elem, name, value, pass ) {
98
+ var lowerName = name.toLowerCase(),
99
+ nType = elem && elem.nodeType;
100
+
101
+ if ( pass ) {
102
+ // Since pass is used internally, we only warn for new jQuery
103
+ // versions where there isn't a pass arg in the formal params
104
+ if ( oldAttr.length < 4 ) {
105
+ migrateWarn("jQuery.fn.attr( props, pass ) is deprecated");
106
+ }
107
+ if ( elem && !rnoAttrNodeType.test( nType ) &&
108
+ (attrFn ? name in attrFn : jQuery.isFunction(jQuery.fn[name])) ) {
109
+ return jQuery( elem )[ name ]( value );
110
+ }
111
+ }
112
+
113
+ // Warn if user tries to set `type`, since it breaks on IE 6/7/8; by checking
114
+ // for disconnected elements we don't warn on $( "<button>", { type: "button" } ).
115
+ if ( name === "type" && value !== undefined && rnoType.test( elem.nodeName ) && elem.parentNode ) {
116
+ migrateWarn("Can't change the 'type' of an input or button in IE 6/7/8");
117
+ }
118
+
119
+ // Restore boolHook for boolean property/attribute synchronization
120
+ if ( !jQuery.attrHooks[ lowerName ] && rboolean.test( lowerName ) ) {
121
+ jQuery.attrHooks[ lowerName ] = {
122
+ get: function( elem, name ) {
123
+ // Align boolean attributes with corresponding properties
124
+ // Fall back to attribute presence where some booleans are not supported
125
+ var attrNode,
126
+ property = jQuery.prop( elem, name );
127
+ return property === true || typeof property !== "boolean" &&
128
+ ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
129
+
130
+ name.toLowerCase() :
131
+ undefined;
132
+ },
133
+ set: function( elem, value, name ) {
134
+ var propName;
135
+ if ( value === false ) {
136
+ // Remove boolean attributes when set to false
137
+ jQuery.removeAttr( elem, name );
138
+ } else {
139
+ // value is true since we know at this point it's type boolean and not false
140
+ // Set boolean attributes to the same name and set the DOM property
141
+ propName = jQuery.propFix[ name ] || name;
142
+ if ( propName in elem ) {
143
+ // Only set the IDL specifically if it already exists on the element
144
+ elem[ propName ] = true;
145
+ }
146
+
147
+ elem.setAttribute( name, name.toLowerCase() );
148
+ }
149
+ return name;
150
+ }
151
+ };
152
+
153
+ // Warn only for attributes that can remain distinct from their properties post-1.9
154
+ if ( ruseDefault.test( lowerName ) ) {
155
+ migrateWarn( "jQuery.fn.attr('" + lowerName + "') may use property instead of attribute" );
156
+ }
157
+ }
158
+
159
+ return oldAttr.call( jQuery, elem, name, value );
160
+ };
161
+
162
+ // attrHooks: value
163
+ jQuery.attrHooks.value = {
164
+ get: function( elem, name ) {
165
+ var nodeName = ( elem.nodeName || "" ).toLowerCase();
166
+ if ( nodeName === "button" ) {
167
+ return valueAttrGet.apply( this, arguments );
168
+ }
169
+ if ( nodeName !== "input" && nodeName !== "option" ) {
170
+ migrateWarn("jQuery.fn.attr('value') no longer gets properties");
171
+ }
172
+ return name in elem ?
173
+ elem.value :
174
+ null;
175
+ },
176
+ set: function( elem, value ) {
177
+ var nodeName = ( elem.nodeName || "" ).toLowerCase();
178
+ if ( nodeName === "button" ) {
179
+ return valueAttrSet.apply( this, arguments );
180
+ }
181
+ if ( nodeName !== "input" && nodeName !== "option" ) {
182
+ migrateWarn("jQuery.fn.attr('value', val) no longer sets properties");
183
+ }
184
+ // Does not return so that setAttribute is also used
185
+ elem.value = value;
186
+ }
187
+ };
188
+
189
+
190
+ var matched, browser,
191
+ oldInit = jQuery.fn.init,
192
+ oldParseJSON = jQuery.parseJSON,
193
+ // Note: XSS check is done below after string is trimmed
194
+ rquickExpr = /^([^<]*)(<[\w\W]+>)([^>]*)$/;
195
+
196
+ // $(html) "looks like html" rule change
197
+ jQuery.fn.init = function( selector, context, rootjQuery ) {
198
+ var match;
199
+
200
+ if ( selector && typeof selector === "string" && !jQuery.isPlainObject( context ) &&
201
+ (match = rquickExpr.exec( jQuery.trim( selector ) )) && match[ 0 ] ) {
202
+ // This is an HTML string according to the "old" rules; is it still?
203
+ if ( selector.charAt( 0 ) !== "<" ) {
204
+ migrateWarn("$(html) HTML strings must start with '<' character");
205
+ }
206
+ if ( match[ 3 ] ) {
207
+ migrateWarn("$(html) HTML text after last tag is ignored");
208
+ }
209
+ // Consistently reject any HTML-like string starting with a hash (#9521)
210
+ // Note that this may break jQuery 1.6.x code that otherwise would work.
211
+ if ( match[ 0 ].charAt( 0 ) === "#" ) {
212
+ migrateWarn("HTML string cannot start with a '#' character");
213
+ jQuery.error("JQMIGRATE: Invalid selector string (XSS)");
214
+ }
215
+ // Now process using loose rules; let pre-1.8 play too
216
+ if ( context && context.context ) {
217
+ // jQuery object as context; parseHTML expects a DOM object
218
+ context = context.context;
219
+ }
220
+ if ( jQuery.parseHTML ) {
221
+ return oldInit.call( this, jQuery.parseHTML( match[ 2 ], context, true ),
222
+ context, rootjQuery );
223
+ }
224
+ }
225
+ return oldInit.apply( this, arguments );
226
+ };
227
+ jQuery.fn.init.prototype = jQuery.fn;
228
+
229
+ // Let $.parseJSON(falsy_value) return null
230
+ jQuery.parseJSON = function( json ) {
231
+ if ( !json && json !== null ) {
232
+ migrateWarn("jQuery.parseJSON requires a valid JSON string");
233
+ return null;
234
+ }
235
+ return oldParseJSON.apply( this, arguments );
236
+ };
237
+
238
+ jQuery.uaMatch = function( ua ) {
239
+ ua = ua.toLowerCase();
240
+
241
+ var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
242
+ /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
243
+ /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
244
+ /(msie) ([\w.]+)/.exec( ua ) ||
245
+ ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
246
+ [];
247
+
248
+ return {
249
+ browser: match[ 1 ] || "",
250
+ version: match[ 2 ] || "0"
251
+ };
252
+ };
253
+
254
+ // Don't clobber any existing jQuery.browser in case it's different
255
+ if ( !jQuery.browser ) {
256
+ matched = jQuery.uaMatch( navigator.userAgent );
257
+ browser = {};
258
+
259
+ if ( matched.browser ) {
260
+ browser[ matched.browser ] = true;
261
+ browser.version = matched.version;
262
+ }
263
+
264
+ // Chrome is Webkit, but Webkit is also Safari.
265
+ if ( browser.chrome ) {
266
+ browser.webkit = true;
267
+ } else if ( browser.webkit ) {
268
+ browser.safari = true;
269
+ }
270
+
271
+ jQuery.browser = browser;
272
+ }
273
+
274
+ // Warn if the code tries to get jQuery.browser
275
+ migrateWarnProp( jQuery, "browser", jQuery.browser, "jQuery.browser is deprecated" );
276
+
277
+ jQuery.sub = function() {
278
+ function jQuerySub( selector, context ) {
279
+ return new jQuerySub.fn.init( selector, context );
280
+ }
281
+ jQuery.extend( true, jQuerySub, this );
282
+ jQuerySub.superclass = this;
283
+ jQuerySub.fn = jQuerySub.prototype = this();
284
+ jQuerySub.fn.constructor = jQuerySub;
285
+ jQuerySub.sub = this.sub;
286
+ jQuerySub.fn.init = function init( selector, context ) {
287
+ if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
288
+ context = jQuerySub( context );
289
+ }
290
+
291
+ return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
292
+ };
293
+ jQuerySub.fn.init.prototype = jQuerySub.fn;
294
+ var rootjQuerySub = jQuerySub(document);
295
+ migrateWarn( "jQuery.sub() is deprecated" );
296
+ return jQuerySub;
297
+ };
298
+
299
+
300
+ // Ensure that $.ajax gets the new parseJSON defined in core.js
301
+ jQuery.ajaxSetup({
302
+ converters: {
303
+ "text json": jQuery.parseJSON
304
+ }
305
+ });
306
+
307
+
308
+ var oldFnData = jQuery.fn.data;
309
+
310
+ jQuery.fn.data = function( name ) {
311
+ var ret, evt,
312
+ elem = this[0];
313
+
314
+ // Handles 1.7 which has this behavior and 1.8 which doesn't
315
+ if ( elem && name === "events" && arguments.length === 1 ) {
316
+ ret = jQuery.data( elem, name );
317
+ evt = jQuery._data( elem, name );
318
+ if ( ( ret === undefined || ret === evt ) && evt !== undefined ) {
319
+ migrateWarn("Use of jQuery.fn.data('events') is deprecated");
320
+ return evt;
321
+ }
322
+ }
323
+ return oldFnData.apply( this, arguments );
324
+ };
325
+
326
+
327
+ var rscriptType = /\/(java|ecma)script/i,
328
+ oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack;
329
+
330
+ jQuery.fn.andSelf = function() {
331
+ migrateWarn("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()");
332
+ return oldSelf.apply( this, arguments );
333
+ };
334
+
335
+ // Since jQuery.clean is used internally on older versions, we only shim if it's missing
336
+ if ( !jQuery.clean ) {
337
+ jQuery.clean = function( elems, context, fragment, scripts ) {
338
+ // Set context per 1.8 logic
339
+ context = context || document;
340
+ context = !context.nodeType && context[0] || context;
341
+ context = context.ownerDocument || context;
342
+
343
+ migrateWarn("jQuery.clean() is deprecated");
344
+
345
+ var i, elem, handleScript, jsTags,
346
+ ret = [];
347
+
348
+ jQuery.merge( ret, jQuery.buildFragment( elems, context ).childNodes );
349
+
350
+ // Complex logic lifted directly from jQuery 1.8
351
+ if ( fragment ) {
352
+ // Special handling of each script element
353
+ handleScript = function( elem ) {
354
+ // Check if we consider it executable
355
+ if ( !elem.type || rscriptType.test( elem.type ) ) {
356
+ // Detach the script and store it in the scripts array (if provided) or the fragment
357
+ // Return truthy to indicate that it has been handled
358
+ return scripts ?
359
+ scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) :
360
+ fragment.appendChild( elem );
361
+ }
362
+ };
363
+
364
+ for ( i = 0; (elem = ret[i]) != null; i++ ) {
365
+ // Check if we're done after handling an executable script
366
+ if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) {
367
+ // Append to fragment and handle embedded scripts
368
+ fragment.appendChild( elem );
369
+ if ( typeof elem.getElementsByTagName !== "undefined" ) {
370
+ // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration
371
+ jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript );
372
+
373
+ // Splice the scripts into ret after their former ancestor and advance our index beyond them
374
+ ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
375
+ i += jsTags.length;
376
+ }
377
+ }
378
+ }
379
+ }
380
+
381
+ return ret;
382
+ };
383
+ }
384
+
385
+ var eventAdd = jQuery.event.add,
386
+ eventRemove = jQuery.event.remove,
387
+ eventTrigger = jQuery.event.trigger,
388
+ oldToggle = jQuery.fn.toggle,
389
+ oldLive = jQuery.fn.live,
390
+ oldDie = jQuery.fn.die,
391
+ ajaxEvents = "ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",
392
+ rajaxEvent = new RegExp( "\\b(?:" + ajaxEvents + ")\\b" ),
393
+ rhoverHack = /(?:^|\s)hover(\.\S+|)\b/,
394
+ hoverHack = function( events ) {
395
+ if ( typeof( events ) !== "string" || jQuery.event.special.hover ) {
396
+ return events;
397
+ }
398
+ if ( rhoverHack.test( events ) ) {
399
+ migrateWarn("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'");
400
+ }
401
+ return events && events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
402
+ };
403
+
404
+ // Event props removed in 1.9, put them back if needed; no practical way to warn them
405
+ if ( jQuery.event.props && jQuery.event.props[ 0 ] !== "attrChange" ) {
406
+ jQuery.event.props.unshift( "attrChange", "attrName", "relatedNode", "srcElement" );
407
+ }
408
+
409
+ // Undocumented jQuery.event.handle was "deprecated" in jQuery 1.7
410
+ if ( jQuery.event.dispatch ) {
411
+ migrateWarnProp( jQuery.event, "handle", jQuery.event.dispatch, "jQuery.event.handle is undocumented and deprecated" );
412
+ }
413
+
414
+ // Support for 'hover' pseudo-event and ajax event warnings
415
+ jQuery.event.add = function( elem, types, handler, data, selector ){
416
+ if ( elem !== document && rajaxEvent.test( types ) ) {
417
+ migrateWarn( "AJAX events should be attached to document: " + types );
418
+ }
419
+ eventAdd.call( this, elem, hoverHack( types || "" ), handler, data, selector );
420
+ };
421
+ jQuery.event.remove = function( elem, types, handler, selector, mappedTypes ){
422
+ eventRemove.call( this, elem, hoverHack( types ) || "", handler, selector, mappedTypes );
423
+ };
424
+
425
+ jQuery.fn.error = function() {
426
+ var args = Array.prototype.slice.call( arguments, 0);
427
+ migrateWarn("jQuery.fn.error() is deprecated");
428
+ args.splice( 0, 0, "error" );
429
+ if ( arguments.length ) {
430
+ return this.bind.apply( this, args );
431
+ }
432
+ // error event should not bubble to window, although it does pre-1.7
433
+ this.triggerHandler.apply( this, args );
434
+ return this;
435
+ };
436
+
437
+ jQuery.fn.toggle = function( fn, fn2 ) {
438
+
439
+ // Don't mess with animation or css toggles
440
+ if ( !jQuery.isFunction( fn ) || !jQuery.isFunction( fn2 ) ) {
441
+ return oldToggle.apply( this, arguments );
442
+ }
443
+ migrateWarn("jQuery.fn.toggle(handler, handler...) is deprecated");
444
+
445
+ // Save reference to arguments for access in closure
446
+ var args = arguments,
447
+ guid = fn.guid || jQuery.guid++,
448
+ i = 0,
449
+ toggler = function( event ) {
450
+ // Figure out which function to execute
451
+ var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
452
+ jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
453
+
454
+ // Make sure that clicks stop
455
+ event.preventDefault();
456
+
457
+ // and execute the function
458
+ return args[ lastToggle ].apply( this, arguments ) || false;
459
+ };
460
+
461
+ // link all the functions, so any of them can unbind this click handler
462
+ toggler.guid = guid;
463
+ while ( i < args.length ) {
464
+ args[ i++ ].guid = guid;
465
+ }
466
+
467
+ return this.click( toggler );
468
+ };
469
+
470
+ jQuery.fn.live = function( types, data, fn ) {
471
+ migrateWarn("jQuery.fn.live() is deprecated");
472
+ if ( oldLive ) {
473
+ return oldLive.apply( this, arguments );
474
+ }
475
+ jQuery( this.context ).on( types, this.selector, data, fn );
476
+ return this;
477
+ };
478
+
479
+ jQuery.fn.die = function( types, fn ) {
480
+ migrateWarn("jQuery.fn.die() is deprecated");
481
+ if ( oldDie ) {
482
+ return oldDie.apply( this, arguments );
483
+ }
484
+ jQuery( this.context ).off( types, this.selector || "**", fn );
485
+ return this;
486
+ };
487
+
488
+ // Turn global events into document-triggered events
489
+ jQuery.event.trigger = function( event, data, elem, onlyHandlers ){
490
+ if ( !elem && !rajaxEvent.test( event ) ) {
491
+ migrateWarn( "Global events are undocumented and deprecated" );
492
+ }
493
+ return eventTrigger.call( this, event, data, elem || document, onlyHandlers );
494
+ };
495
+ jQuery.each( ajaxEvents.split("|"),
496
+ function( _, name ) {
497
+ jQuery.event.special[ name ] = {
498
+ setup: function() {
499
+ var elem = this;
500
+
501
+ // The document needs no shimming; must be !== for oldIE
502
+ if ( elem !== document ) {
503
+ jQuery.event.add( document, name + "." + jQuery.guid, function() {
504
+ jQuery.event.trigger( name, null, elem, true );
505
+ });
506
+ jQuery._data( this, name, jQuery.guid++ );
507
+ }
508
+ return false;
509
+ },
510
+ teardown: function() {
511
+ if ( this !== document ) {
512
+ jQuery.event.remove( document, name + "." + jQuery._data( this, name ) );
513
+ }
514
+ return false;
515
+ }
516
+ };
517
+ }
518
+ );
519
+
520
+
521
+ })( jQuery, window );