flms 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/README.md +102 -2
- data/app/assets/javascripts/flms/admin.js +1 -1
- data/app/assets/javascripts/flms/{bootstrap.js → admin/bootstrap.js} +0 -0
- data/app/assets/javascripts/flms/{layout.coffee → admin/layout.coffee} +2 -2
- data/app/assets/javascripts/flms/{blocks/index → admin/pages/edit}/block.coffee +0 -0
- data/app/assets/javascripts/flms/{blocks/index → admin/pages/edit}/block_list.coffee +1 -1
- data/app/assets/javascripts/flms/{blocks/index/index.coffee → admin/pages/edit/edit.coffee} +2 -2
- data/app/assets/javascripts/flms/public.js +17 -0
- data/app/assets/stylesheets/flms/admin.css +1 -1
- data/app/assets/stylesheets/flms/{blocks → admin/blocks}/show.sass +0 -0
- data/app/assets/stylesheets/flms/{home.sass → admin/home.sass} +0 -1
- data/app/assets/stylesheets/flms/admin/layers/form.sass +4 -0
- data/app/assets/stylesheets/flms/{layout.sass → admin/layout.sass} +0 -0
- data/app/assets/stylesheets/flms/{login.sass → admin/login.sass} +0 -0
- data/app/assets/stylesheets/flms/{blocks/index.sass → admin/pages/edit.sass} +1 -1
- data/app/assets/stylesheets/flms/public.css +8 -0
- data/app/assets/stylesheets/flms/public/public.sass +52 -0
- data/app/controllers/flms/abstract_layer_controller.rb +45 -0
- data/app/controllers/flms/animation_layers_controller.rb +26 -0
- data/app/controllers/flms/application_controller.rb +13 -0
- data/app/controllers/flms/blocks_controller.rb +20 -22
- data/app/controllers/flms/embed_layers_controller.rb +24 -0
- data/app/controllers/flms/image_layers_controller.rb +6 -54
- data/app/controllers/flms/layers_controller.rb +3 -10
- data/app/controllers/flms/pages_controller.rb +44 -5
- data/app/controllers/flms/paragraph_layers_controller.rb +24 -0
- data/app/controllers/flms/text_layers_controller.rb +24 -0
- data/app/helpers/flms/application_helper.rb +13 -0
- data/app/models/flms/animation_layer.rb +33 -0
- data/app/models/flms/block.rb +17 -1
- data/app/models/flms/blocks_page.rb +3 -0
- data/app/models/flms/embed_layer.rb +12 -0
- data/app/models/flms/end_state_keyframe.rb +17 -0
- data/app/models/flms/image_layer.rb +23 -1
- data/app/models/flms/keyframe.rb +130 -0
- data/app/models/flms/layer.rb +91 -2
- data/app/models/flms/page.rb +14 -2
- data/app/models/flms/paragraph_layer.rb +21 -0
- data/app/models/flms/start_state_keyframe.rb +17 -0
- data/app/models/flms/target_state_keyframe.rb +17 -0
- data/app/models/flms/text_layer.rb +20 -0
- data/app/uploaders/image_uploader.rb +21 -34
- data/app/uploaders/thumbnail_image_uploader.rb +36 -0
- data/app/view_objects/flms/animation_layer_view_object.rb +45 -0
- data/app/view_objects/flms/embed_layer_view_object.rb +15 -0
- data/app/view_objects/flms/image_layer_view_object.rb +22 -0
- data/app/view_objects/flms/keyframe_view_object.rb +92 -0
- data/app/view_objects/flms/layer_view_object.rb +72 -0
- data/app/view_objects/flms/paragraph_layer_view_object.rb +19 -0
- data/app/view_objects/flms/text_layer_view_object.rb +30 -0
- data/app/views/flms/animation_layers/_form.html.haml +56 -0
- data/app/views/flms/animation_layers/edit.html.haml +1 -0
- data/app/views/flms/animation_layers/new.html.haml +1 -0
- data/app/views/flms/blocks/_form.html.haml +32 -18
- data/app/views/flms/blocks/edit.html.haml +61 -2
- data/app/views/flms/blocks/index.html.haml +13 -22
- data/app/views/flms/blocks/show.html.haml +12 -35
- data/app/views/flms/elements/_animation_layer.html.haml +2 -0
- data/app/views/flms/elements/_block.html.haml +3 -0
- data/app/views/flms/elements/_embed_layer.html.haml +2 -0
- data/app/views/flms/elements/_image_layer.html.haml +2 -0
- data/app/views/flms/elements/_page.html.haml +11 -0
- data/app/views/flms/elements/_paragraph_layer.html.haml +4 -0
- data/app/views/flms/elements/_text_layer.html.haml +2 -0
- data/app/views/flms/embed_layers/_form.html.haml +29 -0
- data/app/views/flms/embed_layers/edit.html.haml +2 -0
- data/app/views/flms/embed_layers/new.html.haml +2 -0
- data/app/views/flms/image_layers/_form.html.haml +31 -17
- data/app/views/flms/image_layers/new.html.haml +1 -2
- data/app/views/flms/layers/_common_fields.html.haml +41 -0
- data/app/views/flms/layers/_keyframe_fields.html.haml +127 -0
- data/app/views/flms/pages/_add_block.html.haml +8 -0
- data/app/views/flms/pages/_block_list.html.haml +44 -0
- data/app/views/flms/pages/_form.html.haml +22 -23
- data/app/views/flms/pages/edit.html.haml +4 -3
- data/app/views/flms/pages/index.html.haml +4 -3
- data/app/views/flms/pages/show.html.haml +8 -6
- data/app/views/flms/paragraph_layers/_form.html.haml +41 -0
- data/app/views/flms/paragraph_layers/edit.html.haml +2 -0
- data/app/views/flms/paragraph_layers/new.html.haml +2 -0
- data/app/views/flms/text_layers/_form.html.haml +43 -0
- data/app/views/flms/text_layers/edit.html.haml +2 -0
- data/app/views/flms/text_layers/new.html.haml +2 -0
- data/app/views/layouts/flms/_plain_styling.html.haml +1 -0
- data/app/views/layouts/flms/admin.html.haml +8 -3
- data/app/views/layouts/flms/public.html.haml +13 -0
- data/config/initializers/carrierwave.rb +62 -6
- data/config/initializers/mime_types.rb +3 -0
- data/config/initializers/validators.rb +1 -0
- data/config/routes.rb +13 -5
- data/config/s3.yml.example +14 -0
- data/db/migrate/{20130302011705_create_flms_blocks.rb → 20130302011705_flms_create_blocks.rb} +3 -1
- data/db/migrate/{20130302015459_create_flms_blocks_pages.rb → 20130302015459_flms_create_blocks_pages.rb} +1 -1
- data/db/migrate/20130312220011_flms_create_layers.rb +40 -0
- data/db/migrate/20130327183815_flms_create_keyframes.rb +24 -0
- data/lib/flms/css_name_validator.rb +9 -0
- data/lib/flms/version.rb +1 -1
- data/lib/tasks/flms_tasks.rake +46 -6
- data/spec/controllers/animation_layers_controller_spec.rb +38 -0
- data/spec/controllers/blocks_controller_spec.rb +18 -44
- data/spec/controllers/embed_layers_controller_spec.rb +52 -0
- data/spec/controllers/image_layers_controller_spec.rb +73 -0
- data/spec/controllers/layers_controller_spec.rb +4 -5
- data/spec/controllers/pages_controller_spec.rb +66 -1
- data/spec/controllers/paragraph_layers_controller_spec.rb +53 -0
- data/spec/controllers/text_layers_controller_spec.rb +73 -0
- data/spec/dummy/app/views/home/index.html.haml +1 -1
- data/spec/dummy/config/environments/development.rb +1 -0
- data/spec/dummy/config/environments/production.rb +1 -0
- data/spec/dummy/config/environments/test.rb +1 -0
- data/spec/dummy/config/initializers/flms.rb +1 -0
- data/spec/dummy/config/s3.yml +12 -0
- data/spec/dummy/config/s3.yml.example +12 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +40 -5
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +4376 -0
- data/spec/dummy/log/test.log +131766 -0
- data/spec/dummy/public/uploads/flms/animation_layer/image/1/normal_placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/animation_layer/image/1/placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/animation_layer/image/1/small_placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/animation_layer/image/1/thumb_placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/animation_layer/image/7/normal_placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/animation_layer/image/7/placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/animation_layer/image/7/small_placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/animation_layer/image/7/thumb_placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/block/thumbnail/1/placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/block/thumbnail/1/small_placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/block/thumbnail/1/thumb_placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/image_layer/image/1/normal_placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/image_layer/image/1/placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/image_layer/image/1/small_placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/image_layer/image/1/thumb_placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/image_layer/image/2/normal_placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/image_layer/image/2/placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/image_layer/image/2/small_placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/image_layer/image/2/thumb_placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/image_layer/image/3/normal_placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/image_layer/image/3/placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/image_layer/image/3/small_placeholder.png +0 -0
- data/spec/dummy/public/uploads/flms/image_layer/image/3/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/cache/assets/C4C/010/sprockets%2F74558ebf3d0666286090250c04b945a1 +0 -0
- data/spec/dummy/tmp/cache/assets/C4C/7C0/sprockets%2F829fa8a51f2e2266774e2007d7141414 +0 -0
- data/spec/dummy/tmp/cache/assets/C57/C80/sprockets%2F74f66b30036f872b250553c91f2981d8 +0 -0
- data/spec/dummy/tmp/cache/assets/C59/520/sprockets%2Ff2296184148079d68a35d80635c702fc +0 -0
- data/spec/dummy/tmp/cache/assets/C62/B80/sprockets%2Fe2573350e6996f3f19f06c03687339d2 +0 -0
- data/spec/dummy/tmp/cache/assets/C84/200/sprockets%2F6d5671bc22b630f45761e90488b3a909 +0 -0
- data/spec/dummy/tmp/cache/assets/C86/490/sprockets%2F196ee25088eb975920380e3b5fd22325 +0 -0
- data/spec/dummy/tmp/cache/assets/C86/F40/sprockets%2Fb9924512ef3de6aa72460258706865e2 +0 -0
- data/spec/dummy/tmp/cache/assets/CA7/AB0/sprockets%2F88f069985c1ffca86f6394209656964c +0 -0
- data/spec/dummy/tmp/cache/assets/CA9/AC0/sprockets%2F2f3e0ad16e81532007e094c081594f7e +0 -0
- data/spec/dummy/tmp/cache/assets/CA9/F00/sprockets%2F289543b9c4d5ea08789000ce30a95c00 +0 -0
- data/spec/dummy/tmp/cache/assets/CAB/C80/sprockets%2Fc4e739111d82c7189113aeb228816ba8 +0 -0
- data/spec/dummy/tmp/cache/assets/CB0/330/sprockets%2F228e5f742b01972dc6ce664713264d3c +0 -0
- data/spec/dummy/tmp/cache/assets/CB3/E00/sprockets%2F97a8391a80361fb1870669c06a27ae5c +0 -0
- data/spec/dummy/tmp/cache/assets/CC9/C00/sprockets%2F454c58b0a3b0a0a64fd60bb217197580 +0 -0
- data/spec/dummy/tmp/cache/assets/CD1/8F0/sprockets%2F4032f7a5b2133a8b8f963e12fd6120c5 +0 -0
- data/spec/dummy/tmp/cache/assets/CD7/000/sprockets%2Ff6534fbac7e738c013414d148211bd95 +0 -0
- data/spec/dummy/tmp/cache/assets/CD9/AA0/sprockets%2F80c500e462b3e91b00f48609b56ff91b +0 -0
- data/spec/dummy/tmp/cache/assets/CDB/510/sprockets%2Fd61745a24c4636f8813fa14038bac69a +0 -0
- data/spec/dummy/tmp/cache/assets/CDD/640/sprockets%2F557bde539a95020fd557e11f813242fa +0 -0
- data/spec/dummy/tmp/cache/assets/CDF/200/sprockets%2F9b251cfabb019f79e706200499d623c6 +0 -0
- data/spec/dummy/tmp/cache/assets/CE0/420/sprockets%2F5b3f22c66d8a269533a5689c1be5c800 +0 -0
- data/spec/dummy/tmp/cache/assets/CEE/C10/sprockets%2F39310232adc120c16210bdc84184fdaf +0 -0
- data/spec/dummy/tmp/cache/assets/D02/F10/sprockets%2Fd10499187b5f8d8d85769775d1ecb7c7 +0 -0
- data/spec/dummy/tmp/cache/assets/D07/A50/sprockets%2Fdda362e83c229c06b2bb63686e273d13 +0 -0
- data/spec/dummy/tmp/cache/assets/D09/5C0/sprockets%2F7cd3521c63623eb6f02dbb514991a6f6 +0 -0
- data/spec/dummy/tmp/cache/assets/D09/7C0/sprockets%2F892c677abcf22a046a610427fa29d4b7 +0 -0
- data/spec/dummy/tmp/cache/assets/D0B/0C0/sprockets%2Fb2722b54d89845b9619cadda1a04158c +0 -0
- data/spec/dummy/tmp/cache/assets/D11/9D0/sprockets%2F87436354c263adb7b069d7b3d19ace18 +0 -0
- data/spec/dummy/tmp/cache/assets/D15/6F0/sprockets%2F32e2b26b766ac7fb86d0c7062c976c29 +0 -0
- data/spec/dummy/tmp/cache/assets/D18/9C0/sprockets%2Ff92d239ff629c160ee015e3845a6c9c3 +0 -0
- data/spec/dummy/tmp/cache/assets/D18/DF0/sprockets%2F8d53dfef1f06c56f73026d82f29322a9 +0 -0
- data/spec/dummy/tmp/cache/assets/D19/060/sprockets%2F4be3ef7d038e55cffc27166271638f60 +0 -0
- data/spec/dummy/tmp/cache/assets/D1C/E30/sprockets%2F605ce82d89dce653d672485b9c1c52f1 +0 -0
- data/spec/dummy/tmp/cache/assets/D1E/1D0/sprockets%2Ffeec495723d877b92c74db2055516bc9 +0 -0
- data/spec/dummy/tmp/cache/assets/D22/660/sprockets%2F43f26c23b8ddf974767ca6f67b6530f6 +0 -0
- data/spec/dummy/tmp/cache/assets/D24/E10/sprockets%2Fd9032b251e778acab41d4639b003a1ca +0 -0
- data/spec/dummy/tmp/cache/assets/D25/A70/sprockets%2Fb7d53812242f41eafe2dc223317db30a +0 -0
- data/spec/dummy/tmp/cache/assets/D2D/190/sprockets%2Fcea5d014c171b7a836113bb9b0f9f712 +0 -0
- data/spec/dummy/tmp/cache/assets/D2E/130/sprockets%2F5ebb788f274dd034257c0bc0400fae50 +0 -0
- data/spec/dummy/tmp/cache/assets/D3B/440/sprockets%2Fabe31f236167ba051f6ff849d0a7282f +0 -0
- data/spec/dummy/tmp/cache/assets/D3B/550/sprockets%2Fb61caf9834ac8c31691851ac024f26ef +0 -0
- data/spec/dummy/tmp/cache/assets/D3B/980/sprockets%2Ff0e607eb6489ed61f27a5233cae0172e +0 -0
- data/spec/dummy/tmp/cache/assets/D3B/A90/sprockets%2F3a9f74af10313e521d21dc4d78b4f9b9 +0 -0
- data/spec/dummy/tmp/cache/assets/D46/210/sprockets%2F45a8d49c8edbaf91f38ab1495430384c +0 -0
- data/spec/dummy/tmp/cache/assets/D48/DD0/sprockets%2F75d43fac4136d1bbabf481f977b78637 +0 -0
- data/spec/dummy/tmp/cache/assets/D4A/B40/sprockets%2F509d2dc1350975d781c50dffc58ef53f +0 -0
- data/spec/dummy/tmp/cache/assets/D4B/D10/sprockets%2F76e4e1fa5d891fe2261834cf322f38ef +0 -0
- data/spec/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/tmp/cache/assets/D50/0B0/sprockets%2F6c3a019b7442761786cc7bef8e8e7c6c +0 -0
- data/spec/dummy/tmp/cache/assets/D53/F80/sprockets%2F11d791b713f9b9cf2bb85bd7f6589b84 +0 -0
- data/spec/dummy/tmp/cache/assets/D54/BA0/sprockets%2F89de5abea3b3002f6e73210bb7a3c330 +0 -0
- data/spec/dummy/tmp/cache/assets/D54/DE0/sprockets%2F77af3e306bb966f71f83e90e2a8868db +0 -0
- data/spec/dummy/tmp/cache/assets/D5B/1F0/sprockets%2F4d98e747aa4bb9fc8859f49a45159e1c +0 -0
- data/spec/dummy/tmp/cache/assets/D64/D10/sprockets%2F9857068018fbac51ecd0a7510bcca55e +0 -0
- data/spec/dummy/tmp/cache/assets/D66/8E0/sprockets%2F0cbda18dbb9e414ed0bf1199358e1742 +0 -0
- data/spec/dummy/tmp/cache/assets/D6D/150/sprockets%2Fe84b6e0602e1c5218c9da9d46da4d74b +0 -0
- data/spec/dummy/tmp/cache/assets/D6E/870/sprockets%2F3f77e0b5396013fd145a6fdd21bc9b7f +0 -0
- data/spec/dummy/tmp/cache/assets/D71/2D0/sprockets%2F958685af3478f12a33ffaa5cfa26e0d1 +0 -0
- data/spec/dummy/tmp/cache/assets/D77/D80/sprockets%2F7ad794c63274a9812dfbabc1dae69692 +0 -0
- data/spec/dummy/tmp/cache/assets/D79/DE0/sprockets%2F9e7131d002f39be972e9918bdfbbcc66 +0 -0
- data/spec/dummy/tmp/cache/assets/D7C/3A0/sprockets%2Fec63717067efd6b2daf3423edf70f689 +0 -0
- data/spec/dummy/tmp/cache/assets/D7D/BB0/sprockets%2Fe66f1c4ba6885a4d1de08c3d81f991d9 +0 -0
- data/spec/dummy/tmp/cache/assets/D81/1D0/sprockets%2F9f446f7e8b3c18c6f7b636b71a8ba8d4 +0 -0
- data/spec/dummy/tmp/cache/assets/D81/400/sprockets%2F566656e2cc9e698b1dbbd56d6e2e6b36 +0 -0
- data/spec/dummy/tmp/cache/assets/D8C/DE0/sprockets%2Fb95e7d75de89e1285d0e6ef8d85cb508 +0 -0
- data/spec/dummy/tmp/cache/assets/D91/320/sprockets%2F322e2344c1fc1234ffd9b3142eecaf6f +0 -0
- data/spec/dummy/tmp/cache/assets/D92/9B0/sprockets%2F96f73ad8237fa0a4bb3aa8cbe083551a +0 -0
- data/spec/dummy/tmp/cache/assets/D93/0C0/sprockets%2Fab900c084c9c51c312ee3457cee8cdc2 +0 -0
- data/spec/dummy/tmp/cache/assets/D93/3F0/sprockets%2Fb6aecc2fe36010208fc8c4cc9e04672c +0 -0
- data/spec/dummy/tmp/cache/assets/D97/1B0/sprockets%2Fe0ae6a22a963d0e0819ce6436eb57cae +0 -0
- data/spec/dummy/tmp/cache/assets/D98/FD0/sprockets%2F6f253bd2bf824ac38c69bfe1418a04be +0 -0
- data/spec/dummy/tmp/cache/assets/D99/CF0/sprockets%2F015b5a48fa7906d045fc23db8a60feef +0 -0
- data/spec/dummy/tmp/cache/assets/D9A/820/sprockets%2F594caa19e550457af23ae9fba500a9fe +0 -0
- data/spec/dummy/tmp/cache/assets/D9E/220/sprockets%2Fd129fcf804e89814c2f4abbe0336cba9 +0 -0
- data/spec/dummy/tmp/cache/assets/D9E/8D0/sprockets%2F2ae41880ba1dbb6f570fe0e790678dbf +0 -0
- data/spec/dummy/tmp/cache/assets/D9E/A30/sprockets%2Fc82d9ee0ea1a5360faa296957c2bf17e +0 -0
- data/spec/dummy/tmp/cache/assets/DA0/C20/sprockets%2Fe1a590abeca61529529de36efa97b43e +0 -0
- data/spec/dummy/tmp/cache/assets/DA2/330/sprockets%2F27697dddd23a0913339ccb95dabd7ae7 +0 -0
- data/spec/dummy/tmp/cache/assets/DA3/920/sprockets%2F6c45b9f8e0152c78b3c9be1c2e8be53c +0 -0
- data/spec/dummy/tmp/cache/assets/DA5/3A0/sprockets%2Fa02e5a4a95bb7c92ec5b63f908eff870 +0 -0
- data/spec/dummy/tmp/cache/assets/DA5/BC0/sprockets%2F5b86068a872e5bd841750d6cbd2dfdbf +0 -0
- data/spec/dummy/tmp/cache/assets/DA6/360/sprockets%2F1d7b3df8a061fd27e6a956bfd84a93f1 +0 -0
- data/spec/dummy/tmp/cache/assets/DA6/A10/sprockets%2Fd226de7dc43ae36657be35fb6e31db89 +0 -0
- data/spec/dummy/tmp/cache/assets/DA8/4A0/sprockets%2Ff8ba39d58ace11df624bf7e24c7b5882 +0 -0
- data/spec/dummy/tmp/cache/assets/DA8/C30/sprockets%2Fb7d14d588a70a56d7ddac542eef557d6 +0 -0
- data/spec/dummy/tmp/cache/assets/DAE/680/sprockets%2Fcd28d437e7fc959fe1e328bca40f5e74 +0 -0
- data/spec/dummy/tmp/cache/assets/DB2/1F0/sprockets%2F9fe57997f92efbee3b03df4510a2df57 +0 -0
- data/spec/dummy/tmp/cache/assets/DB8/C30/sprockets%2Fca860af2d10e0c745b6e38b12dabe05f +0 -0
- data/spec/dummy/tmp/cache/assets/DBF/630/sprockets%2F8423ad7ae72b0bc6baeac10405389fdf +0 -0
- data/spec/dummy/tmp/cache/assets/DC1/530/sprockets%2F4db0b289eee7dad03453a5924c20dcfa +0 -0
- data/spec/dummy/tmp/cache/assets/DC2/BA0/sprockets%2Feb1b52f8e6baba5409e0e09c3cc70e45 +0 -0
- data/spec/dummy/tmp/cache/assets/DCF/0B0/sprockets%2F23db7ab96a5549546bbdd0bc2e6ea86f +0 -0
- data/spec/dummy/tmp/cache/assets/DD0/EE0/sprockets%2F4b34c7c215efccbeaf495ee4715734fb +0 -0
- data/spec/dummy/tmp/cache/assets/DD4/990/sprockets%2F8dc6b77dc74dfdf830aa8f19b92c130d +0 -0
- data/spec/dummy/tmp/cache/assets/DD7/FC0/sprockets%2Fdee985ae48773ae9b4fc4dd0b85ce201 +0 -0
- data/spec/dummy/tmp/cache/assets/DD8/DC0/sprockets%2Fcc82f3b4753fc2d729ebbcfec94e3077 +0 -0
- data/spec/dummy/tmp/cache/assets/DD9/170/sprockets%2Fccaea8553317199dc77c526fefdfbb27 +0 -0
- data/spec/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/DEA/350/sprockets%2Ffc836da09a20cdbc0b7b49b2525e1bbe +0 -0
- data/spec/dummy/tmp/cache/assets/DF1/A10/sprockets%2Fa925a815ca0bff4d6f42fbdf0d323a4f +0 -0
- data/spec/dummy/tmp/cache/assets/DF3/820/sprockets%2Fede955e751bbec440cbbfc00473c34ec +0 -0
- data/spec/dummy/tmp/cache/assets/DFC/4B0/sprockets%2F30bac9bffe7e6a5ae42a675f55d1c29a +0 -0
- data/spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/E09/1A0/sprockets%2Fc76bb4e6dbb4f2afc0f09c79a41e988f +0 -0
- data/spec/dummy/tmp/cache/assets/E2D/E20/sprockets%2Fec8c39aa4e1ce3059eeab8f265ead07d +0 -0
- data/spec/dummy/tmp/cache/assets/E2E/010/sprockets%2Fab7b35e5d27eba9893aaef6f2bde1b72 +0 -0
- data/spec/dummy/tmp/cache/assets/E2E/A50/sprockets%2Fc7e5c2d6c06cfc59aabd0f814de69c3c +0 -0
- data/spec/dummy/tmp/cache/assets/E4B/EE0/sprockets%2F06c4dea4fc3cb561b87bd078aab0facc +0 -0
- data/spec/dummy/tmp/cache/assets/E5E/A60/sprockets%2Ff83d84dceff86c25a7bab27cbff33ac0 +0 -0
- data/spec/dummy/tmp/cache/assets/E6D/8B0/sprockets%2F9edfdf7e85cdd1a69b0eb14c6ce8ed19 +0 -0
- data/spec/dummy/tmp/cache/assets/E94/6D0/sprockets%2F3bdb0f5d3a20cbd18bafaaea4ba2a7b2 +0 -0
- data/spec/dummy/tmp/uploads/20130503-1614-5904-3619/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1614-5904-3619/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1614-5904-3619/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1614-5904-3619/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1614-5904-6961/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1614-5904-6961/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1614-5904-6961/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1614-5904-6961/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1614-5904-8166/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1614-5904-8166/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1614-5904-8166/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1614-5904-8166/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1630-6161-2793/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1630-6161-2793/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1630-6161-2793/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1630-6161-2793/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1630-6161-4124/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1630-6161-4124/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1630-6161-4124/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1630-6161-4124/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1630-6161-5065/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1630-6161-5065/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1630-6161-5065/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130503-1630-6161-5065/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1009-4529-0167/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1009-4529-0167/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1009-4529-0167/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1009-4529-0167/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1009-4529-1078/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1009-4529-1078/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1009-4529-1078/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1009-4529-1078/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1009-4529-8277/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1009-4529-8277/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1009-4529-8277/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1009-4529-8277/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1015-4718-5926/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1015-4718-5926/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1015-4718-5926/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1015-4718-5926/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1015-4718-8555/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1015-4718-8555/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1015-4718-8555/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1015-4718-8555/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1015-4718-8970/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1015-4718-8970/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1015-4718-8970/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1015-4718-8970/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1016-4827-2822/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1016-4827-2822/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1016-4827-2822/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1016-4827-2822/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1016-4827-5903/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1016-4827-5903/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1016-4827-5903/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1016-4827-5903/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1016-4827-7236/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1016-4827-7236/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1016-4827-7236/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130506-1016-4827-7236/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-1171/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-1171/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-1171/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-1171/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-1953/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-1953/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-1953/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-1953/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-2097/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-2097/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-2097/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-2097/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-2484/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-2484/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-2484/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-2484/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-2606/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-2606/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-2606/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-2606/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-2640/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-2640/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-2640/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-2640/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-3942/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-3942/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-3942/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-3942/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-3995/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-3995/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-3995/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-3995/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-4465/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-4465/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-4465/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-4465/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-4513/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-4513/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-4513/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-4513/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-4527/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-4527/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-4527/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-4527/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-4926/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-4926/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-4926/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-4926/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-5213/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-5213/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-5213/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-5213/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-5546/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-5546/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-5546/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-5546/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-5678/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-5678/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-5678/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-5678/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-5947/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-5947/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-5947/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-5947/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-6549/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-6549/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-6549/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-6549/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-6797/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-6797/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-6797/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-6797/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-6962/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-6962/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-6962/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-6962/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-6970/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-6970/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-6970/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-6970/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-8091/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-8091/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-8091/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-8091/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-8800/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-8800/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-8800/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-8800/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-8918/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-8918/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-8918/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-8918/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-9407/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-9407/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-9407/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-9407/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-9499/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-9499/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-9499/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-9499/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-9908/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-9908/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-9908/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-9908/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-9932/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-9932/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-9932/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1348-12420-9932/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-0034/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-0034/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-0034/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-0034/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-2633/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-2633/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-2633/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-2633/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-3840/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-3840/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-3840/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-3840/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-4800/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-4800/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-4800/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-4800/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-6878/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-6878/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-6878/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-6878/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-7145/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-7145/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-7145/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-7145/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-7187/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-7187/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-7187/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-7187/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-7499/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-7499/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-7499/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130514-1349-12420-7499/thumb_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130515-1904-24025-2789/normal_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130515-1904-24025-2789/placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130515-1904-24025-2789/small_placeholder.png +0 -0
- data/spec/dummy/tmp/uploads/20130515-1904-24025-2789/thumb_placeholder.png +0 -0
- data/spec/factories/blocks.rb +1 -0
- data/spec/factories/keyframes.rb +8 -0
- data/spec/factories/layer.rb +33 -0
- data/spec/features/blocks/create_spec.rb +8 -5
- data/spec/features/blocks/delete_spec.rb +2 -2
- data/spec/features/blocks/edit_spec.rb +29 -7
- data/spec/features/blocks/index_spec.rb +15 -0
- data/spec/features/blocks/show_spec.rb +19 -5
- data/spec/features/layers/animation_layers/create_spec.rb +27 -0
- data/spec/features/layers/animation_layers/edit_spec.rb +27 -0
- data/spec/features/layers/embed_layers/create_spec.rb +25 -0
- data/spec/features/layers/embed_layers/edit_spec.rb +28 -0
- data/spec/features/layers/image_layers/create_spec.rb +8 -5
- data/spec/features/layers/image_layers/delete_spec.rb +3 -4
- data/spec/features/layers/image_layers/edit_spec.rb +34 -6
- data/spec/features/layers/paragraph_layers/create_spec.rb +27 -0
- data/spec/features/layers/paragraph_layers/edit_spec.rb +31 -0
- data/spec/features/layers/text_layers/create_spec.rb +29 -0
- data/spec/features/layers/text_layers/edit_spec.rb +29 -0
- data/spec/features/logout_spec.rb +12 -0
- data/spec/features/pages/edit_spec.rb +74 -0
- data/spec/features/pages/show_spec.rb +32 -0
- data/spec/models/animation_layer_spec.rb +46 -0
- data/spec/models/block_spec.rb +18 -0
- data/spec/models/embed_layer_spec.rb +21 -0
- data/spec/models/end_state_keyframe_spec.rb +18 -0
- data/spec/models/image_layer_spec.rb +19 -0
- data/spec/models/keyframe_spec.rb +185 -0
- data/spec/models/layer_spec.rb +147 -0
- data/spec/models/page_spec.rb +57 -7
- data/spec/models/paragraph_layer_spec.rb +44 -0
- data/spec/models/start_state_keyframe_spec.rb +18 -0
- data/spec/models/target_state_keyframe_spec.rb +18 -0
- data/spec/models/text_layer_spec.rb +56 -0
- data/spec/placeholder.png +0 -0
- data/spec/spec_helper.rb +4 -1
- data/spec/support/lets.rb +17 -6
- data/spec/validators/css_name_validator_spec.rb +34 -0
- data/spec/view_objects/animation_layer_view_object_spec.rb +77 -0
- data/spec/view_objects/image_layer_view_object_spec.rb +13 -0
- data/spec/view_objects/keyframe_view_object_spec.rb +119 -0
- data/spec/view_objects/layer_view_object_spec.rb +57 -0
- data/spec/view_objects/paragraph_layer_view_object_spec.rb +23 -0
- data/spec/view_objects/text_layer_view_object_spec.rb +33 -0
- data/vendor/assets/javascripts/jquery-1.8.3.min.js +2 -0
- data/vendor/assets/javascripts/jquery.easing.1.3.js +205 -0
- data/vendor/assets/javascripts/jquery.quicksand.js +443 -0
- data/vendor/assets/javascripts/scroll-startstop.events.jquery.js +69 -0
- data/vendor/assets/javascripts/skrollr.ie.min.js +2 -0
- data/vendor/assets/javascripts/skrollr.min.js +2 -0
- data/vendor/assets/javascripts/skrollr.mobile.min.js +2 -0
- metadata +816 -101
- data/app/views/layouts/flms/application.html.erb +0 -14
- data/db/migrate/20130312220011_create_flms_layers.rb +0 -13
- data/db/migrate/20130313002421_add_image_to_layers.rb +0 -5
- data/spec/dummy/tmp/pids/server.pid +0 -1
- data/spec/factories/image_layer.rb +0 -6
- data/spec/features/blocks/activating_blocks_spec.rb +0 -18
data/app/models/flms/layer.rb
CHANGED
@@ -1,7 +1,96 @@
|
|
1
1
|
module Flms
|
2
2
|
class Layer < ActiveRecord::Base
|
3
|
-
attr_accessible :name, :type
|
3
|
+
attr_accessible :name, :type,
|
4
|
+
:width, :height, :z_index,
|
5
|
+
:width_percent, :height_percent,
|
6
|
+
:dom_remove, :active,
|
7
|
+
:start_state_keyframe_attributes, :target_state_keyframe_attributes, :end_state_keyframe_attributes
|
4
8
|
|
5
9
|
belongs_to :block
|
10
|
+
|
11
|
+
has_one :start_state_keyframe, dependent: :destroy
|
12
|
+
has_one :target_state_keyframe, dependent: :destroy
|
13
|
+
has_one :end_state_keyframe, dependent: :destroy
|
14
|
+
accepts_nested_attributes_for :start_state_keyframe, :target_state_keyframe, :end_state_keyframe
|
15
|
+
|
16
|
+
validates_presence_of :start_state_keyframe, :target_state_keyframe, :end_state_keyframe
|
17
|
+
validates :name, :'flms/css_name' => true
|
18
|
+
validates_uniqueness_of :name, scope: :block_id
|
19
|
+
validates_numericality_of :width, greater_than_or_equal_to: 0, allow_nil: true
|
20
|
+
validates_numericality_of :height, greater_than_or_equal_to: 0, allow_nil: true
|
21
|
+
validates_numericality_of :z_index, allow_nil: false
|
22
|
+
|
23
|
+
scope :ordered_by_scroll_start, joins: [ :start_state_keyframe ], order: 'flms_keyframes.scroll_start'
|
24
|
+
scope :is_active, conditions: { active: true }
|
25
|
+
|
26
|
+
before_save :calculate_scroll_starts
|
27
|
+
|
28
|
+
after_initialize :set_defaults
|
29
|
+
|
30
|
+
IMAGE_DISPLAY_MODES = %w(contain cover)
|
31
|
+
|
32
|
+
def view_object
|
33
|
+
@view_object ||= Flms::LayerViewObject.new(self)
|
34
|
+
end
|
35
|
+
|
36
|
+
def build_default_keyframes
|
37
|
+
self.start_state_keyframe ||= build_start_state_keyframe(layer: self)
|
38
|
+
self.target_state_keyframe ||= build_target_state_keyframe(layer: self)
|
39
|
+
self.end_state_keyframe ||= build_end_state_keyframe(layer: self)
|
40
|
+
self
|
41
|
+
end
|
42
|
+
|
43
|
+
def keyframes
|
44
|
+
[ start_state_keyframe, target_state_keyframe, end_state_keyframe ]
|
45
|
+
end
|
46
|
+
|
47
|
+
def scroll_start
|
48
|
+
start_state_keyframe.scroll_start
|
49
|
+
end
|
50
|
+
|
51
|
+
def scroll_end
|
52
|
+
start_state_keyframe.scroll_start +
|
53
|
+
start_state_keyframe.scroll_duration +
|
54
|
+
target_state_keyframe.scroll_duration +
|
55
|
+
end_state_keyframe.scroll_duration
|
56
|
+
end
|
57
|
+
|
58
|
+
def calculate_scroll_starts
|
59
|
+
target_state_keyframe.scroll_start = start_state_keyframe.scroll_start + start_state_keyframe.scroll_duration
|
60
|
+
end_state_keyframe.scroll_start = target_state_keyframe.scroll_start + target_state_keyframe.scroll_duration
|
61
|
+
end
|
62
|
+
|
63
|
+
def width_percent
|
64
|
+
# It's ok for a layer to have an undefined width, so account for that here:
|
65
|
+
self.width ? (self.width * 100).to_i : nil
|
66
|
+
end
|
67
|
+
|
68
|
+
def width_percent= val
|
69
|
+
self.width = val.to_i / 100.0
|
70
|
+
end
|
71
|
+
|
72
|
+
def height_percent
|
73
|
+
# It's ok for a layer to have an undefined height, so account for that here:
|
74
|
+
self.height ? (self.height * 100).to_i : nil
|
75
|
+
end
|
76
|
+
|
77
|
+
def height_percent= val
|
78
|
+
self.height = val.to_i / 100.0
|
79
|
+
end
|
80
|
+
|
81
|
+
protected
|
82
|
+
|
83
|
+
# Set default values for this type of layer. Override this method in subclasses to customize.
|
84
|
+
def set_defaults
|
85
|
+
self.width ||= 0.20
|
86
|
+
self.height ||= 0.20
|
87
|
+
end
|
88
|
+
|
89
|
+
private
|
90
|
+
|
91
|
+
def must_be_css_hex_value
|
92
|
+
self.errors[:color] << 'must be a valid CSS hex color code' unless color =~ /^([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/i
|
93
|
+
end
|
94
|
+
|
6
95
|
end
|
7
|
-
end
|
96
|
+
end
|
data/app/models/flms/page.rb
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
module Flms
|
2
2
|
class Page < ActiveRecord::Base
|
3
|
-
attr_accessible :title, :url
|
3
|
+
attr_accessible :title, :url, :block_ids
|
4
4
|
|
5
5
|
has_many :blocks_pages, dependent: :destroy
|
6
6
|
has_many :blocks, through: :blocks_pages
|
7
|
+
has_many :active_blocks, source: :block, through: :blocks_pages, conditions: ['active = ?', true ], order: 'ordering'
|
7
8
|
|
8
9
|
validates :title, :url, presence: true
|
9
10
|
|
10
11
|
# Returns the blocks_pages of this page, in the right order to display them.
|
11
12
|
def ordered_blocks_pages
|
12
|
-
blocks_pages.
|
13
|
+
blocks_pages.ordered
|
13
14
|
end
|
14
15
|
|
15
16
|
# Returns the BlocksPage object for the given block on this page.
|
@@ -21,5 +22,16 @@ module Flms
|
|
21
22
|
def to_param
|
22
23
|
url
|
23
24
|
end
|
25
|
+
|
26
|
+
# Returns an array containing blocks and associated scroll offsets for display.
|
27
|
+
def blocks_to_display_with_offsets
|
28
|
+
scroll_offset = 0
|
29
|
+
blocks_for_display = []
|
30
|
+
blocks_pages.ordered.is_active.each do |block_page|
|
31
|
+
blocks_for_display << { block: block_page.block, scroll_offset: scroll_offset }
|
32
|
+
scroll_offset += block_page.block.scroll_duration
|
33
|
+
end
|
34
|
+
blocks_for_display
|
35
|
+
end
|
24
36
|
end
|
25
37
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Flms
|
2
|
+
class ParagraphLayer < Layer
|
3
|
+
attr_accessible :header, :body, :color
|
4
|
+
|
5
|
+
validates :header, presence: true
|
6
|
+
validates :body, presence: true
|
7
|
+
validate :color, :must_be_css_hex_value
|
8
|
+
|
9
|
+
def view_object
|
10
|
+
@view_object ||= Flms::ParagraphLayerViewObject.new(self)
|
11
|
+
end
|
12
|
+
|
13
|
+
protected
|
14
|
+
|
15
|
+
def set_defaults
|
16
|
+
self.width ||= 0.20
|
17
|
+
self.color ||= 'fff'
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Flms
|
2
|
+
class StartStateKeyframe < Keyframe
|
3
|
+
after_initialize :set_default_values
|
4
|
+
|
5
|
+
def set_default_values
|
6
|
+
self.scroll_start ||= 0
|
7
|
+
self.scroll_duration ||= 100
|
8
|
+
self.width ||= 1.0
|
9
|
+
self.height ||= 1.0
|
10
|
+
self.position_x ||= 0.5
|
11
|
+
self.position_y ||= 0.5
|
12
|
+
self.opacity ||= 0.0
|
13
|
+
self.scale ||= 1.0
|
14
|
+
self.blur ||= 0.0
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Flms
|
2
|
+
class TargetStateKeyframe < Keyframe
|
3
|
+
after_initialize :set_default_values
|
4
|
+
|
5
|
+
def set_default_values
|
6
|
+
# scroll_start is auto-calculated in layer prior to saving the records
|
7
|
+
self.scroll_duration ||= 100
|
8
|
+
self.width ||= 1.0
|
9
|
+
self.height ||= 1.0
|
10
|
+
self.position_x ||= 0.5
|
11
|
+
self.position_y ||= 0.5
|
12
|
+
self.opacity ||= 1.0
|
13
|
+
self.scale ||= 1.0
|
14
|
+
self.blur ||= 0.0
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Flms
|
2
|
+
class TextLayer < Layer
|
3
|
+
attr_accessible :text, :font_size, :color
|
4
|
+
|
5
|
+
validates :text, presence: true
|
6
|
+
validates_numericality_of :font_size, greater_than_or_equal_to: 0
|
7
|
+
validate :color, :must_be_css_hex_value
|
8
|
+
|
9
|
+
def view_object
|
10
|
+
@view_object ||= Flms::TextLayerViewObject.new(self)
|
11
|
+
end
|
12
|
+
|
13
|
+
protected
|
14
|
+
|
15
|
+
def set_defaults
|
16
|
+
self.color ||= 'fff'
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
@@ -4,59 +4,46 @@ require 'carrierwave/processing/mime_types'
|
|
4
4
|
require 'carrierwave/orm/activerecord'
|
5
5
|
|
6
6
|
class ImageUploader < CarrierWave::Uploader::Base
|
7
|
-
|
8
|
-
# Process MIME types.
|
9
7
|
include CarrierWave::MimeTypes
|
10
8
|
process :set_content_type
|
11
9
|
|
12
|
-
# Include RMagick or MiniMagick support:
|
13
|
-
# include CarrierWave::RMagick
|
14
|
-
# include CarrierWave::MiniMagick
|
15
|
-
|
16
|
-
# Include the Sprockets helpers for Rails 3.1+ asset pipeline compatibility:
|
17
10
|
include Sprockets::Helpers::RailsHelper
|
18
11
|
include Sprockets::Helpers::IsolatedHelper
|
19
12
|
|
20
|
-
#
|
21
|
-
|
22
|
-
|
13
|
+
# include CarrierWave::RMagick
|
14
|
+
include CarrierWave::MiniMagick
|
15
|
+
|
16
|
+
attr_reader :geometry
|
23
17
|
|
24
|
-
# Override the directory where uploaded files will be stored.
|
25
|
-
# This is a sensible default for uploaders that are meant to be mounted:
|
26
18
|
def store_dir
|
27
|
-
"
|
19
|
+
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
|
28
20
|
end
|
29
21
|
|
30
|
-
# Provide a default URL as a default if there hasn't been a file uploaded:
|
31
22
|
def default_url
|
32
|
-
# # For Rails 3.1+ asset pipeline compatibility:
|
33
23
|
asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))
|
34
|
-
#
|
35
|
-
# "/images/fallback/" + [version_name, "default.png"].compact.join('_')
|
36
24
|
end
|
37
25
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
# def scale(width, height)
|
42
|
-
# # do something
|
43
|
-
# end
|
26
|
+
version :normal do
|
27
|
+
process :get_geometry
|
28
|
+
end
|
44
29
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
30
|
+
version :small do
|
31
|
+
process resize_to_fit: [200, 200]
|
32
|
+
end
|
33
|
+
|
34
|
+
version :thumb, from_version: :small do
|
35
|
+
process resize_to_fill: [48, 48]
|
36
|
+
end
|
49
37
|
|
50
|
-
# Add a white list of extensions which are allowed to be uploaded.
|
51
|
-
# For images you might use something like this:
|
52
38
|
def extension_white_list
|
53
39
|
%w(jpg jpeg gif png)
|
54
40
|
end
|
55
41
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
42
|
+
def get_geometry
|
43
|
+
if @file
|
44
|
+
img = ::MiniMagick::Image::read(@file)
|
45
|
+
@geometry = [ img[:width], img[:height] ]
|
46
|
+
end
|
47
|
+
end
|
61
48
|
|
62
49
|
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'carrierwave'
|
3
|
+
require 'carrierwave/processing/mime_types'
|
4
|
+
require 'carrierwave/orm/activerecord'
|
5
|
+
|
6
|
+
class ThumbnailImageUploader < CarrierWave::Uploader::Base
|
7
|
+
include CarrierWave::MimeTypes
|
8
|
+
process :set_content_type
|
9
|
+
|
10
|
+
include Sprockets::Helpers::RailsHelper
|
11
|
+
include Sprockets::Helpers::IsolatedHelper
|
12
|
+
|
13
|
+
# include CarrierWave::RMagick
|
14
|
+
include CarrierWave::MiniMagick
|
15
|
+
|
16
|
+
def store_dir
|
17
|
+
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
|
18
|
+
end
|
19
|
+
|
20
|
+
def default_url
|
21
|
+
asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))
|
22
|
+
end
|
23
|
+
|
24
|
+
version :small do
|
25
|
+
process resize_to_fit: [200, 200]
|
26
|
+
end
|
27
|
+
|
28
|
+
version :thumb, from_version: :small do
|
29
|
+
process resize_to_fill: [48, 48]
|
30
|
+
end
|
31
|
+
|
32
|
+
def extension_white_list
|
33
|
+
%w(jpg jpeg gif png)
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module Flms
|
2
|
+
class AnimationLayerViewObject < Flms::LayerViewObject
|
3
|
+
|
4
|
+
def src
|
5
|
+
@layer.image.url
|
6
|
+
end
|
7
|
+
|
8
|
+
def attributes(scroll_offset = 0)
|
9
|
+
attributes = { id: @layer.name }
|
10
|
+
attributes.merge keyframe_data_hash(scroll_offset)
|
11
|
+
end
|
12
|
+
|
13
|
+
# Define attributes related to animating the sprited image
|
14
|
+
def frames_attributes(scroll_offset = 0)
|
15
|
+
data = { }
|
16
|
+
(0...@layer.frame_count).each do |frame_index|
|
17
|
+
y_offset = -(frame_index * frame_sprite_height)
|
18
|
+
data["data-#{ frame_pixel_start(frame_index, scroll_offset) }"] = "background-position: 0 #{ y_offset }px;"
|
19
|
+
data["data-#{ frame_pixel_end(frame_index, scroll_offset) }"] = "background-position: 0 #{ y_offset }px;"
|
20
|
+
end
|
21
|
+
data[:style] = "width: #{ @layer.image_width }px; height: #{ frame_sprite_height }px;" \
|
22
|
+
"background-image: url(#{ src }); background-size: #{ @layer.image_display_mode };"
|
23
|
+
data
|
24
|
+
end
|
25
|
+
|
26
|
+
# Pixel start of specified frame (frame number is 0..n)
|
27
|
+
def frame_pixel_start(frame, scroll_offset = 0)
|
28
|
+
(scroll_offset + (frame * @layer.frame_rate)).to_i
|
29
|
+
end
|
30
|
+
|
31
|
+
# Pixel end of specified frame (frame number is 0..n)
|
32
|
+
def frame_pixel_end(frame, scroll_offset = 0)
|
33
|
+
(scroll_offset + ((frame + 1) * @layer.frame_rate) - 1).to_i
|
34
|
+
end
|
35
|
+
|
36
|
+
# Calculate the pixel size of a single frame of animation;
|
37
|
+
# since animation sprites contain multiple frames stiched together
|
38
|
+
# vertically, the pixel height will be the image height divided
|
39
|
+
# by the number of frames contained within the sprite.
|
40
|
+
def frame_sprite_height
|
41
|
+
@layer.image_height / @layer.frame_count
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Flms
|
2
|
+
class EmbedLayerViewObject < Flms::LayerViewObject
|
3
|
+
|
4
|
+
def embed_code
|
5
|
+
@layer.embed_code
|
6
|
+
end
|
7
|
+
|
8
|
+
def attributes(scroll_offset = 0)
|
9
|
+
attributes = keyframe_data_hash(scroll_offset)
|
10
|
+
attributes[:id] = @layer.name
|
11
|
+
attributes
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Flms
|
2
|
+
class ImageLayerViewObject < Flms::LayerViewObject
|
3
|
+
|
4
|
+
def src
|
5
|
+
@layer.image.url
|
6
|
+
end
|
7
|
+
|
8
|
+
def inner_attributes
|
9
|
+
{ style: """
|
10
|
+
background-image: url(#{src});
|
11
|
+
background-size: #{@layer.image_display_mode};
|
12
|
+
""" }
|
13
|
+
end
|
14
|
+
|
15
|
+
def attributes(scroll_offset = 0)
|
16
|
+
attributes = keyframe_data_hash(scroll_offset)
|
17
|
+
attributes[:id] = @layer.name
|
18
|
+
attributes
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
module Flms
|
2
|
+
|
3
|
+
# A keyframe presenter encapsulates translation of flms keyframe attributes to the CSS-friendly 'data--...'
|
4
|
+
# attributes used by Skrollr.
|
5
|
+
class KeyframeViewObject
|
6
|
+
|
7
|
+
# All attributes need a formatter function:
|
8
|
+
KEYFRAME_ATTRIBUTE_FORMATTERS = { width: :format_as_percent,
|
9
|
+
height: :format_as_percent,
|
10
|
+
position_x: :format_as_percent,
|
11
|
+
position_y: :format_as_percent,
|
12
|
+
opacity: :format_as_decimal,
|
13
|
+
scale: :format_as_transform,
|
14
|
+
blur: :format_as_filter }
|
15
|
+
|
16
|
+
# If a keyframe attribute on the model is not the same as it's corresponding CSS,
|
17
|
+
# provide translations here:
|
18
|
+
CSS_NAMES_FOR_KEYFRAME_ATTRIBUTES = { position_x: 'left',
|
19
|
+
position_y: 'top' }
|
20
|
+
|
21
|
+
def initialize(keyframe)
|
22
|
+
@keyframe = keyframe
|
23
|
+
end
|
24
|
+
|
25
|
+
# Generate a string of CSS styling for each attribute provided by the keyframe
|
26
|
+
# Available options are:
|
27
|
+
# :width - default 0, affects width and margin-left of layer
|
28
|
+
# :height - default 0, affects height and margin-top of layer
|
29
|
+
# :free_height - if true, will suppress generation of height style
|
30
|
+
# Will add margins using provided values, and pin the layer within the viewport
|
31
|
+
# using width and height.
|
32
|
+
def styles(options = {})
|
33
|
+
options[:width] ||= 0
|
34
|
+
options[:height] ||= 0
|
35
|
+
options[:free_height] ||= false
|
36
|
+
|
37
|
+
attribs = [ :position_x, :position_y,
|
38
|
+
:opacity,
|
39
|
+
:blur ].map { |attribute| style_for_attribute(attribute) }.join ' '
|
40
|
+
attribs += pinning(options[:width],
|
41
|
+
options[:height],
|
42
|
+
options[:free_height])
|
43
|
+
attribs
|
44
|
+
end
|
45
|
+
|
46
|
+
# Generate position styling so that the layer remains fully in the viewport.
|
47
|
+
# (Pinned to top-left if positioned top-left, pinned center if centered, etc.)
|
48
|
+
def pinning(width, height, free_height = false)
|
49
|
+
# (Round calculated values here so we can prevent floating-point errors from
|
50
|
+
# giving us unpredictable results in specs)
|
51
|
+
width_style = "#{ style_for_attribute(:width, (@keyframe.scale * width).round(2)) }; "
|
52
|
+
height_style = free_height ? '' : "#{ style_for_attribute(:height, (@keyframe.scale * height).round(2)) }; "
|
53
|
+
margin_left_style = "margin-left: #{ ((@keyframe.position_x * @keyframe.scale * -width * 100) + @keyframe.margin_left_percent) }%; "
|
54
|
+
margin_top_style = "margin-top: #{ ((@keyframe.position_y * @keyframe.scale * -height * 100) + @keyframe.margin_top_percent) }%;"
|
55
|
+
"#{width_style}#{height_style}#{margin_left_style}#{margin_top_style}"
|
56
|
+
end
|
57
|
+
|
58
|
+
# Generate CSS style string for specified attribute.
|
59
|
+
# Uses value of attribute in associated keyframe, unless override is specified,
|
60
|
+
# in which case will generate style using overridden value.
|
61
|
+
def style_for_attribute(attr, override = nil)
|
62
|
+
value = override || @keyframe.send(attr)
|
63
|
+
name = CSS_NAMES_FOR_KEYFRAME_ATTRIBUTES[attr] || attr.to_s
|
64
|
+
formatter = KEYFRAME_ATTRIBUTE_FORMATTERS[attr]
|
65
|
+
"#{ self.send(formatter, name, value) };"
|
66
|
+
end
|
67
|
+
|
68
|
+
#### Attribute formatters are below; formatters must accept an attribute name (string)
|
69
|
+
#### and value parameter (number or string), and return a string.
|
70
|
+
|
71
|
+
def format_as_decimal(name, value)
|
72
|
+
"#{name}: #{value}"
|
73
|
+
end
|
74
|
+
|
75
|
+
def format_as_percent(name, value)
|
76
|
+
"#{name}: #{value * 100}%"
|
77
|
+
end
|
78
|
+
|
79
|
+
def format_as_px(name, value)
|
80
|
+
"#{name}: #{value}px"
|
81
|
+
end
|
82
|
+
|
83
|
+
def format_as_transform(name, value)
|
84
|
+
"transform: #{name.to_s}(#{value})"
|
85
|
+
end
|
86
|
+
|
87
|
+
def format_as_filter(name, value)
|
88
|
+
"filter: #{name.to_s}(#{value})"
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
end
|