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
data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/example/example.html
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
2
|
+
"http://www.w3.org/TR/html4/strict.dtd">
|
3
|
+
|
4
|
+
<!--
|
5
|
+
Copyright 2010 Google Inc.
|
6
|
+
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
you may not use this file except in compliance with the License.
|
9
|
+
You may obtain a copy of the License at
|
10
|
+
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
See the License for the specific language governing permissions and
|
17
|
+
limitations under the License.
|
18
|
+
-->
|
19
|
+
|
20
|
+
<html>
|
21
|
+
<head>
|
22
|
+
<title>Sample</title>
|
23
|
+
<meta name="viewport"
|
24
|
+
content="width=device-width,minimum-scale=1.0,maximum-scale=1.0" />
|
25
|
+
<meta name="apple-mobile-web-app-capable" content="yes" />
|
26
|
+
<link rel="apple-touch-icon-precomposed" href="../images/icon_calendar.png" />
|
27
|
+
<script type="text/javascript" src="../bookmark_bubble.js"></script>
|
28
|
+
<script type="text/javascript" src="example.js"></script>
|
29
|
+
</head>
|
30
|
+
<body style="height: 3000px;">
|
31
|
+
<p>The bookmark bubble will show after a second, if:</p>
|
32
|
+
<ul>
|
33
|
+
<li>It has not been previously dismissed too often</li>
|
34
|
+
<li>The application is not running in full screen mode</li>
|
35
|
+
<li>The bookmark bubble hash token is not present</li>
|
36
|
+
</ul>
|
37
|
+
<p>Supported browsers:</p>
|
38
|
+
<ul>
|
39
|
+
<li>iPhone / iPod / iPad Mobile Safari 3.0+</li>
|
40
|
+
</ul>
|
41
|
+
</body>
|
42
|
+
</html>
|
43
|
+
|
data/lib/middleman-core/templates/mobile/source/tools/mobile-bookmark-bubble/example/example.js
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
/*
|
2
|
+
Copyright 2010 Google Inc.
|
3
|
+
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
you may not use this file except in compliance with the License.
|
6
|
+
You may obtain a copy of the License at
|
7
|
+
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
See the License for the specific language governing permissions and
|
14
|
+
limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
/** @fileoverview Example of how to use the bookmark bubble. */
|
18
|
+
|
19
|
+
window.addEventListener('load', function() {
|
20
|
+
window.setTimeout(function() {
|
21
|
+
var bubble = new google.bookmarkbubble.Bubble();
|
22
|
+
|
23
|
+
var parameter = 'bmb=1';
|
24
|
+
|
25
|
+
bubble.hasHashParameter = function() {
|
26
|
+
return window.location.hash.indexOf(parameter) != -1;
|
27
|
+
};
|
28
|
+
|
29
|
+
bubble.setHashParameter = function() {
|
30
|
+
if (!this.hasHashParameter()) {
|
31
|
+
window.location.hash += parameter;
|
32
|
+
}
|
33
|
+
};
|
34
|
+
|
35
|
+
bubble.getViewportHeight = function() {
|
36
|
+
window.console.log('Example of how to override getViewportHeight.');
|
37
|
+
return window.innerHeight;
|
38
|
+
};
|
39
|
+
|
40
|
+
bubble.getViewportScrollY = function() {
|
41
|
+
window.console.log('Example of how to override getViewportScrollY.');
|
42
|
+
return window.pageYOffset;
|
43
|
+
};
|
44
|
+
|
45
|
+
bubble.registerScrollHandler = function(handler) {
|
46
|
+
window.console.log('Example of how to override registerScrollHandler.');
|
47
|
+
window.addEventListener('scroll', handler, false);
|
48
|
+
};
|
49
|
+
|
50
|
+
bubble.deregisterScrollHandler = function(handler) {
|
51
|
+
window.console.log('Example of how to override deregisterScrollHandler.');
|
52
|
+
window.removeEventListener('scroll', handler, false);
|
53
|
+
};
|
54
|
+
|
55
|
+
bubble.showIfAllowed();
|
56
|
+
}, 1000);
|
57
|
+
}, false);
|
Binary file
|
Binary file
|
@@ -0,0 +1,33 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# Copyright 2010 Google Inc.
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Generates base64 versions of images so they can be inlined using the 'data:'
|
18
|
+
# URI scheme.
|
19
|
+
|
20
|
+
declare -ra IMAGE_FILES=( close.png arrow.png )
|
21
|
+
|
22
|
+
for image in ${IMAGE_FILES[@]}; do
|
23
|
+
OUT="$image.base64"
|
24
|
+
cat "$image" \
|
25
|
+
| uuencode -m ignore-this \
|
26
|
+
| grep -v begin-base64 \
|
27
|
+
| grep -v "====" \
|
28
|
+
| xargs echo \
|
29
|
+
| sed -e 's/ //g' \
|
30
|
+
| xargs echo -n \
|
31
|
+
> $OUT
|
32
|
+
ls -l $OUT
|
33
|
+
done
|
Binary file
|
@@ -0,0 +1,27 @@
|
|
1
|
+
How to run the tests:
|
2
|
+
|
3
|
+
* The tests themselves assume that jsunit is in a sibling directory
|
4
|
+
to the one containing the distrbution. If this is not so, it is sufficient
|
5
|
+
to edit the paths in the test files. (On UNIX, symlinks may be your
|
6
|
+
friend if this is not convenient.)
|
7
|
+
|
8
|
+
* jsmock.js (available from http://jsmock.sourceforge.net/) should
|
9
|
+
be placed in the distribution directory.
|
10
|
+
|
11
|
+
* Specify the test files via a URL parameter. (This might be an issue
|
12
|
+
with jsunit: http://digitalmihailo.blogspot.com/2008/06/make-jsunit-work-in-firefox-30.html)
|
13
|
+
|
14
|
+
For example, if the root of your downloaded of the distribution is /mypath:
|
15
|
+
|
16
|
+
file:///mypath/jsunit/testRunner.html?testpage=mypath/webstorageportabilitylayer/dbwrapper_gears_test.html
|
17
|
+
file:///mypath/jsunit/testRunner.html?testpage=mypath/webstorageportabilitylayer/dbwrapper_html5_test.html
|
18
|
+
file:///mypath/jsunit/testRunner.html?testpage=mypath/webstorageportabilitylayer/dbwrapperapi_test.html
|
19
|
+
|
20
|
+
NB: the leading / in a UNIX path is not included in mypath so setting
|
21
|
+
it via pwd will not deliver the desired effect.
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/*
|
2
|
+
Copyright 2009 Google Inc.
|
3
|
+
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
you may not use this file except in compliance with the License.
|
6
|
+
You may obtain a copy of the License at
|
7
|
+
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
See the License for the specific language governing permissions and
|
14
|
+
limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
// Namespace.
|
18
|
+
google.wspl.DatabaseFactory = google.wspl.DatabaseFactory || {};
|
19
|
+
|
20
|
+
/**
|
21
|
+
* Factory function to build databases in a cross-API manner.
|
22
|
+
* @param {string} dbName of the database
|
23
|
+
* @param {string} dbworkerUrl the URL for Gears worker.
|
24
|
+
* @return {google.wspl.Database} The database object.
|
25
|
+
*/
|
26
|
+
google.wspl.DatabaseFactory.createDatabase = function(dbName, dbworkerUrl) {
|
27
|
+
var dbms;
|
28
|
+
if (window.openDatabase) {
|
29
|
+
// We have HTML5 functionality.
|
30
|
+
dbms = new google.wspl.html5.Database(dbName);
|
31
|
+
} else {
|
32
|
+
// Try to use Google Gears.
|
33
|
+
var gearsDb = goog.gears.getFactory().create('beta.database');
|
34
|
+
var wp = goog.gears.getFactory().create('beta.workerpool');
|
35
|
+
|
36
|
+
// Note that Gears will not allow file based URLs when creating a worker.
|
37
|
+
dbms = new wireless.db.gears.Database();
|
38
|
+
dbms.openDatabase('', dbName, gearsDb);
|
39
|
+
wp.onmessage = google.bind(dbms.onMessage_, dbms);
|
40
|
+
|
41
|
+
// Comment this line out to use the synchronous database.
|
42
|
+
dbms.startWorker(wp, dbworkerUrl, 0);
|
43
|
+
}
|
44
|
+
return dbms;
|
45
|
+
};
|
@@ -0,0 +1,324 @@
|
|
1
|
+
/*
|
2
|
+
Copyright 2009 Google Inc.
|
3
|
+
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
you may not use this file except in compliance with the License.
|
6
|
+
You may obtain a copy of the License at
|
7
|
+
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
See the License for the specific language governing permissions and
|
14
|
+
limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
/**
|
18
|
+
* @fileoverview A worker thread that performs synchronous queries against a
|
19
|
+
* Gears database on behalf of an asynchronous calling client.
|
20
|
+
*
|
21
|
+
* The worker replies to the sender with messages to pass results, errors, and
|
22
|
+
* notifications about completed transactions. The type field of the message
|
23
|
+
* body specifies the message type. For each successful statement, a RESULT
|
24
|
+
* message is sent with a result attribute containing the Gears result set. For
|
25
|
+
* the first unsuccessful statement, an ERROR message will be sent with details
|
26
|
+
* stored in the error field. After the transaction has been committed, a COMMIT
|
27
|
+
* message is sent. If the transaction is rolled back, a ROLLBACK message is
|
28
|
+
* sent.
|
29
|
+
*
|
30
|
+
* NB: The worker must be served over http. Further, to operate successfully,
|
31
|
+
* it requires the inclusion of global_functions.js and gearsutils.js.
|
32
|
+
*/
|
33
|
+
|
34
|
+
|
35
|
+
/**
|
36
|
+
* Creates a DbWorker to handle incoming messages, execute queries, and return
|
37
|
+
* results to the main thread.
|
38
|
+
*
|
39
|
+
* @param {GearsWorkerPool} wp The gears worker pool.
|
40
|
+
* @constructor
|
41
|
+
*/
|
42
|
+
google.wspl.gears.DbWorker = function(wp) {
|
43
|
+
|
44
|
+
/**
|
45
|
+
* An array of transaction ids representing the transactions that are open on
|
46
|
+
* the database.
|
47
|
+
* @type {Array.<number>}
|
48
|
+
* @private
|
49
|
+
*/
|
50
|
+
this.transactions_ = [];
|
51
|
+
|
52
|
+
/**
|
53
|
+
* The gears worker pool.
|
54
|
+
* @type {GearsWorkerPool}
|
55
|
+
* @private
|
56
|
+
*/
|
57
|
+
this.wp_ = wp;
|
58
|
+
|
59
|
+
this.wp_.onmessage = google.bind(this.onMessage_, this);
|
60
|
+
|
61
|
+
this.sendMessageToWorker_({
|
62
|
+
'type': google.wspl.gears.DbWorker.ReplyTypes.STARTED
|
63
|
+
});
|
64
|
+
};
|
65
|
+
|
66
|
+
/**
|
67
|
+
* The gears database that this worker thread will interact with.
|
68
|
+
* @type {GearsDatabase}
|
69
|
+
* @private
|
70
|
+
*/
|
71
|
+
google.wspl.gears.DbWorker.prototype.db_;
|
72
|
+
|
73
|
+
/**
|
74
|
+
* A singleton instance of DbWorker.
|
75
|
+
* @type {google.wspl.gears.DbWorker?}
|
76
|
+
* @private
|
77
|
+
*/
|
78
|
+
google.wspl.gears.DbWorker.instance_;
|
79
|
+
|
80
|
+
/**
|
81
|
+
* The sender ID of the incomming messages. Default to 0 for workerpool ID.
|
82
|
+
* @type {number}
|
83
|
+
* @private
|
84
|
+
*/
|
85
|
+
google.wspl.gears.DbWorker.prototype.senderId_ = 0;
|
86
|
+
|
87
|
+
/**
|
88
|
+
* Message type constants for worker command messages.
|
89
|
+
* @enum {number}
|
90
|
+
*/
|
91
|
+
google.wspl.gears.DbWorker.CommandTypes = {
|
92
|
+
OPEN: 1,
|
93
|
+
BEGIN: 2,
|
94
|
+
EXECUTE: 3,
|
95
|
+
COMMIT: 4,
|
96
|
+
ROLLBACK: 5
|
97
|
+
};
|
98
|
+
|
99
|
+
/**
|
100
|
+
* Message type constants for worker reply messages.
|
101
|
+
* @enum {number}
|
102
|
+
*/
|
103
|
+
google.wspl.gears.DbWorker.ReplyTypes = {
|
104
|
+
RESULT: 1,
|
105
|
+
FAILURE: 2,
|
106
|
+
COMMIT: 3,
|
107
|
+
ROLLBACK: 4,
|
108
|
+
STARTED: 5,
|
109
|
+
OPEN_SUCCESSFUL: 6,
|
110
|
+
OPEN_FAILED: 7,
|
111
|
+
LOG: 8
|
112
|
+
};
|
113
|
+
|
114
|
+
/**
|
115
|
+
* Starts the DbWorker.
|
116
|
+
*/
|
117
|
+
google.wspl.gears.DbWorker.start = function() {
|
118
|
+
var wp = google.gears.workerPool;
|
119
|
+
google.wspl.gears.DbWorker.instance_ = new google.wspl.gears.DbWorker(wp);
|
120
|
+
};
|
121
|
+
|
122
|
+
/**
|
123
|
+
* Handles an OPEN command from the main thread.
|
124
|
+
*
|
125
|
+
* @param {string} userId The user to which the database belongs.
|
126
|
+
* @param {string} name The database's name.
|
127
|
+
*/
|
128
|
+
google.wspl.gears.DbWorker.prototype.handleOpen_ = function(userId, name) {
|
129
|
+
this.log_('Attempting to create Gears database: userId=' + userId + ', name='
|
130
|
+
+ name);
|
131
|
+
try {
|
132
|
+
this.db_ = google.gears.factory.create('beta.database', '1.0');
|
133
|
+
google.wspl.GearsUtils.openDatabase(userId, name, this.db_, this.log_);
|
134
|
+
this.sendMessageToWorker_({
|
135
|
+
'type': google.wspl.gears.DbWorker.ReplyTypes.OPEN_SUCCESSFUL
|
136
|
+
});
|
137
|
+
} catch (ex) {
|
138
|
+
this.sendMessageToWorker_({
|
139
|
+
'type': google.wspl.gears.DbWorker.ReplyTypes.OPEN_FAILED,
|
140
|
+
'error': ex
|
141
|
+
});
|
142
|
+
}
|
143
|
+
};
|
144
|
+
|
145
|
+
/**
|
146
|
+
* Handles a EXECUTE command from the main thread.
|
147
|
+
*
|
148
|
+
* @param {!Array.<google.wspl.Statement>} statements The statements to execute.
|
149
|
+
* @param {number} callbackId The callback to invoke after each execution.
|
150
|
+
* @param {number} transactionId The transaction that the statements belong to.
|
151
|
+
* @private
|
152
|
+
*/
|
153
|
+
google.wspl.gears.DbWorker.prototype.handleExecute_ =
|
154
|
+
function(statements, callbackId, transactionId) {
|
155
|
+
var self = this;
|
156
|
+
try {
|
157
|
+
this.executeAll_(statements, function(results) {
|
158
|
+
self.sendMessageToWorker_(/** @type {string} */({
|
159
|
+
'type': google.wspl.gears.DbWorker.ReplyTypes.RESULT,
|
160
|
+
'results': results,
|
161
|
+
'callbackId': callbackId,
|
162
|
+
'transactionId': transactionId
|
163
|
+
}));
|
164
|
+
});
|
165
|
+
} catch (e) {
|
166
|
+
this.sendMessageToWorker_({
|
167
|
+
'type': google.wspl.gears.DbWorker.ReplyTypes.FAILURE,
|
168
|
+
'error': e,
|
169
|
+
'callbackId': callbackId,
|
170
|
+
'transactionId': transactionId
|
171
|
+
});
|
172
|
+
}
|
173
|
+
};
|
174
|
+
|
175
|
+
/**
|
176
|
+
* Executes all of the statements on the Gears database. The callback is
|
177
|
+
* invoked with the query results after each successful query execution.
|
178
|
+
*
|
179
|
+
* @param {!Array.<Object>} statements The statements to execute.
|
180
|
+
* @param {Function} callback The callback to invoke with query results.
|
181
|
+
* @private
|
182
|
+
*/
|
183
|
+
google.wspl.gears.DbWorker.prototype.executeAll_ =
|
184
|
+
function(statements, callback) {
|
185
|
+
var results = [];
|
186
|
+
for (var i = 0; i < statements.length; i++) {
|
187
|
+
var resultset = this.db_.execute(statements[i]['sql'],
|
188
|
+
statements[i]['params']);
|
189
|
+
var result = google.wspl.GearsUtils.resultSetToObjectArray(resultset);
|
190
|
+
results.push(result);
|
191
|
+
}
|
192
|
+
callback(results);
|
193
|
+
};
|
194
|
+
|
195
|
+
/**
|
196
|
+
* Handles a BEGIN command from the main thread.
|
197
|
+
*
|
198
|
+
* @param {number} transactionId The transaction that the statements belong to.
|
199
|
+
* @private
|
200
|
+
*/
|
201
|
+
google.wspl.gears.DbWorker.prototype.handleBegin_ = function(transactionId) {
|
202
|
+
this.transactions_.push(transactionId);
|
203
|
+
this.db_.execute('BEGIN IMMEDIATE');
|
204
|
+
};
|
205
|
+
|
206
|
+
/**
|
207
|
+
* Handles a COMMIT command from the main thread.
|
208
|
+
*
|
209
|
+
* @param {number} transactionId The transaction that the statements belong to.
|
210
|
+
* @private
|
211
|
+
*/
|
212
|
+
google.wspl.gears.DbWorker.prototype.handleCommit_ = function(transactionId) {
|
213
|
+
this.db_.execute('COMMIT');
|
214
|
+
this.postCommit_();
|
215
|
+
};
|
216
|
+
|
217
|
+
/**
|
218
|
+
* Handles a ROLLBACK command from the main thread.
|
219
|
+
*
|
220
|
+
* @param {number} transactionId The transaction that the statements belong to.
|
221
|
+
* @private
|
222
|
+
*/
|
223
|
+
google.wspl.gears.DbWorker.prototype.handleRollback_ = function(transactionId) {
|
224
|
+
this.db_.execute('ROLLBACK');
|
225
|
+
this.postRollback_();
|
226
|
+
};
|
227
|
+
|
228
|
+
/**
|
229
|
+
* Sends a COMMIT reply to the main thread for each transaction that was
|
230
|
+
* committed.
|
231
|
+
*
|
232
|
+
* @private
|
233
|
+
*/
|
234
|
+
google.wspl.gears.DbWorker.prototype.postCommit_ = function() {
|
235
|
+
for (var i = this.transactions_.length - 1; i >= 0; i--) {
|
236
|
+
this.sendMessageToWorker_({
|
237
|
+
'type': google.wspl.gears.DbWorker.ReplyTypes.COMMIT,
|
238
|
+
'transactionId': this.transactions_[i]
|
239
|
+
});
|
240
|
+
}
|
241
|
+
this.transactions_ = [];
|
242
|
+
};
|
243
|
+
|
244
|
+
/**
|
245
|
+
* Sends a ROLLBACK reply to the main thread for each transaction that was
|
246
|
+
* rolled back.
|
247
|
+
*
|
248
|
+
* @private
|
249
|
+
*/
|
250
|
+
google.wspl.gears.DbWorker.prototype.postRollback_ = function() {
|
251
|
+
for (var i = this.transactions_.length - 1; i >= 0; i --) {
|
252
|
+
this.sendMessageToWorker_({
|
253
|
+
'type': google.wspl.gears.DbWorker.ReplyTypes.ROLLBACK,
|
254
|
+
'transactionId': this.transactions_[i]
|
255
|
+
});
|
256
|
+
}
|
257
|
+
this.transactions_ = [];
|
258
|
+
};
|
259
|
+
|
260
|
+
/**
|
261
|
+
* Handles incomming messages.
|
262
|
+
* @param {string} a Deprecated.
|
263
|
+
* @param {number} b Deprecated.
|
264
|
+
* @param {Object} messageObject The message object.
|
265
|
+
* @private
|
266
|
+
*/
|
267
|
+
google.wspl.gears.DbWorker.prototype.onMessage_ =
|
268
|
+
function(a, b, messageObject) {
|
269
|
+
this.senderId_ = messageObject.sender;
|
270
|
+
var message = messageObject.body;
|
271
|
+
var type = message['type'];
|
272
|
+
var name = message['name'];
|
273
|
+
var statements = message['statements'];
|
274
|
+
var callbackId = message['callbackId'];
|
275
|
+
var transactionId = message['transactionId'];
|
276
|
+
var userId = message['userId'];
|
277
|
+
|
278
|
+
try {
|
279
|
+
switch(type) {
|
280
|
+
case google.wspl.gears.DbWorker.CommandTypes.OPEN:
|
281
|
+
this.handleOpen_(userId, name);
|
282
|
+
break;
|
283
|
+
|
284
|
+
case google.wspl.gears.DbWorker.CommandTypes.EXECUTE:
|
285
|
+
this.handleExecute_(statements, callbackId, transactionId);
|
286
|
+
break;
|
287
|
+
|
288
|
+
case google.wspl.gears.DbWorker.CommandTypes.BEGIN:
|
289
|
+
this.handleBegin_(transactionId);
|
290
|
+
break;
|
291
|
+
|
292
|
+
case google.wspl.gears.DbWorker.CommandTypes.COMMIT:
|
293
|
+
this.handleCommit_(transactionId);
|
294
|
+
break;
|
295
|
+
|
296
|
+
case google.wspl.gears.DbWorker.CommandTypes.ROLLBACK:
|
297
|
+
this.handleRollback_(transactionId);
|
298
|
+
break;
|
299
|
+
}
|
300
|
+
} catch (ex) {
|
301
|
+
this.log_('Database worker failed: ' + ex.message);
|
302
|
+
}
|
303
|
+
};
|
304
|
+
|
305
|
+
/**
|
306
|
+
* Sends a log message to the main thread to be logged.
|
307
|
+
* @param {string} msg The message to log.
|
308
|
+
* @private
|
309
|
+
*/
|
310
|
+
google.wspl.gears.DbWorker.prototype.log_ = function(msg) {
|
311
|
+
this.sendMessageToWorker_({
|
312
|
+
'type': google.wspl.gears.DbWorker.ReplyTypes.LOG,
|
313
|
+
'msg': msg
|
314
|
+
});
|
315
|
+
};
|
316
|
+
|
317
|
+
/**
|
318
|
+
* Sends a message to the main worker thread.
|
319
|
+
* @param {Object} msg The message object to send.
|
320
|
+
* @private
|
321
|
+
*/
|
322
|
+
google.wspl.gears.DbWorker.prototype.sendMessageToWorker_ = function(msg) {
|
323
|
+
this.wp_.sendMessage(msg, this.senderId_);
|
324
|
+
};
|