middleman-core 3.0.0.alpha.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +5 -0
- data/bin/middleman +52 -0
- data/features/3rd_party_cli.feature +5 -0
- data/features/asset_host.feature +7 -0
- data/features/auto_layout.feature +36 -0
- data/features/automatic_image_sizes.feature +16 -0
- data/features/builder.feature +50 -0
- data/features/chained_templates.feature +19 -0
- data/features/clean_build.feature +31 -0
- data/features/cli.feature +120 -0
- data/features/content_for.feature +6 -0
- data/features/current_page_request_path_backwards.feature +6 -0
- data/features/custom_layout_engines.feature +8 -0
- data/features/custom_layouts.feature +44 -0
- data/features/data.feature +22 -0
- data/features/directory_index.feature +36 -0
- data/features/dynamic_pages.feature +95 -0
- data/features/feature_params.feature +6 -0
- data/features/former_padrino_helpers.feature +10 -0
- data/features/front-matter.feature +35 -0
- data/features/helpers_auto_javascript_include_tag.feature +27 -0
- data/features/helpers_auto_stylesheet_link_tag.feature +27 -0
- data/features/helpers_external.feature +6 -0
- data/features/helpers_lorem.feature +6 -0
- data/features/helpers_page_classes.feature +17 -0
- data/features/instance_vars.feature +20 -0
- data/features/mount_rack.feature +8 -0
- data/features/nested_layouts.feature +24 -0
- data/features/partials.feature +41 -0
- data/features/preview_changes.feature +18 -0
- data/features/sitemap_traversal.features +73 -0
- data/features/static_server.feature +6 -0
- data/features/step_definitions/page_layout_steps.rb +15 -0
- data/features/support/env.rb +3 -0
- data/features/wildcard_page_helper.feature +19 -0
- data/fixtures/3rd-party-command/config.rb +10 -0
- data/fixtures/asset-host-app/config.rb +6 -0
- data/fixtures/asset-host-app/source/.htaccess +1 -0
- data/fixtures/asset-host-app/source/asset_host.html.erb +1 -0
- data/fixtures/asset-host-app/source/images/blank.gif +0 -0
- data/fixtures/auto-css-app/config.rb +11 -0
- data/fixtures/auto-css-app/source/auto-css.html.erb +1 -0
- data/fixtures/auto-css-app/source/auto-css/auto-css.html.erb +1 -0
- data/fixtures/auto-css-app/source/auto-css/index.html.erb +1 -0
- data/fixtures/auto-css-app/source/auto-css/sub/auto-css.html.erb +1 -0
- data/fixtures/auto-css-app/source/stylesheets/auto-css.css +3 -0
- data/fixtures/auto-css-app/source/stylesheets/auto-css/auto-css.css +3 -0
- data/fixtures/auto-css-app/source/stylesheets/auto-css/index.css +0 -0
- data/fixtures/auto-css-app/source/stylesheets/auto-css/sub/auto-css.css +3 -0
- data/fixtures/auto-js-app/config.rb +11 -0
- data/fixtures/auto-js-app/source/auto-js.html.erb +1 -0
- data/fixtures/auto-js-app/source/auto-js/auto-js.html.erb +1 -0
- data/fixtures/auto-js-app/source/auto-js/index.html.erb +1 -0
- data/fixtures/auto-js-app/source/auto-js/sub/auto-js.html.erb +1 -0
- data/fixtures/auto-js-app/source/javascripts/auto-js.js +1 -0
- data/fixtures/auto-js-app/source/javascripts/auto-js/auto-js.js +1 -0
- data/fixtures/auto-js-app/source/javascripts/auto-js/index.js +1 -0
- data/fixtures/auto-js-app/source/javascripts/auto-js/sub/auto-js.js +1 -0
- data/fixtures/automatic-image-size-app/config.rb +0 -0
- data/fixtures/automatic-image-size-app/source/auto-image-sizes.html.erb +1 -0
- data/fixtures/automatic-image-size-app/source/images/blank.gif +0 -0
- data/fixtures/basic-data-app/config.rb +4 -0
- data/fixtures/basic-data-app/data/test.yml +4 -0
- data/fixtures/basic-data-app/data/test2.json +4 -0
- data/fixtures/basic-data-app/source/data.html.erb +1 -0
- data/fixtures/basic-data-app/source/data3.html.erb +1 -0
- data/fixtures/build-with-errors-app/config.rb +1 -0
- data/fixtures/build-with-errors-app/source/index.html.erb +1 -0
- data/fixtures/chained-app/config.rb +0 -0
- data/fixtures/chained-app/data/article.yml +2 -0
- data/fixtures/chained-app/source/index.html.str.erb +8 -0
- data/fixtures/clean-app/config-complications.rb +11 -0
- data/fixtures/clean-app/config-empty.rb +0 -0
- data/fixtures/clean-app/config.rb +11 -0
- data/fixtures/clean-app/source/index.html.erb +1 -0
- data/fixtures/clean-app/source/layout.erb +9 -0
- data/fixtures/clean-app/source/layouts/custom.erb +8 -0
- data/fixtures/clean-app/source/real.html +1 -0
- data/fixtures/clean-app/source/real/index.html.erb +5 -0
- data/fixtures/clean-app/source/should_be_ignored.html +1 -0
- data/fixtures/clean-app/source/should_be_ignored2.html +1 -0
- data/fixtures/clean-app/source/should_be_ignored3.html +1 -0
- data/fixtures/clean-app/source/static.html +1 -0
- data/fixtures/clean-dir-app/config.rb +1 -0
- data/fixtures/clean-dir-app/source/about.html +1 -0
- data/fixtures/content-for-app/config.rb +3 -0
- data/fixtures/content-for-app/source/content_for_erb.html.erb +5 -0
- data/fixtures/content-for-app/source/layouts/content_for.erb +4 -0
- data/fixtures/current-page-app/config.rb +3 -0
- data/fixtures/current-page-app/source/request-path.html.erb +1 -0
- data/fixtures/custom-layout-app/config.rb +1 -0
- data/fixtures/custom-layout-app/source/index.html.erb +1 -0
- data/fixtures/custom-layout-app/source/layout.str +9 -0
- data/fixtures/custom-layout-app2/config.rb +0 -0
- data/fixtures/custom-layout-app2/source/custom-layout-dir/index.html.erb +1 -0
- data/fixtures/custom-layout-app2/source/custom-layout.html.erb +1 -0
- data/fixtures/custom-layout-app2/source/layouts/custom.erb +8 -0
- data/fixtures/data-app/config.rb +3 -0
- data/fixtures/data-app/data/pages.yml +6 -0
- data/fixtures/data-app/source/index.html.erb +1 -0
- data/fixtures/data-app/source/layout.erb +5 -0
- data/fixtures/different-engine-layout/config.rb +0 -0
- data/fixtures/different-engine-layout/source/index.html.str +1 -0
- data/fixtures/different-engine-layout/source/layout.erb +9 -0
- data/fixtures/different-engine-partial/config.rb +0 -0
- data/fixtures/different-engine-partial/source/index.html.erb +1 -0
- data/fixtures/different-engine-partial/source/layouts/layout.erb +7 -0
- data/fixtures/different-engine-partial/source/shared/_footer.str +1 -0
- data/fixtures/different-engine-partial/source/shared/_header.erb +1 -0
- data/fixtures/dynamic-pages-app/config.rb +29 -0
- data/fixtures/dynamic-pages-app/source/real.html +1 -0
- data/fixtures/dynamic-pages-app/source/real/index.html.erb +5 -0
- data/fixtures/dynamic-pages-app/source/should_be_ignored.html +1 -0
- data/fixtures/dynamic-pages-app/source/should_be_ignored2.html +1 -0
- data/fixtures/dynamic-pages-app/source/should_be_ignored3.html +1 -0
- data/fixtures/dynamic-pages-app/source/should_be_ignored4.html +1 -0
- data/fixtures/dynamic-pages-app/source/should_be_ignored5.html +1 -0
- data/fixtures/dynamic-pages-app/source/should_be_ignored6.html +1 -0
- data/fixtures/dynamic-pages-app/source/should_be_ignored7.html +1 -0
- data/fixtures/dynamic-pages-app/source/should_be_ignored8.html +1 -0
- data/fixtures/empty-app/not-config.rb +0 -0
- data/fixtures/engine-matching-layout/config.rb +0 -0
- data/fixtures/engine-matching-layout/source/index.html.erb +1 -0
- data/fixtures/engine-matching-layout/source/layout.erb +9 -0
- data/fixtures/external-helpers/config.rb +4 -0
- data/fixtures/external-helpers/lib/hello_helper.rb +5 -0
- data/fixtures/external-helpers/source/index.html.erb +1 -0
- data/fixtures/feature-params-app/config.rb +12 -0
- data/fixtures/feature-params-app/source/index.html.erb +3 -0
- data/fixtures/frontmatter-app/config.rb +0 -0
- data/fixtures/frontmatter-app/source/front-matter-2.php.erb +7 -0
- data/fixtures/frontmatter-app/source/front-matter-change.html.erb +5 -0
- data/fixtures/frontmatter-app/source/front-matter.html.erb +6 -0
- data/fixtures/generator-test/config.rb +80 -0
- data/fixtures/generator-test/source/index.html.erb +10 -0
- data/fixtures/glob-app/config.rb +1 -0
- data/fixtures/glob-app/source/index.html.erb +4 -0
- data/fixtures/glob-app/source/stylesheets/site.css.str +3 -0
- data/fixtures/ignore-app/config.rb +2 -0
- data/fixtures/ignore-app/source/articles/template.html.erb +1 -0
- data/fixtures/ignore-app/source/template.html.erb +1 -0
- data/fixtures/indexable-app/config.rb +2 -0
- data/fixtures/indexable-app/source/.htaccess +1 -0
- data/fixtures/indexable-app/source/a_folder/needs_index.html +1 -0
- data/fixtures/indexable-app/source/leave_me_alone.html +1 -0
- data/fixtures/indexable-app/source/needs_index.html +1 -0
- data/fixtures/indexable-app/source/regular/index.html +1 -0
- data/fixtures/instance-vars-app/config.rb +0 -0
- data/fixtures/instance-vars-app/source/_vartial.erb +5 -0
- data/fixtures/instance-vars-app/source/instance-var-set.html.erb +2 -0
- data/fixtures/instance-vars-app/source/layout.erb +3 -0
- data/fixtures/instance-vars-app/source/no-instance-var.html.erb +1 -0
- data/fixtures/large-build-app/config.rb +3 -0
- data/fixtures/large-build-app/source/.htaccess +1 -0
- data/fixtures/large-build-app/source/_partial.erb +1 -0
- data/fixtures/large-build-app/source/images/Child folder/regular_file(example).txt +1 -0
- data/fixtures/large-build-app/source/images/Read me (example).txt +1 -0
- data/fixtures/large-build-app/source/images/blank.gif +0 -0
- data/fixtures/large-build-app/source/index.html.erb +1 -0
- data/fixtures/large-build-app/source/layout.erb +9 -0
- data/fixtures/large-build-app/source/layouts/content_for.erb +4 -0
- data/fixtures/large-build-app/source/layouts/custom.erb +8 -0
- data/fixtures/large-build-app/source/other_layout.erb +1 -0
- data/fixtures/large-build-app/source/services/index.html.erb +1 -0
- data/fixtures/large-build-app/source/spaces in file.html.erb +1 -0
- data/fixtures/large-build-app/source/static.html +1 -0
- data/fixtures/large-build-app/source/stylesheets/static.css +2 -0
- data/fixtures/lorem-app/config.rb +0 -0
- data/fixtures/lorem-app/source/lorem.html.erb +13 -0
- data/fixtures/manual-layout-missing/config.rb +1 -0
- data/fixtures/manual-layout-missing/source/index.html.erb +1 -0
- data/fixtures/manual-layout-override/config.rb +3 -0
- data/fixtures/manual-layout-override/source/index.html.erb +1 -0
- data/fixtures/manual-layout-override/source/layouts/another.erb +9 -0
- data/fixtures/manual-layout-override/source/layouts/custom.erb +9 -0
- data/fixtures/manual-layout/config.rb +1 -0
- data/fixtures/manual-layout/source/index.html.erb +1 -0
- data/fixtures/manual-layout/source/layouts/custom.erb +9 -0
- data/fixtures/multiple-layouts/config.rb +0 -0
- data/fixtures/multiple-layouts/source/index.html.erb +1 -0
- data/fixtures/multiple-layouts/source/layout.erb +9 -0
- data/fixtures/multiple-layouts/source/layout.str +9 -0
- data/fixtures/nested-layout-app/config.rb +1 -0
- data/fixtures/nested-layout-app/source/data-one.html.erb +5 -0
- data/fixtures/nested-layout-app/source/data-two.html.erb +5 -0
- data/fixtures/nested-layout-app/source/index.html.erb +1 -0
- data/fixtures/nested-layout-app/source/layouts/inner.erb +4 -0
- data/fixtures/nested-layout-app/source/layouts/master.erb +3 -0
- data/fixtures/nested-layout-app/source/layouts/outer.erb +4 -0
- data/fixtures/no-layout/config.rb +0 -0
- data/fixtures/no-layout/source/index.html.erb +1 -0
- data/fixtures/padrino-helpers-app/config.rb +0 -0
- data/fixtures/padrino-helpers-app/source/former_padrino_test.html.erb +4 -0
- data/fixtures/page-classes-app/config.rb +4 -0
- data/fixtures/page-classes-app/source/page-classes.html.erb +1 -0
- data/fixtures/page-classes-app/source/sub1/page-classes.html.erb +1 -0
- data/fixtures/page-classes-app/source/sub1/sub2/page-classes.html.erb +1 -0
- data/fixtures/partials-app/config.rb +0 -0
- data/fixtures/partials-app/source/_locals.erb +1 -0
- data/fixtures/partials-app/source/_main.erb +1 -0
- data/fixtures/partials-app/source/_main.str +1 -0
- data/fixtures/partials-app/source/index.html.erb +3 -0
- data/fixtures/partials-app/source/locals.html.erb +1 -0
- data/fixtures/partials-app/source/second.html.str +3 -0
- data/fixtures/partials-app/source/shared/_footer.erb +1 -0
- data/fixtures/partials-app/source/shared/_header.erb +1 -0
- data/fixtures/partials-app/source/sub/_local.erb +1 -0
- data/fixtures/partials-app/source/sub/index.html.erb +3 -0
- data/fixtures/plain-app/index.html +1 -0
- data/fixtures/preview-app/config.rb +0 -0
- data/fixtures/preview-app/source/content.html.erb +1 -0
- data/fixtures/preview-app/source/layout.erb +1 -0
- data/fixtures/sinatra-app/config.rb +11 -0
- data/fixtures/sinatra-app/source/index.html.erb +5 -0
- data/fixtures/traversal-app/config.rb +7 -0
- data/fixtures/traversal-app/source/directory-indexed.html.erb +0 -0
- data/fixtures/traversal-app/source/directory-indexed/sibling.html.erb +3 -0
- data/fixtures/traversal-app/source/directory-indexed/sibling2.html.erb +3 -0
- data/fixtures/traversal-app/source/directory-indexed/sub2/index.html.erb +0 -0
- data/fixtures/traversal-app/source/directory-indexed/sub3/deep.html.erb +0 -0
- data/fixtures/traversal-app/source/index.html.erb +0 -0
- data/fixtures/traversal-app/source/layout.erb +19 -0
- data/fixtures/traversal-app/source/proxied.html.erb +0 -0
- data/fixtures/traversal-app/source/root.html.erb +0 -0
- data/fixtures/traversal-app/source/sub/index.html.erb +0 -0
- data/fixtures/traversal-app/source/sub/sibling.html.erb +0 -0
- data/fixtures/traversal-app/source/sub/sibling2.html.erb +0 -0
- data/fixtures/traversal-app/source/sub/sub2/index.html.erb +0 -0
- data/fixtures/traversal-app/source/sub/sub3/deep.html.erb +0 -0
- data/fixtures/wildcard-app/config.rb +1 -0
- data/fixtures/wildcard-app/source/admin/index.html.erb +1 -0
- data/fixtures/wildcard-app/source/admin/page.html.erb +1 -0
- data/fixtures/wildcard-app/source/index.html.erb +1 -0
- data/fixtures/wildcard-app/source/layouts/admin.erb +2 -0
- data/fixtures/wildcard-app/source/layouts/layout.erb +2 -0
- data/fixtures/wildcard-directory-index-app/config.rb +2 -0
- data/fixtures/wildcard-directory-index-app/source/admin/index.html.erb +1 -0
- data/fixtures/wildcard-directory-index-app/source/admin/page.html.erb +1 -0
- data/fixtures/wildcard-directory-index-app/source/index.html.erb +1 -0
- data/fixtures/wildcard-directory-index-app/source/layouts/admin.erb +2 -0
- data/fixtures/wildcard-directory-index-app/source/layouts/layout.erb +2 -0
- data/lib/middleman-core.rb +259 -0
- data/lib/middleman-core/base.rb +494 -0
- data/lib/middleman-core/cache.rb +57 -0
- data/lib/middleman-core/cli.rb +57 -0
- data/lib/middleman-core/cli/build.rb +229 -0
- data/lib/middleman-core/cli/init.rb +52 -0
- data/lib/middleman-core/cli/server.rb +52 -0
- data/lib/middleman-core/core_extensions/assets.rb +30 -0
- data/lib/middleman-core/core_extensions/builder.rb +49 -0
- data/lib/middleman-core/core_extensions/data.rb +193 -0
- data/lib/middleman-core/core_extensions/default_helpers.rb +119 -0
- data/lib/middleman-core/core_extensions/extensions.rb +148 -0
- data/lib/middleman-core/core_extensions/file_watcher.rb +83 -0
- data/lib/middleman-core/core_extensions/front_matter.rb +145 -0
- data/lib/middleman-core/core_extensions/rendering.rb +247 -0
- data/lib/middleman-core/core_extensions/routing.rb +69 -0
- data/lib/middleman-core/core_extensions/show_exceptions.rb +16 -0
- data/lib/middleman-core/core_extensions/sitemap.rb +72 -0
- data/lib/middleman-core/extensions/asset_host.rb +29 -0
- data/lib/middleman-core/extensions/automatic_image_sizes.rb +38 -0
- data/lib/middleman-core/extensions/automatic_image_sizes/fastimage.rb +287 -0
- data/lib/middleman-core/extensions/directory_indexes.rb +62 -0
- data/lib/middleman-core/extensions/lorem.rb +140 -0
- data/lib/middleman-core/guard.rb +148 -0
- data/lib/middleman-core/renderers/erb.rb +19 -0
- data/lib/middleman-core/sitemap/page.rb +186 -0
- data/lib/middleman-core/sitemap/store.rb +139 -0
- data/lib/middleman-core/sitemap/template.rb +82 -0
- data/lib/middleman-core/step_definitions.rb +12 -0
- data/lib/middleman-core/step_definitions/builder_steps.rb +42 -0
- data/lib/middleman-core/step_definitions/middleman_steps.rb +15 -0
- data/lib/middleman-core/step_definitions/server_steps.rb +73 -0
- data/lib/middleman-core/templates.rb +82 -0
- data/lib/middleman-core/templates/default.rb +29 -0
- data/lib/middleman-core/templates/default/source/images/background.png +0 -0
- data/lib/middleman-core/templates/default/source/images/middleman.png +0 -0
- data/lib/middleman-core/templates/default/source/index.html.erb +10 -0
- data/lib/middleman-core/templates/default/source/javascripts/all.js +1 -0
- data/lib/middleman-core/templates/default/source/layouts/layout.erb +19 -0
- data/lib/middleman-core/templates/default/source/stylesheets/_animate.scss +23 -0
- data/lib/middleman-core/templates/default/source/stylesheets/_normalize.scss +431 -0
- data/lib/middleman-core/templates/default/source/stylesheets/all.css.scss +40 -0
- data/lib/middleman-core/templates/html5.rb +25 -0
- data/lib/middleman-core/templates/html5/source/404.html +38 -0
- data/lib/middleman-core/templates/html5/source/README.md +388 -0
- data/lib/middleman-core/templates/html5/source/apple-touch-icon-114x114-precomposed.png +0 -0
- data/lib/middleman-core/templates/html5/source/apple-touch-icon-57x57-precomposed.png +0 -0
- data/lib/middleman-core/templates/html5/source/apple-touch-icon-72x72-precomposed.png +0 -0
- data/lib/middleman-core/templates/html5/source/apple-touch-icon-precomposed.png +0 -0
- data/lib/middleman-core/templates/html5/source/apple-touch-icon.png +0 -0
- data/lib/middleman-core/templates/html5/source/crossdomain.xml +25 -0
- data/lib/middleman-core/templates/html5/source/css/style.css +293 -0
- data/lib/middleman-core/templates/html5/source/favicon.ico +0 -0
- data/lib/middleman-core/templates/html5/source/humans.txt +43 -0
- data/lib/middleman-core/templates/html5/source/img/.gitignore +2 -0
- data/lib/middleman-core/templates/html5/source/index.html +79 -0
- data/lib/middleman-core/templates/html5/source/js/libs/jquery-1.6.2.js +8981 -0
- data/lib/middleman-core/templates/html5/source/js/libs/jquery-1.6.2.min.js +18 -0
- data/lib/middleman-core/templates/html5/source/js/libs/modernizr-2.0.6.min.js +4 -0
- data/lib/middleman-core/templates/html5/source/js/mylibs/.gitignore +2 -0
- data/lib/middleman-core/templates/html5/source/js/plugins.js +20 -0
- data/lib/middleman-core/templates/html5/source/js/script.js +8 -0
- data/lib/middleman-core/templates/html5/source/robots.txt +5 -0
- data/lib/middleman-core/templates/html5/source/test/index.html +31 -0
- data/lib/middleman-core/templates/html5/source/test/qunit/qunit.css +148 -0
- data/lib/middleman-core/templates/html5/source/test/qunit/qunit.js +1265 -0
- data/lib/middleman-core/templates/html5/source/test/tests.js +24 -0
- data/lib/middleman-core/templates/local.rb +21 -0
- data/lib/middleman-core/templates/mobile.rb +25 -0
- data/lib/middleman-core/templates/mobile/source/404.html +37 -0
- data/lib/middleman-core/templates/mobile/source/README.markdown +21 -0
- data/lib/middleman-core/templates/mobile/source/crossdomain.xml +25 -0
- data/lib/middleman-core/templates/mobile/source/css/style.css +315 -0
- data/lib/middleman-core/templates/mobile/source/humans.txt +43 -0
- data/lib/middleman-core/templates/mobile/source/img/h/apple-touch-icon.png +0 -0
- data/lib/middleman-core/templates/mobile/source/img/h/splash.png +0 -0
- data/lib/middleman-core/templates/mobile/source/img/l/apple-touch-icon-precomposed.png +0 -0
- data/lib/middleman-core/templates/mobile/source/img/l/apple-touch-icon.png +0 -0
- data/lib/middleman-core/templates/mobile/source/img/l/splash.png +0 -0
- data/lib/middleman-core/templates/mobile/source/img/m/apple-touch-icon.png +0 -0
- data/lib/middleman-core/templates/mobile/source/index.html +92 -0
- data/lib/middleman-core/templates/mobile/source/js/libs/modernizr-custom.js +14 -0
- data/lib/middleman-core/templates/mobile/source/js/libs/respond.min.js +7 -0
- data/lib/middleman-core/templates/mobile/source/js/mylibs/helper.js +171 -0
- data/lib/middleman-core/templates/mobile/source/js/plugins.js +20 -0
- data/lib/middleman-core/templates/mobile/source/js/script.js +0 -0
- data/lib/middleman-core/templates/mobile/source/robots.txt +4 -0
- data/lib/middleman-core/templates/mobile/source/sitemap.xml +9 -0
- data/lib/middleman-core/templates/mobile/source/test/index.html +31 -0
- data/lib/middleman-core/templates/mobile/source/test/qunit/qunit.css +148 -0
- data/lib/middleman-core/templates/mobile/source/test/qunit/qunit.js +1265 -0
- data/lib/middleman-core/templates/mobile/source/test/tests.js +21 -0
- data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/Readme.PDF +0 -0
- data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/aspx/aspx1.snippet +31 -0
- data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/aspx/aspx2.snippet +2 -0
- data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/aspx/ga.aspx +195 -0
- data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/aspx/sample.aspx +44 -0
- data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/jsp/ga.jsp +225 -0
- data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/jsp/jsp1.snippet +35 -0
- data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/jsp/jsp2.snippet +2 -0
- data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/jsp/sample.jsp +51 -0
- data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/ga.php +176 -0
- data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/php1.snippet +30 -0
- data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/php2.snippet +4 -0
- data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/php/sample.php +44 -0
- data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/pl/ga.pl +195 -0
- data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/pl/perl1.snippet +27 -0
- data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/pl/perl2.snippet +1 -0
- data/lib/middleman-core/templates/mobile/source/tools/googleanalyticsformobile/pl/sample.pl +38 -0
- data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/COPYING +202 -0
- data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/bookmark_bubble.js +559 -0
- data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/example/example.html +43 -0
- data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/example/example.js +57 -0
- data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/images/arrow.png +0 -0
- data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/images/close.png +0 -0
- data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/images/generate_base64_images +33 -0
- data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/images/icon_calendar.png +0 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/README +27 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/databasefactory.js +45 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/dbworker.js +324 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/dbworker_test.html +393 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/dbworkerstarter.js +32 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/dbwrapper_gears.js +595 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/dbwrapper_gears_test.html +404 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/dbwrapper_html5.js +203 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/dbwrapper_html5_test.html +468 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/dbwrapperapi.js +202 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/dbwrapperapi_test.html +51 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset.js +71 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/gears_resultset_test.html +86 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/gears_transaction.js +196 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/gears_transaction_test.html +221 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/gearsutils.js +94 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/gearsutils_test.html +84 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/global_functions.js +72 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/simplenotes/index.html +347 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/simplenotes/simplenotes.js +503 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/simplenotes/styles.css +66 -0
- data/lib/middleman-core/templates/mobile/source/tools/wspl/simplenotes/template.js +75 -0
- data/lib/middleman-core/templates/shared/Gemfile.tt +3 -0
- data/lib/middleman-core/templates/shared/config.ru +4 -0
- data/lib/middleman-core/templates/shared/config.tt +92 -0
- data/lib/middleman-core/vendor/hooks-0.2.0/CHANGES.textile +9 -0
- data/lib/middleman-core/vendor/hooks-0.2.0/Gemfile +3 -0
- data/lib/middleman-core/vendor/hooks-0.2.0/README.rdoc +107 -0
- data/lib/middleman-core/vendor/hooks-0.2.0/Rakefile +12 -0
- data/lib/middleman-core/vendor/hooks-0.2.0/hooks.gemspec +22 -0
- data/lib/middleman-core/vendor/hooks-0.2.0/lib/hooks.rb +109 -0
- data/lib/middleman-core/vendor/hooks-0.2.0/lib/hooks/inheritable_attribute.rb +33 -0
- data/lib/middleman-core/vendor/hooks-0.2.0/test/hooks_test.rb +141 -0
- data/lib/middleman-core/vendor/hooks-0.2.0/test/inheritable_attribute_test.rb +55 -0
- data/lib/middleman-core/vendor/hooks-0.2.0/test/test_helper.rb +10 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/.document +5 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/.gitignore +22 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/.yardopts +1 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/LICENSE.txt +20 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/README.rdoc +294 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/Rakefile +5 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/bin/padrino +9 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core.rb +167 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/application.rb +270 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/application/rendering.rb +292 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/application/routing.rb +934 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/application/showexceptions.rb +20 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/caller.rb +53 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/cli/adapter.rb +24 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/cli/base.rb +151 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/cli/console.rb +20 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/cli/rake.rb +24 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/cli/rake_tasks.rb +59 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/command.rb +38 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/images/404.png +0 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/images/500.png +0 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/loader.rb +210 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/cs.yml +34 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/da.yml +34 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/de.yml +34 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/en.yml +34 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/es.yml +34 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/fr.yml +34 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/hu.yml +34 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/it.yml +40 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/ja.yml +34 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/lv.yml +34 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/nl.yml +34 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/no.yml +35 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/pl.yml +34 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/pt_br.yml +40 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/ru.yml +35 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/tr.yml +34 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/uk.yml +34 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/zh_cn.yml +34 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/locale/zh_tw.yml +34 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/logger.rb +345 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/mounter.rb +224 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/reloader.rb +254 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/router.rb +98 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/server.rb +79 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/support_lite.rb +200 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/tasks.rb +21 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/lib/padrino-core/version.rb +20 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/padrino-core.gemspec +38 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/apps/.components +6 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/apps/.gitignore +7 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/apps/complex.rb +32 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/apps/simple.rb +33 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/dependencies/a.rb +9 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/dependencies/b.rb +4 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/dependencies/c.rb +1 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/dependencies/circular/e.rb +13 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/dependencies/circular/f.rb +2 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/dependencies/circular/g.rb +2 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/fixtures/dependencies/d.rb +4 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/helper.rb +81 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/mini_shoulda.rb +45 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_application.rb +108 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_core.rb +79 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_dependencies.rb +44 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_filters.rb +278 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_locale.rb +21 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_logger.rb +100 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_mounter.rb +177 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_reloader_complex.rb +75 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_reloader_simple.rb +98 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_rendering.rb +461 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_restful_routing.rb +33 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_router.rb +146 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.5/test/test_routing.rb +1673 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/.document +5 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/.gitignore +21 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/.yardopts +1 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/LICENSE.txt +20 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/README.rdoc +239 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/Rakefile +5 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers.rb +58 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/asset_tag_helpers.rb +420 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/form_builder/abstract_form_builder.rb +220 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/form_builder/standard_form_builder.rb +43 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/form_helpers.rb +602 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/format_helpers.rb +381 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/cs.yml +103 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/da.yml +91 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/de.yml +81 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/en.yml +103 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/es.yml +103 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/fr.yml +80 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/hu.yml +103 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/it.yml +89 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/ja.yml +103 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/lv.yml +103 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/nl.yml +82 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/no.yml +91 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/pl.yml +95 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/pt_br.yml +103 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/ru.yml +103 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/tr.yml +103 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/uk.yml +103 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/zh_cn.yml +104 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/locale/zh_tw.yml +103 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/number_helpers.rb +288 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/output_helpers.rb +175 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/output_helpers/abstract_handler.rb +98 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/output_helpers/erb_handler.rb +79 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/output_helpers/haml_handler.rb +63 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/output_helpers/slim_handler.rb +81 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/render_helpers.rb +60 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/tag_helpers.rb +103 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/lib/padrino-helpers/translation_helpers.rb +38 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/padrino-helpers.gemspec +27 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/app.rb +73 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/capture_concat.erb +14 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/capture_concat.haml +12 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/capture_concat.slim +13 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_for.erb +14 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_for.haml +12 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_for.slim +12 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_tag.erb +11 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_tag.haml +9 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/content_tag.slim +9 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/current_engine.erb +5 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/current_engine.haml +5 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/current_engine.slim +5 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/fields_for.erb +20 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/fields_for.haml +15 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/fields_for.slim +15 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_for.erb +56 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_for.haml +47 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_for.slim +47 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_tag.erb +56 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_tag.haml +45 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/form_tag.slim +45 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/link_to.erb +5 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/link_to.haml +4 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/link_to.slim +4 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/mail_to.erb +3 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/mail_to.haml +3 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/mail_to.slim +3 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/meta_tag.erb +3 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/meta_tag.haml +3 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/meta_tag.slim +3 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/partials/_erb.erb +1 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/partials/_haml.haml +1 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/partials/_slim.slim +1 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/simple_partial.erb +1 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/simple_partial.haml +1 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/markup_app/views/simple_partial.slim +1 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/app.rb +50 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/current_engine.haml +5 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/current_engines/_erb.erb +1 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/current_engines/_haml.haml +1 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/current_engines/_slim.slim +1 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/erb/test.erb +1 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/explicit_engine.haml +5 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/haml/test.haml +1 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/template/_user.haml +7 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/template/haml_template.haml +1 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/fixtures/render_app/views/template/some_template.haml +2 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/helper.rb +66 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/test_asset_tag_helpers.rb +320 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/test_form_builder.rb +996 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/test_form_helpers.rb +645 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/test_format_helpers.rb +227 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/test_locale.rb +20 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/test_number_helpers.rb +136 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/test_output_helpers.rb +153 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/test_render_helpers.rb +76 -0
- data/lib/middleman-core/vendor/padrino-helpers-0.10.5/test/test_tag_helpers.rb +105 -0
- data/lib/middleman-core/version.rb +13 -0
- data/middleman-core.gemspec +41 -0
- metadata +974 -0
@@ -0,0 +1,175 @@
|
|
1
|
+
module Padrino
|
2
|
+
module Helpers
|
3
|
+
###
|
4
|
+
# Helpers related to buffer output for various template engines.
|
5
|
+
#
|
6
|
+
module OutputHelpers
|
7
|
+
|
8
|
+
def self.included(base) # @private
|
9
|
+
base.send(:include, SinatraCurrentEngine) unless base.method_defined?(:current_engine)
|
10
|
+
end
|
11
|
+
|
12
|
+
##
|
13
|
+
# Module used to detect the current engine in vanilla sinatra apps.
|
14
|
+
# @private
|
15
|
+
module SinatraCurrentEngine
|
16
|
+
attr_reader :current_engine
|
17
|
+
|
18
|
+
def render(engine, *) # @private
|
19
|
+
@current_engine, engine_was = engine, @current_engine
|
20
|
+
output = super
|
21
|
+
@current_engine = engine_was
|
22
|
+
output
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
##
|
27
|
+
# Captures the html from a block of template code for any available handler.
|
28
|
+
#
|
29
|
+
# @param [Object] *args
|
30
|
+
# Objects yield to the captured block
|
31
|
+
# @param [Proc] &block
|
32
|
+
# Template code to capture as html
|
33
|
+
#
|
34
|
+
# @return [String] Captured html resulting from the block
|
35
|
+
#
|
36
|
+
# @example
|
37
|
+
# capture_html(&block) => "...html..."
|
38
|
+
# capture_html(object_for_block, &block) => "...html..."
|
39
|
+
#
|
40
|
+
# @api semipublic
|
41
|
+
def capture_html(*args, &block)
|
42
|
+
handler = find_proper_handler
|
43
|
+
captured_html = ""
|
44
|
+
if handler && handler.is_type? && handler.block_is_type?(block)
|
45
|
+
captured_html = handler.capture_from_template(*args, &block)
|
46
|
+
end
|
47
|
+
# invoking the block directly if there was no template
|
48
|
+
captured_html = block_given? && block.call(*args) if captured_html.blank?
|
49
|
+
captured_html
|
50
|
+
end
|
51
|
+
alias :capture :capture_html
|
52
|
+
|
53
|
+
##
|
54
|
+
# Outputs the given text to the templates buffer directly.
|
55
|
+
#
|
56
|
+
# @param [String] text
|
57
|
+
# Text to concatenate to the buffer.
|
58
|
+
#
|
59
|
+
# @example
|
60
|
+
# concat_content("This will be output to the template buffer")
|
61
|
+
#
|
62
|
+
# @api semipublic
|
63
|
+
def concat_content(text="")
|
64
|
+
handler = find_proper_handler
|
65
|
+
if handler && handler.is_type?
|
66
|
+
handler.concat_to_template(text)
|
67
|
+
else # theres no template to concat, return the text directly
|
68
|
+
text
|
69
|
+
end
|
70
|
+
end
|
71
|
+
alias :concat :concat_content
|
72
|
+
|
73
|
+
##
|
74
|
+
# Returns true if the block is from a supported template type; false otherwise.
|
75
|
+
# Used to determine if html should be returned or concatenated to the view.
|
76
|
+
#
|
77
|
+
# @param [Block] block
|
78
|
+
# Determine if this block is a view template.
|
79
|
+
#
|
80
|
+
# @example
|
81
|
+
# block_is_template?(block) => true
|
82
|
+
#
|
83
|
+
# @return [Boolean] True if the block is a template; false otherwise.
|
84
|
+
#
|
85
|
+
# @api semipublic
|
86
|
+
def block_is_template?(block)
|
87
|
+
handler = find_proper_handler
|
88
|
+
block && handler && handler.block_is_type?(block)
|
89
|
+
end
|
90
|
+
|
91
|
+
##
|
92
|
+
# Capture a block or text of content to be rendered at a later time.
|
93
|
+
# Your blocks can also receive values, which are passed to them by <tt>yield_content</tt>
|
94
|
+
#
|
95
|
+
# @overload content_for(key, content)
|
96
|
+
# @param [Symbol] key Name of your key for the content yield.
|
97
|
+
# @param [String] content Text to be stored for this key.
|
98
|
+
# @overload content_for(key, &block)
|
99
|
+
# @param [Symbol] key Name of your key for the content yield.
|
100
|
+
# @param [Proc] block Block to be stored as content for this key.
|
101
|
+
#
|
102
|
+
# @example
|
103
|
+
# content_for(:name) { ...content... }
|
104
|
+
# content_for(:name) { |name| ...content... }
|
105
|
+
# content_for(:name, "I'm Jeff")
|
106
|
+
#
|
107
|
+
# @api public
|
108
|
+
def content_for(key, content = nil, &block)
|
109
|
+
content_blocks[key.to_sym] << (block_given? ? block : Proc.new { content })
|
110
|
+
end
|
111
|
+
|
112
|
+
##
|
113
|
+
# Is there a content block for a given key?
|
114
|
+
#
|
115
|
+
# @param [Symbol] key
|
116
|
+
# Name of content to yield
|
117
|
+
#
|
118
|
+
# @return [TrueClass,FalseClass] Result html for the given +key+
|
119
|
+
#
|
120
|
+
# @example
|
121
|
+
# content_for? :header => true
|
122
|
+
#
|
123
|
+
# @api public
|
124
|
+
def content_for?(key)
|
125
|
+
content_blocks[key.to_sym].present?
|
126
|
+
end
|
127
|
+
|
128
|
+
##
|
129
|
+
# Render the captured content blocks for a given key.
|
130
|
+
# You can also pass values to the content blocks by passing them
|
131
|
+
# as arguments after the key.
|
132
|
+
#
|
133
|
+
# @param [Symbol] key
|
134
|
+
# Name of content to yield
|
135
|
+
# @param *args
|
136
|
+
# Values to pass to the content block
|
137
|
+
#
|
138
|
+
# @return [String] Result html for the given +key+
|
139
|
+
#
|
140
|
+
# @example
|
141
|
+
# yield_content :include
|
142
|
+
# yield_content :head, "param1", "param2"
|
143
|
+
# yield_content(:title) || "My page title"
|
144
|
+
#
|
145
|
+
# @api public
|
146
|
+
def yield_content(key, *args)
|
147
|
+
blocks = content_blocks[key.to_sym]
|
148
|
+
return nil if blocks.empty?
|
149
|
+
blocks.map { |content| capture_html(*args, &content) }.join
|
150
|
+
end
|
151
|
+
|
152
|
+
protected
|
153
|
+
##
|
154
|
+
# Retrieves content_blocks stored by content_for or within yield_content
|
155
|
+
#
|
156
|
+
# @example
|
157
|
+
# content_blocks[:name] => ['...', '...']
|
158
|
+
#
|
159
|
+
def content_blocks
|
160
|
+
@content_blocks ||= Hash.new { |h,k| h[k] = [] }
|
161
|
+
end
|
162
|
+
|
163
|
+
##
|
164
|
+
# Retrieves the template handler for the given output context.
|
165
|
+
# Can handle any output related to capturing or concating in a given template.
|
166
|
+
#
|
167
|
+
# @example
|
168
|
+
# find_proper_handler => <OutputHelpers::HamlHandler>
|
169
|
+
#
|
170
|
+
def find_proper_handler
|
171
|
+
OutputHelpers.handlers.map { |h| h.new(self) }.find { |h| h.engines.include?(current_engine) && h.is_type? }
|
172
|
+
end
|
173
|
+
end # OutputHelpers
|
174
|
+
end # Helpers
|
175
|
+
end # Padrino
|
@@ -0,0 +1,98 @@
|
|
1
|
+
module Padrino
|
2
|
+
module Helpers
|
3
|
+
module OutputHelpers
|
4
|
+
##
|
5
|
+
# Returns the list of all available template handlers
|
6
|
+
#
|
7
|
+
# @example
|
8
|
+
# OutputHelpers.handlers => [<OutputHelpers::HamlHandler>, <OutputHelpers::ErbHandler>]
|
9
|
+
#
|
10
|
+
# @private
|
11
|
+
def self.handlers
|
12
|
+
@_template_handlers ||= []
|
13
|
+
end
|
14
|
+
|
15
|
+
##
|
16
|
+
# Registers a new handler as available to the output helpers
|
17
|
+
#
|
18
|
+
# @example
|
19
|
+
# OutputHelpers.register(OutputHelpers::HamlHandler)
|
20
|
+
#
|
21
|
+
# @private
|
22
|
+
def self.register(handler)
|
23
|
+
handlers << handler
|
24
|
+
end
|
25
|
+
|
26
|
+
# @abstract Extend this to create a template handler
|
27
|
+
class AbstractHandler
|
28
|
+
attr_reader :template
|
29
|
+
|
30
|
+
def initialize(template)
|
31
|
+
@template = template
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# Returns extension of the template
|
36
|
+
#
|
37
|
+
# @example
|
38
|
+
# @handler.template_extension => "erb"
|
39
|
+
#
|
40
|
+
def template_extension
|
41
|
+
caller.find { |c| c =~ /\/views\// }[/\.([\w]*?)\:/, 1] rescue nil
|
42
|
+
# "/some/path/app/views/posts/foo.html.erb:3:in `evaluate_source'"
|
43
|
+
# => "erb"
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Returns an array of engines used for the template
|
48
|
+
#
|
49
|
+
# @example
|
50
|
+
# @handler.engines => [:erb, :erubis]
|
51
|
+
#
|
52
|
+
def engines
|
53
|
+
# Implemented in subclass
|
54
|
+
end
|
55
|
+
|
56
|
+
##
|
57
|
+
# Returns true if the current template type is same as this handlers; false otherwise.
|
58
|
+
#
|
59
|
+
# @example
|
60
|
+
# @handler.is_type? => true
|
61
|
+
#
|
62
|
+
def is_type?
|
63
|
+
# Implemented in subclass
|
64
|
+
end
|
65
|
+
|
66
|
+
##
|
67
|
+
# Returns true if the block given is of the handler's template type; false otherwise.
|
68
|
+
#
|
69
|
+
# @example
|
70
|
+
# @handler.block_is_type?(block) => true
|
71
|
+
#
|
72
|
+
def block_is_type?(block)
|
73
|
+
# Implemented in subclass
|
74
|
+
end
|
75
|
+
|
76
|
+
##
|
77
|
+
# Captures the html from a block of template code for this handler
|
78
|
+
#
|
79
|
+
# @example
|
80
|
+
# @handler.capture_from_template(&block) => "...html..."
|
81
|
+
#
|
82
|
+
def capture_from_template(*args, &block)
|
83
|
+
# Implemented in subclass
|
84
|
+
end
|
85
|
+
|
86
|
+
##
|
87
|
+
# Outputs the given text to the templates buffer directly
|
88
|
+
#
|
89
|
+
# @example
|
90
|
+
# @handler.concat_to_template("This will be output to the template buffer")
|
91
|
+
#
|
92
|
+
def concat_to_template(text="")
|
93
|
+
# Implemented in subclass
|
94
|
+
end
|
95
|
+
end # AbstractHandler
|
96
|
+
end # OutputHelpers
|
97
|
+
end # Helpers
|
98
|
+
end # Padrino
|
@@ -0,0 +1,79 @@
|
|
1
|
+
module Padrino
|
2
|
+
module Helpers
|
3
|
+
module OutputHelpers
|
4
|
+
##
|
5
|
+
# Handler for reading and writing from an erb template.
|
6
|
+
#
|
7
|
+
class ErbHandler < AbstractHandler
|
8
|
+
attr_reader :output_buffer
|
9
|
+
|
10
|
+
def initialize(template)
|
11
|
+
super
|
12
|
+
@output_buffer = template.instance_variable_get(:@_out_buf)
|
13
|
+
end
|
14
|
+
|
15
|
+
##
|
16
|
+
# Returns true if the current template type is same as this handlers; false otherwise.
|
17
|
+
#
|
18
|
+
# @example
|
19
|
+
# @handler.is_type? => true
|
20
|
+
#
|
21
|
+
def is_type?
|
22
|
+
!self.output_buffer.nil?
|
23
|
+
end
|
24
|
+
|
25
|
+
# Captures the html from a block of template code for this handler
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# @handler.capture_from_template(&block) => "...html..."
|
29
|
+
#
|
30
|
+
def capture_from_template(*args, &block)
|
31
|
+
self.output_buffer, _buf_was = "", self.output_buffer
|
32
|
+
block.call(*args)
|
33
|
+
ret = eval("@_out_buf", block.binding)
|
34
|
+
self.output_buffer = _buf_was
|
35
|
+
ret
|
36
|
+
end
|
37
|
+
|
38
|
+
##
|
39
|
+
# Outputs the given text to the templates buffer directly
|
40
|
+
#
|
41
|
+
# @example
|
42
|
+
# @handler.concat_to_template("This will be output to the template buffer")
|
43
|
+
#
|
44
|
+
def concat_to_template(text="")
|
45
|
+
self.output_buffer << text if is_type? && text
|
46
|
+
nil
|
47
|
+
end
|
48
|
+
|
49
|
+
##
|
50
|
+
# Returns true if the block given is of the handler's template type; false otherwise.
|
51
|
+
#
|
52
|
+
# @example
|
53
|
+
# @handler.block_is_type?(block) => true
|
54
|
+
#
|
55
|
+
def block_is_type?(block)
|
56
|
+
is_type? || (block && eval('defined?(__in_erb_template)', block.binding))
|
57
|
+
end
|
58
|
+
|
59
|
+
##
|
60
|
+
# Returns an array of engines used for the template
|
61
|
+
#
|
62
|
+
# @example
|
63
|
+
# @handler.engines => [:erb, :erubis]
|
64
|
+
#
|
65
|
+
def engines
|
66
|
+
@_engines ||= [:erb, :erubis]
|
67
|
+
end
|
68
|
+
|
69
|
+
protected
|
70
|
+
|
71
|
+
def output_buffer=(val)
|
72
|
+
template.instance_variable_set(:@_out_buf, val)
|
73
|
+
end
|
74
|
+
end # ErbHandler
|
75
|
+
|
76
|
+
OutputHelpers.register(ErbHandler)
|
77
|
+
end # OutputHelpers
|
78
|
+
end # Helpers
|
79
|
+
end # Padrino
|
@@ -0,0 +1,63 @@
|
|
1
|
+
module Padrino
|
2
|
+
module Helpers
|
3
|
+
module OutputHelpers
|
4
|
+
##
|
5
|
+
# Handler for reading and writing from a haml template.
|
6
|
+
#
|
7
|
+
class HamlHandler < AbstractHandler
|
8
|
+
##
|
9
|
+
# Returns true if the current template type is same as this handlers; false otherwise.
|
10
|
+
#
|
11
|
+
# @example
|
12
|
+
# @handler.is_type? => true
|
13
|
+
#
|
14
|
+
def is_type?
|
15
|
+
template.respond_to?(:is_haml?) && template.is_haml?
|
16
|
+
end
|
17
|
+
|
18
|
+
##
|
19
|
+
# Returns true if the block given is of the handler's template type; false otherwise.
|
20
|
+
#
|
21
|
+
# @example
|
22
|
+
# @handler.block_is_type?(block) => true
|
23
|
+
#
|
24
|
+
def block_is_type?(block)
|
25
|
+
template.block_is_haml?(block)
|
26
|
+
end
|
27
|
+
|
28
|
+
# Captures the html from a block of template code for this handler
|
29
|
+
#
|
30
|
+
# @example
|
31
|
+
# @handler.capture_from_template(&block) => "...html..."
|
32
|
+
#
|
33
|
+
def capture_from_template(*args, &block)
|
34
|
+
eval("_hamlout ||= @haml_buffer", block.binding) # this is for rbx
|
35
|
+
template.capture_haml(*args, &block)
|
36
|
+
end
|
37
|
+
|
38
|
+
##
|
39
|
+
# Outputs the given text to the templates buffer directly
|
40
|
+
#
|
41
|
+
# @example
|
42
|
+
# @handler.concat_to_template("This will be output to the template buffer")
|
43
|
+
#
|
44
|
+
def concat_to_template(text="")
|
45
|
+
template.haml_concat(text)
|
46
|
+
nil
|
47
|
+
end
|
48
|
+
|
49
|
+
##
|
50
|
+
# Returns an array of engines used for the template
|
51
|
+
#
|
52
|
+
# @example
|
53
|
+
# @handler.engines => [:haml]
|
54
|
+
#
|
55
|
+
def engines
|
56
|
+
@_engines ||= [:haml]
|
57
|
+
end
|
58
|
+
end # HamlHandler
|
59
|
+
|
60
|
+
OutputHelpers.register(HamlHandler)
|
61
|
+
end # OutputHelpers
|
62
|
+
end # Helpers
|
63
|
+
end # Padrino
|
@@ -0,0 +1,81 @@
|
|
1
|
+
# Make slim works with sinatra/padrino
|
2
|
+
Slim::Engine.set_default_options(:buffer => '@_out_buf', :generator => Temple::Generators::StringBuffer) if defined?(Slim)
|
3
|
+
|
4
|
+
module Padrino
|
5
|
+
module Helpers
|
6
|
+
module OutputHelpers
|
7
|
+
##
|
8
|
+
# Handler for reading and writing from a slim template.
|
9
|
+
#
|
10
|
+
class SlimHandler < AbstractHandler
|
11
|
+
attr_reader :output_buffer
|
12
|
+
|
13
|
+
def initialize(template)
|
14
|
+
super
|
15
|
+
@output_buffer = template.instance_variable_get(:@_out_buf)
|
16
|
+
end
|
17
|
+
|
18
|
+
##
|
19
|
+
# Returns true if the current template type is same as this handlers; false otherwise.
|
20
|
+
#
|
21
|
+
# @example
|
22
|
+
# @handler.is_type? => true
|
23
|
+
#
|
24
|
+
def is_type?
|
25
|
+
!self.output_buffer.nil?
|
26
|
+
end
|
27
|
+
|
28
|
+
# Captures the html from a block of template code for this handler
|
29
|
+
#
|
30
|
+
# @example
|
31
|
+
# @handler.capture_from_template(&block) => "...html..."
|
32
|
+
#
|
33
|
+
def capture_from_template(*args, &block)
|
34
|
+
self.output_buffer, _buf_was = "", self.output_buffer
|
35
|
+
block.call(*args)
|
36
|
+
ret = eval("@_out_buf", block.binding)
|
37
|
+
self.output_buffer = _buf_was
|
38
|
+
ret
|
39
|
+
end
|
40
|
+
|
41
|
+
##
|
42
|
+
# Outputs the given text to the templates buffer directly
|
43
|
+
#
|
44
|
+
# @example
|
45
|
+
# @handler.concat_to_template("This will be output to the template buffer")
|
46
|
+
#
|
47
|
+
def concat_to_template(text="")
|
48
|
+
self.output_buffer << text if is_type? && text
|
49
|
+
nil
|
50
|
+
end
|
51
|
+
|
52
|
+
##
|
53
|
+
# Returns true if the block given is of the handler's template type; false otherwise.
|
54
|
+
#
|
55
|
+
# @example
|
56
|
+
# @handler.block_is_type?(block) => true
|
57
|
+
#
|
58
|
+
def block_is_type?(block)
|
59
|
+
is_type? || (block && eval('defined? __in_erb_template', block.binding))
|
60
|
+
end
|
61
|
+
|
62
|
+
##
|
63
|
+
# Returns an array of engines used for the template
|
64
|
+
#
|
65
|
+
# @example
|
66
|
+
# @handler.engines => [:erb, :erubis]
|
67
|
+
#
|
68
|
+
def engines
|
69
|
+
@_engines ||= [:slim]
|
70
|
+
end
|
71
|
+
|
72
|
+
protected
|
73
|
+
def output_buffer=(val)
|
74
|
+
template.instance_variable_set(:@_out_buf, val)
|
75
|
+
end
|
76
|
+
end # SlimHandler
|
77
|
+
|
78
|
+
OutputHelpers.register(SlimHandler)
|
79
|
+
end # OutputHelpers
|
80
|
+
end # Helpers
|
81
|
+
end # Padrino
|