compartment 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +24 -0
- data/Rakefile +34 -0
- data/app/assets/javascripts/compartment/application.js +24 -0
- data/app/assets/javascripts/compartment/collections/content_block_types.js.coffee +5 -0
- data/app/assets/javascripts/compartment/collections/content_blocks.js.coffee +12 -0
- data/app/assets/javascripts/compartment/compartment.js.coffee +12 -0
- data/app/assets/javascripts/compartment/modals.js.coffee +49 -0
- data/app/assets/javascripts/compartment/models/content_area.js.coffee +12 -0
- data/app/assets/javascripts/compartment/models/content_block.js.coffee +1 -0
- data/app/assets/javascripts/compartment/models/content_block_type.js.coffee +1 -0
- data/app/assets/javascripts/compartment/models/page.js.coffee +36 -0
- data/app/assets/javascripts/compartment/routers/default.js.coffee +13 -0
- data/app/assets/javascripts/compartment/views/content_area.js.coffee +63 -0
- data/app/assets/javascripts/compartment/views/content_block.js.coffee +61 -0
- data/app/assets/javascripts/compartment/views/content_span.js.coffee +61 -0
- data/app/assets/javascripts/compartment/views/modal.js.coffee +42 -0
- data/app/assets/javascripts/compartment/views/modals/new_content_block.js.coffee +20 -0
- data/app/assets/javascripts/compartment/views/modals/new_page.js.coffee +3 -0
- data/app/assets/javascripts/compartment/views/modals/old_modal.js.coffee +72 -0
- data/app/assets/javascripts/compartment/views/page.js.coffee +14 -0
- data/app/assets/javascripts/compartment/views/page_toolbar.js.coffee +19 -0
- data/app/assets/stylesheets/compartment/admin-styles.sass +6 -0
- data/app/assets/stylesheets/compartment/forms.sass +118 -0
- data/app/assets/stylesheets/compartment/frontend-styles.sass +64 -0
- data/app/assets/stylesheets/compartment/modals.sass +21 -0
- data/app/assets/stylesheets/compartment/page_toolbar.sass +51 -0
- data/app/assets/templates/compartment/add_content_button.jst.eco +3 -0
- data/app/assets/templates/compartment/content_blocks/actions.jst.eco +6 -0
- data/app/assets/templates/compartment/content_blocks/edit.jst.ejs +8 -0
- data/app/assets/templates/compartment/content_blocks/new.jst.eco +6 -0
- data/app/assets/templates/compartment/content_blocks/show.jst.ejs +8 -0
- data/app/assets/templates/compartment/modals/new_content_block.jst.eco +12 -0
- data/app/assets/templates/compartment/modals/new_page.jst.eco +11 -0
- data/app/assets/templates/compartment/modals/sign_up_form.jst.eco +27 -0
- data/app/assets/templates/compartment/page_toolbar.jst.eco +6 -0
- data/app/controllers/compartment/admin/account_controller.rb +12 -0
- data/app/controllers/compartment/admin/application_controller.rb +27 -0
- data/app/controllers/compartment/admin/content_block_types_controller.rb +14 -0
- data/app/controllers/compartment/admin/content_blocks_controller.rb +68 -0
- data/app/controllers/compartment/admin/dashboard_controller.rb +12 -0
- data/app/controllers/compartment/admin/pages_controller.rb +98 -0
- data/app/controllers/compartment/admin/sessions_controller.rb +34 -0
- data/app/controllers/compartment/admin/settings_controller.rb +13 -0
- data/app/controllers/compartment/admin/sites_controller.rb +89 -0
- data/app/controllers/compartment/admin/users_controller.rb +89 -0
- data/app/controllers/compartment/application_controller.rb +16 -0
- data/app/controllers/compartment/pages_controller.rb +17 -0
- data/app/controllers/compartment/theme_assets_controller.rb +12 -0
- data/app/helpers/compartment/application_helper.rb +12 -0
- data/app/helpers/compartment/pages_helper.rb +93 -0
- data/app/models/compartment/content_block.rb +14 -0
- data/app/models/compartment/page.rb +14 -0
- data/app/models/compartment/site.rb +14 -0
- data/app/models/compartment/theme.rb +41 -0
- data/app/models/compartment/user.rb +8 -0
- data/app/themes/default/images/background_body.jpg +0 -0
- data/app/themes/default/images/background_header.jpg +0 -0
- data/app/themes/default/images/favicon.ico +0 -0
- data/app/themes/default/images/image.jpg +0 -0
- data/app/themes/default/info.rb +4 -0
- data/app/themes/default/stylesheets/styles.css +209 -0
- data/app/themes/default/templates/error_404.html +1 -0
- data/app/themes/default/templates/error_500.html +1 -0
- data/app/themes/default/templates/one_column.erb +63 -0
- data/app/themes/default/templates/two_column.erb +70 -0
- data/app/views/compartment/admin/account/show.html.erb +1 -0
- data/app/views/compartment/admin/content_blocks/_form.html.erb +22 -0
- data/app/views/compartment/admin/content_blocks/edit.html.erb +6 -0
- data/app/views/compartment/admin/content_blocks/index.html.erb +25 -0
- data/app/views/compartment/admin/content_blocks/new.html.erb +5 -0
- data/app/views/compartment/admin/content_blocks/show.html.erb +15 -0
- data/app/views/compartment/admin/dashboard/index.html.erb +1 -0
- data/app/views/compartment/admin/pages/_form.html.erb +29 -0
- data/app/views/compartment/admin/pages/edit.html.erb +6 -0
- data/app/views/compartment/admin/pages/index.html.erb +7 -0
- data/app/views/compartment/admin/pages/new.html.erb +4 -0
- data/app/views/compartment/admin/pages/show.html.erb +25 -0
- data/app/views/compartment/admin/pages/toolbar.html.erb +56 -0
- data/app/views/compartment/admin/sessions/new.html.erb +19 -0
- data/app/views/compartment/admin/settings/index.html.erb +3 -0
- data/app/views/compartment/admin/sites/_form.html.erb +21 -0
- data/app/views/compartment/admin/sites/edit.html.erb +6 -0
- data/app/views/compartment/admin/sites/index.html.erb +23 -0
- data/app/views/compartment/admin/sites/new.html.erb +5 -0
- data/app/views/compartment/admin/sites/show.html.erb +10 -0
- data/app/views/compartment/admin/users/_form.html.erb +29 -0
- data/app/views/compartment/admin/users/edit.html.erb +6 -0
- data/app/views/compartment/admin/users/index.html.erb +24 -0
- data/app/views/compartment/admin/users/new.html.erb +5 -0
- data/app/views/compartment/admin/users/show.html.erb +15 -0
- data/app/views/compartment/errors/page_not_found.html.erb +1 -0
- data/app/views/compartment/errors/unknown_site.html.erb +1 -0
- data/app/views/layouts/compartment/application.html.erb +41 -0
- data/app/views/layouts/compartment/authentication.html.erb +45 -0
- data/config/cucumber.yml +8 -0
- data/config/routes.rb +25 -0
- data/db/migrate/20121208061936_create_compartment_sites.rb +9 -0
- data/db/migrate/20121208063802_create_compartment_pages.rb +13 -0
- data/db/migrate/20121209214222_create_compartment_content_blocks.rb +12 -0
- data/db/migrate/20121209223603_create_compartment_themes.rb +11 -0
- data/db/migrate/20121214060141_create_compartment_users.rb +10 -0
- data/lib/compartment.rb +13 -0
- data/lib/compartment/config.rb +20 -0
- data/lib/compartment/content_block_dsl.rb +25 -0
- data/lib/compartment/engine.rb +21 -0
- data/lib/compartment/version.rb +3 -0
- data/lib/tasks/compartment_tasks.rake +21 -0
- data/spec/controllers/compartment/admin/content_blocks_controller_spec_autogenerated.rb +164 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +59 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +60 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/tasks/cucumber.rake +65 -0
- data/spec/dummy/log/development.log +4127 -0
- data/spec/dummy/log/test.log +93426 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/tmp/cache/assets/C3E/240/sprockets%2F055c2b9605c134d2066c606674f01d05 +0 -0
- data/spec/dummy/tmp/cache/assets/C47/120/sprockets%2F185f0b2e6c231347125613b2407ff686 +0 -0
- data/spec/dummy/tmp/cache/assets/C50/DA0/sprockets%2F456eeb2d37782046ba6c030836643476 +0 -0
- data/spec/dummy/tmp/cache/assets/C52/1C0/sprockets%2Fa78612d84335327b0983c4dc225d1668 +0 -0
- data/spec/dummy/tmp/cache/assets/C76/0F0/sprockets%2F75046a33c909e2b406a3a5929a633a09 +0 -0
- data/spec/dummy/tmp/cache/assets/C77/980/sprockets%2F360cfd80942c2190cb67268b1630a484 +0 -0
- data/spec/dummy/tmp/cache/assets/C8E/6D0/sprockets%2F9e0fc4406af59e36f7d9670453801932 +0 -0
- data/spec/dummy/tmp/cache/assets/C8F/840/sprockets%2F5e5130c2ae14217f1530b406b32a832f +0 -0
- data/spec/dummy/tmp/cache/assets/C9D/370/sprockets%2F6191b8cb150830acc70b897012d4008e +0 -0
- data/spec/dummy/tmp/cache/assets/CA0/C60/sprockets%2Fa16082a8613c43441e0d26b0945aec95 +0 -0
- data/spec/dummy/tmp/cache/assets/CA1/3D0/sprockets%2Fb60224c86974950f832ac26115bbec00 +0 -0
- data/spec/dummy/tmp/cache/assets/CA1/A40/sprockets%2F446b1711d42cc93f65a4a7d22564b035 +0 -0
- data/spec/dummy/tmp/cache/assets/CA7/750/sprockets%2F412bb188276e8969c51469a0ab010a8a +0 -0
- data/spec/dummy/tmp/cache/assets/CA8/250/sprockets%2F5721e7a044aa7244f3f42139ed26385b +0 -0
- data/spec/dummy/tmp/cache/assets/CA9/750/sprockets%2F81a628a4623319f364f30e31e9e3eb22 +0 -0
- data/spec/dummy/tmp/cache/assets/CAC/7A0/sprockets%2Fd1db034053f1908095360ef27668c7da +0 -0
- data/spec/dummy/tmp/cache/assets/CAF/5C0/sprockets%2F72933125931d191df741f01fc5ff2f26 +0 -0
- data/spec/dummy/tmp/cache/assets/CB0/930/sprockets%2F8272ad6d0b079362b2491ce3396a2c97 +0 -0
- data/spec/dummy/tmp/cache/assets/CB1/230/sprockets%2Fbb1808e1d9891094168331ff2fa29c23 +0 -0
- data/spec/dummy/tmp/cache/assets/CB4/FB0/sprockets%2F1f909bc406bf958072ad795d5303f235 +0 -0
- data/spec/dummy/tmp/cache/assets/CB6/730/sprockets%2F19ef44fa001bbda37824909746238f68 +0 -0
- data/spec/dummy/tmp/cache/assets/CBC/170/sprockets%2F895158f320da274e839a4978bb3a25f4 +0 -0
- data/spec/dummy/tmp/cache/assets/CBD/160/sprockets%2Fe56dd38d8c51e8095620f5d67103909d +0 -0
- data/spec/dummy/tmp/cache/assets/CC2/AD0/sprockets%2F94439c33d1a5c557b89cb739e08e1991 +0 -0
- data/spec/dummy/tmp/cache/assets/CCB/850/sprockets%2F02e05b258d7c735f26e633b010c920cb +0 -0
- data/spec/dummy/tmp/cache/assets/CD0/500/sprockets%2Fd27696561a9ec3799b76d4af927338e5 +0 -0
- data/spec/dummy/tmp/cache/assets/CD0/F70/sprockets%2Fb770d8010fa12ecf83d2a171480763d4 +0 -0
- data/spec/dummy/tmp/cache/assets/CD6/980/sprockets%2F78671dda395c821a632ca0871043abf5 +0 -0
- data/spec/dummy/tmp/cache/assets/CD7/7C0/sprockets%2F04f40780f76ba40666c06bf4d1273ef1 +0 -0
- data/spec/dummy/tmp/cache/assets/CD7/8B0/sprockets%2F4a7030aa11b628c26653f58da193f84f +0 -0
- data/spec/dummy/tmp/cache/assets/CD7/E40/sprockets%2F244cc083a125c752f459d8ddfc510218 +0 -0
- data/spec/dummy/tmp/cache/assets/CD9/A90/sprockets%2Fdb4d98730929f78269f493773b5be8e8 +0 -0
- data/spec/dummy/tmp/cache/assets/CDE/0E0/sprockets%2F4b5a7685116047b5ece80c613a4eb866 +0 -0
- data/spec/dummy/tmp/cache/assets/CE2/F80/sprockets%2F3f4be29b1866cb0b0e2dc56536934189 +0 -0
- data/spec/dummy/tmp/cache/assets/CE3/B50/sprockets%2F10e4d9543759ae40f8249c45d34a31ff +0 -0
- data/spec/dummy/tmp/cache/assets/CE5/2A0/sprockets%2F38ab60b12edd0388b87513096a7b789e +0 -0
- data/spec/dummy/tmp/cache/assets/CE8/330/sprockets%2F6f9128544f46a17c60027c35fce4ef75 +0 -0
- data/spec/dummy/tmp/cache/assets/CEB/200/sprockets%2F3007de86523e820696bcaa986ef2a785 +0 -0
- data/spec/dummy/tmp/cache/assets/CEB/4E0/sprockets%2Fffb7c224a9178c6154dea70d94089627 +0 -0
- data/spec/dummy/tmp/cache/assets/CEF/A00/sprockets%2F42449d8a1940eba9130a32d02ab2cf20 +0 -0
- data/spec/dummy/tmp/cache/assets/CF0/C20/sprockets%2F83a42387a965774facbd717770f6f2a7 +0 -0
- data/spec/dummy/tmp/cache/assets/CF5/060/sprockets%2F2986d6ece9249d6f3f9ac694540a2372 +0 -0
- data/spec/dummy/tmp/cache/assets/CF9/F20/sprockets%2F986fdff75a775c678471053713d8c1ed +0 -0
- data/spec/dummy/tmp/cache/assets/CFC/FF0/sprockets%2F47850d338885758cbc4bd4e7b9328fe8 +0 -0
- data/spec/dummy/tmp/cache/assets/D05/D70/sprockets%2F7007cf768de19464db05ae106ca2604d +0 -0
- data/spec/dummy/tmp/cache/assets/D06/590/sprockets%2Fc045182e2f0f3816f76aeb421a167ee3 +0 -0
- data/spec/dummy/tmp/cache/assets/D09/D40/sprockets%2F1bcb641850b964f38417f5cc91e00c7a +0 -0
- data/spec/dummy/tmp/cache/assets/D0B/7D0/sprockets%2Ffa7e2864007ff1f93ab619b61be12705 +0 -0
- data/spec/dummy/tmp/cache/assets/D0C/2B0/sprockets%2Fc01d05da2c09811f6ebb6457a579f393 +0 -0
- data/spec/dummy/tmp/cache/assets/D0F/0A0/sprockets%2F7530089ddbee51165c91d42983ea5cc1 +0 -0
- data/spec/dummy/tmp/cache/assets/D10/190/sprockets%2F17a938bb93cdc2e9a4a71383f824811c +0 -0
- data/spec/dummy/tmp/cache/assets/D13/490/sprockets%2Ffaa1ae5ba596394a7e6f21293362884c +0 -0
- data/spec/dummy/tmp/cache/assets/D18/4F0/sprockets%2F0dd2285c0874040e463e76b49fc9ee6d +0 -0
- data/spec/dummy/tmp/cache/assets/D1B/080/sprockets%2F8289214205c22b86fd90e7dde88e70dc +0 -0
- data/spec/dummy/tmp/cache/assets/D20/960/sprockets%2F9d81c99fa4b33c3e2f6425593bf6e590 +0 -0
- data/spec/dummy/tmp/cache/assets/D2B/DE0/sprockets%2F80480edba05dbf2a035b05454d57e34c +0 -0
- data/spec/dummy/tmp/cache/assets/D2C/210/sprockets%2F8f316259703dacdd21f83ad05f0ca132 +0 -0
- data/spec/dummy/tmp/cache/assets/D2C/780/sprockets%2Ffe4d215714b72c23b8dd8a5f0020ad09 +0 -0
- data/spec/dummy/tmp/cache/assets/D2F/180/sprockets%2Fbf3b7ed377172b501728a446a107bbcc +0 -0
- data/spec/dummy/tmp/cache/assets/D37/EC0/sprockets%2Fea6cc6410ad20a1c67445f8e860fe444 +0 -0
- data/spec/dummy/tmp/cache/assets/D38/6D0/sprockets%2F7cc91ca26644e7b06438b0bf8e405d0d +0 -0
- data/spec/dummy/tmp/cache/assets/D3B/780/sprockets%2F1e0cf992502bd912aa9a191ec778cc44 +0 -0
- data/spec/dummy/tmp/cache/assets/D3B/930/sprockets%2F0e770ba1bd268256242eaea8c9718e5c +0 -0
- data/spec/dummy/tmp/cache/assets/D3D/D10/sprockets%2F953c3b472be2ede368471137bdc90ae4 +0 -0
- data/spec/dummy/tmp/cache/assets/D3E/500/sprockets%2Fe60a09899ac6c983ddea50151d2ea273 +0 -0
- data/spec/dummy/tmp/cache/assets/D3F/340/sprockets%2Fef74a174d01b6808e4bc5a2ef87721e4 +0 -0
- data/spec/dummy/tmp/cache/assets/D41/930/sprockets%2Fb3d4b6333baf5e867f2b361c5b2c7498 +0 -0
- data/spec/dummy/tmp/cache/assets/D45/A40/sprockets%2Fc60487581ef1accbcc895418c71f2e72 +0 -0
- data/spec/dummy/tmp/cache/assets/D46/090/sprockets%2F0ea2b9f32f6719be92596d7f6033b2ec +0 -0
- data/spec/dummy/tmp/cache/assets/D48/750/sprockets%2F76db9aaecd1148827ed661f924d6f251 +0 -0
- data/spec/dummy/tmp/cache/assets/D4B/990/sprockets%2Fc8702905706ece4f927eb4ae267bf7d4 +0 -0
- data/spec/dummy/tmp/cache/assets/D51/720/sprockets%2F1a0601ba3458aa96131495dc4aca0fbe +0 -0
- data/spec/dummy/tmp/cache/assets/D52/EF0/sprockets%2Ffd5f726a8a0df8287448fa948db1b817 +0 -0
- data/spec/dummy/tmp/cache/assets/D57/4A0/sprockets%2F2f425bc85c002e370adbd8c51c8220eb +0 -0
- data/spec/dummy/tmp/cache/assets/D58/940/sprockets%2F1c3b2ff81dc2a0482d34112f9fb12d2e +0 -0
- data/spec/dummy/tmp/cache/assets/D5B/7F0/sprockets%2F523ea79ecf40a31bd0b6ddb56e334123 +0 -0
- data/spec/dummy/tmp/cache/assets/D5F/210/sprockets%2F41a7b5fa423ac505c66add2b98942c0b +0 -0
- data/spec/dummy/tmp/cache/assets/D62/8F0/sprockets%2F5b6411bf7a3d055f2f07a8bf457a2bd3 +0 -0
- data/spec/dummy/tmp/cache/assets/D63/D20/sprockets%2F008f511a7971c5311f1b8d4fddaad18f +0 -0
- data/spec/dummy/tmp/cache/assets/D65/050/sprockets%2Faaee3ad426e876a0f2219b790191b2ed +0 -0
- data/spec/dummy/tmp/cache/assets/D65/3A0/sprockets%2Fc1ec78a1c30ff75157afa34014f3ef63 +0 -0
- data/spec/dummy/tmp/cache/assets/D69/6A0/sprockets%2F1bf617ff04da082c0eb39b9445d8d3a5 +0 -0
- data/spec/dummy/tmp/cache/assets/D6B/0D0/sprockets%2Fea8a529c947d286a13e5eefe16b12b12 +0 -0
- data/spec/dummy/tmp/cache/assets/D6D/1F0/sprockets%2F11595043cc2f4c29d2fb5cea595e1b9e +0 -0
- data/spec/dummy/tmp/cache/assets/D70/970/sprockets%2Fb21f42ff3dec1446ff32e8f260b18c78 +0 -0
- data/spec/dummy/tmp/cache/assets/D71/FB0/sprockets%2F68433b17ff4eaf61f5048ee06e8cb20e +0 -0
- data/spec/dummy/tmp/cache/assets/D73/060/sprockets%2Fd1df80c17350a4ca8daf86c7599f41f1 +0 -0
- data/spec/dummy/tmp/cache/assets/D74/050/sprockets%2F29efd25b4cdd2d7607b0d477705b8ec6 +0 -0
- data/spec/dummy/tmp/cache/assets/D78/DC0/sprockets%2F3f1950b87fc75fb6f1dbb672e3ed5327 +0 -0
- data/spec/dummy/tmp/cache/assets/D79/710/sprockets%2F0b98cf262e57ae187a6192f29ccad49d +0 -0
- data/spec/dummy/tmp/cache/assets/D7A/5F0/sprockets%2F69fbbb1724da70dc767193677df3c4de +0 -0
- data/spec/dummy/tmp/cache/assets/D7B/7B0/sprockets%2F9df3019edd7238ea05c0d86ae899f3b3 +0 -0
- data/spec/dummy/tmp/cache/assets/D7E/380/sprockets%2F256295ea2de1a85d8aefa6a797c69c90 +0 -0
- data/spec/dummy/tmp/cache/assets/D81/D40/sprockets%2Ff6ffb740a883607444fcc8e9e51c8dc4 +0 -0
- data/spec/dummy/tmp/cache/assets/D82/120/sprockets%2Fcfa458d7fd9975793198ae714e02ecaa +0 -0
- data/spec/dummy/tmp/cache/assets/D86/A60/sprockets%2Fc38e7ef3fd858357b7fc3c2fb8a91564 +0 -0
- data/spec/dummy/tmp/cache/assets/D89/DA0/sprockets%2F8d18248a443fea94a88079efa99bfaf7 +0 -0
- data/spec/dummy/tmp/cache/assets/D8C/770/sprockets%2F7b0fa3005aecf24c6e23af9c5ad02827 +0 -0
- data/spec/dummy/tmp/cache/assets/D93/3D0/sprockets%2Fa5bb4b51d7b5cf47a9d85ccd00904f12 +0 -0
- data/spec/dummy/tmp/cache/assets/D94/420/sprockets%2F2e54f2c67f40ae3b28fdb90c215d3d3c +0 -0
- data/spec/dummy/tmp/cache/assets/D97/890/sprockets%2Fea52bb8869ad0d04f5a91ecabd722239 +0 -0
- data/spec/dummy/tmp/cache/assets/D98/770/sprockets%2Fab39cb17cb0c7ddc46a7e083741d7c28 +0 -0
- data/spec/dummy/tmp/cache/assets/D9A/910/sprockets%2F52be75ddde7b2ffa06af4fd068008091 +0 -0
- data/spec/dummy/tmp/cache/assets/D9E/8D0/sprockets%2F6183b396dba27e5bb64eaa8dce09740e +0 -0
- data/spec/dummy/tmp/cache/assets/DA6/EC0/sprockets%2F2cd5612affe9038f43fb59fa525ae39e +0 -0
- data/spec/dummy/tmp/cache/assets/DA9/610/sprockets%2F070519c5b7c9e2a05ffb7a82e9c69cdf +0 -0
- data/spec/dummy/tmp/cache/assets/DAF/0A0/sprockets%2F81a6c69e615b9f6c0a7870fde9e4ae7a +0 -0
- data/spec/dummy/tmp/cache/assets/DB4/9A0/sprockets%2F152cabc332eafced3e25d12e33a4435e +0 -0
- data/spec/dummy/tmp/cache/assets/DC6/2D0/sprockets%2F7f232a3b35c509bdb0cdd0eee98e3c36 +0 -0
- data/spec/dummy/tmp/cache/assets/DC9/830/sprockets%2Fff60d20f4db56b13e6bad309b96c08fd +0 -0
- data/spec/dummy/tmp/cache/assets/DCF/A70/sprockets%2F5cfadbd4a6878da4c19eb5451225e3ef +0 -0
- data/spec/dummy/tmp/cache/assets/DD3/1E0/sprockets%2Fb2dbcbff454c034f8ecb7528b908c8a8 +0 -0
- data/spec/dummy/tmp/cache/assets/DD3/9E0/sprockets%2F99fee80ec4d119a6cc5a3d90d1bb7d92 +0 -0
- data/spec/dummy/tmp/cache/assets/DD5/F20/sprockets%2F9bcb865783d19929b0eace77ab1ac4ec +0 -0
- data/spec/dummy/tmp/cache/assets/DD9/D20/sprockets%2F774bf932abf9fed1f8d1de4a68b931e0 +0 -0
- data/spec/dummy/tmp/cache/assets/DDA/830/sprockets%2Ff565a73a906a56c2e19ce6dfbf5e61ff +0 -0
- data/spec/dummy/tmp/cache/assets/DDA/F10/sprockets%2Fd8b845f49355b153aedcb6d9a8fc7ca5 +0 -0
- data/spec/dummy/tmp/cache/assets/DDC/5D0/sprockets%2F364253d7cbaf3ad0350ad0cb6a5cbdc0 +0 -0
- data/spec/dummy/tmp/cache/assets/DE4/E20/sprockets%2F2fdc2c653d97cb4f40fed7f45d879da9 +0 -0
- data/spec/dummy/tmp/cache/assets/DF2/880/sprockets%2Fc906bbb19c4a06daf594ab3e286bc3bd +0 -0
- data/spec/dummy/tmp/cache/assets/DF4/0F0/sprockets%2F3421cdee43ff1e0d6cfa27eafa7e2516 +0 -0
- data/spec/dummy/tmp/cache/assets/DF6/410/sprockets%2Fbcdfb6d07d79490cbfb6801aa63cc5c2 +0 -0
- data/spec/dummy/tmp/cache/assets/DFA/2D0/sprockets%2F240cd9ec435b5fa1c59ff1b1a79dae8a +0 -0
- data/spec/dummy/tmp/cache/assets/E02/4E0/sprockets%2Fbfb8eaedf0b359e72db268fe2c4175c4 +0 -0
- data/spec/dummy/tmp/cache/assets/E07/F90/sprockets%2F6fbb6d5990372ef85acc84beceac4b73 +0 -0
- data/spec/dummy/tmp/cache/assets/E0D/470/sprockets%2Faef35e2e6837a1ffa4d5898acc5a8fe4 +0 -0
- data/spec/dummy/tmp/cache/assets/E0F/790/sprockets%2F2f4eb4bda5c5ca56d3340caa5aa82c0b +0 -0
- data/spec/dummy/tmp/cache/assets/E40/950/sprockets%2F7ff1e1ede4ad5d7ef5094b0efd8896cc +0 -0
- data/spec/dummy/tmp/cache/assets/E7B/720/sprockets%2Fbbeda91214d7ec5bd4c2fdb5b5eead02 +0 -0
- data/spec/dummy/tmp/cache/assets/E98/680/sprockets%2F42fd3fbf3bc7ecafb09f7cff81088ded +0 -0
- data/spec/dummy/tmp/cache/assets/EC6/860/sprockets%2F83df86ffb45cdaaea9ba6efbca34d7c9 +0 -0
- data/spec/dummy/tmp/cache/assets/EEC/1E0/sprockets%2Fbfa1aff0059cf17ccf5f27afb6ffbfeb +0 -0
- data/spec/dummy/tmp/cache/sass/301ce5a14d4f5bb39e22a56c42ad3d69df129f35/bootstrap.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_accordion.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_alerts.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_breadcrumbs.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_button-groups.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_buttons.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_carousel.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_close.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_code.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_component-animations.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_dropdowns.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_forms.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_grid.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_hero-unit.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_labels-badges.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_layouts.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_media.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_mixins.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_modals.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_navbar.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_navs.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_pager.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_pagination.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_popovers.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_progress-bars.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_reset.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_scaffolding.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_sprites.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_tables.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_thumbnails.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_tooltip.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_type.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_utilities.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_variables.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/_wells.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/adcfc93268f0014d6a7edb19347218e29709360e/bootstrap.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/e09d521ae3b813be62b26216d68685f8f049a496/admin-styles.sassc +0 -0
- data/spec/dummy/tmp/cache/sass/e09d521ae3b813be62b26216d68685f8f049a496/frontend-styles.sassc +0 -0
- data/spec/factories/compartment_admin_content_blocks.rb +8 -0
- data/spec/factories/content_block.rb +8 -0
- data/spec/factories/page.rb +16 -0
- data/spec/factories/site.rb +13 -0
- data/spec/factories/theme.rb +5 -0
- data/spec/factories/user.rb +6 -0
- data/spec/helpers/pages_helper_spec.rb +126 -0
- data/spec/lib/compartment/config_spec.rb +11 -0
- data/spec/lib/compartment_spec.rb +10 -0
- data/spec/models/compartment/content_block_spec.rb +12 -0
- data/spec/models/compartment/page_spec.rb +39 -0
- data/spec/models/compartment/site_spec.rb +8 -0
- data/spec/models/compartment/theme_spec.rb +53 -0
- data/spec/models/compartment/user_spec.rb +6 -0
- data/spec/spec_helper.rb +50 -0
- metadata +703 -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/spec/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,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,59 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
Bundler.require
|
6
|
+
require "compartment"
|
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
|
+
|
17
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
18
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
19
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
20
|
+
|
21
|
+
# Activate observers that should always be running.
|
22
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
23
|
+
|
24
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
25
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
26
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
27
|
+
|
28
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
29
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
30
|
+
# config.i18n.default_locale = :de
|
31
|
+
|
32
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
33
|
+
config.encoding = "utf-8"
|
34
|
+
|
35
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
36
|
+
config.filter_parameters += [:password]
|
37
|
+
|
38
|
+
# Enable escaping HTML in JSON.
|
39
|
+
config.active_support.escape_html_entities_in_json = true
|
40
|
+
|
41
|
+
# Use SQL instead of Active Record's schema dumper when creating the database.
|
42
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
43
|
+
# like if you have constraints or database-specific column types
|
44
|
+
# config.active_record.schema_format = :sql
|
45
|
+
|
46
|
+
# Enforce whitelist mode for mass assignment.
|
47
|
+
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
48
|
+
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
49
|
+
# parameters by using an attr_accessible or attr_protected declaration.
|
50
|
+
config.active_record.whitelist_attributes = true
|
51
|
+
|
52
|
+
# Enable the asset pipeline
|
53
|
+
config.assets.enabled = true
|
54
|
+
|
55
|
+
# Version of your assets, change this if you want to expire all your assets
|
56
|
+
config.assets.version = '1.0'
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
@@ -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
|