ecm_cms_core 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +38 -0
- data/app/admin/ecm/ecm_core/folders.rb +46 -0
- data/app/admin/ecm/ecm_core/templates.rb +57 -0
- data/app/controllers/ecm/cms_core/page_controller.rb +55 -0
- data/app/controllers/page_controller.rb +2 -0
- data/app/helpers/ecm/cms_core_helper.rb +48 -0
- data/app/models/ecm/cms_core/folder.rb +65 -0
- data/app/models/ecm/cms_core/template.rb +150 -0
- data/config/locales/ecm.cms_core.de.yml +22 -0
- data/config/locales/ecm.cms_core.en.yml +22 -0
- data/config/locales/ecm.cms_core.folder.de.yml +13 -0
- data/config/locales/ecm.cms_core.folder.en.yml +13 -0
- data/config/locales/ecm.cms_core.forms.de.yml +8 -0
- data/config/locales/ecm.cms_core.template.de.yml +21 -0
- data/config/locales/ecm.cms_core.template.en.yml +21 -0
- data/db/migrate/001_create_ecm_cms_core_folders.rb +16 -0
- data/db/migrate/002_create_ecm_cms_core_templates.rb +19 -0
- data/lib/ecm/cms_core/engine.rb +25 -0
- data/lib/ecm/cms_core/version.rb +5 -0
- data/lib/ecm_cms_core.rb +13 -0
- data/lib/generators/ecm/cms_core/active_admin/active_admin_generator.rb +16 -0
- data/lib/generators/ecm/cms_core/active_admin/templates/folders.rb +44 -0
- data/lib/generators/ecm/cms_core/active_admin/templates/templates.rb +52 -0
- data/lib/generators/ecm/cms_core/controller/controller_generator.rb +15 -0
- data/lib/generators/ecm/cms_core/controller/templates/page_controller.rb +3 -0
- data/lib/generators/ecm/cms_core/install/install_generator.rb +34 -0
- data/lib/generators/ecm/cms_core/locales/locales_generator.rb +17 -0
- data/lib/generators/ecm/cms_core/locales/templates/ecm.cms-core.de.yml +48 -0
- data/lib/generators/ecm/cms_core/locales/templates/ecm.cms-core.en.yml +48 -0
- data/lib/generators/ecm/cms_core/migrations/migrations_generator.rb +28 -0
- data/lib/generators/ecm/cms_core/migrations/templates/create_ecm_cms_core_folders.rb +20 -0
- data/lib/generators/ecm/cms_core/migrations/templates/create_ecm_cms_core_templates.rb +23 -0
- data/lib/generators/ecm/cms_core/models/models_generator.rb +16 -0
- data/lib/generators/ecm/cms_core/models/templates/folder.rb +58 -0
- data/lib/generators/ecm/cms_core/models/templates/template.rb +127 -0
- data/lib/generators/ecm/cms_core/routes/routes_generator.rb +18 -0
- data/lib/generators/ecm/cms_core/routes/templates/routes.rb +14 -0
- data/lib/tasks/ecm_cms_core_tasks.rake +4 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/admin/dashboards.rb +44 -0
- data/test/dummy/app/assets/javascripts/active_admin.js +1 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/active_admin.css.scss +6 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/controllers/frontend_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/admin_user.rb +11 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config/application.rb +60 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/active_admin.rb +133 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/devise.rb +232 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/admin_user.de.yml +16 -0
- data/test/dummy/config/locales/devise.en.yml +58 -0
- data/test/dummy/config/locales/ecm.admin.de.yml +5 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +75 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20120622191421_devise_create_admin_users.rb +49 -0
- data/test/dummy/db/migrate/20120622211430_create_admin_notes.rb +17 -0
- data/test/dummy/db/migrate/20120622211431_move_admin_notes_to_comments.rb +25 -0
- data/test/dummy/db/migrate/20120622211432_create_ecm_cms_core_folders.ecm_cms_core_engine.rb +17 -0
- data/test/dummy/db/migrate/20120622211433_create_ecm_cms_core_templates.ecm_cms_core_engine.rb +20 -0
- data/test/dummy/db/schema.rb +78 -0
- data/test/dummy/lib/i18n_controller.rb +13 -0
- data/test/dummy/log/development.log +3914 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/test/fixtures/admin_users.yml +11 -0
- data/test/dummy/test/unit/admin_user_test.rb +7 -0
- data/test/dummy/tmp/cache/assets/C18/0B0/sprockets%2F35b3b1439378240b7f536115a153938b +0 -0
- data/test/dummy/tmp/cache/assets/C71/090/sprockets%2F931c90486b551252ac56132ab76b3d24 +0 -0
- data/test/dummy/tmp/cache/assets/C77/210/sprockets%2Ff90b51d7105d6180b8164f81f4018e40 +0 -0
- data/test/dummy/tmp/cache/assets/C7A/1D0/sprockets%2F0189934c63685d1fb1126608daf1425a +0 -0
- data/test/dummy/tmp/cache/assets/C86/B30/sprockets%2F85e65103906606f93dcb5680baf75803 +0 -0
- data/test/dummy/tmp/cache/assets/C88/8B0/sprockets%2F6680b99d2ee676651202ae63a78c4632 +0 -0
- data/test/dummy/tmp/cache/assets/CAD/7E0/sprockets%2F935781681cef3fc00956d32115cdd521 +0 -0
- data/test/dummy/tmp/cache/assets/CB0/2A0/sprockets%2F3481651900e045da49fced159c2c9814 +0 -0
- data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/CDB/040/sprockets%2Fc732474e67003a4eb840eb44c5ca9385 +0 -0
- data/test/dummy/tmp/cache/assets/CDD/E00/sprockets%2Fb2e579afe803008df59253c7710ad551 +0 -0
- data/test/dummy/tmp/cache/assets/CEA/0A0/sprockets%2Ff1bd29507924f5fa43fb777b0d681295 +0 -0
- data/test/dummy/tmp/cache/assets/CF3/0B0/sprockets%2F0052f1e917b02a5ad4b2ca961221a8f4 +0 -0
- data/test/dummy/tmp/cache/assets/CFD/150/sprockets%2Fdb3d5b419b4002d3340c24b493d8bb95 +0 -0
- data/test/dummy/tmp/cache/assets/D08/3C0/sprockets%2Fbe501c50446a7f55d74e3d4a7920bb56 +0 -0
- data/test/dummy/tmp/cache/assets/D0A/5C0/sprockets%2Fb89637e3b60cf2ddbb055339f23a8421 +0 -0
- data/test/dummy/tmp/cache/assets/D0E/A90/sprockets%2Fc50f8f2a758b0942172763af9a33b0ef +0 -0
- data/test/dummy/tmp/cache/assets/D1B/200/sprockets%2Fee63896e56c8fa545d2a92d3145a760d +0 -0
- data/test/dummy/tmp/cache/assets/D2E/DE0/sprockets%2F7668bdc951df66f9d93210ed7689bb57 +0 -0
- data/test/dummy/tmp/cache/assets/D30/D00/sprockets%2F506e8247250c45c101b1f6cefe7b22fb +0 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D38/540/sprockets%2F86e1ad844bc9df4491a2a52b870421db +0 -0
- data/test/dummy/tmp/cache/assets/D3A/240/sprockets%2Fbd5ec81e43457436f38d6f2e21eb311b +0 -0
- data/test/dummy/tmp/cache/assets/D3D/B50/sprockets%2F60f3b6e7ec4196f82f701a039db5a55a +0 -0
- data/test/dummy/tmp/cache/assets/D46/720/sprockets%2Fef62800e7785cd1f7f7d7edb3960000e +0 -0
- data/test/dummy/tmp/cache/assets/D48/640/sprockets%2F9f4f18d910b678b1d0777e04cdaf6f24 +0 -0
- data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/D59/D70/sprockets%2Fed9f0de1b65ae8d7ef89087c83728461 +0 -0
- data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/D5B/860/sprockets%2F79ae2a01f99104da404ed31a8fea230d +0 -0
- data/test/dummy/tmp/cache/assets/D5D/6B0/sprockets%2F690ac8bc288fe688ce9d76121687c8bf +0 -0
- data/test/dummy/tmp/cache/assets/D5F/AE0/sprockets%2F6057dd9be3e736fad88777c09689bfe1 +0 -0
- data/test/dummy/tmp/cache/assets/D6B/E60/sprockets%2Ff93ae30e51558cab50c5867ffa4a714a +0 -0
- data/test/dummy/tmp/cache/assets/D7F/600/sprockets%2Fafd454e9dc29d3ce8f5fc810465219f6 +0 -0
- data/test/dummy/tmp/cache/assets/D84/500/sprockets%2Fe598c3010e9ff8a9fc930e84eb2b8f38 +0 -0
- data/test/dummy/tmp/cache/assets/D93/4C0/sprockets%2F857ecd2092cee11f740b3cf2e373ad2a +0 -0
- data/test/dummy/tmp/cache/assets/D96/0A0/sprockets%2F115d14ce48fada6837943c0e5b0a8eda +0 -0
- data/test/dummy/tmp/cache/assets/D97/060/sprockets%2F16cc3664c109be5b82c1521e4fe1fdfe +0 -0
- data/test/dummy/tmp/cache/assets/D9A/7F0/sprockets%2Fa9dc360a17e439e63ada3f389e053cda +0 -0
- data/test/dummy/tmp/cache/assets/D9C/4F0/sprockets%2Ffd36b6361b4bd8d3425f9aa35ff53dc1 +0 -0
- data/test/dummy/tmp/cache/assets/DAB/5A0/sprockets%2F2da87e72599a04cc89c8beec9218dd1a +0 -0
- data/test/dummy/tmp/cache/assets/DAC/1E0/sprockets%2Faf6be87981984ebc9b4f70a346dbea42 +0 -0
- data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/DDE/420/sprockets%2Ffb8b186d5bf0307f86f65fc787d2adeb +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/sass/0149e15b7f61f5a238cd1c4ab956828760d53144/_all.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0149e15b7f61f5a238cd1c4ab956828760d53144/_buttons.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0149e15b7f61f5a238cd1c4ab956828760d53144/_gradients.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0149e15b7f61f5a238cd1c4ab956828760d53144/_icons.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0149e15b7f61f5a238cd1c4ab956828760d53144/_reset.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0149e15b7f61f5a238cd1c4ab956828760d53144/_rounded.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0149e15b7f61f5a238cd1c4ab956828760d53144/_sections.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0149e15b7f61f5a238cd1c4ab956828760d53144/_shadows.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0149e15b7f61f5a238cd1c4ab956828760d53144/_typography.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0149e15b7f61f5a238cd1c4ab956828760d53144/_utilities.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0149e15b7f61f5a238cd1c4ab956828760d53144/_variables.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/025ab9f29cb4b11e07ac4b96733b80e57356376f/_dashboard.scssc +0 -0
- data/test/dummy/tmp/cache/sass/025ab9f29cb4b11e07ac4b96733b80e57356376f/_logged_out.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0a3ebe071aa41297ff474bfea40b9ed55813ab31/_all.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0a3ebe071aa41297ff474bfea40b9ed55813ab31/_buttons.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0a3ebe071aa41297ff474bfea40b9ed55813ab31/_gradients.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0a3ebe071aa41297ff474bfea40b9ed55813ab31/_icons.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0a3ebe071aa41297ff474bfea40b9ed55813ab31/_reset.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0a3ebe071aa41297ff474bfea40b9ed55813ab31/_rounded.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0a3ebe071aa41297ff474bfea40b9ed55813ab31/_sections.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0a3ebe071aa41297ff474bfea40b9ed55813ab31/_shadows.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0a3ebe071aa41297ff474bfea40b9ed55813ab31/_typography.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0a3ebe071aa41297ff474bfea40b9ed55813ab31/_utilities.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0a3ebe071aa41297ff474bfea40b9ed55813ab31/_variables.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0db19bf6a4f34e09dc67d80432c747832dda1113/_batch_actions.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0db19bf6a4f34e09dc67d80432c747832dda1113/_blank_slates.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0db19bf6a4f34e09dc67d80432c747832dda1113/_breadcrumbs.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0db19bf6a4f34e09dc67d80432c747832dda1113/_buttons.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0db19bf6a4f34e09dc67d80432c747832dda1113/_columns.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0db19bf6a4f34e09dc67d80432c747832dda1113/_comments.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0db19bf6a4f34e09dc67d80432c747832dda1113/_date_picker.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0db19bf6a4f34e09dc67d80432c747832dda1113/_flash_messages.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0db19bf6a4f34e09dc67d80432c747832dda1113/_grid.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0db19bf6a4f34e09dc67d80432c747832dda1113/_links.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0db19bf6a4f34e09dc67d80432c747832dda1113/_pagination.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0db19bf6a4f34e09dc67d80432c747832dda1113/_panels.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0db19bf6a4f34e09dc67d80432c747832dda1113/_popovers.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0db19bf6a4f34e09dc67d80432c747832dda1113/_scopes.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0db19bf6a4f34e09dc67d80432c747832dda1113/_status_tags.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0db19bf6a4f34e09dc67d80432c747832dda1113/_table_tools.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0db19bf6a4f34e09dc67d80432c747832dda1113/_tables.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0f4e444537b0131df87c384df649d22afd80ac5a/_dashboard.scssc +0 -0
- data/test/dummy/tmp/cache/sass/0f4e444537b0131df87c384df649d22afd80ac5a/_logged_out.scssc +0 -0
- data/test/dummy/tmp/cache/sass/1c415517c309043503f3cb2f5eca65b0c9760f76/active_admin.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/34122bbb9d39040bce83b198dfa3e2499be58cd0/_bourbon.scssc +0 -0
- data/test/dummy/tmp/cache/sass/34df7e5f74ec615651dab1b9694e84563b724cb5/_base.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/34df7e5f74ec615651dab1b9694e84563b724cb5/_forms.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/34df7e5f74ec615651dab1b9694e84563b724cb5/_header.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/34df7e5f74ec615651dab1b9694e84563b724cb5/_mixins.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/34df7e5f74ec615651dab1b9694e84563b724cb5/_typography.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/4330ed9682443ec12b5cc9718d9ca0f970e72645/_base.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/4330ed9682443ec12b5cc9718d9ca0f970e72645/_forms.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/4330ed9682443ec12b5cc9718d9ca0f970e72645/_header.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/4330ed9682443ec12b5cc9718d9ca0f970e72645/_mixins.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/4330ed9682443ec12b5cc9718d9ca0f970e72645/_typography.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/4330ed9682443ec12b5cc9718d9ca0f970e72645/print.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/521b993c9acd187272527f2007471941399e49e7/_button.scssc +0 -0
- data/test/dummy/tmp/cache/sass/521b993c9acd187272527f2007471941399e49e7/_clearfix.scssc +0 -0
- data/test/dummy/tmp/cache/sass/521b993c9acd187272527f2007471941399e49e7/_font-face.scssc +0 -0
- data/test/dummy/tmp/cache/sass/521b993c9acd187272527f2007471941399e49e7/_font-family.scssc +0 -0
- data/test/dummy/tmp/cache/sass/521b993c9acd187272527f2007471941399e49e7/_hide-text.scssc +0 -0
- data/test/dummy/tmp/cache/sass/521b993c9acd187272527f2007471941399e49e7/_html5-input-types.scssc +0 -0
- data/test/dummy/tmp/cache/sass/521b993c9acd187272527f2007471941399e49e7/_position.scssc +0 -0
- data/test/dummy/tmp/cache/sass/521b993c9acd187272527f2007471941399e49e7/_timing-functions.scssc +0 -0
- data/test/dummy/tmp/cache/sass/5a8f06dfcf99c0436939674b51a4e9800b2066e8/_footer.scssc +0 -0
- data/test/dummy/tmp/cache/sass/5a8f06dfcf99c0436939674b51a4e9800b2066e8/_main_structure.scssc +0 -0
- data/test/dummy/tmp/cache/sass/5a8f06dfcf99c0436939674b51a4e9800b2066e8/_title_bar.scssc +0 -0
- data/test/dummy/tmp/cache/sass/686dc179041c7d3a972dc3ec33726e7ae1e4ab05/_animation.scssc +0 -0
- data/test/dummy/tmp/cache/sass/686dc179041c7d3a972dc3ec33726e7ae1e4ab05/_appearance.scssc +0 -0
- data/test/dummy/tmp/cache/sass/686dc179041c7d3a972dc3ec33726e7ae1e4ab05/_background-image.scssc +0 -0
- data/test/dummy/tmp/cache/sass/686dc179041c7d3a972dc3ec33726e7ae1e4ab05/_background-size.scssc +0 -0
- data/test/dummy/tmp/cache/sass/686dc179041c7d3a972dc3ec33726e7ae1e4ab05/_border-image.scssc +0 -0
- data/test/dummy/tmp/cache/sass/686dc179041c7d3a972dc3ec33726e7ae1e4ab05/_border-radius.scssc +0 -0
- data/test/dummy/tmp/cache/sass/686dc179041c7d3a972dc3ec33726e7ae1e4ab05/_box-shadow.scssc +0 -0
- data/test/dummy/tmp/cache/sass/686dc179041c7d3a972dc3ec33726e7ae1e4ab05/_box-sizing.scssc +0 -0
- data/test/dummy/tmp/cache/sass/686dc179041c7d3a972dc3ec33726e7ae1e4ab05/_columns.scssc +0 -0
- data/test/dummy/tmp/cache/sass/686dc179041c7d3a972dc3ec33726e7ae1e4ab05/_flex-box.scssc +0 -0
- data/test/dummy/tmp/cache/sass/686dc179041c7d3a972dc3ec33726e7ae1e4ab05/_inline-block.scssc +0 -0
- data/test/dummy/tmp/cache/sass/686dc179041c7d3a972dc3ec33726e7ae1e4ab05/_linear-gradient.scssc +0 -0
- data/test/dummy/tmp/cache/sass/686dc179041c7d3a972dc3ec33726e7ae1e4ab05/_prefixer.scssc +0 -0
- data/test/dummy/tmp/cache/sass/686dc179041c7d3a972dc3ec33726e7ae1e4ab05/_radial-gradient.scssc +0 -0
- data/test/dummy/tmp/cache/sass/686dc179041c7d3a972dc3ec33726e7ae1e4ab05/_transform.scssc +0 -0
- data/test/dummy/tmp/cache/sass/686dc179041c7d3a972dc3ec33726e7ae1e4ab05/_transition.scssc +0 -0
- data/test/dummy/tmp/cache/sass/686dc179041c7d3a972dc3ec33726e7ae1e4ab05/_user-select.scssc +0 -0
- data/test/dummy/tmp/cache/sass/799f94dffbb29370035dd8035c06b45b72790fc5/_blank_slates.scssc +0 -0
- data/test/dummy/tmp/cache/sass/799f94dffbb29370035dd8035c06b45b72790fc5/_breadcrumbs.scssc +0 -0
- data/test/dummy/tmp/cache/sass/799f94dffbb29370035dd8035c06b45b72790fc5/_buttons.scssc +0 -0
- data/test/dummy/tmp/cache/sass/799f94dffbb29370035dd8035c06b45b72790fc5/_columns.scssc +0 -0
- data/test/dummy/tmp/cache/sass/799f94dffbb29370035dd8035c06b45b72790fc5/_comments.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/799f94dffbb29370035dd8035c06b45b72790fc5/_date_picker.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/799f94dffbb29370035dd8035c06b45b72790fc5/_flash_messages.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/799f94dffbb29370035dd8035c06b45b72790fc5/_grid.scssc +0 -0
- data/test/dummy/tmp/cache/sass/799f94dffbb29370035dd8035c06b45b72790fc5/_links.scssc +0 -0
- data/test/dummy/tmp/cache/sass/799f94dffbb29370035dd8035c06b45b72790fc5/_pagination.scssc +0 -0
- data/test/dummy/tmp/cache/sass/799f94dffbb29370035dd8035c06b45b72790fc5/_panels.scssc +0 -0
- data/test/dummy/tmp/cache/sass/799f94dffbb29370035dd8035c06b45b72790fc5/_scopes.scssc +0 -0
- data/test/dummy/tmp/cache/sass/799f94dffbb29370035dd8035c06b45b72790fc5/_status_tags.scssc +0 -0
- data/test/dummy/tmp/cache/sass/799f94dffbb29370035dd8035c06b45b72790fc5/_table_tools.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/799f94dffbb29370035dd8035c06b45b72790fc5/_tables.css.scssc +0 -0
- data/test/dummy/tmp/cache/sass/972efe55173f6628b13c5cb56b5b0f9b84985155/_deprecated-webkit-gradient.scssc +0 -0
- data/test/dummy/tmp/cache/sass/972efe55173f6628b13c5cb56b5b0f9b84985155/_flex-grid.scssc +0 -0
- data/test/dummy/tmp/cache/sass/972efe55173f6628b13c5cb56b5b0f9b84985155/_grid-width.scssc +0 -0
- data/test/dummy/tmp/cache/sass/972efe55173f6628b13c5cb56b5b0f9b84985155/_linear-gradient.scssc +0 -0
- data/test/dummy/tmp/cache/sass/972efe55173f6628b13c5cb56b5b0f9b84985155/_modular-scale.scssc +0 -0
- data/test/dummy/tmp/cache/sass/972efe55173f6628b13c5cb56b5b0f9b84985155/_radial-gradient.scssc +0 -0
- data/test/dummy/tmp/cache/sass/972efe55173f6628b13c5cb56b5b0f9b84985155/_render-gradients.scssc +0 -0
- data/test/dummy/tmp/cache/sass/972efe55173f6628b13c5cb56b5b0f9b84985155/_tint-shade.scssc +0 -0
- data/test/dummy/tmp/cache/sass/a6e19f0ba7c994b5cd1f8fcd2ef7cb5a62017be7/_bourbon.scssc +0 -0
- data/test/dummy/tmp/cache/sass/a86a1245039dd9da2b0a1422db19889ca592daee/_footer.scssc +0 -0
- data/test/dummy/tmp/cache/sass/a86a1245039dd9da2b0a1422db19889ca592daee/_main_structure.scssc +0 -0
- data/test/dummy/tmp/cache/sass/a86a1245039dd9da2b0a1422db19889ca592daee/_title_bar.scssc +0 -0
- data/test/dummy/tmp/cache/sass/c572ddc25b7a57596b711c26460dab735895a907/_animation.scssc +0 -0
- data/test/dummy/tmp/cache/sass/c572ddc25b7a57596b711c26460dab735895a907/_appearance.scssc +0 -0
- data/test/dummy/tmp/cache/sass/c572ddc25b7a57596b711c26460dab735895a907/_background-image.scssc +0 -0
- data/test/dummy/tmp/cache/sass/c572ddc25b7a57596b711c26460dab735895a907/_background-size.scssc +0 -0
- data/test/dummy/tmp/cache/sass/c572ddc25b7a57596b711c26460dab735895a907/_border-image.scssc +0 -0
- data/test/dummy/tmp/cache/sass/c572ddc25b7a57596b711c26460dab735895a907/_border-radius.scssc +0 -0
- data/test/dummy/tmp/cache/sass/c572ddc25b7a57596b711c26460dab735895a907/_box-shadow.scssc +0 -0
- data/test/dummy/tmp/cache/sass/c572ddc25b7a57596b711c26460dab735895a907/_box-sizing.scssc +0 -0
- data/test/dummy/tmp/cache/sass/c572ddc25b7a57596b711c26460dab735895a907/_columns.scssc +0 -0
- data/test/dummy/tmp/cache/sass/c572ddc25b7a57596b711c26460dab735895a907/_flex-box.scssc +0 -0
- data/test/dummy/tmp/cache/sass/c572ddc25b7a57596b711c26460dab735895a907/_inline-block.scssc +0 -0
- data/test/dummy/tmp/cache/sass/c572ddc25b7a57596b711c26460dab735895a907/_linear-gradient.scssc +0 -0
- data/test/dummy/tmp/cache/sass/c572ddc25b7a57596b711c26460dab735895a907/_radial-gradient.scssc +0 -0
- data/test/dummy/tmp/cache/sass/c572ddc25b7a57596b711c26460dab735895a907/_transform.scssc +0 -0
- data/test/dummy/tmp/cache/sass/c572ddc25b7a57596b711c26460dab735895a907/_transition.scssc +0 -0
- data/test/dummy/tmp/cache/sass/c572ddc25b7a57596b711c26460dab735895a907/_user-select.scssc +0 -0
- data/test/dummy/tmp/cache/sass/eab4ec523f2b3fe0ce62881e5ddde80ea26c42ed/_deprecated-webkit-gradient.scssc +0 -0
- data/test/dummy/tmp/cache/sass/eab4ec523f2b3fe0ce62881e5ddde80ea26c42ed/_flex-grid.scssc +0 -0
- data/test/dummy/tmp/cache/sass/eab4ec523f2b3fe0ce62881e5ddde80ea26c42ed/_grid-width.scssc +0 -0
- data/test/dummy/tmp/cache/sass/eab4ec523f2b3fe0ce62881e5ddde80ea26c42ed/_linear-gradient.scssc +0 -0
- data/test/dummy/tmp/cache/sass/eab4ec523f2b3fe0ce62881e5ddde80ea26c42ed/_modular-scale.scssc +0 -0
- data/test/dummy/tmp/cache/sass/eab4ec523f2b3fe0ce62881e5ddde80ea26c42ed/_radial-gradient.scssc +0 -0
- data/test/dummy/tmp/cache/sass/eab4ec523f2b3fe0ce62881e5ddde80ea26c42ed/_render-gradients.scssc +0 -0
- data/test/dummy/tmp/cache/sass/eab4ec523f2b3fe0ce62881e5ddde80ea26c42ed/_tint-shade.scssc +0 -0
- data/test/dummy/tmp/cache/sass/eab4ec523f2b3fe0ce62881e5ddde80ea26c42ed/_transition-property-name.scssc +0 -0
- data/test/dummy/tmp/cache/sass/ecba858b902d0403d7e616a9f9672a7729dd00f2/_button.scssc +0 -0
- data/test/dummy/tmp/cache/sass/ecba858b902d0403d7e616a9f9672a7729dd00f2/_clearfix.scssc +0 -0
- data/test/dummy/tmp/cache/sass/ecba858b902d0403d7e616a9f9672a7729dd00f2/_font-family.scssc +0 -0
- data/test/dummy/tmp/cache/sass/ecba858b902d0403d7e616a9f9672a7729dd00f2/_html5-input-types.scssc +0 -0
- data/test/dummy/tmp/cache/sass/ecba858b902d0403d7e616a9f9672a7729dd00f2/_position.scssc +0 -0
- data/test/dummy/tmp/cache/sass/ecba858b902d0403d7e616a9f9672a7729dd00f2/_timing-functions.scssc +0 -0
- data/test/dummy/tmp/pids/server.pid +1 -0
- data/test/ecm_cms_core_test.rb +7 -0
- data/test/test_helper.rb +15 -0
- metadata +669 -0
@@ -0,0 +1,261 @@
|
|
1
|
+
== Welcome to Rails
|
2
|
+
|
3
|
+
Rails is a web-application framework that includes everything needed to create
|
4
|
+
database-backed web applications according to the Model-View-Control pattern.
|
5
|
+
|
6
|
+
This pattern splits the view (also called the presentation) into "dumb"
|
7
|
+
templates that are primarily responsible for inserting pre-built data in between
|
8
|
+
HTML tags. The model contains the "smart" domain objects (such as Account,
|
9
|
+
Product, Person, Post) that holds all the business logic and knows how to
|
10
|
+
persist themselves to a database. The controller handles the incoming requests
|
11
|
+
(such as Save New Account, Update Product, Show Post) by manipulating the model
|
12
|
+
and directing data to the view.
|
13
|
+
|
14
|
+
In Rails, the model is handled by what's called an object-relational mapping
|
15
|
+
layer entitled Active Record. This layer allows you to present the data from
|
16
|
+
database rows as objects and embellish these data objects with business logic
|
17
|
+
methods. You can read more about Active Record in
|
18
|
+
link:files/vendor/rails/activerecord/README.html.
|
19
|
+
|
20
|
+
The controller and view are handled by the Action Pack, which handles both
|
21
|
+
layers by its two parts: Action View and Action Controller. These two layers
|
22
|
+
are bundled in a single package due to their heavy interdependence. This is
|
23
|
+
unlike the relationship between the Active Record and Action Pack that is much
|
24
|
+
more separate. Each of these packages can be used independently outside of
|
25
|
+
Rails. You can read more about Action Pack in
|
26
|
+
link:files/vendor/rails/actionpack/README.html.
|
27
|
+
|
28
|
+
|
29
|
+
== Getting Started
|
30
|
+
|
31
|
+
1. At the command prompt, create a new Rails application:
|
32
|
+
<tt>rails new myapp</tt> (where <tt>myapp</tt> is the application name)
|
33
|
+
|
34
|
+
2. Change directory to <tt>myapp</tt> and start the web server:
|
35
|
+
<tt>cd myapp; rails server</tt> (run with --help for options)
|
36
|
+
|
37
|
+
3. Go to http://localhost:3000/ and you'll see:
|
38
|
+
"Welcome aboard: You're riding Ruby on Rails!"
|
39
|
+
|
40
|
+
4. Follow the guidelines to start developing your application. You can find
|
41
|
+
the following resources handy:
|
42
|
+
|
43
|
+
* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
|
44
|
+
* Ruby on Rails Tutorial Book: http://www.railstutorial.org/
|
45
|
+
|
46
|
+
|
47
|
+
== Debugging Rails
|
48
|
+
|
49
|
+
Sometimes your application goes wrong. Fortunately there are a lot of tools that
|
50
|
+
will help you debug it and get it back on the rails.
|
51
|
+
|
52
|
+
First area to check is the application log files. Have "tail -f" commands
|
53
|
+
running on the server.log and development.log. Rails will automatically display
|
54
|
+
debugging and runtime information to these files. Debugging info will also be
|
55
|
+
shown in the browser on requests from 127.0.0.1.
|
56
|
+
|
57
|
+
You can also log your own messages directly into the log file from your code
|
58
|
+
using the Ruby logger class from inside your controllers. Example:
|
59
|
+
|
60
|
+
class WeblogController < ActionController::Base
|
61
|
+
def destroy
|
62
|
+
@weblog = Weblog.find(params[:id])
|
63
|
+
@weblog.destroy
|
64
|
+
logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
The result will be a message in your log file along the lines of:
|
69
|
+
|
70
|
+
Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1!
|
71
|
+
|
72
|
+
More information on how to use the logger is at http://www.ruby-doc.org/core/
|
73
|
+
|
74
|
+
Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are
|
75
|
+
several books available online as well:
|
76
|
+
|
77
|
+
* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe)
|
78
|
+
* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
|
79
|
+
|
80
|
+
These two books will bring you up to speed on the Ruby language and also on
|
81
|
+
programming in general.
|
82
|
+
|
83
|
+
|
84
|
+
== Debugger
|
85
|
+
|
86
|
+
Debugger support is available through the debugger command when you start your
|
87
|
+
Mongrel or WEBrick server with --debugger. This means that you can break out of
|
88
|
+
execution at any point in the code, investigate and change the model, and then,
|
89
|
+
resume execution! You need to install ruby-debug to run the server in debugging
|
90
|
+
mode. With gems, use <tt>sudo gem install ruby-debug</tt>. Example:
|
91
|
+
|
92
|
+
class WeblogController < ActionController::Base
|
93
|
+
def index
|
94
|
+
@posts = Post.all
|
95
|
+
debugger
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
So the controller will accept the action, run the first line, then present you
|
100
|
+
with a IRB prompt in the server window. Here you can do things like:
|
101
|
+
|
102
|
+
>> @posts.inspect
|
103
|
+
=> "[#<Post:0x14a6be8
|
104
|
+
@attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>,
|
105
|
+
#<Post:0x14a6620
|
106
|
+
@attributes={"title"=>"Rails", "body"=>"Only ten..", "id"=>"2"}>]"
|
107
|
+
>> @posts.first.title = "hello from a debugger"
|
108
|
+
=> "hello from a debugger"
|
109
|
+
|
110
|
+
...and even better, you can examine how your runtime objects actually work:
|
111
|
+
|
112
|
+
>> f = @posts.first
|
113
|
+
=> #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
|
114
|
+
>> f.
|
115
|
+
Display all 152 possibilities? (y or n)
|
116
|
+
|
117
|
+
Finally, when you're ready to resume execution, you can enter "cont".
|
118
|
+
|
119
|
+
|
120
|
+
== Console
|
121
|
+
|
122
|
+
The console is a Ruby shell, which allows you to interact with your
|
123
|
+
application's domain model. Here you'll have all parts of the application
|
124
|
+
configured, just like it is when the application is running. You can inspect
|
125
|
+
domain models, change values, and save to the database. Starting the script
|
126
|
+
without arguments will launch it in the development environment.
|
127
|
+
|
128
|
+
To start the console, run <tt>rails console</tt> from the application
|
129
|
+
directory.
|
130
|
+
|
131
|
+
Options:
|
132
|
+
|
133
|
+
* Passing the <tt>-s, --sandbox</tt> argument will rollback any modifications
|
134
|
+
made to the database.
|
135
|
+
* Passing an environment name as an argument will load the corresponding
|
136
|
+
environment. Example: <tt>rails console production</tt>.
|
137
|
+
|
138
|
+
To reload your controllers and models after launching the console run
|
139
|
+
<tt>reload!</tt>
|
140
|
+
|
141
|
+
More information about irb can be found at:
|
142
|
+
link:http://www.rubycentral.org/pickaxe/irb.html
|
143
|
+
|
144
|
+
|
145
|
+
== dbconsole
|
146
|
+
|
147
|
+
You can go to the command line of your database directly through <tt>rails
|
148
|
+
dbconsole</tt>. You would be connected to the database with the credentials
|
149
|
+
defined in database.yml. Starting the script without arguments will connect you
|
150
|
+
to the development database. Passing an argument will connect you to a different
|
151
|
+
database, like <tt>rails dbconsole production</tt>. Currently works for MySQL,
|
152
|
+
PostgreSQL and SQLite 3.
|
153
|
+
|
154
|
+
== Description of Contents
|
155
|
+
|
156
|
+
The default directory structure of a generated Ruby on Rails application:
|
157
|
+
|
158
|
+
|-- app
|
159
|
+
| |-- assets
|
160
|
+
| |-- images
|
161
|
+
| |-- javascripts
|
162
|
+
| `-- stylesheets
|
163
|
+
| |-- controllers
|
164
|
+
| |-- helpers
|
165
|
+
| |-- mailers
|
166
|
+
| |-- models
|
167
|
+
| `-- views
|
168
|
+
| `-- layouts
|
169
|
+
|-- config
|
170
|
+
| |-- environments
|
171
|
+
| |-- initializers
|
172
|
+
| `-- locales
|
173
|
+
|-- db
|
174
|
+
|-- doc
|
175
|
+
|-- lib
|
176
|
+
| `-- tasks
|
177
|
+
|-- log
|
178
|
+
|-- public
|
179
|
+
|-- script
|
180
|
+
|-- test
|
181
|
+
| |-- fixtures
|
182
|
+
| |-- functional
|
183
|
+
| |-- integration
|
184
|
+
| |-- performance
|
185
|
+
| `-- unit
|
186
|
+
|-- tmp
|
187
|
+
| |-- cache
|
188
|
+
| |-- pids
|
189
|
+
| |-- sessions
|
190
|
+
| `-- sockets
|
191
|
+
`-- vendor
|
192
|
+
|-- assets
|
193
|
+
`-- stylesheets
|
194
|
+
`-- plugins
|
195
|
+
|
196
|
+
app
|
197
|
+
Holds all the code that's specific to this particular application.
|
198
|
+
|
199
|
+
app/assets
|
200
|
+
Contains subdirectories for images, stylesheets, and JavaScript files.
|
201
|
+
|
202
|
+
app/controllers
|
203
|
+
Holds controllers that should be named like weblogs_controller.rb for
|
204
|
+
automated URL mapping. All controllers should descend from
|
205
|
+
ApplicationController which itself descends from ActionController::Base.
|
206
|
+
|
207
|
+
app/models
|
208
|
+
Holds models that should be named like post.rb. Models descend from
|
209
|
+
ActiveRecord::Base by default.
|
210
|
+
|
211
|
+
app/views
|
212
|
+
Holds the template files for the view that should be named like
|
213
|
+
weblogs/index.html.erb for the WeblogsController#index action. All views use
|
214
|
+
eRuby syntax by default.
|
215
|
+
|
216
|
+
app/views/layouts
|
217
|
+
Holds the template files for layouts to be used with views. This models the
|
218
|
+
common header/footer method of wrapping views. In your views, define a layout
|
219
|
+
using the <tt>layout :default</tt> and create a file named default.html.erb.
|
220
|
+
Inside default.html.erb, call <% yield %> to render the view using this
|
221
|
+
layout.
|
222
|
+
|
223
|
+
app/helpers
|
224
|
+
Holds view helpers that should be named like weblogs_helper.rb. These are
|
225
|
+
generated for you automatically when using generators for controllers.
|
226
|
+
Helpers can be used to wrap functionality for your views into methods.
|
227
|
+
|
228
|
+
config
|
229
|
+
Configuration files for the Rails environment, the routing map, the database,
|
230
|
+
and other dependencies.
|
231
|
+
|
232
|
+
db
|
233
|
+
Contains the database schema in schema.rb. db/migrate contains all the
|
234
|
+
sequence of Migrations for your schema.
|
235
|
+
|
236
|
+
doc
|
237
|
+
This directory is where your application documentation will be stored when
|
238
|
+
generated using <tt>rake doc:app</tt>
|
239
|
+
|
240
|
+
lib
|
241
|
+
Application specific libraries. Basically, any kind of custom code that
|
242
|
+
doesn't belong under controllers, models, or helpers. This directory is in
|
243
|
+
the load path.
|
244
|
+
|
245
|
+
public
|
246
|
+
The directory available for the web server. Also contains the dispatchers and the
|
247
|
+
default HTML files. This should be set as the DOCUMENT_ROOT of your web
|
248
|
+
server.
|
249
|
+
|
250
|
+
script
|
251
|
+
Helper scripts for automation and generation.
|
252
|
+
|
253
|
+
test
|
254
|
+
Unit and functional tests along with fixtures. When using the rails generate
|
255
|
+
command, template test files will be generated for you and placed in this
|
256
|
+
directory.
|
257
|
+
|
258
|
+
vendor
|
259
|
+
External libraries that the application depends on. Also includes the plugins
|
260
|
+
subdirectory. If the app has frozen rails, those gems also go here, under
|
261
|
+
vendor/rails/. This directory is in the load path.
|
data/test/dummy/Rakefile
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
3
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
4
|
+
|
5
|
+
require File.expand_path('../config/application', __FILE__)
|
6
|
+
|
7
|
+
Dummy::Application.load_tasks
|
@@ -0,0 +1,44 @@
|
|
1
|
+
ActiveAdmin::Dashboards.build do
|
2
|
+
|
3
|
+
# Define your dashboard sections here. Each block will be
|
4
|
+
# rendered on the dashboard in the context of the view. So just
|
5
|
+
# return the content which you would like to display.
|
6
|
+
|
7
|
+
# == Simple Dashboard Section
|
8
|
+
# Here is an example of a simple dashboard section
|
9
|
+
#
|
10
|
+
# section "Recent Posts" do
|
11
|
+
# ul do
|
12
|
+
# Post.recent(5).collect do |post|
|
13
|
+
# li link_to(post.title, admin_post_path(post))
|
14
|
+
# end
|
15
|
+
# end
|
16
|
+
# end
|
17
|
+
|
18
|
+
# == Render Partial Section
|
19
|
+
# The block is rendered within the context of the view, so you can
|
20
|
+
# easily render a partial rather than build content in ruby.
|
21
|
+
#
|
22
|
+
# section "Recent Posts" do
|
23
|
+
# div do
|
24
|
+
# render 'recent_posts' # => this will render /app/views/admin/dashboard/_recent_posts.html.erb
|
25
|
+
# end
|
26
|
+
# end
|
27
|
+
|
28
|
+
# == Section Ordering
|
29
|
+
# The dashboard sections are ordered by a given priority from top left to
|
30
|
+
# bottom right. The default priority is 10. By giving a section numerically lower
|
31
|
+
# priority it will be sorted higher. For example:
|
32
|
+
#
|
33
|
+
# section "Recent Posts", :priority => 10
|
34
|
+
# section "Recent User", :priority => 1
|
35
|
+
#
|
36
|
+
# Will render the "Recent Users" then the "Recent Posts" sections on the dashboard.
|
37
|
+
|
38
|
+
# == Conditionally Display
|
39
|
+
# Provide a method name or Proc object to conditionally render a section at run time.
|
40
|
+
#
|
41
|
+
# section "Membership Summary", :if => :memberships_enabled?
|
42
|
+
# section "Membership Summary", :if => Proc.new { current_admin_user.account.memberships.any? }
|
43
|
+
|
44
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require active_admin/base
|
@@ -0,0 +1,15 @@
|
|
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
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require_tree .
|
@@ -0,0 +1,13 @@
|
|
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
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class AdminUser < ActiveRecord::Base
|
2
|
+
# Include default devise modules. Others available are:
|
3
|
+
# :token_authenticatable, :confirmable,
|
4
|
+
# :lockable, :timeoutable and :omniauthable
|
5
|
+
devise :database_authenticatable,
|
6
|
+
:recoverable, :rememberable, :trackable, :validatable
|
7
|
+
|
8
|
+
# Setup accessible (or protected) attributes for your model
|
9
|
+
attr_accessible :email, :password, :password_confirmation, :remember_me
|
10
|
+
# attr_accessible :title, :body
|
11
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
Bundler.require
|
6
|
+
require "ecm_cms_core"
|
7
|
+
|
8
|
+
module Dummy
|
9
|
+
class Application < Rails::Application
|
10
|
+
# Settings in config/environments/* take precedence over those specified here.
|
11
|
+
# Application configuration should go into files in config/initializers
|
12
|
+
# -- all .rb files in that directory are automatically loaded.
|
13
|
+
|
14
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
15
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
16
|
+
config.autoload_paths += %W(#{config.root}/lib)
|
17
|
+
|
18
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
19
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
20
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
21
|
+
|
22
|
+
# Activate observers that should always be running.
|
23
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
24
|
+
|
25
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
26
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
27
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
28
|
+
config.time_zone = 'Europe/Berlin'
|
29
|
+
|
30
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
31
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
32
|
+
# config.i18n.default_locale = :de
|
33
|
+
config.i18n.available_locales = [:de, :en]
|
34
|
+
config.i18n.default_locale = :de
|
35
|
+
|
36
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
37
|
+
config.encoding = "utf-8"
|
38
|
+
|
39
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
40
|
+
config.filter_parameters += [:password]
|
41
|
+
|
42
|
+
# Use SQL instead of Active Record's schema dumper when creating the database.
|
43
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
44
|
+
# like if you have constraints or database-specific column types
|
45
|
+
# config.active_record.schema_format = :sql
|
46
|
+
|
47
|
+
# Enforce whitelist mode for mass assignment.
|
48
|
+
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
49
|
+
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
50
|
+
# parameters by using an attr_accessible or attr_protected declaration.
|
51
|
+
config.active_record.whitelist_attributes = true
|
52
|
+
|
53
|
+
# Enable the asset pipeline
|
54
|
+
config.assets.enabled = true
|
55
|
+
|
56
|
+
# Version of your assets, change this if you want to expire all your assets
|
57
|
+
config.assets.version = '1.0'
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem 'sqlite3'
|
6
|
+
development:
|
7
|
+
adapter: sqlite3
|
8
|
+
database: db/development.sqlite3
|
9
|
+
pool: 5
|
10
|
+
timeout: 5000
|
11
|
+
|
12
|
+
# Warning: The database defined as "test" will be erased and
|
13
|
+
# re-generated from your development database when you run "rake".
|
14
|
+
# Do not set this db to the same as development or production.
|
15
|
+
test:
|
16
|
+
adapter: sqlite3
|
17
|
+
database: db/test.sqlite3
|
18
|
+
pool: 5
|
19
|
+
timeout: 5000
|
20
|
+
|
21
|
+
production:
|
22
|
+
adapter: sqlite3
|
23
|
+
database: db/production.sqlite3
|
24
|
+
pool: 5
|
25
|
+
timeout: 5000
|
@@ -0,0 +1,37 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
18
|
+
|
19
|
+
# Print deprecation notices to the Rails logger
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Only use best-standards-support built into browsers
|
23
|
+
config.action_dispatch.best_standards_support = :builtin
|
24
|
+
|
25
|
+
# Raise exception on mass assignment protection for Active Record models
|
26
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
27
|
+
|
28
|
+
# Log the query plan for queries taking more than this (works
|
29
|
+
# with SQLite, MySQL, and PostgreSQL)
|
30
|
+
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
31
|
+
|
32
|
+
# Do not compress assets
|
33
|
+
config.assets.compress = false
|
34
|
+
|
35
|
+
# Expands the lines which load the assets
|
36
|
+
config.assets.debug = true
|
37
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# Code is not reloaded between requests
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Full error reports are disabled and caching is turned on
|
8
|
+
config.consider_all_requests_local = false
|
9
|
+
config.action_controller.perform_caching = true
|
10
|
+
|
11
|
+
# Disable Rails's static asset server (Apache or nginx will already do this)
|
12
|
+
config.serve_static_assets = false
|
13
|
+
|
14
|
+
# Compress JavaScripts and CSS
|
15
|
+
config.assets.compress = true
|
16
|
+
|
17
|
+
# Don't fallback to assets pipeline if a precompiled asset is missed
|
18
|
+
config.assets.compile = false
|
19
|
+
|
20
|
+
# Generate digests for assets URLs
|
21
|
+
config.assets.digest = true
|
22
|
+
|
23
|
+
# Defaults to Rails.root.join("public/assets")
|
24
|
+
# config.assets.manifest = YOUR_PATH
|
25
|
+
|
26
|
+
# Specifies the header that your server uses for sending files
|
27
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
28
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
29
|
+
|
30
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
31
|
+
# config.force_ssl = true
|
32
|
+
|
33
|
+
# See everything in the log (default is :info)
|
34
|
+
# config.log_level = :debug
|
35
|
+
|
36
|
+
# Prepend all log lines with the following tags
|
37
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
38
|
+
|
39
|
+
# Use a different logger for distributed setups
|
40
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
41
|
+
|
42
|
+
# Use a different cache store in production
|
43
|
+
# config.cache_store = :mem_cache_store
|
44
|
+
|
45
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
46
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
47
|
+
|
48
|
+
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
49
|
+
# config.assets.precompile += %w( search.js )
|
50
|
+
|
51
|
+
# Disable delivery errors, bad email addresses will be ignored
|
52
|
+
# config.action_mailer.raise_delivery_errors = false
|
53
|
+
|
54
|
+
# Enable threaded mode
|
55
|
+
# config.threadsafe!
|
56
|
+
|
57
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
58
|
+
# the I18n.default_locale when a translation can not be found)
|
59
|
+
config.i18n.fallbacks = true
|
60
|
+
|
61
|
+
# Send deprecation notices to registered listeners
|
62
|
+
config.active_support.deprecation = :notify
|
63
|
+
|
64
|
+
# Log the query plan for queries taking more than this (works
|
65
|
+
# with SQLite, MySQL, and PostgreSQL)
|
66
|
+
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
67
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Configure static asset server for tests with Cache-Control for performance
|
11
|
+
config.serve_static_assets = true
|
12
|
+
config.static_cache_control = "public, max-age=3600"
|
13
|
+
|
14
|
+
# Log error messages when you accidentally call methods on nil
|
15
|
+
config.whiny_nils = true
|
16
|
+
|
17
|
+
# Show full error reports and disable caching
|
18
|
+
config.consider_all_requests_local = true
|
19
|
+
config.action_controller.perform_caching = false
|
20
|
+
|
21
|
+
# Raise exceptions instead of rendering exception templates
|
22
|
+
config.action_dispatch.show_exceptions = false
|
23
|
+
|
24
|
+
# Disable request forgery protection in test environment
|
25
|
+
config.action_controller.allow_forgery_protection = false
|
26
|
+
|
27
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
28
|
+
# The :test delivery method accumulates sent emails in the
|
29
|
+
# ActionMailer::Base.deliveries array.
|
30
|
+
config.action_mailer.delivery_method = :test
|
31
|
+
|
32
|
+
# Raise exception on mass assignment protection for Active Record models
|
33
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
34
|
+
|
35
|
+
# Print deprecation notices to the stderr
|
36
|
+
config.active_support.deprecation = :stderr
|
37
|
+
end
|