middleman-core 4.3.7 → 4.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gemtest +0 -0
- data/features/asset_hash.feature +64 -62
- data/features/data.feature +20 -0
- data/features/front-matter-neighbor.feature +33 -27
- data/features/front-matter.feature +11 -5
- data/features/i18n_preview.feature +238 -238
- data/features/liquid.feature +5 -2
- data/features/support/env.rb +0 -3
- data/features/unicode_filenames.feature +3 -3
- data/fixtures/asset-hash-app/source/apple-touch-icon.png +0 -0
- data/fixtures/asset-hash-app/source/favicon.ico +0 -0
- data/fixtures/asset-hash-app/source/fonts/fontawesome-webfont.woff +0 -0
- data/fixtures/asset-hash-app/source/fonts/fontawesome-webfont.woff2 +0 -0
- data/fixtures/asset-hash-app/source/images/100px.gif +0 -0
- data/fixtures/asset-hash-app/source/images/100px.jpg +0 -0
- data/fixtures/asset-hash-app/source/images/100px.png +0 -0
- data/fixtures/asset-hash-app/source/images/200px.jpg +0 -0
- data/fixtures/asset-hash-app/source/images/300px.jpg +0 -0
- data/fixtures/asset-hash-host-app/source/images/100px.gif +0 -0
- data/fixtures/asset-hash-host-app/source/images/100px.jpg +0 -0
- data/fixtures/asset-hash-host-app/source/images/100px.png +0 -0
- data/fixtures/asset-hash-minified-app/source/images/100px.jpg +0 -0
- data/fixtures/asset-hash-prefix/source/javascripts/application.js.map +0 -0
- data/fixtures/asset-hash-remove-filename/source/javascripts/application.js.map +0 -0
- data/fixtures/asset-hash-source-map/source/javascripts/application.js.map +0 -0
- data/fixtures/asset-host-app/source/.htaccess +0 -0
- data/fixtures/asset-host-app/source/images/blank0.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank1.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank10.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank100.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank101.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank1010.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank102.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank1020.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank1021.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank1022.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank1023.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank1024.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank103.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank1030.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank1031.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank1032.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank1033.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank1034.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank104.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank1043.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank1054.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank2.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank20.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank21.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank22.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank23.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank24.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank3.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank30.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank31.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank32.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank33.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank34.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank4.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank43.gif +0 -0
- data/fixtures/asset-host-app/source/images/blank54.gif +0 -0
- data/fixtures/auto-css-app/source/stylesheets/auto-css/index.css +0 -0
- data/fixtures/auto-js-directory-index-app/config.rb +0 -0
- data/fixtures/automatic-alt-tags-app/config.rb +0 -0
- data/fixtures/automatic-directory-matcher-app/source/root-plain.html +0 -0
- data/fixtures/automatic-directory-matcher-app/source/root.html.erb +0 -0
- data/fixtures/automatic-directory-matcher-app/source/sub--sub--sub-plain.html +0 -0
- data/fixtures/automatic-directory-matcher-app/source/sub--sub--sub.html.erb +0 -0
- data/fixtures/automatic-directory-matcher-app/source/sub--sub-plain.html +0 -0
- data/fixtures/automatic-directory-matcher-app/source/sub--sub.html.erb +0 -0
- data/fixtures/automatic-image-size-app/config.rb +0 -0
- data/fixtures/basic-data-app/data/test3.toml +7 -0
- data/fixtures/basic-data-app/source/data4.html.erb +5 -0
- data/fixtures/build-with-errors-app/source/index.html.erb +0 -0
- data/fixtures/cache-buster-app/config.rb +0 -0
- data/fixtures/chained-app/config.rb +0 -0
- data/fixtures/clean-app/config-empty.rb +0 -0
- data/fixtures/clean-app/source/real.html +0 -0
- data/fixtures/clean-app/source/should_be_ignored.html +0 -0
- data/fixtures/clean-app/source/should_be_ignored2.html +0 -0
- data/fixtures/clean-app/source/should_be_ignored3.html +0 -0
- data/fixtures/clean-dir-app/source/about.html +0 -0
- data/fixtures/clean-nested-app/config.rb +0 -0
- data/fixtures/clean-nested-app/source/about.html +0 -0
- data/fixtures/clean-nested-app/source/nested/nested.html +0 -0
- data/fixtures/coffeescript-app/config.rb +0 -0
- data/fixtures/content-type-app/source/.htaccess +0 -0
- data/fixtures/content-type-app/source/README +0 -0
- data/fixtures/content-type-app/source/javascripts/app.js +0 -0
- data/fixtures/content-type-app/source/stylesheets/site.css +0 -0
- data/fixtures/csspie/config.rb +0 -0
- data/fixtures/custom-layout-app2/config.rb +0 -0
- data/fixtures/custom-src-app/src/index.html +0 -0
- data/fixtures/default-alt-tags-app/config.rb +0 -0
- data/fixtures/default-alt-tags-app/source/images/blank.gif +0 -0
- data/fixtures/different-engine-layout/config.rb +0 -0
- data/fixtures/different-engine-partial/config.rb +0 -0
- data/fixtures/different-engine-partial/source/index.html.erb +0 -0
- data/fixtures/different-engine-partial/source/shared/_footer.str +0 -0
- data/fixtures/different-engine-partial/source/shared/_header.erb +0 -0
- data/fixtures/dynamic-pages-app/source/real.html +0 -0
- data/fixtures/dynamic-pages-app/source/should_be_ignored.html +0 -0
- data/fixtures/dynamic-pages-app/source/should_be_ignored2.html +0 -0
- data/fixtures/dynamic-pages-app/source/should_be_ignored3.html +0 -0
- data/fixtures/dynamic-pages-app/source/should_be_ignored4.html +0 -0
- data/fixtures/dynamic-pages-app/source/should_be_ignored5.html +0 -0
- data/fixtures/dynamic-pages-app/source/should_be_ignored6.html +0 -0
- data/fixtures/dynamic-pages-app/source/should_be_ignored7.html +0 -0
- data/fixtures/dynamic-pages-app/source/should_be_ignored8.html +0 -0
- data/fixtures/ember-cli-app/source/javascripts/file.js +0 -0
- data/fixtures/ember-cli-app/test-app/app/components/.gitkeep +0 -0
- data/fixtures/ember-cli-app/test-app/app/controllers/.gitkeep +0 -0
- data/fixtures/ember-cli-app/test-app/app/helpers/.gitkeep +0 -0
- data/fixtures/ember-cli-app/test-app/app/models/.gitkeep +0 -0
- data/fixtures/ember-cli-app/test-app/app/routes/.gitkeep +0 -0
- data/fixtures/ember-cli-app/test-app/app/styles/.gitkeep +0 -0
- data/fixtures/ember-cli-app/test-app/app/templates/.gitkeep +0 -0
- data/fixtures/ember-cli-app/test-app/app/templates/components/.gitkeep +0 -0
- data/fixtures/ember-cli-app/test-app/app/views/.gitkeep +0 -0
- data/fixtures/ember-cli-app/test-app/public/.gitkeep +0 -0
- data/fixtures/ember-cli-app/test-app/tests/unit/.gitkeep +0 -0
- data/fixtures/empty-app/not-config.rb +0 -0
- data/fixtures/engine-matching-layout/config.rb +0 -0
- data/fixtures/env-app/config.rb +0 -0
- data/fixtures/extensionless-text-files-app/config.rb +0 -0
- data/fixtures/extensionless-text-files-app/source/CNAME +0 -0
- data/fixtures/extensionless-text-files-app/source/LICENSE +0 -0
- data/fixtures/extensionless-text-files-app/source/README +0 -0
- data/fixtures/extensionless-text-files-app/source/index.html +0 -0
- data/fixtures/external-helpers/source/automatic.html.erb +0 -0
- data/fixtures/external-helpers/source/index.html.erb +0 -0
- data/fixtures/external-pipeline-error/source/javascripts/file.js +0 -0
- data/fixtures/fonts-app/config.rb +0 -0
- data/fixtures/fonts-app/source/fonts/blank/blank.otf +0 -0
- data/fixtures/frontmatter-app/source/raw-front-matter-toml.html +6 -0
- data/fixtures/frontmatter-app/source/raw-front-matter.html +1 -1
- data/fixtures/frontmatter-neighbor-app/source/raw-front-matter-toml.html +1 -0
- data/fixtures/frontmatter-neighbor-app/source/raw-front-matter-toml.html.frontmatter +4 -0
- data/fixtures/frontmatter-neighbor-app/source/raw-front-matter.php +0 -0
- data/fixtures/frontmatter-settings-app/source/layouts/override.erb +0 -0
- data/fixtures/frontmatter-settings-neighbor-app/source/layouts/override.erb +0 -0
- data/fixtures/frontmatter-settings-neighbor-app/source/override_layout.html.erb +0 -0
- data/fixtures/frontmatter-settings-neighbor-app/source/page_mentioned.html.erb +0 -0
- data/fixtures/gzip-app/source/index.html +0 -0
- data/fixtures/i18n-alt-root-app/source/lang_data/hello.html.erb +0 -0
- data/fixtures/i18n-alt-root-app/source/lang_data/index.html.erb +0 -0
- data/fixtures/i18n-alt-root-app/source/layout.erb +0 -0
- data/fixtures/i18n-test-app/data/defaults_en.yml +0 -0
- data/fixtures/i18n-test-app/data/defaults_es.yml +0 -0
- data/fixtures/i18n-test-app/data/en_defaults.yml +0 -0
- data/fixtures/i18n-test-app/source/_country.en.erb +0 -0
- data/fixtures/i18n-test-app/source/_country.es.erb +0 -0
- data/fixtures/i18n-test-app/source/_site.erb +0 -0
- data/fixtures/i18n-test-app/source/images/president.en.svg +0 -0
- data/fixtures/i18n-test-app/source/images/president.es.svg +0 -0
- data/fixtures/i18n-test-app/source/localizable/_state.en.erb +0 -0
- data/fixtures/i18n-test-app/source/localizable/_state.es.erb +0 -0
- data/fixtures/i18n-test-app/source/localizable/hello.html.erb +0 -0
- data/fixtures/i18n-test-app/source/localizable/images/flag.en.svg +0 -0
- data/fixtures/i18n-test-app/source/localizable/images/flag.es.svg +0 -0
- data/fixtures/i18n-test-app/source/localizable/index.html.erb +0 -0
- data/fixtures/i18n-test-app/source/localizable/partials/_greeting.en.erb +0 -0
- data/fixtures/i18n-test-app/source/localizable/partials/_greeting.es.erb +0 -0
- data/fixtures/ignore-app/source/about.html.erb +0 -0
- data/fixtures/ignore-app/source/images/icon/messages.png +0 -0
- data/fixtures/ignore-app/source/images/pic.png +0 -0
- data/fixtures/ignore-app/source/images/portrait.jpg +0 -0
- data/fixtures/ignore-app/source/index.html.erb +0 -0
- data/fixtures/ignore-app/source/plain.html +0 -0
- data/fixtures/ignore-app/source/reports/another.html +0 -0
- data/fixtures/ignore-app/source/reports/index.html +0 -0
- data/fixtures/import-app/bower_components/jquery/dist/jquery.min.map +0 -0
- data/fixtures/import-app/bower_components/jquery/src/sizzle/dist/sizzle.min.map +0 -0
- data/fixtures/import-app/source/test.html +0 -0
- data/fixtures/import-app/static.html +0 -0
- data/fixtures/indexable-app/source/.htaccess +0 -0
- data/fixtures/indexable-app/source/.htpasswd +0 -0
- data/fixtures/indexable-app/source/.nojekyll +0 -0
- data/fixtures/indexable-app/source/a_folder/needs_index.html +0 -0
- data/fixtures/indexable-app/source/leave_me_alone.html +0 -0
- data/fixtures/indexable-app/source/needs_index.html +0 -0
- data/fixtures/indexable-app/source/regular/index.html +0 -0
- data/fixtures/javascript-app/config.rb +0 -0
- data/fixtures/large-build-app/source/.htaccess +0 -0
- data/fixtures/large-build-app/source/.htpasswd +0 -0
- data/fixtures/large-build-app/source/other_layout.erb +0 -0
- data/fixtures/large-build-app/source/spaces in file.html.erb +0 -0
- data/fixtures/link-to-app/config.rb +0 -0
- data/fixtures/liquid-app/config.rb +0 -0
- data/fixtures/liquid-app/source/_liquid_partial.liquid +0 -0
- data/fixtures/liquid-app/source/liquid_master.html.liquid +0 -0
- data/fixtures/markdown-app/source/filter_html.html.markdown +0 -0
- data/fixtures/markdown-app/source/highlighted.html.markdown +0 -0
- data/fixtures/markdown-app/source/img.html.markdown +0 -0
- data/fixtures/markdown-app/source/link.html.markdown +0 -0
- data/fixtures/markdown-app/source/mailto.html.markdown +0 -0
- data/fixtures/markdown-app/source/quote.html.markdown +0 -0
- data/fixtures/markdown-app/source/safe_links.html.markdown +0 -0
- data/fixtures/markdown-app/source/underline.html.markdown +0 -0
- data/fixtures/markdown-in-haml-app/config.rb +0 -0
- data/fixtures/markdown-in-slim-app/config.rb +0 -0
- data/fixtures/minify-css-app/source/stylesheets/bourbon/css3/_selection.scss +0 -0
- data/fixtures/minify-css-app/source/stylesheets/report.css +0 -0
- data/fixtures/minify-js-app/config.rb +0 -0
- data/fixtures/missing-tilt-library-app/source/danger-zone/more-wiki.html.wiki +0 -0
- data/fixtures/missing-tilt-library-app/source/safe-zone/my-wiki.html.wiki +0 -0
- data/fixtures/missing-tilt-library-app/source/textile-source.html.textile +0 -0
- data/fixtures/missing-tilt-library-app/source/wiki-source.html.wiki +0 -0
- data/fixtures/more-extensionless-text-files-app/source/CNAME +0 -0
- data/fixtures/more-extensionless-text-files-app/source/LICENSE +0 -0
- data/fixtures/more-extensionless-text-files-app/source/README +0 -0
- data/fixtures/more-extensionless-text-files-app/source/index.html +0 -0
- data/fixtures/more-ignore-app/source/about.html.erb +0 -0
- data/fixtures/more-ignore-app/source/images/icon/messages.png +0 -0
- data/fixtures/more-ignore-app/source/images/pic.png +0 -0
- data/fixtures/more-ignore-app/source/images/portrait.jpg +0 -0
- data/fixtures/more-ignore-app/source/index.html.erb +0 -0
- data/fixtures/more-ignore-app/source/plain.html +0 -0
- data/fixtures/more-ignore-app/source/reports/another.html +0 -0
- data/fixtures/more-ignore-app/source/reports/index.html +0 -0
- data/fixtures/more-preview-app/config.rb +0 -0
- data/fixtures/more-preview-app/source/content.html.erb +0 -0
- data/fixtures/more-preview-app/source/layout.erb +0 -0
- data/fixtures/more-traversal-app/source/directory-indexed/sub2/index.html.erb +0 -0
- data/fixtures/more-traversal-app/source/directory-indexed/sub3/deep.html.erb +0 -0
- data/fixtures/more-traversal-app/source/directory-indexed.html.erb +0 -0
- data/fixtures/more-traversal-app/source/index.html.erb +0 -0
- data/fixtures/more-traversal-app/source/proxied.html.erb +0 -0
- data/fixtures/more-traversal-app/source/root.html.erb +0 -0
- data/fixtures/more-traversal-app/source/sub/index.html.erb +0 -0
- data/fixtures/more-traversal-app/source/sub/sibling.html.erb +0 -0
- data/fixtures/more-traversal-app/source/sub/sibling2.html.erb +0 -0
- data/fixtures/more-traversal-app/source/sub/sub2/index.html.erb +0 -0
- data/fixtures/more-traversal-app/source/sub/sub3/deep.html.erb +0 -0
- data/fixtures/multiple-data-sources-app/data/two.yml +0 -0
- data/fixtures/multiple-data-sources-app/data1/data1.yml +0 -0
- data/fixtures/multiple-data-sources-app/data2/data2.yml +0 -0
- data/fixtures/multiple-data-sources-app/data2/two.yml +0 -0
- data/fixtures/multiple-layouts/config.rb +0 -0
- data/fixtures/multiple-sources-app/source/index.html.erb +0 -0
- data/fixtures/multiple-sources-app/source/override-in-two.html.erb +0 -0
- data/fixtures/multiple-sources-app/source0/override-in-one.html.erb +0 -0
- data/fixtures/multiple-sources-app/source1/index1.html.erb +0 -0
- data/fixtures/multiple-sources-app/source1/override-in-one.html.erb +0 -0
- data/fixtures/multiple-sources-app/source2/index2.html.erb +0 -0
- data/fixtures/multiple-sources-app/source2/override-in-two.html.erb +0 -0
- data/fixtures/multiple-sources-with-duplicate-file-names-app/source/index.html.erb +0 -0
- data/fixtures/multiple-sources-with-duplicate-file-names-app/source2/index.html.erb +0 -0
- data/fixtures/nested-data-app/data/examples/deeper/stuff.yml +0 -0
- data/fixtures/nested-data-app/data/examples/more.yml +0 -0
- data/fixtures/no-layout/config.rb +0 -0
- data/fixtures/page-classes-app/source/1-folder/1-inside-with-numeric.html.erb +0 -0
- data/fixtures/page-classes-app/source/1-starts-with-numeric.html.erb +0 -0
- data/fixtures/page-classes-app/source/2-starts-with-numeric-custom.html.erb +0 -0
- data/fixtures/page-helper-layout-block-app/source/index.html.erb +0 -0
- data/fixtures/page-helper-layout-block-app/source/path/child.html.erb +0 -0
- data/fixtures/page-helper-layout-block-app/source/path/index.html.erb +0 -0
- data/fixtures/paginate-app/config.rb +0 -0
- data/fixtures/partial-chained_templates-app/config.rb +0 -0
- data/fixtures/partials-app/config.rb +0 -0
- data/fixtures/partials-app/source/_code_snippet.html +0 -0
- data/fixtures/partials-app/source/_locals.erb +0 -0
- data/fixtures/partials-app/source/_main.erb +0 -0
- data/fixtures/partials-app/source/_main.str +0 -0
- data/fixtures/partials-app/source/shared/_footer.erb +0 -0
- data/fixtures/partials-app/source/shared/_header.erb +0 -0
- data/fixtures/partials-app/source/shared/_snippet.html.erb +0 -0
- data/fixtures/partials-app/source/static_underscore.html.erb +0 -0
- data/fixtures/partials-app/source/sub/_local.erb +0 -0
- data/fixtures/partials-app/source/svg.html.erb +0 -0
- data/fixtures/passthrough-app/source/.htaccess +0 -0
- data/fixtures/preview-app/config.rb +0 -0
- data/fixtures/preview-app/source/content.html.erb +0 -0
- data/fixtures/preview-app/source/layout.erb +0 -0
- data/fixtures/proxy-pages-app/source/real.html +0 -0
- data/fixtures/proxy-pages-app/source/should_be_ignored3.html +0 -0
- data/fixtures/proxy-pages-app/source/should_be_ignored6.html +0 -0
- data/fixtures/proxy-pages-app/source/should_be_ignored7.html +0 -0
- data/fixtures/proxy-pages-app/source/should_be_ignored8.html +0 -0
- data/fixtures/related-files-app/config.rb +0 -0
- data/fixtures/related-files-app/source/index.html.erb +0 -0
- data/fixtures/related-files-app/source/partials/_test.erb +0 -0
- data/fixtures/related-files-app/source/partials/_test2.haml +0 -0
- data/fixtures/related-files-app/source/stylesheets/_include3.sass +0 -0
- data/fixtures/related-files-app/source/stylesheets/_include4.scss +0 -0
- data/fixtures/related-files-app/source/stylesheets/include1.css +0 -0
- data/fixtures/related-files-app/source/stylesheets/include2.css.scss +0 -0
- data/fixtures/related-files-app/source/stylesheets/site.css.scss +0 -0
- data/fixtures/relative-app/config.rb +0 -0
- data/fixtures/relative-assets-app/source/fonts/roboto/roboto-regular-webfont.eot +0 -0
- data/fixtures/relative-assets-app/source/fonts/roboto/roboto-regular-webfont.svg +0 -0
- data/fixtures/relative-assets-app/source/fonts/roboto/roboto-regular-webfont.ttf +0 -0
- data/fixtures/relative-assets-app/source/fonts/roboto/roboto-regular-webfont.woff +0 -0
- data/fixtures/relative-assets-app/source/images/blank2.gif +0 -0
- data/fixtures/sass-in-slim-app/config.rb +0 -0
- data/fixtures/scss-app/config.rb +0 -0
- data/fixtures/scss-app/source/stylesheets/error.css.sass +0 -0
- data/fixtures/strip-url-app/config.rb +0 -0
- data/fixtures/stylus-preview-app/config.rb +0 -0
- data/fixtures/traversal-app/source/.htaccess +0 -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/directory-indexed.html.erb +0 -0
- data/fixtures/traversal-app/source/index.html.erb +0 -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/source/admin/index.html.erb +0 -0
- data/fixtures/wildcard-app/source/admin/page.html.erb +0 -0
- data/fixtures/wildcard-app/source/index.html.erb +0 -0
- data/fixtures/wildcard-directory-index-app/source/admin/index.html.erb +0 -0
- data/fixtures/wildcard-directory-index-app/source/admin/page.html.erb +0 -0
- data/fixtures/wildcard-directory-index-app/source/index.html.erb +0 -0
- data/lib/middleman-core/builder.rb +1 -1
- data/lib/middleman-core/core_extensions/data.rb +4 -2
- data/lib/middleman-core/core_extensions/default_helpers.rb +1 -0
- data/lib/middleman-core/core_extensions/front_matter.rb +1 -0
- data/lib/middleman-core/core_extensions/rendering.rb +0 -6
- data/lib/middleman-core/dns_resolver/basic_network_resolver.rb +0 -2
- data/lib/middleman-core/dns_resolver.rb +2 -4
- data/lib/middleman-core/extensions/asset_hash.rb +1 -1
- data/lib/middleman-core/meta_pages/assets/glyphicons-halflings.png +0 -0
- data/lib/middleman-core/meta_pages/assets/sitemap.js +0 -0
- data/lib/middleman-core/preview_server/server_ip_address.rb +5 -14
- data/lib/middleman-core/rack.rb +2 -1
- data/lib/middleman-core/sitemap/extensions/traversal.rb +2 -1
- data/lib/middleman-core/step_definitions/commandline_steps.rb +0 -4
- data/lib/middleman-core/step_definitions/middleman_steps.rb +1 -1
- data/lib/middleman-core/step_definitions/server_steps.rb +3 -2
- data/lib/middleman-core/template_context.rb +3 -3
- data/lib/middleman-core/template_renderer.rb +1 -1
- data/lib/middleman-core/util/data.rb +28 -0
- data/lib/middleman-core/util/paths.rb +2 -1
- data/lib/middleman-core/version.rb +1 -1
- data/middleman-core.gemspec +8 -6
- data/spec/middleman-core/binary_spec/middleman +0 -0
- data/spec/middleman-core/binary_spec/middleman.png +0 -0
- data/spec/middleman-core/binary_spec/stars.svgz +0 -0
- data/spec/middleman-core/dns_resolver_spec.rb +8 -24
- data/spec/spec_helper.rb +0 -3
- metadata +52 -1083
- data/features/stylus.feature +0 -54
- data/lib/middleman-core/renderers/stylus.rb +0 -10
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/fixtures/scss-app/config.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -229,7 +229,7 @@ module Middleman
|
|
229
229
|
if resource.binary?
|
230
230
|
export_file!(output_file, resource.file_descriptor[:full_path])
|
231
231
|
else
|
232
|
-
response = @rack.get(::
|
232
|
+
response = @rack.get(::WEBrick::HTTPUtils.escape(resource.request_path))
|
233
233
|
|
234
234
|
# If we get a response, save it to a tempfile.
|
235
235
|
if response.status == 200
|
@@ -17,7 +17,7 @@ module Middleman
|
|
17
17
|
expose_to_template data: :data_store
|
18
18
|
|
19
19
|
# The regex which tells Middleman which files are for data
|
20
|
-
DATA_FILE_MATCHER = /^(.*?)[\w-]+\.(yml|yaml|json)$/
|
20
|
+
DATA_FILE_MATCHER = /^(.*?)[\w-]+\.(yml|yaml|json|toml)$/
|
21
21
|
|
22
22
|
def initialize(app, config={}, &block)
|
23
23
|
super
|
@@ -102,13 +102,15 @@ module Middleman
|
|
102
102
|
extension = File.extname(data_path)
|
103
103
|
basename = File.basename(data_path, extension)
|
104
104
|
|
105
|
-
return unless %w(.yaml .yml .json).include?(extension)
|
105
|
+
return unless %w(.yaml .yml .json .toml).include?(extension)
|
106
106
|
|
107
107
|
if %w(.yaml .yml).include?(extension)
|
108
108
|
data, postscript = ::Middleman::Util::Data.parse(file, @app.config[:frontmatter_delims], :yaml)
|
109
109
|
data[:postscript] = postscript if !postscript.nil? && data.is_a?(Hash)
|
110
110
|
elsif extension == '.json'
|
111
111
|
data, _postscript = ::Middleman::Util::Data.parse(file, @app.config[:frontmatter_delims], :json)
|
112
|
+
elsif extension == '.toml'
|
113
|
+
data, _postscript = ::Middleman::Util::Data.parse(file, @app.config[:frontmatter_delims], :toml)
|
112
114
|
end
|
113
115
|
|
114
116
|
data_branch = @local_data
|
@@ -6,6 +6,7 @@ require 'padrino-helpers/format_helpers'
|
|
6
6
|
require 'padrino-helpers/number_helpers'
|
7
7
|
require 'padrino-helpers/output_helpers'
|
8
8
|
require 'padrino-helpers/render_helpers'
|
9
|
+
require 'active_support/core_ext/array/extract_options'
|
9
10
|
require 'middleman-core/contracts'
|
10
11
|
|
11
12
|
# Don't fail on invalid locale, that's not what our current
|
@@ -17,6 +17,7 @@ module Middleman::CoreExtensions
|
|
17
17
|
# Set textual delimiters that denote the start and end of frontmatter
|
18
18
|
define_setting :frontmatter_delims, {
|
19
19
|
json: [%w(;;; ;;;)],
|
20
|
+
toml: [%w(+++ +++)],
|
20
21
|
yaml: [%w(--- ---), %w(--- ...)]
|
21
22
|
}, 'Allowed frontmatter delimiters'
|
22
23
|
|
@@ -47,9 +47,3 @@ Middleman::Extensions.register :less_renderer, auto_activate: :before_configurat
|
|
47
47
|
require 'middleman-core/renderers/less'
|
48
48
|
Middleman::Renderers::Less
|
49
49
|
end
|
50
|
-
|
51
|
-
# Stylus Support
|
52
|
-
Middleman::Extensions.register :stylus_renderer, auto_activate: :before_configuration do
|
53
|
-
require 'middleman-core/renderers/stylus'
|
54
|
-
Middleman::Renderers::Stylus
|
55
|
-
end
|
@@ -31,10 +31,8 @@ module Middleman
|
|
31
31
|
@resolvers = []
|
32
32
|
@resolvers << opts.fetch(:hosts_resolver, HostsResolver.new)
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
@resolvers << opts.fetch(:local_link_resolver, LocalLinkResolver.new)
|
37
|
-
end
|
34
|
+
require 'middleman-core/dns_resolver/local_link_resolver'
|
35
|
+
@resolvers << opts.fetch(:local_link_resolver, LocalLinkResolver.new)
|
38
36
|
|
39
37
|
@resolvers << opts.fetch(:network_resolver, NetworkResolver.new)
|
40
38
|
end
|
@@ -87,7 +87,7 @@ class Middleman::Extensions::AssetHash < ::Middleman::Extension
|
|
87
87
|
else
|
88
88
|
# Render through the Rack interface so middleware and mounted apps get a shot
|
89
89
|
response = @rack_client.get(
|
90
|
-
::
|
90
|
+
::WEBrick::HTTPUtils.escape(resource.destination_path),
|
91
91
|
'bypass_inline_url_rewriter_asset_hash' => 'true'
|
92
92
|
)
|
93
93
|
|
File without changes
|
File without changes
|
@@ -35,20 +35,11 @@ module Middleman
|
|
35
35
|
format('[%s]', to_s)
|
36
36
|
end
|
37
37
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
false
|
44
|
-
end
|
45
|
-
else
|
46
|
-
def self.match?(str)
|
47
|
-
str = str.to_s.sub(/%.*$/, '')
|
48
|
-
IPAddr.new(str).ipv6?
|
49
|
-
rescue IPAddr::InvalidAddressError, IPAddr::AddressFamilyError
|
50
|
-
false
|
51
|
-
end
|
38
|
+
def self.match?(str)
|
39
|
+
str = str.to_s.sub(/%.*$/, '')
|
40
|
+
IPAddr.new(str).ipv6?
|
41
|
+
rescue IPAddr::InvalidAddressError, IPAddr::AddressFamilyError
|
42
|
+
false
|
52
43
|
end
|
53
44
|
end
|
54
45
|
end
|
data/lib/middleman-core/rack.rb
CHANGED
@@ -3,6 +3,7 @@ require 'rack/file'
|
|
3
3
|
require 'rack/lint'
|
4
4
|
require 'rack/head'
|
5
5
|
require 'rack/utils'
|
6
|
+
require 'webrick'
|
6
7
|
|
7
8
|
require 'middleman-core/util'
|
8
9
|
require 'middleman-core/logger'
|
@@ -86,7 +87,7 @@ module Middleman
|
|
86
87
|
def process_request(env, req, res)
|
87
88
|
start_time = Time.now
|
88
89
|
|
89
|
-
request_path =
|
90
|
+
request_path = WEBrick::HTTPUtils.unescape(env['PATH_INFO'].dup)
|
90
91
|
if request_path.respond_to? :force_encoding
|
91
92
|
request_path.force_encoding('UTF-8')
|
92
93
|
end
|
@@ -26,9 +26,10 @@ module Middleman
|
|
26
26
|
end
|
27
27
|
|
28
28
|
test_expr = parts.join('\\/')
|
29
|
+
test_expr = %r{^#{test_expr}(?:\.[a-zA-Z0-9]+|\/)$}
|
29
30
|
# eponymous reverse-lookup
|
30
31
|
found = @store.resources.find do |candidate|
|
31
|
-
candidate.path =~
|
32
|
+
candidate.path =~ test_expr
|
32
33
|
end
|
33
34
|
|
34
35
|
if found
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'middleman-core/rack'
|
2
2
|
require 'rspec/expectations'
|
3
3
|
require 'capybara/cucumber'
|
4
|
+
require 'webrick'
|
4
5
|
|
5
6
|
Given /^a clean server$/ do
|
6
7
|
@initialize_commands = []
|
@@ -72,11 +73,11 @@ Given /^a template named "([^\"]*)" with:$/ do |name, string|
|
|
72
73
|
end
|
73
74
|
|
74
75
|
When /^I go to "([^\"]*)"$/ do |url|
|
75
|
-
visit(
|
76
|
+
visit(WEBrick::HTTPUtils.escape(url))
|
76
77
|
end
|
77
78
|
|
78
79
|
Then /^going to "([^\"]*)" should not raise an exception$/ do |url|
|
79
|
-
expect{ visit(
|
80
|
+
expect{ visit(WEBrick::HTTPUtils.escape(url)) }.to_not raise_exception
|
80
81
|
end
|
81
82
|
|
82
83
|
Then /^the content type should be "([^\"]*)"$/ do |expected|
|
@@ -99,8 +99,8 @@ module Middleman
|
|
99
99
|
# @param [Hash] options
|
100
100
|
# @param [Proc] block A block will be evaluated to return internal contents.
|
101
101
|
# @return [String]
|
102
|
-
Contract Any, Or[Symbol, String], Hash
|
103
|
-
def render(_, name, options={}, &block)
|
102
|
+
Contract Any, Or[Symbol, String], Hash, Hash, Maybe[Proc] => String
|
103
|
+
def render(_, name, options={}, locals={}, &block)
|
104
104
|
name = name.to_s
|
105
105
|
|
106
106
|
partial_file = locate_partial(name, false) || locate_partial(name, true)
|
@@ -114,7 +114,7 @@ module Middleman
|
|
114
114
|
partial_file.read
|
115
115
|
else
|
116
116
|
opts = options.dup
|
117
|
-
locs =
|
117
|
+
locs = locals.dup
|
118
118
|
|
119
119
|
render_file(partial_file, locs, opts, &block)
|
120
120
|
end
|
@@ -132,7 +132,7 @@ module Middleman
|
|
132
132
|
@app.extensions.add_exposed_to_context(context)
|
133
133
|
|
134
134
|
locals.each do |k, _|
|
135
|
-
next unless context.respond_to?(k) && ![:current_path, :paginate, :page_articles, :blog_controller, :lang, :locale].include?(k.to_sym)
|
135
|
+
next unless context.respond_to?(k) && ![:current_path, :paginate, :page_articles, :blog_controller, :lang, :locale, :data].include?(k.to_sym)
|
136
136
|
|
137
137
|
msg = "Template local `#{k}` tried to overwrite an existing context value. Please rename the key when passing to `locals`"
|
138
138
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'yaml'
|
2
2
|
require 'json'
|
3
|
+
require 'toml'
|
3
4
|
require 'pathname'
|
4
5
|
require 'backports/2.1.0/array/to_h'
|
5
6
|
require 'hashie'
|
@@ -65,6 +66,8 @@ module Middleman
|
|
65
66
|
return [parse_yaml(content, full_path), nil]
|
66
67
|
when :json
|
67
68
|
return [parse_json(content, full_path), nil]
|
69
|
+
when :toml
|
70
|
+
return [parse_toml(content, full_path), nil]
|
68
71
|
end
|
69
72
|
end
|
70
73
|
|
@@ -79,6 +82,11 @@ module Middleman
|
|
79
82
|
parse_json("{#{match[:frontmatter]}}", full_path),
|
80
83
|
match[:additional_content]
|
81
84
|
]
|
85
|
+
when *frontmatter_delims[:toml]
|
86
|
+
[
|
87
|
+
parse_toml(match[:frontmatter], full_path),
|
88
|
+
match[:additional_content]
|
89
|
+
]
|
82
90
|
else
|
83
91
|
[
|
84
92
|
{},
|
@@ -122,6 +130,26 @@ module Middleman
|
|
122
130
|
c ? symbolize_recursive(c) : {}
|
123
131
|
end
|
124
132
|
memoize :parse_yaml
|
133
|
+
|
134
|
+
# Parse TOML frontmatter out of a string
|
135
|
+
# @param [String] content
|
136
|
+
# @return [Hash]
|
137
|
+
Contract String, Pathname => Hash
|
138
|
+
def parse_toml(content, full_path)
|
139
|
+
c = begin
|
140
|
+
::Middleman::Util.instrument 'parse.toml' do
|
141
|
+
::TOML.load(content)
|
142
|
+
end
|
143
|
+
rescue StandardError
|
144
|
+
# TOML parser swallows useful error, so we can't warn about it.
|
145
|
+
# https://github.com/jm/toml/issues/47
|
146
|
+
warn "TOML Exception parsing #{full_path}"
|
147
|
+
{}
|
148
|
+
end
|
149
|
+
|
150
|
+
c ? symbolize_recursive(c) : {}
|
151
|
+
end
|
152
|
+
memoize :parse_yaml
|
125
153
|
|
126
154
|
# Parse JSON frontmatter out of a string
|
127
155
|
# @param [String] content
|
@@ -4,6 +4,7 @@ require 'uri'
|
|
4
4
|
require 'addressable/uri'
|
5
5
|
require 'memoist'
|
6
6
|
require 'tilt'
|
7
|
+
require 'webrick'
|
7
8
|
|
8
9
|
require 'middleman-core/contracts'
|
9
10
|
|
@@ -33,7 +34,7 @@ module Middleman
|
|
33
34
|
Contract String => String
|
34
35
|
def normalize_path(path)
|
35
36
|
# The tr call works around a bug in Ruby's Unicode handling
|
36
|
-
::
|
37
|
+
WEBrick::HTTPUtils.unescape(path).sub(%r{^/}, '').tr('', '')
|
37
38
|
end
|
38
39
|
memoize :normalize_path
|
39
40
|
|
data/middleman-core.gemspec
CHANGED
@@ -16,10 +16,10 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.files = `git ls-files -z`.split("\0")
|
17
17
|
s.test_files = `git ls-files -z -- {fixtures,features}/*`.split("\0")
|
18
18
|
s.require_path = 'lib'
|
19
|
-
s.required_ruby_version = '>= 2.
|
19
|
+
s.required_ruby_version = '>= 2.5.0'
|
20
20
|
|
21
21
|
# Core
|
22
|
-
s.add_dependency('bundler')
|
22
|
+
s.add_dependency('bundler', '~> 2.0')
|
23
23
|
s.add_dependency('rack', ['>= 1.4.5', '< 3'])
|
24
24
|
s.add_dependency('tilt', ['~> 2.0.9'])
|
25
25
|
s.add_dependency('erubis')
|
@@ -27,18 +27,20 @@ Gem::Specification.new do |s|
|
|
27
27
|
s.add_dependency('parallel')
|
28
28
|
s.add_dependency('servolux')
|
29
29
|
s.add_dependency('dotenv')
|
30
|
+
s.add_dependency('toml')
|
31
|
+
s.add_dependency('webrick')
|
30
32
|
|
31
33
|
# Helpers
|
32
|
-
s.add_dependency('activesupport', ['>=
|
33
|
-
s.add_dependency('padrino-helpers', ['~> 0.
|
34
|
-
s.add_dependency("addressable", ["~> 2.
|
34
|
+
s.add_dependency('activesupport', ['>= 6.1', '< 7.0'])
|
35
|
+
s.add_dependency('padrino-helpers', ['~> 0.15.0'])
|
36
|
+
s.add_dependency("addressable", ["~> 2.4"])
|
35
37
|
s.add_dependency('memoist', ['~> 0.14'])
|
36
38
|
|
37
39
|
# Watcher
|
38
40
|
s.add_dependency('listen', ['~> 3.0.0'])
|
39
41
|
|
40
42
|
# i18n
|
41
|
-
s.add_dependency('i18n', ['~>
|
43
|
+
s.add_dependency('i18n', ['~> 1.6.0'])
|
42
44
|
|
43
45
|
# Automatic Image Sizes
|
44
46
|
s.add_dependency('fastimage', ['~> 2.0'])
|
File without changes
|
File without changes
|
File without changes
|
@@ -22,9 +22,7 @@ RSpec.describe Middleman::DnsResolver do
|
|
22
22
|
context 'when hosts resolver can resolve name' do
|
23
23
|
before :each do
|
24
24
|
expect(hosts_resolver).to receive(:getnames).with(unresolved_ip).and_return(resolved_names)
|
25
|
-
|
26
|
-
expect(local_link_resolver).not_to receive(:getnames)
|
27
|
-
end
|
25
|
+
expect(local_link_resolver).not_to receive(:getnames)
|
28
26
|
expect(network_resolver).not_to receive(:getnames)
|
29
27
|
end
|
30
28
|
|
@@ -37,12 +35,8 @@ RSpec.describe Middleman::DnsResolver do
|
|
37
35
|
context 'when local link resolver can resolve name' do
|
38
36
|
before :each do
|
39
37
|
expect(hosts_resolver).to receive(:getnames).with(unresolved_ip).and_return([])
|
40
|
-
|
41
|
-
|
42
|
-
expect(network_resolver).not_to receive(:getnames)
|
43
|
-
else
|
44
|
-
expect(network_resolver).to receive(:getnames).with(unresolved_ip).and_return(resolved_names)
|
45
|
-
end
|
38
|
+
expect(local_link_resolver).to receive(:getnames).with(unresolved_ip).and_return(resolved_names)
|
39
|
+
expect(network_resolver).not_to receive(:getnames)
|
46
40
|
end
|
47
41
|
|
48
42
|
let(:unresolved_ip) { '127.0.0.1' }
|
@@ -54,9 +48,7 @@ RSpec.describe Middleman::DnsResolver do
|
|
54
48
|
context 'when network resolver can resolve name' do
|
55
49
|
before :each do
|
56
50
|
expect(hosts_resolver).to receive(:getnames).with(unresolved_ip).and_return([])
|
57
|
-
|
58
|
-
expect(local_link_resolver).to receive(:getnames).with(unresolved_ip).and_return([])
|
59
|
-
end
|
51
|
+
expect(local_link_resolver).to receive(:getnames).with(unresolved_ip).and_return([])
|
60
52
|
expect(network_resolver).to receive(:getnames).with(unresolved_ip).and_return(resolved_names)
|
61
53
|
end
|
62
54
|
|
@@ -71,9 +63,7 @@ RSpec.describe Middleman::DnsResolver do
|
|
71
63
|
context 'when hosts resolver can resolve name' do
|
72
64
|
before :each do
|
73
65
|
expect(hosts_resolver).to receive(:getaddresses).with(unresolved_ips).and_return(resolved_name)
|
74
|
-
|
75
|
-
expect(local_link_resolver).not_to receive(:getaddresses)
|
76
|
-
end
|
66
|
+
expect(local_link_resolver).not_to receive(:getaddresses)
|
77
67
|
expect(network_resolver).not_to receive(:getaddresses)
|
78
68
|
end
|
79
69
|
|
@@ -86,12 +76,8 @@ RSpec.describe Middleman::DnsResolver do
|
|
86
76
|
context 'when local link resolver can resolve name' do
|
87
77
|
before :each do
|
88
78
|
expect(hosts_resolver).to receive(:getaddresses).with(unresolved_ips).and_return([])
|
89
|
-
|
90
|
-
|
91
|
-
expect(network_resolver).not_to receive(:getaddresses)
|
92
|
-
else
|
93
|
-
expect(network_resolver).to receive(:getaddresses).with(unresolved_ips).and_return(resolved_name)
|
94
|
-
end
|
79
|
+
expect(local_link_resolver).to receive(:getaddresses).with(unresolved_ips).and_return(resolved_name)
|
80
|
+
expect(network_resolver).not_to receive(:getaddresses)
|
95
81
|
end
|
96
82
|
|
97
83
|
let(:unresolved_ips) { '127.0.0.1' }
|
@@ -103,9 +89,7 @@ RSpec.describe Middleman::DnsResolver do
|
|
103
89
|
context 'when network resolver can resolve name' do
|
104
90
|
before :each do
|
105
91
|
expect(hosts_resolver).to receive(:getaddresses).with(unresolved_ips).and_return([])
|
106
|
-
|
107
|
-
expect(local_link_resolver).to receive(:getaddresses).with(unresolved_ips).and_return([])
|
108
|
-
end
|
92
|
+
expect(local_link_resolver).to receive(:getaddresses).with(unresolved_ips).and_return([])
|
109
93
|
expect(network_resolver).to receive(:getaddresses).with(unresolved_ips).and_return(resolved_name)
|
110
94
|
end
|
111
95
|
|
data/spec/spec_helper.rb
CHANGED