static_blocks 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.md +88 -0
- data/Rakefile +33 -0
- data/app/assets/javascripts/static_blocks/application.js +17 -0
- data/app/assets/javascripts/static_blocks/static_blocks.js +2 -0
- data/app/assets/stylesheets/scaffold.css +56 -0
- data/app/assets/stylesheets/static_blocks/application.css +13 -0
- data/app/assets/stylesheets/static_blocks/static_blocks.css.scss +14 -0
- data/app/controllers/static_blocks/application_controller.rb +24 -0
- data/app/controllers/static_blocks/static_blocks_controller.rb +88 -0
- data/app/helpers/static_blocks/application_helper.rb +4 -0
- data/app/helpers/static_blocks/static_blocks_helper.rb +4 -0
- data/app/models/static_blocks/static_block.rb +16 -0
- data/app/views/layouts/static_blocks/application.html.erb +57 -0
- data/app/views/static_blocks/static_blocks/_form.html.erb +29 -0
- data/app/views/static_blocks/static_blocks/edit.html.erb +4 -0
- data/app/views/static_blocks/static_blocks/index.html.erb +45 -0
- data/app/views/static_blocks/static_blocks/new.html.erb +3 -0
- data/app/views/static_blocks/static_blocks/show.html.erb +23 -0
- data/config/routes.rb +4 -0
- data/db/migrate/20130611042319_create_static_blocks_static_blocks.rb +11 -0
- data/db/migrate/20130612034816_create_static_block_translations.rb +13 -0
- data/lib/generators/install_generator.rb +18 -0
- data/lib/static_blocks/engine.rb +36 -0
- data/lib/static_blocks/helpers.rb +17 -0
- data/lib/static_blocks/version.rb +3 -0
- data/lib/static_blocks.rb +6 -0
- data/lib/tasks/populate.rake +12 -0
- data/lib/tasks/static_blocks_tasks.rake +4 -0
- data/lib/templates/static_blocks_config_template.rb +6 -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/javascripts/info.js +2 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/assets/stylesheets/info.css.scss +3 -0
- data/spec/dummy/app/controllers/application_controller.rb +19 -0
- data/spec/dummy/app/controllers/info_controller.rb +4 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/helpers/info_helper.rb +2 -0
- data/spec/dummy/app/views/info/index.html.erb +16 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -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/static_blocks.rb +6 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/locales/wk.yml +2 -0
- data/spec/dummy/config/routes.rb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20130611042521_create_static_blocks_static_blocks.static_blocks.rb +12 -0
- data/spec/dummy/db/migrate/20130612035223_create_static_block_translations.static_blocks.rb +14 -0
- data/spec/dummy/db/schema.rb +35 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +61872 -0
- data/spec/dummy/log/test.log +9254 -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/769/300/static_block%3A%3Afoo +1 -0
- data/spec/dummy/tmp/cache/assets/C03/2A0/sprockets%2F2c19695a93d05c448f53808347981544 +0 -0
- data/spec/dummy/tmp/cache/assets/C40/7B0/sprockets%2Ff01427a1a9625a41079717e522b48c21 +0 -0
- data/spec/dummy/tmp/cache/assets/C43/A80/sprockets%2F94596a352d4841586b435699f9838f1d +0 -0
- data/spec/dummy/tmp/cache/assets/C4F/B70/sprockets%2Fa7618b479c438355ec218b6a35081361 +0 -0
- data/spec/dummy/tmp/cache/assets/C52/CD0/sprockets%2F05f5bfd8319e875420216370307594be +0 -0
- data/spec/dummy/tmp/cache/assets/C57/300/sprockets%2F2615d11245c762e27f082087638cd8f7 +0 -0
- data/spec/dummy/tmp/cache/assets/C5E/080/sprockets%2F47c55992c35644316a8e0e2c8048b687 +0 -0
- data/spec/dummy/tmp/cache/assets/C71/290/sprockets%2F3e5152a8b0665a620e0c8639a0164c82 +0 -0
- data/spec/dummy/tmp/cache/assets/C7C/C50/sprockets%2Fb278044170d94414368b7ee7b4314e4a +0 -0
- data/spec/dummy/tmp/cache/assets/C80/DF0/sprockets%2F7c8023b375b62805ef332a557207dd96 +0 -0
- data/spec/dummy/tmp/cache/assets/C87/620/sprockets%2F3432446e738294254b2a8edee23c7809 +0 -0
- data/spec/dummy/tmp/cache/assets/C89/C20/sprockets%2F32dcb5437995ed21393476f6a1d51728 +0 -0
- data/spec/dummy/tmp/cache/assets/C90/600/sprockets%2Fd5d3d15976742040862cea796e828c73 +0 -0
- data/spec/dummy/tmp/cache/assets/CB4/CE0/sprockets%2F3299a2e34377c16f310e9289c0cf470e +0 -0
- data/spec/dummy/tmp/cache/assets/CBD/290/sprockets%2F7941ab3c9bc78f426e20c9095a659329 +0 -0
- data/spec/dummy/tmp/cache/assets/CBD/B40/sprockets%2F0a00f98a83686470ee2838ef1c3c8693 +0 -0
- data/spec/dummy/tmp/cache/assets/CBF/090/sprockets%2Fb4576076221ea1abb2ecd081025d3026 +0 -0
- data/spec/dummy/tmp/cache/assets/CC1/5A0/sprockets%2F880ce77a9b28981a952adc78253d1844 +0 -0
- data/spec/dummy/tmp/cache/assets/CC1/ED0/sprockets%2Fa14463bb037619fa57b714120bb5a0c3 +0 -0
- data/spec/dummy/tmp/cache/assets/CC6/C10/sprockets%2F6a82e2cb3e9964325cb937155e92679f +0 -0
- data/spec/dummy/tmp/cache/assets/CCF/850/sprockets%2F3e49a417d9f9c4087090ff7d9c939482 +0 -0
- data/spec/dummy/tmp/cache/assets/CD0/060/sprockets%2F2ea5643654580eb50727bb42fc190c1a +0 -0
- data/spec/dummy/tmp/cache/assets/CD0/C00/sprockets%2Ff581e133147c235d2f003a91f18c4b5d +0 -0
- data/spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/tmp/cache/assets/CDC/C80/sprockets%2F0221b31c67280890e929e5600ddf7fae +0 -0
- data/spec/dummy/tmp/cache/assets/CDF/250/sprockets%2F28111ed79a6721f4d8a870571d74e1ac +0 -0
- data/spec/dummy/tmp/cache/assets/CE0/A80/sprockets%2Fb14006f874599a0d9cd092b64c18cc90 +0 -0
- data/spec/dummy/tmp/cache/assets/CE3/F70/sprockets%2F26eef61af70b3b5416a8fd2928406944 +0 -0
- data/spec/dummy/tmp/cache/assets/CE7/C50/sprockets%2F9fa1970f509ab772a4535f7b0ee42378 +0 -0
- data/spec/dummy/tmp/cache/assets/CF3/A70/sprockets%2F0055fb67d9cf98a6916a16d758f7b632 +0 -0
- data/spec/dummy/tmp/cache/assets/CF5/810/sprockets%2F1e87820b7e288fa1d49739666e5c4ef0 +0 -0
- data/spec/dummy/tmp/cache/assets/CF9/720/sprockets%2F8b948daf6bef57f06c78b66966110458 +0 -0
- data/spec/dummy/tmp/cache/assets/CFA/870/sprockets%2F98e7068f7261e1abe3e9253c9b4779c8 +0 -0
- data/spec/dummy/tmp/cache/assets/CFD/450/sprockets%2F5a1c34baf6a0808107c88ab82a2824e2 +0 -0
- data/spec/dummy/tmp/cache/assets/CFD/9F0/sprockets%2F3327ac0f5086d72b0a712c328cb636fa +0 -0
- data/spec/dummy/tmp/cache/assets/D00/080/sprockets%2F8e09f98d6161aedd5169d33cf3699686 +0 -0
- data/spec/dummy/tmp/cache/assets/D07/100/sprockets%2F64ee117ce583fa61da15d35315a576d1 +0 -0
- data/spec/dummy/tmp/cache/assets/D0B/D70/sprockets%2F552e4c8c329a24dc0b0046eac37e5959 +0 -0
- data/spec/dummy/tmp/cache/assets/D0D/840/sprockets%2F50e9139381224f7c9baaf6caf404b394 +0 -0
- data/spec/dummy/tmp/cache/assets/D11/9D0/sprockets%2F0bd4e6571b02cf9b6b48316e7b72e791 +0 -0
- data/spec/dummy/tmp/cache/assets/D18/860/sprockets%2F540c2f958fef569f4a7539c070a6a2e1 +0 -0
- data/spec/dummy/tmp/cache/assets/D1A/DF0/sprockets%2F1e85f1a823c6ac486d80965fdc349e14 +0 -0
- data/spec/dummy/tmp/cache/assets/D1F/D80/sprockets%2F7438f09ddf022f97525c3eb448f65f3c +0 -0
- data/spec/dummy/tmp/cache/assets/D2B/CD0/sprockets%2F76f9b9eefb641d7657a46237287c8df1 +0 -0
- data/spec/dummy/tmp/cache/assets/D2F/730/sprockets%2Fcb562b326045b0e0c8ec50f5d82a92f1 +0 -0
- data/spec/dummy/tmp/cache/assets/D2F/950/sprockets%2F563c7c80a43c918ab182fbb055ca0d09 +0 -0
- data/spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/D34/970/sprockets%2F7085373a4d1111c33ca8b8986e0cacec +0 -0
- data/spec/dummy/tmp/cache/assets/D37/640/sprockets%2Faf7183c34069b6d8baf5041d26ff05c1 +0 -0
- data/spec/dummy/tmp/cache/assets/D38/CA0/sprockets%2Fb2f67c43ed95cdec381201a1591a5e73 +0 -0
- data/spec/dummy/tmp/cache/assets/D3E/630/sprockets%2Fcdb19b1bced9374f844f54376dc43103 +0 -0
- data/spec/dummy/tmp/cache/assets/D42/2F0/sprockets%2F77e311e8847d2d5c5254bc51cd2cf8e2 +0 -0
- data/spec/dummy/tmp/cache/assets/D44/4C0/sprockets%2F009e4d29a2d937679015a0ddceda89c7 +0 -0
- data/spec/dummy/tmp/cache/assets/D46/A90/sprockets%2Fe349870cbccfd6637c4739c04c45af34 +0 -0
- data/spec/dummy/tmp/cache/assets/D49/A90/sprockets%2Fc7da9c3c9df8e05520c74c53639a845c +0 -0
- data/spec/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/tmp/cache/assets/D50/470/sprockets%2F2bc1690c65d8ffbff84b58e810e63693 +0 -0
- data/spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/D5C/3F0/sprockets%2F10bb094cd44ab73b2e31c49618ee7b1b +0 -0
- data/spec/dummy/tmp/cache/assets/D5C/6C0/sprockets%2F1ad1dff23bbf7320d2d7fda364555105 +0 -0
- data/spec/dummy/tmp/cache/assets/D5C/820/sprockets%2F696c617f9a6df357683eaa0589d95afd +0 -0
- data/spec/dummy/tmp/cache/assets/D62/F80/sprockets%2F16a0314243f7d9efc8fbac12224c74fb +0 -0
- data/spec/dummy/tmp/cache/assets/D68/BA0/sprockets%2Ff8283b87e207eb7103ae2ac8df2084bb +0 -0
- data/spec/dummy/tmp/cache/assets/D6A/D90/sprockets%2Fd425f2ec9668522e6ab25db50e7a2d4b +0 -0
- data/spec/dummy/tmp/cache/assets/D6B/5F0/sprockets%2F5e5a089ff23e4b1b5e7071c0b66ff41d +0 -0
- data/spec/dummy/tmp/cache/assets/D6D/E40/sprockets%2F96988fa2bc8e98bcf908f897cd4f3582 +0 -0
- data/spec/dummy/tmp/cache/assets/D7A/BA0/sprockets%2F7fe8ec92b30b7e2f688c3a91157c5eb3 +0 -0
- data/spec/dummy/tmp/cache/assets/D7B/610/sprockets%2Fd93cd9e659b56810ef3ef1fc4052d93b +0 -0
- data/spec/dummy/tmp/cache/assets/D80/010/sprockets%2F441ea8159f4442e7dbf499d93faff51c +0 -0
- data/spec/dummy/tmp/cache/assets/D83/090/sprockets%2Fa40a252a6e2b0ff86dace14bc38230c4 +0 -0
- data/spec/dummy/tmp/cache/assets/D8B/660/sprockets%2F82f06d4bae338af323d10ca53c23e5de +0 -0
- data/spec/dummy/tmp/cache/assets/D8C/960/sprockets%2F8c261eb90a4ec2f023bde5d31f628a2a +0 -0
- data/spec/dummy/tmp/cache/assets/D96/D10/sprockets%2F7bd1f5ab50fa7984dc3d13841c800ebe +0 -0
- data/spec/dummy/tmp/cache/assets/D98/2B0/sprockets%2F5fc3f1cbdd2724729e1ec9538a3acd12 +0 -0
- data/spec/dummy/tmp/cache/assets/D99/370/sprockets%2Fc28be70a409478b91da2ead47ba493bd +0 -0
- data/spec/dummy/tmp/cache/assets/D9A/7C0/sprockets%2F96f90c2cec66ba0dfcb37b7412e2e912 +0 -0
- data/spec/dummy/tmp/cache/assets/D9A/DB0/sprockets%2Fdb4ec6a8fd5fd625823e014e790a00df +0 -0
- data/spec/dummy/tmp/cache/assets/DA0/EE0/sprockets%2F4ecacd17cd6b98f67eb104181a841f7d +0 -0
- data/spec/dummy/tmp/cache/assets/DA1/C30/sprockets%2F679ced082eeb1816e41b2e07c6bae69c +0 -0
- data/spec/dummy/tmp/cache/assets/DA1/F20/sprockets%2F7e3ba0288726eccaf28beab45d695a91 +0 -0
- data/spec/dummy/tmp/cache/assets/DA2/820/sprockets%2F9f81de74a49c9eaf25ad2de0d51c7801 +0 -0
- data/spec/dummy/tmp/cache/assets/DA9/720/sprockets%2F48daf0816368157bfaeecdc8d6a39f25 +0 -0
- data/spec/dummy/tmp/cache/assets/DC9/A10/sprockets%2F160de89fafbd05b8cc47310780cf4ace +0 -0
- data/spec/dummy/tmp/cache/assets/DCF/A40/sprockets%2F554e10f5ef3e3c90b2de3ae0f5c886bf +0 -0
- data/spec/dummy/tmp/cache/assets/DDA/FB0/sprockets%2F92b4d4f3bc269e36e67f43ed8eb0db5f +0 -0
- data/spec/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/DDF/B10/sprockets%2Fbfb4fe5872d9482cab1f83ee74a499bc +0 -0
- data/spec/dummy/tmp/cache/assets/DF5/F30/sprockets%2F2a719aa2678fbbc921b4dca98b21cdfb +0 -0
- data/spec/dummy/tmp/cache/assets/DFE/2A0/sprockets%2Fa874cd00fc9abeb66d68908bbf2ee22b +0 -0
- data/spec/dummy/tmp/cache/assets/E00/BC0/sprockets%2F5fb79fd146d829debfd0306daabe1d74 +0 -0
- data/spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/E29/330/sprockets%2F37aa8f7e3db4c960ac2bce349e5bc1ce +0 -0
- data/spec/dummy/tmp/cache/assets/E2A/1C0/sprockets%2Ffae6441e70ce48653dc6fdefcadc01d3 +0 -0
- data/spec/dummy/tmp/cache/assets/E3D/850/sprockets%2Fdf71e8b2fb6eeb586657c8b936afaaeb +0 -0
- data/spec/dummy/tmp/cache/assets/E58/B30/sprockets%2F9fe3bb87890ca35d6acfaa0ad1fd5eb3 +0 -0
- data/spec/dummy/tmp/cache/assets/E6A/D70/sprockets%2F3d7b9d065fb3bee3fbff2d58eeb4a89c +0 -0
- data/spec/dummy/tmp/cache/assets/E7E/730/sprockets%2Fabdedbedfdddeb4ae08e143d1026557a +0 -0
- data/spec/dummy/tmp/cache/assets/E8B/4D0/sprockets%2Fedb0cb7f93abec7e5f5bf1ade2490be6 +0 -0
- data/spec/dummy/tmp/cache/assets/EB3/7B0/sprockets%2F51dabbc2ed9b98e08dc4bf5aba5aad6d +0 -0
- data/spec/dummy/tmp/cache/sass/4f0ce0b83bd09d93536268da405600ef1b98018d/bootstrap.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/539156597b6c6280022503b5a967d95c6f1abc4c/static_blocks.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/956b3763d4c52184978e8e3b49a9eb5d80253bf7/bootstrap.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_accordion.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_alerts.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_breadcrumbs.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_button-groups.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_buttons.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_carousel.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_close.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_code.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_component-animations.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_dropdowns.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_forms.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_grid.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_hero-unit.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_labels-badges.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_layouts.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_media.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_mixins.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_modals.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_navbar.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_navs.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_pager.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_pagination.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_popovers.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_progress-bars.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_reset.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_scaffolding.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_sprites.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_tables.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_thumbnails.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_tooltip.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_type.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_utilities.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_variables.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/_wells.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a65a94b6445e42c04c4572af485c41f8c586032f/bootstrap.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c406acb89bd590cc76375f46baeadeb0ce5cba8e/info.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_accordion.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_alerts.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_breadcrumbs.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_button-groups.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_buttons.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_carousel.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_close.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_code.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_component-animations.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_dropdowns.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_forms.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_grid.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_hero-unit.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_labels-badges.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_layouts.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_media.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_mixins.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_modals.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_navbar.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_navs.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_pager.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_pagination.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_popovers.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_progress-bars.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_reset.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_scaffolding.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_sprites.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_tables.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_thumbnails.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_tooltip.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_type.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_utilities.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_variables.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/_wells.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cec3b0e976607689afac1fc85095e1fdcb40263a/bootstrap.scssc +0 -0
- data/spec/dummy/tmp/capybara/capybara-201306231456094410600944.html +73 -0
- data/spec/dummy/tmp/capybara/capybara-20130623151435523273444.html +73 -0
- data/spec/helpers/static_blocks_helper_spec.rb +13 -0
- data/spec/integration/static_blocks_spec.rb +68 -0
- data/spec/models/static_block_spec.rb +13 -0
- data/spec/spec_helper.rb +14 -0
- data/spec/support/capybara.rb +8 -0
- metadata +762 -0
@@ -0,0 +1,12 @@
|
|
1
|
+
namespace :db do
|
2
|
+
desc "Fill database"
|
3
|
+
task :populate => :environment do
|
4
|
+
require 'populator'
|
5
|
+
StaticBlocks::StaticBlock.populate 20 do |sb|
|
6
|
+
sb.title = Populator.words(1..3).titleize
|
7
|
+
sb.content = Populator.sentences(1..10)
|
8
|
+
sb.status = ['draft', 'published']
|
9
|
+
sb.created_at = 2.years.from_now..Time.now
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -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
|
+
| |-- assets
|
177
|
+
| `-- tasks
|
178
|
+
|-- log
|
179
|
+
|-- public
|
180
|
+
|-- script
|
181
|
+
|-- test
|
182
|
+
| |-- fixtures
|
183
|
+
| |-- functional
|
184
|
+
| |-- integration
|
185
|
+
| |-- performance
|
186
|
+
| `-- unit
|
187
|
+
|-- tmp
|
188
|
+
| `-- cache
|
189
|
+
| `-- assets
|
190
|
+
`-- vendor
|
191
|
+
|-- assets
|
192
|
+
| |-- javascripts
|
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,19 @@
|
|
1
|
+
class ApplicationController < ActionController::Base
|
2
|
+
protect_from_forgery
|
3
|
+
|
4
|
+
before_filter :set_locale
|
5
|
+
|
6
|
+
private
|
7
|
+
|
8
|
+
def set_locale
|
9
|
+
I18n.locale = params[:locale] if params[:locale].present?
|
10
|
+
# current_user.locale
|
11
|
+
# request.subdomain
|
12
|
+
# request.env["HTTP_ACCEPT_LANGUAGE"]
|
13
|
+
# request.remote_ip
|
14
|
+
end
|
15
|
+
|
16
|
+
def default_url_options(options = {})
|
17
|
+
{locale: I18n.locale}
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<h1>Dummy app Info#index</h1>
|
2
|
+
|
3
|
+
<div id="locale">
|
4
|
+
Language
|
5
|
+
|
6
|
+
<%= link_to_unless_current "English", locale: "en" %> |
|
7
|
+
<%= link_to_unless_current "Wookieespeak", locale: "wk" %>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<div>
|
11
|
+
<%=raw static_block_for('foo') %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div>
|
15
|
+
<%= t :hello %>
|
16
|
+
</div>
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
Bundler.require(*Rails.groups)
|
6
|
+
require "static_blocks"
|
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
|
@@ -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 nil and saved in location specified by config.assets.prefix
|
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
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|