middleman-core 4.3.0.rc.1 → 4.3.0.rc.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Rakefile +0 -1
- data/cucumber.yml +2 -2
- data/features/asset_hash.feature +2 -2
- data/features/collections.feature +2 -2
- data/features/i18n_mixed_sources.feature +8 -0
- data/features/markdown.feature +0 -1
- data/features/multiple-sources-reload.feature +40 -0
- data/features/partials.feature +1 -1
- data/features/support/env.rb +4 -1
- data/features/tilde_directories.feature +0 -2
- data/features/unicode_filenames.feature +1 -1
- data/fixtures/asset-hash-app/config.rb +0 -1
- data/fixtures/asset-hash-app/lib/middleware.rb +2 -2
- data/fixtures/asset-hash-app/source/stylesheets/_partial.sass +1 -1
- data/fixtures/asset-hash-prefix/config.rb +1 -2
- data/fixtures/asset-hash-prefix/lib/middleware.rb +2 -2
- data/fixtures/asset-hash-source-map/config.rb +0 -1
- data/fixtures/asset-hash-source-map/lib/middleware.rb +2 -2
- data/fixtures/asset-host-app/config.rb +1 -1
- data/fixtures/auto-css-app/config.rb +2 -2
- data/fixtures/auto-js-app/config.rb +2 -2
- data/fixtures/auto-js-directory-index-app/config.rb +1 -1
- data/fixtures/automatic-directory-matcher-app/config.rb +1 -1
- data/fixtures/basic-data-app/config.rb +2 -2
- data/fixtures/capture-html-app/config.rb +4 -4
- data/fixtures/clean-app/config-complications.rb +6 -6
- data/fixtures/clean-app/config-hidden-dir-after.rb +4 -4
- data/fixtures/clean-app/config-hidden-dir-before.rb +1 -1
- data/fixtures/clean-app/config.rb +6 -6
- data/fixtures/clean-dir-app/config.rb +0 -1
- data/fixtures/clean-nested-app/config.rb +1 -1
- data/fixtures/collections-app/source/blog1/2011-01-01-new-article.html.markdown +1 -1
- data/fixtures/collections-app/source/blog1/2011-01-02-another-article.html.markdown +1 -1
- data/fixtures/collections-app/source/blog2/2011-01-01-new-article.html.markdown +1 -1
- data/fixtures/collections-app/source/blog2/2011-01-02-another-article.html.markdown +1 -1
- data/fixtures/content-for-app/config.rb +4 -4
- data/fixtures/destination-dir-different-from-source-dir-name/external/page.html.erb +1 -0
- data/fixtures/destination-dir-different-from-source-dir-name/my-app/config.rb +2 -0
- data/fixtures/destination-dir-different-from-source-dir-name/my-app/source/index.html.erb +1 -0
- data/fixtures/dynamic-pages-app/config.rb +25 -26
- data/fixtures/ember-cli-app/config.rb +4 -4
- data/fixtures/env-app/environments/development.rb +1 -1
- data/fixtures/env-app/environments/production.rb +1 -1
- data/fixtures/extension-hooks-app/config.rb +8 -8
- data/fixtures/external-helpers/config.rb +2 -2
- data/fixtures/external-helpers/helpers/derp.rb +3 -1
- data/fixtures/external-helpers/helpers/four_helpers.rb +3 -1
- data/fixtures/external-helpers/helpers/one_helper.rb +3 -1
- data/fixtures/external-helpers/helpers/yet_another_thingy.rb +3 -1
- data/fixtures/external-helpers/lib/hello_helper.rb +1 -1
- data/fixtures/external-pipeline-error/config.rb +4 -4
- data/fixtures/feature-params-app/config.rb +1 -1
- data/fixtures/frontmatter-app/config.rb +1 -1
- data/fixtures/glob-app/config.rb +1 -1
- data/fixtures/i-8859-1-app/config.rb +1 -1
- data/fixtures/i18n-force-locale/config.rb +4 -4
- data/fixtures/i18n-mixed-sources/config.rb +1 -1
- data/fixtures/i18n-mixed-sources/source/c/d/index.html.erb +9 -0
- data/fixtures/i18n-mixed-sources/source/localizable/c/d/index.html.erb +9 -0
- data/fixtures/import-app/config.rb +3 -3
- data/fixtures/indexable-app/config.rb +3 -3
- data/fixtures/large-build-app/config.rb +1 -1
- data/fixtures/manual-layout-override/config.rb +1 -1
- data/fixtures/missing-tilt-library-app/config.rb +2 -2
- data/fixtures/more-traversal-app/config.rb +4 -4
- data/fixtures/multiple-data-sources-app/config.rb +1 -1
- data/fixtures/multiple-sources-app/config.rb +1 -1
- data/fixtures/multiple-sources-with-destination-dir/config.rb +2 -0
- data/fixtures/multiple-sources-with-destination-dir/external/page.html.erb +1 -0
- data/fixtures/multiple-sources-with-destination-dir/source/index.html.erb +1 -0
- data/fixtures/multiple-sources-with-duplicate-file-names-app/config.rb +1 -1
- data/fixtures/multiple-sources-without-destination-dir/config.rb +1 -0
- data/fixtures/multiple-sources-without-destination-dir/external/page.html.erb +1 -0
- data/fixtures/multiple-sources-without-destination-dir/source/index.html.erb +1 -0
- data/fixtures/nested-layout-app/source/another.html.markdown +1 -1
- data/fixtures/nested-layout-app/source/haml-test.html.markdown +1 -1
- data/fixtures/nested-layout-app/source/slim-test.html.markdown +1 -1
- data/fixtures/padrino-helpers-app/config.rb +1 -1
- data/fixtures/page-classes-app/config.rb +2 -2
- data/fixtures/page-helper-layout-block-app/config.rb +1 -1
- data/fixtures/page-id-app/config-proc.rb +4 -4
- data/fixtures/page-id-app/config.rb +3 -3
- data/fixtures/paginate-app/source/blog/2011-01-01-test-article.html.markdown +1 -1
- data/fixtures/paginate-app/source/blog/2011-01-02-test-article.html.markdown +1 -1
- data/fixtures/paginate-app/source/blog/2011-01-03-test-article.html.markdown +1 -1
- data/fixtures/paginate-app/source/blog/2011-01-04-test-article.html.markdown +1 -1
- data/fixtures/paginate-app/source/blog/2011-01-05-test-article.html.markdown +1 -1
- data/fixtures/paginate-app/source/blog/2011-02-01-test-article.html.markdown +1 -1
- data/fixtures/paginate-app/source/blog/2011-02-02-test-article.html.markdown +1 -1
- data/fixtures/partials-app/source/_locals.erb +1 -1
- data/fixtures/partials-app/source/locals.html.erb +1 -1
- data/fixtures/proxy-pages-app/config.rb +13 -14
- data/fixtures/sass-assets-path-app/config.rb +2 -2
- data/fixtures/sinatra-app/config.rb +6 -6
- data/fixtures/traversal-app/config.rb +4 -4
- data/fixtures/v4-extension-callbacks/config.rb +2 -2
- data/fixtures/wildcard-app/config.rb +1 -1
- data/fixtures/wildcard-directory-index-app/config.rb +1 -1
- data/lib/middleman-core.rb +3 -3
- data/lib/middleman-core/application.rb +5 -5
- data/lib/middleman-core/builder.rb +20 -20
- data/lib/middleman-core/callback_manager.rb +1 -1
- data/lib/middleman-core/config_context.rb +2 -2
- data/lib/middleman-core/configuration.rb +5 -5
- data/lib/middleman-core/contracts.rb +2 -2
- data/lib/middleman-core/core_extensions/collections.rb +1 -1
- data/lib/middleman-core/core_extensions/collections/lazy_root.rb +1 -1
- data/lib/middleman-core/core_extensions/collections/lazy_step.rb +9 -9
- data/lib/middleman-core/core_extensions/collections/pagination.rb +6 -6
- data/lib/middleman-core/core_extensions/data.rb +10 -10
- data/lib/middleman-core/core_extensions/default_helpers.rb +26 -22
- data/lib/middleman-core/core_extensions/file_watcher.rb +1 -1
- data/lib/middleman-core/core_extensions/front_matter.rb +3 -3
- data/lib/middleman-core/core_extensions/i18n.rb +24 -24
- data/lib/middleman-core/core_extensions/inline_url_rewriter.rb +10 -7
- data/lib/middleman-core/core_extensions/routing.rb +1 -1
- data/lib/middleman-core/dns_resolver.rb +1 -1
- data/lib/middleman-core/dns_resolver/basic_network_resolver.rb +3 -3
- data/lib/middleman-core/dns_resolver/hosts_resolver.rb +1 -1
- data/lib/middleman-core/dns_resolver/local_link_resolver.rb +1 -1
- data/lib/middleman-core/dns_resolver/network_resolver.rb +1 -1
- data/lib/middleman-core/extension.rb +26 -25
- data/lib/middleman-core/extension_manager.rb +1 -1
- data/lib/middleman-core/extensions.rb +8 -7
- data/lib/middleman-core/extensions/asset_hash.rb +24 -22
- data/lib/middleman-core/extensions/asset_host.rb +10 -10
- data/lib/middleman-core/extensions/automatic_alt_tags.rb +1 -1
- data/lib/middleman-core/extensions/automatic_image_sizes.rb +3 -3
- data/lib/middleman-core/extensions/cache_buster.rb +2 -2
- data/lib/middleman-core/extensions/directory_indexes.rb +1 -1
- data/lib/middleman-core/extensions/external_pipeline.rb +14 -9
- data/lib/middleman-core/extensions/gzip.rb +7 -5
- data/lib/middleman-core/extensions/lorem.rb +9 -9
- data/lib/middleman-core/extensions/minify_css.rb +9 -9
- data/lib/middleman-core/extensions/minify_javascript.rb +10 -10
- data/lib/middleman-core/extensions/relative_assets.rb +8 -8
- data/lib/middleman-core/file_renderer.rb +6 -5
- data/lib/middleman-core/load_paths.rb +10 -10
- data/lib/middleman-core/logger.rb +2 -3
- data/lib/middleman-core/meta_pages.rb +1 -1
- data/lib/middleman-core/preview_server.rb +21 -22
- data/lib/middleman-core/preview_server/checks.rb +1 -1
- data/lib/middleman-core/preview_server/information.rb +13 -13
- data/lib/middleman-core/preview_server/network_interface_inventory.rb +3 -3
- data/lib/middleman-core/preview_server/server_information.rb +1 -1
- data/lib/middleman-core/preview_server/server_url.rb +1 -1
- data/lib/middleman-core/preview_server/tcp_port_prober.rb +1 -1
- data/lib/middleman-core/rack.rb +1 -1
- data/lib/middleman-core/renderers/coffee_script.rb +2 -2
- data/lib/middleman-core/renderers/haml.rb +1 -4
- data/lib/middleman-core/renderers/less.rb +1 -1
- data/lib/middleman-core/renderers/liquid.rb +2 -1
- data/lib/middleman-core/renderers/markdown.rb +7 -7
- data/lib/middleman-core/renderers/redcarpet.rb +2 -2
- data/lib/middleman-core/renderers/sass.rb +5 -5
- data/lib/middleman-core/renderers/sass_functions.rb +5 -5
- data/lib/middleman-core/renderers/slim.rb +2 -2
- data/lib/middleman-core/sitemap/extensions/ignores.rb +2 -4
- data/lib/middleman-core/sitemap/extensions/import.rb +1 -1
- data/lib/middleman-core/sitemap/extensions/on_disk.rb +1 -1
- data/lib/middleman-core/sitemap/extensions/proxies.rb +2 -1
- data/lib/middleman-core/sitemap/extensions/redirects.rb +1 -1
- data/lib/middleman-core/sitemap/extensions/request_endpoints.rb +1 -1
- data/lib/middleman-core/sitemap/extensions/traversal.rb +80 -25
- data/lib/middleman-core/sitemap/resource.rb +21 -20
- data/lib/middleman-core/sitemap/store.rb +3 -3
- data/lib/middleman-core/sources.rb +12 -12
- data/lib/middleman-core/sources/source_watcher.rb +16 -10
- data/lib/middleman-core/step_definitions/builder_steps.rb +23 -23
- data/lib/middleman-core/step_definitions/commandline_steps.rb +5 -5
- data/lib/middleman-core/step_definitions/middleman_steps.rb +13 -14
- data/lib/middleman-core/step_definitions/server_steps.rb +14 -16
- data/lib/middleman-core/template_context.rb +17 -10
- data/lib/middleman-core/template_renderer.rb +34 -32
- data/lib/middleman-core/util.rb +2 -2
- data/lib/middleman-core/util/binary.rb +3 -1
- data/lib/middleman-core/util/data.rb +2 -2
- data/lib/middleman-core/util/files.rb +2 -2
- data/lib/middleman-core/util/paths.rb +47 -44
- data/lib/middleman-core/util/rack.rb +3 -3
- data/lib/middleman-core/util/uri_templates.rb +1 -0
- data/lib/middleman-core/version.rb +1 -1
- data/middleman-core.gemspec +3 -2
- data/spec/middleman-core/callbacks_spec.rb +15 -14
- data/spec/middleman-core/core_extensions/data_spec.rb +70 -74
- data/spec/middleman-core/dns_resolver_spec.rb +6 -6
- data/spec/middleman-core/util_spec.rb +81 -86
- data/spec/support/given.rb +11 -15
- metadata +44 -6
@@ -1,5 +1,5 @@
|
|
1
1
|
activate :external_pipeline,
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
name: :ember,
|
3
|
+
command: "cd test-app/ && ember #{build? ? :build : :serve} --environment #{config[:environment]}",
|
4
|
+
source: 'test-app/dist',
|
5
|
+
latency: 2
|
@@ -1 +1 @@
|
|
1
|
-
set :api_key,
|
1
|
+
set :api_key, 'dev1'
|
@@ -1,2 +1,2 @@
|
|
1
|
-
set :api_key,
|
1
|
+
set :api_key, 'prod2'
|
2
2
|
activate :minify_css
|
@@ -12,20 +12,20 @@ class MyFeature < Middleman::Extension
|
|
12
12
|
puts '/// ready ///'
|
13
13
|
end
|
14
14
|
|
15
|
-
app.before_render do |
|
16
|
-
puts
|
15
|
+
app.before_render do |_body, _path, _locs, _template_class|
|
16
|
+
puts '/// before_render ///'
|
17
17
|
end
|
18
18
|
|
19
|
-
app.after_render do |
|
20
|
-
puts
|
19
|
+
app.after_render do |_content, _path, _locs, _template_class|
|
20
|
+
puts '/// after_render ///'
|
21
21
|
end
|
22
22
|
|
23
|
-
app.before_build do |
|
24
|
-
puts
|
23
|
+
app.before_build do |_builder|
|
24
|
+
puts '/// before_build ///'
|
25
25
|
end
|
26
26
|
|
27
|
-
app.after_build do |
|
28
|
-
puts
|
27
|
+
app.after_build do |_builder|
|
28
|
+
puts '/// after_build ///'
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
activate :external_pipeline,
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
name: :failing,
|
3
|
+
command: 'mv does-not-exist tmp/file.js',
|
4
|
+
source: 'tmp',
|
5
|
+
latency: 2
|
@@ -1 +1 @@
|
|
1
|
-
config[:frontmatter_delims][:yaml] << %w
|
1
|
+
config[:frontmatter_delims][:yaml] << %w[\\--- \\---]
|
data/fixtures/glob-app/config.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
page
|
1
|
+
page '/index.html', layout: false
|
@@ -1 +1 @@
|
|
1
|
-
set :encoding,
|
1
|
+
set :encoding, 'ISO-8859-1'
|
@@ -1,11 +1,11 @@
|
|
1
|
-
[
|
2
|
-
proxy "/#{locale}/index.html",
|
1
|
+
%i[en es].each do |locale|
|
2
|
+
proxy "/#{locale}/index.html", 'index.html', ignore: true, lang: locale
|
3
3
|
end
|
4
4
|
|
5
|
-
proxy
|
5
|
+
proxy '/fr/index.html', 'index.html', lang: :fr
|
6
6
|
|
7
7
|
activate :i18n
|
8
8
|
|
9
|
-
# This is what breaks i18n, just because it adds a resource list manipulator that
|
9
|
+
# This is what breaks i18n, just because it adds a resource list manipulator that
|
10
10
|
# forces a rebuild of the resource list.
|
11
11
|
activate :asset_hash
|
@@ -1 +1 @@
|
|
1
|
-
activate :i18n, mount_at_root: :en, langs: [
|
1
|
+
activate :i18n, mount_at_root: :en, langs: %i[en es]
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import_file File.expand_path(
|
1
|
+
import_file File.expand_path('static.html', root), '/static2.html'
|
2
2
|
|
3
|
-
import_path File.expand_path(
|
3
|
+
import_path File.expand_path('bower_components/', root)
|
4
4
|
|
5
|
-
import_path File.expand_path(
|
5
|
+
import_path File.expand_path('bower_components', root) do |target_path, _original_path|
|
6
6
|
target_path.sub('bower_components', 'bower_components2')
|
7
7
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
activate :directory_indexes
|
2
|
-
page
|
2
|
+
page '/leave_me_alone.html', directory_index: false
|
3
3
|
|
4
|
-
page
|
5
|
-
page
|
4
|
+
page '/wildcard*', directory_index: false
|
5
|
+
page(/regex_.*/, directory_index: false)
|
@@ -1,2 +1,2 @@
|
|
1
|
-
ignore
|
2
|
-
ignore
|
1
|
+
ignore 'danger-zone/*'
|
2
|
+
ignore '*.textile'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
activate :directory_indexes
|
2
2
|
|
3
|
-
proxy
|
4
|
-
proxy
|
3
|
+
proxy '/sub/fake.html', '/proxied.html', ignore: true
|
4
|
+
proxy '/sub/fake2.html', '/proxied.html', ignore: true
|
5
5
|
|
6
|
-
proxy
|
7
|
-
proxy
|
6
|
+
proxy '/directory-indexed/fake.html', '/proxied.html', ignore: true
|
7
|
+
proxy '/directory-indexed/fake2.html', '/proxied.html', ignore: true
|
@@ -0,0 +1 @@
|
|
1
|
+
Before edit
|
@@ -0,0 +1 @@
|
|
1
|
+
Don't care
|
@@ -1,2 +1,2 @@
|
|
1
1
|
files.watch :source, path: File.join(root, 'source2'),
|
2
|
-
destination_dir: 'source2'
|
2
|
+
destination_dir: 'source2'
|
@@ -0,0 +1 @@
|
|
1
|
+
files.watch :source, path: File.join(root, 'external')
|
@@ -0,0 +1 @@
|
|
1
|
+
Before edit
|
@@ -0,0 +1 @@
|
|
1
|
+
Don't care
|
@@ -1,2 +1,2 @@
|
|
1
|
-
page
|
2
|
-
page
|
1
|
+
page '/sub1/page-classes.html', layout: false
|
2
|
+
page '/sub1/sub2/page-classes.html', layout: false
|
@@ -1,7 +1,7 @@
|
|
1
|
-
%w
|
2
|
-
proxy "/#{n}.html",
|
1
|
+
%w[1 2 3].each do |n|
|
2
|
+
proxy "/#{n}.html", '/index.html', id: "page#{n}"
|
3
3
|
end
|
4
4
|
|
5
|
-
page
|
5
|
+
page '/overwrites/*', id: :"something-else"
|
6
6
|
|
7
|
-
config[:page_id_generator] = ->(path){ path +
|
7
|
+
config[:page_id_generator] = ->(path) { path + '-foo' }
|
@@ -1 +1 @@
|
|
1
|
-
Local
|
1
|
+
Local vars are '<%= locals['foo'] %>', '<%= locals[:bar] %>' and '<%= baz %>'
|
@@ -1 +1 @@
|
|
1
|
-
<%= partial 'locals', locals: { foo: 'bar' } %>
|
1
|
+
<%= partial 'locals', locals: { foo: 'foo', 'bar' => 'bar', 'baz': 'baz' } %>
|
@@ -1,18 +1,17 @@
|
|
1
|
-
|
2
|
-
proxy
|
3
|
-
proxy
|
4
|
-
proxy
|
5
|
-
proxy "/fake4.html", "real.html", layout: false
|
1
|
+
proxy '/fake.html', '/real.html', layout: false
|
2
|
+
proxy 'fake2.html', '/real.html', layout: false
|
3
|
+
proxy 'fake3.html', 'real.html', layout: false
|
4
|
+
proxy '/fake4.html', 'real.html', layout: false
|
6
5
|
|
7
|
-
proxy
|
8
|
-
proxy
|
9
|
-
proxy
|
10
|
-
proxy
|
6
|
+
proxy '/target_ignore.html', '/should_be_ignored3.html', ignore: true
|
7
|
+
proxy 'target_ignore2.html', '/should_be_ignored6.html', ignore: true
|
8
|
+
proxy 'target_ignore3.html', 'should_be_ignored7.html', ignore: true
|
9
|
+
proxy '/target_ignore4.html', 'should_be_ignored8.html', ignore: true
|
11
10
|
|
12
|
-
%w
|
13
|
-
proxy "/fake/#{num}.html",
|
14
|
-
proxy "fake2/#{num}.html",
|
15
|
-
proxy "fake3/#{num}.html",
|
11
|
+
%w[one two].each do |num|
|
12
|
+
proxy "/fake/#{num}.html", '/real/index.html', ignore: true, locals: { num: num }
|
13
|
+
proxy "fake2/#{num}.html", '/real/index.html', ignore: true, locals: { num: num }
|
14
|
+
proxy "fake3/#{num}.html", 'real/index.html', ignore: true, locals: { num: num }
|
16
15
|
end
|
17
16
|
|
18
|
-
proxy
|
17
|
+
proxy '明日がある.html', '/real.html', layout: false
|