exo_cms 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (252) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +3 -5
  3. data/app/controllers/concerns/exo/admin/{site_slug_id_filter.rb → site_restriction.rb} +3 -3
  4. data/app/controllers/concerns/exo/host_restriction.rb +32 -0
  5. data/app/controllers/concerns/exo/{route_filter.rb → request_restriction.rb} +8 -6
  6. data/app/controllers/exo/admin/assets_controller.rb +4 -4
  7. data/app/controllers/exo/admin/ckeditor_assets_controller.rb +2 -2
  8. data/app/controllers/exo/admin/ckeditor_blocks_controller.rb +3 -3
  9. data/app/controllers/exo/admin/contributors_controller.rb +2 -2
  10. data/app/controllers/exo/admin/items_controller.rb +3 -3
  11. data/app/controllers/exo/admin/pages_controller.rb +2 -2
  12. data/app/controllers/exo/admin/resources_controller.rb +2 -2
  13. data/app/controllers/exo/admin/routes_controller.rb +2 -2
  14. data/app/controllers/exo/admin/sessions_controller.rb +2 -0
  15. data/app/controllers/exo/admin/settings_controller.rb +5 -5
  16. data/app/controllers/exo/admin/site_controller.rb +1 -1
  17. data/app/controllers/exo/{admin/application_controller.rb → admin_controller.rb} +3 -3
  18. data/app/controllers/exo/gridfs_controller.rb +3 -3
  19. data/app/controllers/exo/pages_controller.rb +8 -9
  20. data/app/controllers/exo_controller.rb +4 -0
  21. data/app/helpers/exo/block_helper.rb +1 -1
  22. data/app/helpers/exo/resources_helper.rb +1 -1
  23. data/app/models/exo/app_service.rb +3 -0
  24. data/app/models/exo/block.rb +9 -11
  25. data/app/presenters/exo/item_decorator.rb +23 -0
  26. data/app/presenters/exo/resource_decorator.rb +21 -0
  27. data/app/presenters/exo/route_decorator.rb +23 -0
  28. data/app/presenters/exo/site_decorator.rb +25 -0
  29. data/app/resources/templates/application.html.haml +3 -3
  30. data/app/services/exo/config.rb +2 -0
  31. data/app/services/exo/router.rb +33 -0
  32. data/app/views/exo/admin/{application/_bheader.html.haml → _bheader.html.haml} +0 -0
  33. data/app/views/exo/admin/{application/_editor_header.html.haml → _editor_header.html.haml} +0 -0
  34. data/app/views/exo/admin/{application/_header.html.haml → _header.html.haml} +2 -2
  35. data/app/views/exo/admin/{application/_meta_errors.html.haml → _meta_errors.html.haml} +0 -0
  36. data/app/views/exo/admin/{application/_sidebar.html.haml → _sidebar.html.haml} +0 -0
  37. data/app/views/exo/admin/{application/_sidenav.html.haml → _sidenav.html.haml} +23 -17
  38. data/app/views/exo/admin/contributors/index.html.haml +1 -1
  39. data/app/views/exo/admin/{application/fields → fields}/_image.html.haml +0 -0
  40. data/app/views/exo/admin/{application/fields → fields}/_markdown.html.haml +0 -0
  41. data/app/views/exo/admin/items/show.html.haml +3 -3
  42. data/app/views/exo/admin/resources/index.html.haml +1 -1
  43. data/app/views/exo/admin/routes/index.html.haml +1 -1
  44. data/app/views/exo/admin/routes/show.html.haml +1 -1
  45. data/app/views/layouts/{application.html.erb → application.html.erb.tmp} +0 -0
  46. data/app/views/layouts/exo/admin/application.html.haml +1 -1
  47. data/app/views/layouts/exo/admin/editor.html.haml +2 -2
  48. data/config/initializers/devise.rb +27 -19
  49. data/config/routes.rb +1 -0
  50. data/lib/exo.rb +18 -7
  51. data/lib/exo/engine.rb +0 -2
  52. data/lib/exo/regexp.rb +7 -5
  53. data/lib/exo/version.rb +1 -1
  54. data/lib/generators/exo/install_generator.rb +20 -0
  55. data/lib/generators/exo/templates/engine_routes.rb +2 -0
  56. data/lib/generators/exo/templates/gems.rb +5 -0
  57. data/lib/generators/exo/templates/initializer.rb +5 -0
  58. data/spec/dummy/app/controllers/exo/admin/customs_controller.rb +1 -1
  59. data/spec/dummy/app/controllers/my_app/site_customs_controller.rb +1 -1
  60. data/spec/dummy/app/views/{a_sierra_theme → an_exo_theme}/a_page.html.haml +0 -0
  61. data/spec/dummy/app/views/an_exo_theme/a_page_with_block.html.haml +3 -0
  62. data/spec/dummy/app/views/layouts/{a_sierra_theme → an_exo_theme}/application.html.erb +0 -0
  63. data/spec/dummy/app/views/layouts/demo/application.html.haml +3 -3
  64. data/spec/dummy/config/application.rb +2 -1
  65. data/spec/dummy/config/initializers/exo.rb +2 -0
  66. data/spec/dummy/log/development.log +1938 -1
  67. data/spec/dummy/tmp/cache/assets/development/sprockets/03bec07d16adc41979a9767aaf23a5bf +0 -0
  68. data/spec/dummy/tmp/cache/assets/development/sprockets/05d652e83e6b6823771fca143eabff87 +0 -0
  69. data/spec/dummy/tmp/cache/assets/development/sprockets/063d6d3a982ac3bfa05750bd3d01416e +0 -0
  70. data/spec/dummy/tmp/cache/assets/development/sprockets/0b8cbd6c43ff11ed3ab96976a2e98e2b +0 -0
  71. data/spec/dummy/tmp/cache/assets/development/sprockets/0c48f6c7a09d069017a22749c940fd6a +0 -0
  72. data/spec/dummy/tmp/cache/assets/development/sprockets/0da0612d0055abcde88349af8cbdaffc +0 -0
  73. data/spec/dummy/tmp/cache/assets/development/sprockets/0e1b30ba4880626e3c136ff23d15f277 +0 -0
  74. data/spec/dummy/tmp/cache/assets/development/sprockets/0f621a895f3d0916a756a8c7313c7120 +0 -0
  75. data/spec/dummy/tmp/cache/assets/development/sprockets/18fedf436371d2979b37a490e2cbcacf +0 -0
  76. data/spec/dummy/tmp/cache/assets/development/sprockets/1f93865a20acec72a1870a7f9d348cc0 +0 -0
  77. data/spec/dummy/tmp/cache/assets/development/sprockets/219ff56291853001c0fe482a28484813 +0 -0
  78. data/spec/dummy/tmp/cache/assets/development/sprockets/224aace438e22fd51b5b2b6a45a4d69f +0 -0
  79. data/spec/dummy/tmp/cache/assets/development/sprockets/24d0fbc91349d4114a1eefbe058c8fba +0 -0
  80. data/spec/dummy/tmp/cache/assets/development/sprockets/2a6027bbfa613448003ab80bfc3249f2 +0 -0
  81. data/spec/dummy/tmp/cache/assets/development/sprockets/2c71b158948039606eb85485d93ed206 +0 -0
  82. data/spec/dummy/tmp/cache/assets/development/sprockets/3360fbdb00ed8ef59706becb7dbb41e4 +0 -0
  83. data/spec/dummy/tmp/cache/assets/development/sprockets/34f82b1703cb8350ca18f16392967779 +0 -0
  84. data/spec/dummy/tmp/cache/assets/development/sprockets/3b300b301493f1baf5d9dc2969701185 +0 -0
  85. data/spec/dummy/tmp/cache/assets/development/sprockets/3d2b5b35fe7888d5139899d2e067d2ce +0 -0
  86. data/spec/dummy/tmp/cache/assets/development/sprockets/3dfa6cb0540572b6362a1d5e6a1f6d26 +0 -0
  87. data/spec/dummy/tmp/cache/assets/development/sprockets/412b23d9dc12a05a414cae1e5a3fbbf8 +0 -0
  88. data/spec/dummy/tmp/cache/assets/development/sprockets/41acdde13a0132b81cbc4951661048cb +0 -0
  89. data/spec/dummy/tmp/cache/assets/development/sprockets/41d37ff244c3daef0583214fbef2c560 +0 -0
  90. data/spec/dummy/tmp/cache/assets/development/sprockets/48c744a9d1e3e5b052f995545823c315 +0 -0
  91. data/spec/dummy/tmp/cache/assets/development/sprockets/497a85ce66b5ead32a647661d0bada21 +0 -0
  92. data/spec/dummy/tmp/cache/assets/development/sprockets/4a5a6e9cf9074d00b627b83cf85c62f9 +0 -0
  93. data/spec/dummy/tmp/cache/assets/development/sprockets/4cd21bd7ac15013e918411a6001c4472 +0 -0
  94. data/spec/dummy/tmp/cache/assets/development/sprockets/576d1d5819328f9c5e52bbec45cb991e +0 -0
  95. data/spec/dummy/tmp/cache/assets/development/sprockets/6089ad88fceb548141d376101c88bc94 +0 -0
  96. data/spec/dummy/tmp/cache/assets/development/sprockets/667b895b188f4435053278e2497ac7b9 +0 -0
  97. data/spec/dummy/tmp/cache/assets/development/sprockets/6df5499acca0edd86677d5beec5c2b18 +0 -0
  98. data/spec/dummy/tmp/cache/assets/development/sprockets/716d07423ee379b258338cb932e39d25 +0 -0
  99. data/spec/dummy/tmp/cache/assets/development/sprockets/717887cd48fa79a99d0c71e392750d58 +0 -0
  100. data/spec/dummy/tmp/cache/assets/development/sprockets/727bcd360e44edbb990ea53347896a64 +0 -0
  101. data/spec/dummy/tmp/cache/assets/development/sprockets/73f77b33ce0f17becb6e75ff1082c43e +0 -0
  102. data/spec/dummy/tmp/cache/assets/development/sprockets/741b8483fbcabf9c321f7db58e78c3d8 +0 -0
  103. data/spec/dummy/tmp/cache/assets/development/sprockets/759a59934e8cb39ace939db6b3ca6c1a +0 -0
  104. data/spec/dummy/tmp/cache/assets/development/sprockets/76d85daa1c4000f529bf26504ebde8d9 +0 -0
  105. data/spec/dummy/tmp/cache/assets/development/sprockets/7888c5b61b2cd04d7ee4cf78ab510eb5 +0 -0
  106. data/spec/dummy/tmp/cache/assets/development/sprockets/797b3e33d6e04a512949c083da9c8819 +0 -0
  107. data/spec/dummy/tmp/cache/assets/development/sprockets/7ccfc79620770d38c5bd539c16fca755 +0 -0
  108. data/spec/dummy/tmp/cache/assets/development/sprockets/7eee5343ea643e8ac6dfa9282bbc4547 +0 -0
  109. data/spec/dummy/tmp/cache/assets/development/sprockets/7ef0c015d0ad290b8ffcd526afb67834 +0 -0
  110. data/spec/dummy/tmp/cache/assets/development/sprockets/85556c6543bc5bde199eee0c8096d83e +0 -0
  111. data/spec/dummy/tmp/cache/assets/development/sprockets/86d06f76cdbdc83c9621c928d42fa346 +0 -0
  112. data/spec/dummy/tmp/cache/assets/development/sprockets/8bb68b74b9c6d04b2172ef5589d5b1a5 +0 -0
  113. data/spec/dummy/tmp/cache/assets/development/sprockets/905ad43b3fc55108ad345c6255ddcfb8 +0 -0
  114. data/spec/dummy/tmp/cache/assets/development/sprockets/9a65689623c3096b82dd97819ef02b79 +0 -0
  115. data/spec/dummy/tmp/cache/assets/development/sprockets/9b1352fb7f42bed64bf100b191511e0d +0 -0
  116. data/spec/dummy/tmp/cache/assets/development/sprockets/a7244c34cc0ff696fbfe2fccb04cb04b +0 -0
  117. data/spec/dummy/tmp/cache/assets/development/sprockets/b162acd8d30fdf3dd12192251e427c66 +0 -0
  118. data/spec/dummy/tmp/cache/assets/development/sprockets/b30e4385f999fefded784baa3436ecd3 +0 -0
  119. data/spec/dummy/tmp/cache/assets/development/sprockets/b9df96c25252b82da00791df6d017199 +0 -0
  120. data/spec/dummy/tmp/cache/assets/development/sprockets/ba27cf3baf39fb89f47836875af24dd8 +0 -0
  121. data/spec/dummy/tmp/cache/assets/development/sprockets/c02127f4958e88d15dad1754931334aa +0 -0
  122. data/spec/dummy/tmp/cache/assets/development/sprockets/ca6ae3b0212906e203a675ad02a7729e +0 -0
  123. data/spec/dummy/tmp/cache/assets/development/sprockets/cb679ef7ff0235de4855aa5ee7c4fb27 +0 -0
  124. data/spec/dummy/tmp/cache/assets/development/sprockets/cb9e847b58fe12c042e8e608905c4c38 +0 -0
  125. data/spec/dummy/tmp/cache/assets/development/sprockets/db9141fa82b703a2439a562438fc6f04 +0 -0
  126. data/spec/dummy/tmp/cache/assets/development/sprockets/e3efb6f18e9d6f7f1f7a2bfdb4a616d3 +0 -0
  127. data/spec/dummy/tmp/cache/assets/development/sprockets/e5182eea228cd4e352dc35de5b86d387 +0 -0
  128. data/spec/dummy/tmp/cache/assets/development/sprockets/f20c3ba49438960a7f1184ec1aece636 +0 -0
  129. data/spec/dummy/tmp/cache/assets/development/sprockets/f3c6a93068f488ad8f54bf72f206fa3b +0 -0
  130. data/spec/dummy/tmp/cache/assets/development/sprockets/f952832de9d68bc78aae760f4d85d675 +0 -0
  131. data/spec/dummy/tmp/cache/assets/development/sprockets/fca2562e4bd00a9aaf122c2a9e76eea5 +0 -0
  132. data/spec/dummy/tmp/cache/assets/test/sass/1117950fc1adf8b31294376d9067eb7feadc7de0/colorize.sassc +0 -0
  133. data/spec/dummy/tmp/cache/assets/test/sass/1117950fc1adf8b31294376d9067eb7feadc7de0/content.sassc +0 -0
  134. data/spec/dummy/tmp/cache/assets/test/sass/1117950fc1adf8b31294376d9067eb7feadc7de0/header.sassc +0 -0
  135. data/spec/dummy/tmp/cache/assets/test/sass/1117950fc1adf8b31294376d9067eb7feadc7de0/sidebar.sassc +0 -0
  136. data/spec/dummy/tmp/cache/assets/test/sass/1117950fc1adf8b31294376d9067eb7feadc7de0/tables.sassc +0 -0
  137. data/spec/dummy/tmp/cache/assets/test/sass/1117950fc1adf8b31294376d9067eb7feadc7de0/wrapper.sassc +0 -0
  138. data/spec/dummy/tmp/cache/assets/test/sass/238d7e2ec3d3030371e96efa23f1677a0a064045/_functions.scssc +0 -0
  139. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_accordion.scssc +0 -0
  140. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_alert-boxes.scssc +0 -0
  141. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_block-grid.scssc +0 -0
  142. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_breadcrumbs.scssc +0 -0
  143. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_button-groups.scssc +0 -0
  144. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_buttons.scssc +0 -0
  145. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_clearing.scssc +0 -0
  146. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_dropdown-buttons.scssc +0 -0
  147. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_dropdown.scssc +0 -0
  148. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_flex-video.scssc +0 -0
  149. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_forms.scssc +0 -0
  150. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_global.scssc +0 -0
  151. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_grid.scssc +0 -0
  152. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_inline-lists.scssc +0 -0
  153. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_joyride.scssc +0 -0
  154. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_keystrokes.scssc +0 -0
  155. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_labels.scssc +0 -0
  156. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_magellan.scssc +0 -0
  157. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_offcanvas.scssc +0 -0
  158. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_orbit.scssc +0 -0
  159. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_pagination.scssc +0 -0
  160. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_panels.scssc +0 -0
  161. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_pricing-tables.scssc +0 -0
  162. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_progress-bars.scssc +0 -0
  163. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_reveal.scssc +0 -0
  164. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_side-nav.scssc +0 -0
  165. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_split-buttons.scssc +0 -0
  166. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_sub-nav.scssc +0 -0
  167. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_switch.scssc +0 -0
  168. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_tables.scssc +0 -0
  169. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_tabs.scssc +0 -0
  170. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_thumbs.scssc +0 -0
  171. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_tooltips.scssc +0 -0
  172. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_top-bar.scssc +0 -0
  173. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_type.scssc +0 -0
  174. data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_visibility.scssc +0 -0
  175. data/spec/dummy/tmp/cache/assets/test/sass/54bc91a8b995104fa44ba264c53dbd8d0a6ce1eb/font-awesome.css.erbc +0 -0
  176. data/spec/dummy/tmp/cache/assets/test/sass/689cee5da0d308518a9400df205830efb3b2004b/foundation.scssc +0 -0
  177. data/spec/dummy/tmp/cache/assets/test/sass/868bdcd3c8e6bd73d750879e972f235f451b00af/application.sassc +0 -0
  178. data/spec/dummy/tmp/cache/assets/test/sass/868bdcd3c8e6bd73d750879e972f235f451b00af/foundation_and_overrides.scssc +0 -0
  179. data/spec/dummy/tmp/cache/assets/test/sass/868bdcd3c8e6bd73d750879e972f235f451b00af/responsive-tables.cssc +0 -0
  180. data/spec/dummy/tmp/cache/assets/test/sprockets/05d652e83e6b6823771fca143eabff87 +0 -0
  181. data/spec/dummy/tmp/cache/assets/test/sprockets/063d6d3a982ac3bfa05750bd3d01416e +0 -0
  182. data/spec/dummy/tmp/cache/assets/test/sprockets/0b8cbd6c43ff11ed3ab96976a2e98e2b +0 -0
  183. data/spec/dummy/tmp/cache/assets/test/sprockets/0da0612d0055abcde88349af8cbdaffc +0 -0
  184. data/spec/dummy/tmp/cache/assets/test/sprockets/0e1b30ba4880626e3c136ff23d15f277 +0 -0
  185. data/spec/dummy/tmp/cache/assets/test/sprockets/0f621a895f3d0916a756a8c7313c7120 +0 -0
  186. data/spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  187. data/spec/dummy/tmp/cache/assets/test/sprockets/1f93865a20acec72a1870a7f9d348cc0 +0 -0
  188. data/spec/dummy/tmp/cache/assets/test/sprockets/224aace438e22fd51b5b2b6a45a4d69f +0 -0
  189. data/spec/dummy/tmp/cache/assets/test/sprockets/2a6027bbfa613448003ab80bfc3249f2 +0 -0
  190. data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  191. data/spec/dummy/tmp/cache/assets/test/sprockets/3360fbdb00ed8ef59706becb7dbb41e4 +0 -0
  192. data/spec/dummy/tmp/cache/assets/test/sprockets/34f82b1703cb8350ca18f16392967779 +0 -0
  193. data/spec/dummy/tmp/cache/assets/test/sprockets/3d2b5b35fe7888d5139899d2e067d2ce +0 -0
  194. data/spec/dummy/tmp/cache/assets/test/sprockets/412b23d9dc12a05a414cae1e5a3fbbf8 +0 -0
  195. data/spec/dummy/tmp/cache/assets/test/sprockets/41d37ff244c3daef0583214fbef2c560 +0 -0
  196. data/spec/dummy/tmp/cache/assets/test/sprockets/447161da5ee42f4d3b0702a328975499 +0 -0
  197. data/spec/dummy/tmp/cache/assets/test/sprockets/4a5a6e9cf9074d00b627b83cf85c62f9 +0 -0
  198. data/spec/dummy/tmp/cache/assets/test/sprockets/4cd21bd7ac15013e918411a6001c4472 +0 -0
  199. data/spec/dummy/tmp/cache/assets/test/sprockets/576d1d5819328f9c5e52bbec45cb991e +0 -0
  200. data/spec/dummy/tmp/cache/assets/test/sprockets/5e9e6e4b1c4bb6da2f89517e17fdca8b +0 -0
  201. data/spec/dummy/tmp/cache/assets/test/sprockets/6089ad88fceb548141d376101c88bc94 +0 -0
  202. data/spec/dummy/tmp/cache/assets/test/sprockets/6df5499acca0edd86677d5beec5c2b18 +0 -0
  203. data/spec/dummy/tmp/cache/assets/test/sprockets/717887cd48fa79a99d0c71e392750d58 +0 -0
  204. data/spec/dummy/tmp/cache/assets/test/sprockets/73f77b33ce0f17becb6e75ff1082c43e +0 -0
  205. data/spec/dummy/tmp/cache/assets/test/sprockets/741b8483fbcabf9c321f7db58e78c3d8 +0 -0
  206. data/spec/dummy/tmp/cache/assets/test/sprockets/759a59934e8cb39ace939db6b3ca6c1a +0 -0
  207. data/spec/dummy/tmp/cache/assets/test/sprockets/76d85daa1c4000f529bf26504ebde8d9 +0 -0
  208. data/spec/dummy/tmp/cache/assets/test/sprockets/7888c5b61b2cd04d7ee4cf78ab510eb5 +0 -0
  209. data/spec/dummy/tmp/cache/assets/test/sprockets/7eee5343ea643e8ac6dfa9282bbc4547 +0 -0
  210. data/spec/dummy/tmp/cache/assets/test/sprockets/7ef0c015d0ad290b8ffcd526afb67834 +0 -0
  211. data/spec/dummy/tmp/cache/assets/test/sprockets/85556c6543bc5bde199eee0c8096d83e +0 -0
  212. data/spec/dummy/tmp/cache/assets/test/sprockets/86d06f76cdbdc83c9621c928d42fa346 +0 -0
  213. data/spec/dummy/tmp/cache/assets/test/sprockets/905ad43b3fc55108ad345c6255ddcfb8 +0 -0
  214. data/spec/dummy/tmp/cache/assets/test/sprockets/9a65689623c3096b82dd97819ef02b79 +0 -0
  215. data/spec/dummy/tmp/cache/assets/test/sprockets/a7244c34cc0ff696fbfe2fccb04cb04b +0 -0
  216. data/spec/dummy/tmp/cache/assets/test/sprockets/b30e4385f999fefded784baa3436ecd3 +0 -0
  217. data/spec/dummy/tmp/cache/assets/test/sprockets/b9df96c25252b82da00791df6d017199 +0 -0
  218. data/spec/dummy/tmp/cache/assets/test/sprockets/ba27cf3baf39fb89f47836875af24dd8 +0 -0
  219. data/spec/dummy/tmp/cache/assets/test/sprockets/c02127f4958e88d15dad1754931334aa +0 -0
  220. data/spec/dummy/tmp/cache/assets/test/sprockets/ca6ae3b0212906e203a675ad02a7729e +0 -0
  221. data/spec/dummy/tmp/cache/assets/test/sprockets/cb679ef7ff0235de4855aa5ee7c4fb27 +0 -0
  222. data/spec/dummy/tmp/cache/assets/test/sprockets/cb9e847b58fe12c042e8e608905c4c38 +0 -0
  223. data/spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  224. data/spec/dummy/tmp/cache/assets/test/sprockets/db9141fa82b703a2439a562438fc6f04 +0 -0
  225. data/spec/dummy/tmp/cache/assets/test/sprockets/e3efb6f18e9d6f7f1f7a2bfdb4a616d3 +0 -0
  226. data/spec/dummy/tmp/cache/assets/test/sprockets/e5182eea228cd4e352dc35de5b86d387 +0 -0
  227. data/spec/dummy/tmp/cache/assets/test/sprockets/f20c3ba49438960a7f1184ec1aece636 +0 -0
  228. data/spec/dummy/tmp/cache/assets/test/sprockets/f3c6a93068f488ad8f54bf72f206fa3b +0 -0
  229. data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  230. data/spec/dummy/tmp/cache/assets/test/sprockets/f94211d95775b7b113ff83fbab9d96e5 +0 -0
  231. data/spec/dummy/tmp/cache/assets/test/sprockets/f952832de9d68bc78aae760f4d85d675 +0 -0
  232. data/spec/dummy/tmp/cache/assets/test/sprockets/fca2562e4bd00a9aaf122c2a9e76eea5 +0 -0
  233. data/spec/features/admin/routes/details_spec.rb +1 -1
  234. data/spec/features/front/page_blocks/defined_spec.rb +1 -1
  235. data/spec/features/front/page_blocks/undefined_spec.rb +1 -1
  236. data/spec/features/front/routes/page_spec.rb +1 -1
  237. data/spec/generators/exo/install_generator_spec.rb +41 -0
  238. data/spec/models/{sierra → exo}/contributor_spec.rb +0 -0
  239. data/spec/models/{sierra → exo}/site_spec.rb +0 -0
  240. data/spec/spec_helper.rb +8 -2
  241. data/spec/support/factories/block_factory.rb +1 -1
  242. data/spec/templates/fake_routes.rb +3 -0
  243. metadata +303 -360
  244. data/app/controllers/concerns/exo/host_filter.rb +0 -22
  245. data/app/controllers/exo/application_controller.rb +0 -6
  246. data/app/presenters/exo/item_presenter.rb +0 -19
  247. data/app/presenters/exo/resource_presenter.rb +0 -25
  248. data/app/presenters/exo/route_presenter.rb +0 -33
  249. data/app/presenters/exo/site_presenter.rb +0 -35
  250. data/app/services/exo/tick.rb +0 -36
  251. data/spec/dummy/app/views/a_sierra_theme/a_page_with_block.html.haml +0 -3
  252. data/spec/dummy/tmp/pids/server.pid +0 -1
@@ -1,6 +1,6 @@
1
1
  describe 'Admin route details' do
2
2
  let(:site) { create :site }
3
- logged_colaborator! do |c|
3
+ logged_contributor! do |c|
4
4
  c.sites = [site]
5
5
  c.save
6
6
  end
@@ -1,5 +1,5 @@
1
1
  describe 'Front page with defined block' do
2
- let(:site) { create :site, theme_path: 'a_exo_theme' }
2
+ let(:site) { create :site, theme_path: TEST_THEME }
3
3
 
4
4
  let(:route_page) do
5
5
  build(:route_page, view_path: '/a_page_with_block').tap do |p|
@@ -1,5 +1,5 @@
1
1
  describe 'Front page with undefined block' do
2
- let(:site) { create :site, theme_path: 'a_exo_theme' }
2
+ let(:site) { create :site, theme_path: TEST_THEME }
3
3
 
4
4
  let(:route_page) do
5
5
  build(:route_page, view_path: '/a_page_with_block').tap do |p|
@@ -1,5 +1,5 @@
1
1
  describe 'Front route page' do
2
- let(:site) { create :site, theme_path: 'a_exo_theme' }
2
+ let(:site) { create :site, theme_path: TEST_THEME }
3
3
 
4
4
  let(:route_page) do
5
5
  build(:route_page, view_path: '/a_page').tap do |p|
@@ -0,0 +1,41 @@
1
+ describe 'exo:install' do
2
+ let(:route_indentation) { "\n "}
3
+ let(:generators_path) { File.join ENGINE_RAILS_ROOT, 'lib', 'generators', 'exo'}
4
+ within_source_root do
5
+ FileUtils.touch 'Gemfile'
6
+ FileUtils.mkdir_p "config"
7
+ File.open('config/routes.rb', 'w') do |destination|
8
+ File.open(File.join(SPEC_TEMPLATES_PATH, 'fake_routes.rb'), 'r') do |source|
9
+ destination.write source
10
+ end
11
+ end
12
+ FileUtils.mkdir_p "config/initializers"
13
+ end
14
+
15
+ it 'add exo_cms to Gemfile' do
16
+ gems_path = File.join generators_path, 'templates', 'gems.rb'
17
+
18
+ File.open(gems_path, 'r') do |f|
19
+ subject.should append_file('Gemfile', f.read.to_s)
20
+ end
21
+ end
22
+
23
+ it 'generates exo initializer' do
24
+ subject.should generate('config/initializers/exo.rb')
25
+ end
26
+
27
+ it 'append engine mounting on "/" to config/routes.rb' do
28
+ engine_route_path = File.join generators_path, 'templates', 'engine_routes.rb'
29
+
30
+ mounting = ''
31
+ File.open(engine_route_path, 'r') {|f| mounting = f.read }
32
+
33
+ subject.should inject_into_file 'config/routes.rb', (route_indentation + mounting)
34
+
35
+ within_source_root do
36
+ File.open(File.join('config', 'routes.rb'), 'r') do |routes|
37
+ routes.read.should match /draw do.*#previous stuff.*#{mounting}.*end/
38
+ end
39
+ end
40
+ end
41
+ end
File without changes
@@ -5,7 +5,8 @@ puts "spec helper".colorize(:green)
5
5
 
6
6
  ENV["RAILS_ENV"] ||= 'test'
7
7
  require File.expand_path("../dummy/config/environment", __FILE__)
8
- spec_root = File.expand_path('..', __FILE__)
8
+ SPEC_ROOT = spec_root = File.expand_path('..', __FILE__)
9
+ SPEC_TEMPLATES_PATH = File.join spec_root, 'templates'
9
10
 
10
11
  require 'rspec/rails'
11
12
  require 'capybara/dsl'
@@ -13,15 +14,20 @@ require 'database_cleaner'
13
14
  require 'mongoid-rspec'
14
15
  require 'shoulda-matchers'
15
16
  require 'factory_girl_rspec'
16
- require 'email_spec'
17
+ require 'genspec'
17
18
 
18
19
  ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
20
+ TEST_THEME = 'an_exo_theme'
21
+
22
+ require 'exo'
19
23
 
20
24
  Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }
21
25
 
22
26
  Mongoid.logger.level = Logger::WARN
23
27
  Capybara.default_selector = :css
24
28
 
29
+
30
+
25
31
  RSpec.configure do |config|
26
32
  config.include RSpec::Rails::RequestExampleGroup, :example_group => {
27
33
  :file_path => config.escaped_path(%w(spec (end_points)))