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.
- checksums.yaml +4 -4
- data/Rakefile +3 -5
- data/app/controllers/concerns/exo/admin/{site_slug_id_filter.rb → site_restriction.rb} +3 -3
- data/app/controllers/concerns/exo/host_restriction.rb +32 -0
- data/app/controllers/concerns/exo/{route_filter.rb → request_restriction.rb} +8 -6
- data/app/controllers/exo/admin/assets_controller.rb +4 -4
- data/app/controllers/exo/admin/ckeditor_assets_controller.rb +2 -2
- data/app/controllers/exo/admin/ckeditor_blocks_controller.rb +3 -3
- data/app/controllers/exo/admin/contributors_controller.rb +2 -2
- data/app/controllers/exo/admin/items_controller.rb +3 -3
- data/app/controllers/exo/admin/pages_controller.rb +2 -2
- data/app/controllers/exo/admin/resources_controller.rb +2 -2
- data/app/controllers/exo/admin/routes_controller.rb +2 -2
- data/app/controllers/exo/admin/sessions_controller.rb +2 -0
- data/app/controllers/exo/admin/settings_controller.rb +5 -5
- data/app/controllers/exo/admin/site_controller.rb +1 -1
- data/app/controllers/exo/{admin/application_controller.rb → admin_controller.rb} +3 -3
- data/app/controllers/exo/gridfs_controller.rb +3 -3
- data/app/controllers/exo/pages_controller.rb +8 -9
- data/app/controllers/exo_controller.rb +4 -0
- data/app/helpers/exo/block_helper.rb +1 -1
- data/app/helpers/exo/resources_helper.rb +1 -1
- data/app/models/exo/app_service.rb +3 -0
- data/app/models/exo/block.rb +9 -11
- data/app/presenters/exo/item_decorator.rb +23 -0
- data/app/presenters/exo/resource_decorator.rb +21 -0
- data/app/presenters/exo/route_decorator.rb +23 -0
- data/app/presenters/exo/site_decorator.rb +25 -0
- data/app/resources/templates/application.html.haml +3 -3
- data/app/services/exo/config.rb +2 -0
- data/app/services/exo/router.rb +33 -0
- data/app/views/exo/admin/{application/_bheader.html.haml → _bheader.html.haml} +0 -0
- data/app/views/exo/admin/{application/_editor_header.html.haml → _editor_header.html.haml} +0 -0
- data/app/views/exo/admin/{application/_header.html.haml → _header.html.haml} +2 -2
- data/app/views/exo/admin/{application/_meta_errors.html.haml → _meta_errors.html.haml} +0 -0
- data/app/views/exo/admin/{application/_sidebar.html.haml → _sidebar.html.haml} +0 -0
- data/app/views/exo/admin/{application/_sidenav.html.haml → _sidenav.html.haml} +23 -17
- data/app/views/exo/admin/contributors/index.html.haml +1 -1
- data/app/views/exo/admin/{application/fields → fields}/_image.html.haml +0 -0
- data/app/views/exo/admin/{application/fields → fields}/_markdown.html.haml +0 -0
- data/app/views/exo/admin/items/show.html.haml +3 -3
- data/app/views/exo/admin/resources/index.html.haml +1 -1
- data/app/views/exo/admin/routes/index.html.haml +1 -1
- data/app/views/exo/admin/routes/show.html.haml +1 -1
- data/app/views/layouts/{application.html.erb → application.html.erb.tmp} +0 -0
- data/app/views/layouts/exo/admin/application.html.haml +1 -1
- data/app/views/layouts/exo/admin/editor.html.haml +2 -2
- data/config/initializers/devise.rb +27 -19
- data/config/routes.rb +1 -0
- data/lib/exo.rb +18 -7
- data/lib/exo/engine.rb +0 -2
- data/lib/exo/regexp.rb +7 -5
- data/lib/exo/version.rb +1 -1
- data/lib/generators/exo/install_generator.rb +20 -0
- data/lib/generators/exo/templates/engine_routes.rb +2 -0
- data/lib/generators/exo/templates/gems.rb +5 -0
- data/lib/generators/exo/templates/initializer.rb +5 -0
- data/spec/dummy/app/controllers/exo/admin/customs_controller.rb +1 -1
- data/spec/dummy/app/controllers/my_app/site_customs_controller.rb +1 -1
- data/spec/dummy/app/views/{a_sierra_theme → an_exo_theme}/a_page.html.haml +0 -0
- data/spec/dummy/app/views/an_exo_theme/a_page_with_block.html.haml +3 -0
- data/spec/dummy/app/views/layouts/{a_sierra_theme → an_exo_theme}/application.html.erb +0 -0
- data/spec/dummy/app/views/layouts/demo/application.html.haml +3 -3
- data/spec/dummy/config/application.rb +2 -1
- data/spec/dummy/config/initializers/exo.rb +2 -0
- data/spec/dummy/log/development.log +1938 -1
- data/spec/dummy/tmp/cache/assets/development/sprockets/03bec07d16adc41979a9767aaf23a5bf +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/05d652e83e6b6823771fca143eabff87 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/063d6d3a982ac3bfa05750bd3d01416e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0b8cbd6c43ff11ed3ab96976a2e98e2b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0c48f6c7a09d069017a22749c940fd6a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0da0612d0055abcde88349af8cbdaffc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0e1b30ba4880626e3c136ff23d15f277 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0f621a895f3d0916a756a8c7313c7120 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/18fedf436371d2979b37a490e2cbcacf +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/1f93865a20acec72a1870a7f9d348cc0 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/219ff56291853001c0fe482a28484813 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/224aace438e22fd51b5b2b6a45a4d69f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/24d0fbc91349d4114a1eefbe058c8fba +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2a6027bbfa613448003ab80bfc3249f2 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2c71b158948039606eb85485d93ed206 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/3360fbdb00ed8ef59706becb7dbb41e4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/34f82b1703cb8350ca18f16392967779 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/3b300b301493f1baf5d9dc2969701185 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/3d2b5b35fe7888d5139899d2e067d2ce +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/3dfa6cb0540572b6362a1d5e6a1f6d26 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/412b23d9dc12a05a414cae1e5a3fbbf8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/41acdde13a0132b81cbc4951661048cb +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/41d37ff244c3daef0583214fbef2c560 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/48c744a9d1e3e5b052f995545823c315 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/497a85ce66b5ead32a647661d0bada21 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4a5a6e9cf9074d00b627b83cf85c62f9 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4cd21bd7ac15013e918411a6001c4472 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/576d1d5819328f9c5e52bbec45cb991e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6089ad88fceb548141d376101c88bc94 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/667b895b188f4435053278e2497ac7b9 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6df5499acca0edd86677d5beec5c2b18 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/716d07423ee379b258338cb932e39d25 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/717887cd48fa79a99d0c71e392750d58 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/727bcd360e44edbb990ea53347896a64 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/73f77b33ce0f17becb6e75ff1082c43e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/741b8483fbcabf9c321f7db58e78c3d8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/759a59934e8cb39ace939db6b3ca6c1a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/76d85daa1c4000f529bf26504ebde8d9 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/7888c5b61b2cd04d7ee4cf78ab510eb5 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/797b3e33d6e04a512949c083da9c8819 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/7ccfc79620770d38c5bd539c16fca755 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/7eee5343ea643e8ac6dfa9282bbc4547 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/7ef0c015d0ad290b8ffcd526afb67834 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/85556c6543bc5bde199eee0c8096d83e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/86d06f76cdbdc83c9621c928d42fa346 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8bb68b74b9c6d04b2172ef5589d5b1a5 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/905ad43b3fc55108ad345c6255ddcfb8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9a65689623c3096b82dd97819ef02b79 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9b1352fb7f42bed64bf100b191511e0d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a7244c34cc0ff696fbfe2fccb04cb04b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b162acd8d30fdf3dd12192251e427c66 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b30e4385f999fefded784baa3436ecd3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b9df96c25252b82da00791df6d017199 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ba27cf3baf39fb89f47836875af24dd8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c02127f4958e88d15dad1754931334aa +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ca6ae3b0212906e203a675ad02a7729e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cb679ef7ff0235de4855aa5ee7c4fb27 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cb9e847b58fe12c042e8e608905c4c38 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/db9141fa82b703a2439a562438fc6f04 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e3efb6f18e9d6f7f1f7a2bfdb4a616d3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e5182eea228cd4e352dc35de5b86d387 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f20c3ba49438960a7f1184ec1aece636 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f3c6a93068f488ad8f54bf72f206fa3b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f952832de9d68bc78aae760f4d85d675 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/fca2562e4bd00a9aaf122c2a9e76eea5 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/1117950fc1adf8b31294376d9067eb7feadc7de0/colorize.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/1117950fc1adf8b31294376d9067eb7feadc7de0/content.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/1117950fc1adf8b31294376d9067eb7feadc7de0/header.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/1117950fc1adf8b31294376d9067eb7feadc7de0/sidebar.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/1117950fc1adf8b31294376d9067eb7feadc7de0/tables.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/1117950fc1adf8b31294376d9067eb7feadc7de0/wrapper.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/238d7e2ec3d3030371e96efa23f1677a0a064045/_functions.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_accordion.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_alert-boxes.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_block-grid.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_breadcrumbs.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_button-groups.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_buttons.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_clearing.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_dropdown-buttons.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_dropdown.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_flex-video.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_forms.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_global.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_grid.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_inline-lists.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_joyride.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_keystrokes.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_labels.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_magellan.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_offcanvas.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_orbit.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_pagination.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_panels.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_pricing-tables.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_progress-bars.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_reveal.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_side-nav.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_split-buttons.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_sub-nav.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_switch.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_tables.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_tabs.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_thumbs.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_tooltips.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_top-bar.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_type.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/277777414a383c3fe6a5a46b95c6fecc44307daf/_visibility.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/54bc91a8b995104fa44ba264c53dbd8d0a6ce1eb/font-awesome.css.erbc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/689cee5da0d308518a9400df205830efb3b2004b/foundation.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/868bdcd3c8e6bd73d750879e972f235f451b00af/application.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/868bdcd3c8e6bd73d750879e972f235f451b00af/foundation_and_overrides.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/868bdcd3c8e6bd73d750879e972f235f451b00af/responsive-tables.cssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/05d652e83e6b6823771fca143eabff87 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/063d6d3a982ac3bfa05750bd3d01416e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0b8cbd6c43ff11ed3ab96976a2e98e2b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0da0612d0055abcde88349af8cbdaffc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0e1b30ba4880626e3c136ff23d15f277 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0f621a895f3d0916a756a8c7313c7120 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1f93865a20acec72a1870a7f9d348cc0 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/224aace438e22fd51b5b2b6a45a4d69f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2a6027bbfa613448003ab80bfc3249f2 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3360fbdb00ed8ef59706becb7dbb41e4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/34f82b1703cb8350ca18f16392967779 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3d2b5b35fe7888d5139899d2e067d2ce +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/412b23d9dc12a05a414cae1e5a3fbbf8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/41d37ff244c3daef0583214fbef2c560 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/447161da5ee42f4d3b0702a328975499 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4a5a6e9cf9074d00b627b83cf85c62f9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4cd21bd7ac15013e918411a6001c4472 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/576d1d5819328f9c5e52bbec45cb991e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5e9e6e4b1c4bb6da2f89517e17fdca8b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6089ad88fceb548141d376101c88bc94 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6df5499acca0edd86677d5beec5c2b18 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/717887cd48fa79a99d0c71e392750d58 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/73f77b33ce0f17becb6e75ff1082c43e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/741b8483fbcabf9c321f7db58e78c3d8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/759a59934e8cb39ace939db6b3ca6c1a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/76d85daa1c4000f529bf26504ebde8d9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7888c5b61b2cd04d7ee4cf78ab510eb5 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7eee5343ea643e8ac6dfa9282bbc4547 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7ef0c015d0ad290b8ffcd526afb67834 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/85556c6543bc5bde199eee0c8096d83e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/86d06f76cdbdc83c9621c928d42fa346 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/905ad43b3fc55108ad345c6255ddcfb8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/9a65689623c3096b82dd97819ef02b79 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a7244c34cc0ff696fbfe2fccb04cb04b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b30e4385f999fefded784baa3436ecd3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b9df96c25252b82da00791df6d017199 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ba27cf3baf39fb89f47836875af24dd8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c02127f4958e88d15dad1754931334aa +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ca6ae3b0212906e203a675ad02a7729e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cb679ef7ff0235de4855aa5ee7c4fb27 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cb9e847b58fe12c042e8e608905c4c38 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/db9141fa82b703a2439a562438fc6f04 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e3efb6f18e9d6f7f1f7a2bfdb4a616d3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e5182eea228cd4e352dc35de5b86d387 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f20c3ba49438960a7f1184ec1aece636 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f3c6a93068f488ad8f54bf72f206fa3b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f94211d95775b7b113ff83fbab9d96e5 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f952832de9d68bc78aae760f4d85d675 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/fca2562e4bd00a9aaf122c2a9e76eea5 +0 -0
- data/spec/features/admin/routes/details_spec.rb +1 -1
- data/spec/features/front/page_blocks/defined_spec.rb +1 -1
- data/spec/features/front/page_blocks/undefined_spec.rb +1 -1
- data/spec/features/front/routes/page_spec.rb +1 -1
- data/spec/generators/exo/install_generator_spec.rb +41 -0
- data/spec/models/{sierra → exo}/contributor_spec.rb +0 -0
- data/spec/models/{sierra → exo}/site_spec.rb +0 -0
- data/spec/spec_helper.rb +8 -2
- data/spec/support/factories/block_factory.rb +1 -1
- data/spec/templates/fake_routes.rb +3 -0
- metadata +303 -360
- data/app/controllers/concerns/exo/host_filter.rb +0 -22
- data/app/controllers/exo/application_controller.rb +0 -6
- data/app/presenters/exo/item_presenter.rb +0 -19
- data/app/presenters/exo/resource_presenter.rb +0 -25
- data/app/presenters/exo/route_presenter.rb +0 -33
- data/app/presenters/exo/site_presenter.rb +0 -35
- data/app/services/exo/tick.rb +0 -36
- data/spec/dummy/app/views/a_sierra_theme/a_page_with_block.html.haml +0 -3
- data/spec/dummy/tmp/pids/server.pid +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47bc2bfafd7fb198d45ac0f39b22ca0999099183
|
4
|
+
data.tar.gz: 69e43b06a5f9106e252f6f12eed0799d8f3d5c50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00728e26ddd82deacd6aac4e0d6784209c56cb35af5c9250396661d71c20b7937e1b0e79d8b6c730ea0e08007c08a85320d7989f5740932ef94988a103223f37
|
7
|
+
data.tar.gz: cda6363e2f76ea2109c91817bfc340d77dc900e8e84cf7ec72a68a760f98353d1cabda7f78e3ad439f13fa7cc79de72c7bbacd1d2e06c19071f2718d70fcf124
|
data/Rakefile
CHANGED
@@ -14,19 +14,17 @@ RDoc::Task.new(:rdoc) do |rdoc|
|
|
14
14
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
15
|
end
|
16
16
|
|
17
|
-
APP_RAKEFILE = File.expand_path("../
|
17
|
+
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
18
18
|
load 'rails/tasks/engine.rake'
|
19
19
|
|
20
|
-
|
21
|
-
|
22
20
|
Bundler::GemHelper.install_tasks
|
23
21
|
|
24
22
|
require 'rake/testtask'
|
25
23
|
|
26
24
|
Rake::TestTask.new(:test) do |t|
|
27
25
|
t.libs << 'lib'
|
28
|
-
t.libs << '
|
29
|
-
t.pattern = '
|
26
|
+
t.libs << 'spec'
|
27
|
+
t.pattern = 'spec/**/*_spec.rb'
|
30
28
|
t.verbose = false
|
31
29
|
end
|
32
30
|
|
@@ -1,13 +1,13 @@
|
|
1
1
|
module Exo::Admin
|
2
|
-
module
|
2
|
+
module SiteRestriction
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
5
|
included do
|
6
|
-
include ::Exo::
|
6
|
+
include ::Exo::HostRestriction
|
7
7
|
extend ClassMethods
|
8
8
|
|
9
9
|
before_filter do
|
10
|
-
redirect_to exo.admin_root_url unless allowed_sites.include?
|
10
|
+
redirect_to exo.admin_root_url unless allowed_sites.include? exo_site.slug_id
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
@@ -0,0 +1,32 @@
|
|
1
|
+
class Exo
|
2
|
+
module HostRestriction
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
included do
|
6
|
+
before_filter :exo_host_acceptance!
|
7
|
+
before_filter :exo_host_redirection!
|
8
|
+
|
9
|
+
expose(:exo_site) { exo_router.site }
|
10
|
+
|
11
|
+
rescue_from ::Exo::Site::UnknowHostError do |e|
|
12
|
+
render e, status: 503
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
protected
|
17
|
+
def exo_router
|
18
|
+
@exo_router
|
19
|
+
end
|
20
|
+
|
21
|
+
def exo_host_acceptance!
|
22
|
+
@exo_router = Router.for_host! request.host
|
23
|
+
end
|
24
|
+
|
25
|
+
def exo_host_redirection!
|
26
|
+
if exo_router.domain_redirection?(request.host)
|
27
|
+
redirect_to exo_router.host_url(request.path)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
@@ -1,18 +1,20 @@
|
|
1
1
|
class Exo
|
2
|
-
module
|
2
|
+
module RequestRestriction
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
5
|
included do
|
6
|
-
before_filter :
|
7
|
-
|
6
|
+
before_filter :exo_request_routing!
|
7
|
+
|
8
|
+
expose(:exo_route) { exo_router.route }
|
9
|
+
|
8
10
|
rescue_from Exo::Route::UnknowPathError do |e|
|
9
11
|
render e, status: 404
|
10
12
|
end
|
11
13
|
end
|
12
|
-
|
14
|
+
|
13
15
|
protected
|
14
|
-
def
|
15
|
-
|
16
|
+
def exo_request_routing!
|
17
|
+
exo_router.for_request! request
|
16
18
|
end
|
17
19
|
end
|
18
20
|
end
|
@@ -1,17 +1,17 @@
|
|
1
1
|
module Exo::Admin
|
2
|
-
class AssetsController <
|
2
|
+
class AssetsController < Exo::AdminController
|
3
3
|
MODEL = Exo::Asset
|
4
|
-
expose(:assets) {
|
4
|
+
expose(:assets) { exo_site.slug_scope(MODEL).asc(:created_at) }
|
5
5
|
expose(:current_asset) do
|
6
6
|
if [:new, :create].include? params[:action].to_sym
|
7
7
|
MODEL.new asset_params
|
8
8
|
else
|
9
|
-
|
9
|
+
exo_site.slug_scope(MODEL).find params[:id]
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
13
|
def create
|
14
|
-
current_asset.site =
|
14
|
+
current_asset.site = exo_site
|
15
15
|
#current_asset.content = params[:upload]
|
16
16
|
if current_asset.save
|
17
17
|
redirect_to admin_assets_url
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Exo::Admin
|
2
|
-
class CkeditorAssetsController <
|
2
|
+
class CkeditorAssetsController < Exo::AdminController
|
3
3
|
skip_before_filter :verify_authenticity_token
|
4
4
|
before_filter :expose_ckeditor_stuff
|
5
5
|
|
@@ -10,7 +10,7 @@ module Exo::Admin
|
|
10
10
|
expose(:ckeditor_function_num) { params[:CKEditorFuncNum] }
|
11
11
|
expose(:asset) do
|
12
12
|
MODEL.new.tap do |a|
|
13
|
-
a.site =
|
13
|
+
a.site = exo_site
|
14
14
|
a.content = params[:upload]
|
15
15
|
end
|
16
16
|
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
module Exo::Admin
|
2
|
-
class CkeditorBlocksController <
|
2
|
+
class CkeditorBlocksController < Exo::AdminController
|
3
3
|
expose(:targeted_page) do
|
4
4
|
_route = nil
|
5
|
-
Exo::PathMatcher.route_for(
|
6
|
-
_route = Exo::
|
5
|
+
Exo::PathMatcher.route_for(exo_site.routes, params) do |route|
|
6
|
+
_route = Exo::RouteDecorator.new route
|
7
7
|
end
|
8
8
|
_route
|
9
9
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Exo::Admin
|
2
|
-
class ContributorsController <
|
3
|
-
expose(:contributor) {
|
2
|
+
class ContributorsController < Exo::AdminController
|
3
|
+
expose(:contributor) { exo_site.contributors.find params[:id] }
|
4
4
|
end
|
5
5
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Exo::Admin
|
2
|
-
class ItemsController < Exo::
|
2
|
+
class ItemsController < Exo::AdminController
|
3
3
|
MODEL = Exo::Resource::Item
|
4
4
|
|
5
|
-
expose(:current_resource) {
|
5
|
+
expose(:current_resource) { exo_site.site.resources.find params[:resource_id] }
|
6
6
|
expose(:current_item) do
|
7
7
|
if [:new, :create].include? params[:action].to_sym
|
8
8
|
MODEL.new item_params
|
@@ -12,7 +12,7 @@ module Exo::Admin
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def create
|
15
|
-
current_item.site =
|
15
|
+
current_item.site = exo_site
|
16
16
|
current_item.resource = current_resource
|
17
17
|
|
18
18
|
update
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module Exo::Admin
|
2
|
-
class PagesController <
|
2
|
+
class PagesController < Exo::AdminController
|
3
3
|
REMOVAL_REGEXP = /\Ahttps?:\/\/([a-z0-9.-:]+)\//i
|
4
4
|
expose(:mercury_path) do
|
5
5
|
File.join '/', params[:url].gsub(REMOVAL_REGEXP, '')
|
6
6
|
end
|
7
|
-
expose(:current_page) {
|
7
|
+
expose(:current_page) { exo_site.routes.find_by path: mercury_path }
|
8
8
|
|
9
9
|
def mercury_update
|
10
10
|
params[:content].each do |slug, mercure|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Exo::Admin
|
2
|
-
class ResourcesController < Exo::
|
3
|
-
expose(:current_resource) {
|
2
|
+
class ResourcesController < Exo::AdminController
|
3
|
+
expose(:current_resource) { exo_site.resources.find params[:id] }
|
4
4
|
end
|
5
5
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Exo::Admin
|
2
|
-
class SettingsController < Exo::
|
2
|
+
class SettingsController < Exo::AdminController
|
3
3
|
skip_before_filter :verify_authenticity_token, only: :create
|
4
4
|
|
5
5
|
MODEL = Exo::Setting
|
@@ -7,21 +7,21 @@ module Exo::Admin
|
|
7
7
|
before_filter :current_route, if: :for_route?
|
8
8
|
helper_method :for_route?
|
9
9
|
|
10
|
-
expose(:settings) {
|
10
|
+
expose(:settings) { exo_site.settings }
|
11
11
|
expose(:current_setting) do
|
12
12
|
if [:new, :create].include? params[:action].to_sym
|
13
13
|
MODEL.new new_setting_params
|
14
14
|
else
|
15
|
-
parent = for_route? ? current_route :
|
15
|
+
parent = for_route? ? current_route : exo_site
|
16
16
|
parent.settings.find params[:id]
|
17
17
|
end
|
18
18
|
end
|
19
19
|
expose(:current_route) do
|
20
|
-
|
20
|
+
exo_site.routes.find params[:route_id]
|
21
21
|
end
|
22
22
|
|
23
23
|
def create
|
24
|
-
current_setting.setting_container = for_route? ? current_route :
|
24
|
+
current_setting.setting_container = for_route? ? current_route : exo_site
|
25
25
|
if current_setting.save
|
26
26
|
redirect_to_parent
|
27
27
|
else
|
@@ -1,8 +1,8 @@
|
|
1
|
-
|
2
|
-
class
|
1
|
+
class Exo
|
2
|
+
class AdminController < ExoController
|
3
3
|
layout 'exo/admin/application'
|
4
|
+
|
4
5
|
before_filter :authenticate_contributor!
|
5
|
-
expose(:current_site) { tick.site.site }
|
6
6
|
|
7
7
|
protected
|
8
8
|
def allow_params key, fields
|
@@ -1,13 +1,13 @@
|
|
1
1
|
class Exo
|
2
|
-
class GridfsController <
|
2
|
+
class GridfsController < ExoController
|
3
3
|
def item_asset
|
4
|
-
item =
|
4
|
+
item = exo_site.resource(params[:resource_slug_id]).items.find_by slug_id: params[:item_slug_id]
|
5
5
|
asset = item.send params[:field_slug_id].to_sym
|
6
6
|
respond_with_asset asset
|
7
7
|
end
|
8
8
|
|
9
9
|
def asset
|
10
|
-
asset =
|
10
|
+
asset = exo_site.slug_scope(Exo::Asset).find_by _id: params[:id]
|
11
11
|
if asset
|
12
12
|
respond_with_asset asset
|
13
13
|
else
|
@@ -1,23 +1,22 @@
|
|
1
1
|
class Exo
|
2
|
-
class PagesController <
|
2
|
+
class PagesController < ExoController
|
3
3
|
before_filter :fix_lookup_context
|
4
|
-
include
|
4
|
+
include RequestRestriction
|
5
|
+
helper Exo::BlockHelper
|
5
6
|
|
6
7
|
def serve_page
|
7
|
-
if
|
8
|
-
redirect_to
|
8
|
+
if exo_router.route.redirection?
|
9
|
+
redirect_to exo_router.route.to_url
|
9
10
|
else
|
10
|
-
render
|
11
|
+
render exo_router.route.view_path, layout: exo_router.route.layout_path
|
11
12
|
end
|
12
13
|
end
|
13
14
|
|
14
15
|
protected
|
15
|
-
|
16
16
|
def fix_lookup_context
|
17
|
-
# /!\ this is evil
|
18
17
|
lookup_context.prefixes = [
|
19
|
-
|
20
|
-
|
18
|
+
exo_site.theme_path,
|
19
|
+
exo_site.nest_path('application')
|
21
20
|
]
|
22
21
|
end
|
23
22
|
end
|
@@ -46,7 +46,7 @@ module Exo::ResourcesHelper
|
|
46
46
|
hash[:value] = value.form_value
|
47
47
|
end
|
48
48
|
when Exo::Resource::MetaRelation
|
49
|
-
_resource =
|
49
|
+
_resource = exo_site.resource_name field.resource_slug_id
|
50
50
|
options[:selected] = item.value_for(field).form_value
|
51
51
|
options[:include_blank] = false
|
52
52
|
options[:collection] = _resource.items.asc(:name).collect {|i| [i.name, i.id.to_s]}
|
data/app/models/exo/block.rb
CHANGED
@@ -1,13 +1,11 @@
|
|
1
|
-
class Exo
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
field :content
|
1
|
+
class Exo::Block
|
2
|
+
include Exo::Document
|
3
|
+
|
4
|
+
embedded_in :page, class_name: 'Exo::Route::Page'
|
5
|
+
|
6
|
+
field :slug_id
|
7
|
+
field :content
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
end
|
9
|
+
validates_presence_of :slug_id
|
10
|
+
validates_presence_of :content
|
13
11
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class Exo
|
2
|
+
class ItemDecorator < Draper::Decorator
|
3
|
+
delegate_all
|
4
|
+
|
5
|
+
def decorated_resource
|
6
|
+
@decorated_resource ||= wrap_resource item.resource
|
7
|
+
end
|
8
|
+
|
9
|
+
alias :resource :decorated_resource
|
10
|
+
|
11
|
+
def method_missing method, *params, &block
|
12
|
+
if meta_field = resource.meta_field method
|
13
|
+
item.value_for meta_field
|
14
|
+
else
|
15
|
+
item.send method, *params, &block
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def wrap_resource resource
|
20
|
+
ResourceDecorator.new resource if resource
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class Exo
|
2
|
+
class ResourceDecorator < Draper::Decorator
|
3
|
+
delegate_all
|
4
|
+
|
5
|
+
def items
|
6
|
+
ScopeWraper.new resource.items, self
|
7
|
+
end
|
8
|
+
|
9
|
+
def item_name slug_id
|
10
|
+
wrap_item items.find_by(slug_id: slug_id)
|
11
|
+
end
|
12
|
+
|
13
|
+
def meta_field_name name
|
14
|
+
resource.meta_fields.where(slug_id: name.to_s).first
|
15
|
+
end
|
16
|
+
|
17
|
+
def wrap_item item
|
18
|
+
ItemDecorator.new item if item
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class Exo
|
2
|
+
class RouteDecorator < Draper::Decorator
|
3
|
+
DEFAULT_LAYOUT = '/application'
|
4
|
+
|
5
|
+
delegate_all
|
6
|
+
|
7
|
+
def redirection?
|
8
|
+
object.class == Exo::Route::Redirection
|
9
|
+
end
|
10
|
+
|
11
|
+
def view_path
|
12
|
+
object.site.nest_path object.view_path
|
13
|
+
end
|
14
|
+
|
15
|
+
def layout_path
|
16
|
+
object.site.nest_path(object.layout_path || DEFAULT_LAYOUT)
|
17
|
+
end
|
18
|
+
|
19
|
+
def block_name slug_id
|
20
|
+
object.blocks.where(slug_id: slug_id.to_s).first
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|