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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 407a6cefc4af923494308fd89533f224e4a41ace633f3047443481148181d5fc
|
4
|
+
data.tar.gz: fa06797e795bf36af4fd50b2174f6de794eb11aaa40f1ed39b242852181188ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 129679da5f716ac7a5bc64b8928fe0211add698897af3875f57b32f0f89c3bedf0bf11b08f9ba15d7454eb208e7d9cc5c81befd1a71fb624471ac518afb839b4
|
7
|
+
data.tar.gz: bedf2d6090c39aa9aa0159d2b31a99b88317fe64252adf6da06222f57f0300b234b87559b5da8a50805d261230ecc8d2b2be7c0dacf7539f2037adc03eb8ea81
|
data/Rakefile
CHANGED
data/cucumber.yml
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
default: --require features --tags
|
2
|
-
wip: --require features --tags @wip
|
1
|
+
default: --fail-fast --require features --tags 'not @wip'
|
2
|
+
wip: --fail-fast --require features --tags @wip
|
data/features/asset_hash.feature
CHANGED
@@ -179,14 +179,14 @@ Feature: Assets get file hashes appended to them and references to them are upda
|
|
179
179
|
font-size: 14px
|
180
180
|
"""
|
181
181
|
When I go to "/partials/"
|
182
|
-
Then I should see 'href="../stylesheets/uses_partials-
|
182
|
+
Then I should see 'href="../stylesheets/uses_partials-a3c8302b.css'
|
183
183
|
And the file "source/stylesheets/_partial.sass" has the contents
|
184
184
|
"""
|
185
185
|
body
|
186
186
|
font-size: 18px !important
|
187
187
|
"""
|
188
188
|
When I go to "/partials/"
|
189
|
-
Then I should see 'href="../stylesheets/uses_partials-
|
189
|
+
Then I should see 'href="../stylesheets/uses_partials-08ee47a7.css'
|
190
190
|
|
191
191
|
Scenario: The asset hash should change when a Rack-based filter changes
|
192
192
|
Given a fixture app "asset-hash-app"
|
@@ -111,7 +111,7 @@ Feature: Collections
|
|
111
111
|
"""
|
112
112
|
---
|
113
113
|
title: "Blog3 Another Article"
|
114
|
-
date: 2011-01-02
|
114
|
+
date: "2011-01-02"
|
115
115
|
tags:
|
116
116
|
- foo
|
117
117
|
---
|
@@ -133,7 +133,7 @@ Feature: Collections
|
|
133
133
|
"""
|
134
134
|
---
|
135
135
|
title: "Blog2 Yet Another Article"
|
136
|
-
date: 2011-01-02
|
136
|
+
date: "2011-01-02"
|
137
137
|
tags:
|
138
138
|
- foo
|
139
139
|
---
|
@@ -37,3 +37,11 @@ Feature: i18n merging path trees
|
|
37
37
|
When I go to "/es/b/sub.html"
|
38
38
|
Then I should see "Current locale: es"
|
39
39
|
Then I should see "path: is-localized Home # b/index.html.erb # b/sub.html.erb"
|
40
|
+
|
41
|
+
When I go to "/c/d/index.html"
|
42
|
+
Then I should see "Current locale: en"
|
43
|
+
Then I should see "path: is-localized Home # c/d/index.html.erb"
|
44
|
+
|
45
|
+
When I go to "/es/c/d/index.html"
|
46
|
+
Then I should see "Current locale: es"
|
47
|
+
Then I should see "path: is-localized Home # c/d/index.html.erb"
|
data/features/markdown.feature
CHANGED
@@ -0,0 +1,40 @@
|
|
1
|
+
Feature: Allow content with multiple sources to reload
|
2
|
+
Scenario: With source that does not specify a destination directory
|
3
|
+
Given the Server is running at "multiple-sources-without-destination-dir"
|
4
|
+
When I go to "/page.html"
|
5
|
+
Then I should see "Before edit"
|
6
|
+
|
7
|
+
When the file "external/page.html.erb" has the contents
|
8
|
+
"""
|
9
|
+
After edit
|
10
|
+
"""
|
11
|
+
And I go to "/page.html"
|
12
|
+
Then I should see "After edit"
|
13
|
+
|
14
|
+
|
15
|
+
Scenario: With source that specifies destination directory
|
16
|
+
Given the Server is running at "multiple-sources-with-destination-dir"
|
17
|
+
When I go to "/external/page.html"
|
18
|
+
Then I should see "Before edit"
|
19
|
+
|
20
|
+
When the file "external/page.html.erb" has the contents
|
21
|
+
"""
|
22
|
+
After edit
|
23
|
+
"""
|
24
|
+
And I go to "/external/page.html"
|
25
|
+
Then I should see "After edit"
|
26
|
+
|
27
|
+
Scenario: With external source and a destination directory name different from source directory name
|
28
|
+
Given a fixture app "destination-dir-different-from-source-dir-name"
|
29
|
+
And I cd to "my-app"
|
30
|
+
And the Server is running
|
31
|
+
|
32
|
+
When I go to "/my_dir/page.html"
|
33
|
+
Then I should see "Before edit"
|
34
|
+
|
35
|
+
When the file "../external/page.html.erb" has the contents
|
36
|
+
"""
|
37
|
+
After edit
|
38
|
+
"""
|
39
|
+
And I go to "/my_dir/page.html"
|
40
|
+
Then I should see "After edit"
|
data/features/partials.feature
CHANGED
@@ -37,7 +37,7 @@ Feature: Provide Sane Defaults for Partial Behavior
|
|
37
37
|
Scenario: Partials can be passed locals
|
38
38
|
Given the Server is running at "partials-app"
|
39
39
|
When I go to "/locals.html"
|
40
|
-
Then I should see "Local
|
40
|
+
Then I should see "Local vars are 'foo', 'bar' and 'baz'"
|
41
41
|
|
42
42
|
Scenario: Partial and Layout use different engines
|
43
43
|
Given the Server is running at "different-engine-partial"
|
data/features/support/env.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
ENV[
|
1
|
+
ENV['TEST'] = 'true'
|
2
2
|
|
3
|
+
require 'backports/latest'
|
3
4
|
require 'sassc'
|
4
5
|
|
5
6
|
require 'simplecov'
|
@@ -8,6 +9,8 @@ SimpleCov.root(File.expand_path(File.dirname(__FILE__) + '/../..'))
|
|
8
9
|
require 'phantomjs/poltergeist'
|
9
10
|
Capybara.javascript_driver = :poltergeist
|
10
11
|
|
12
|
+
Capybara.server = :webrick
|
13
|
+
|
11
14
|
require 'simplecov'
|
12
15
|
SimpleCov.start
|
13
16
|
|
@@ -6,8 +6,8 @@ class Middleware
|
|
6
6
|
def call(env)
|
7
7
|
status, headers, response = @app.call(env)
|
8
8
|
body = ''
|
9
|
-
response.each {|part| body += part }
|
10
|
-
if (env[
|
9
|
+
response.each { |part| body += part }
|
10
|
+
if /css$/.match?(env['PATH_INFO'])
|
11
11
|
body += "\n/* Added by Rack filter */"
|
12
12
|
status, headers, response = Rack::Response.new(body, status, headers).finish
|
13
13
|
end
|
@@ -1,2 +1,2 @@
|
|
1
1
|
body
|
2
|
-
font-size: 18px
|
2
|
+
font-size: 18px
|
@@ -6,8 +6,8 @@ class Middleware
|
|
6
6
|
def call(env)
|
7
7
|
status, headers, response = @app.call(env)
|
8
8
|
body = ''
|
9
|
-
response.each {|part| body += part }
|
10
|
-
if (env[
|
9
|
+
response.each { |part| body += part }
|
10
|
+
if /css$/.match?(env['PATH_INFO'])
|
11
11
|
body += "\n/* Added by Rack filter */"
|
12
12
|
status, headers, response = Rack::Response.new(body, status, headers).finish
|
13
13
|
end
|
@@ -6,8 +6,8 @@ class Middleware
|
|
6
6
|
def call(env)
|
7
7
|
status, headers, response = @app.call(env)
|
8
8
|
body = ''
|
9
|
-
response.each {|part| body += part }
|
10
|
-
if (env[
|
9
|
+
response.each { |part| body += part }
|
10
|
+
if /css$/.match?(env['PATH_INFO'])
|
11
11
|
body += "\n/* Added by Rack filter */"
|
12
12
|
status, headers, response = Rack::Response.new(body, status, headers).finish
|
13
13
|
end
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
activate :asset_host, host: 'http://assets1.example.com'
|
@@ -1 +1 @@
|
|
1
|
-
activate :directory_indexes
|
1
|
+
activate :directory_indexes
|
@@ -1 +1 @@
|
|
1
|
-
set :automatic_directory_matcher,
|
1
|
+
set :automatic_directory_matcher, '--'
|
@@ -1,2 +1,2 @@
|
|
1
|
-
page
|
2
|
-
page
|
1
|
+
page '/data.html', layout: false
|
2
|
+
page '/data3.html', layout: false
|
@@ -1,5 +1,5 @@
|
|
1
|
-
require
|
1
|
+
require 'slim'
|
2
2
|
|
3
|
-
page
|
4
|
-
page
|
5
|
-
page
|
3
|
+
page '/capture_html_erb.html', layout: :capture_html
|
4
|
+
page '/capture_html_haml.html', layout: :capture_html
|
5
|
+
page '/capture_html_slim.html', layout: :capture_html
|
@@ -1,9 +1,9 @@
|
|
1
|
-
proxy
|
1
|
+
proxy '/fake.html', '/real.html', layout: false
|
2
2
|
|
3
|
-
ignore
|
4
|
-
ignore
|
5
|
-
proxy
|
3
|
+
ignore '/should_be_ignored.html'
|
4
|
+
ignore '/should_be_ignored2.html'
|
5
|
+
proxy '/target_ignore.html', '/should_be_ignored3.html', ignore: true
|
6
6
|
|
7
|
-
%w
|
8
|
-
proxy "/fake/#{num}.html",
|
7
|
+
%w[one two].each do |num|
|
8
|
+
proxy "/fake/#{num}.html", '/real/index.html', locals: { num: num }
|
9
9
|
end
|
@@ -1,5 +1,5 @@
|
|
1
|
-
set :build_dir,
|
1
|
+
set :build_dir, '.build'
|
2
2
|
|
3
|
-
ignore
|
4
|
-
ignore
|
5
|
-
proxy
|
3
|
+
ignore '/should_be_ignored.html'
|
4
|
+
ignore '/should_be_ignored2.html'
|
5
|
+
proxy '/target_ignore.html', '/should_be_ignored3.html', ignore: true
|
@@ -1 +1 @@
|
|
1
|
-
set :build_dir,
|
1
|
+
set :build_dir, '.build'
|
@@ -1,9 +1,9 @@
|
|
1
|
-
proxy
|
1
|
+
proxy '/fake.html', '/real.html', layout: false
|
2
2
|
|
3
|
-
ignore
|
4
|
-
ignore
|
5
|
-
proxy
|
3
|
+
ignore '/should_be_ignored.html'
|
4
|
+
ignore '/should_be_ignored2.html'
|
5
|
+
proxy '/target_ignore.html', '/should_be_ignored3.html', ignore: true
|
6
6
|
|
7
|
-
%w
|
8
|
-
proxy "/fake/#{num}.html",
|
7
|
+
%w[one two].each do |num|
|
8
|
+
proxy "/fake/#{num}.html", '/real/index.html', locals: { num: num }
|
9
9
|
end
|
@@ -1 +1 @@
|
|
1
|
-
set :build_dir,
|
1
|
+
set :build_dir, 'sub/dir'
|
@@ -1,5 +1,5 @@
|
|
1
|
-
require
|
1
|
+
require 'slim'
|
2
2
|
|
3
|
-
page
|
4
|
-
page
|
5
|
-
page
|
3
|
+
page '/content_for_erb.html', layout: :content_for
|
4
|
+
page '/content_for_haml.html', layout: :content_for
|
5
|
+
page '/content_for_slim.html', layout: :content_for
|
@@ -0,0 +1 @@
|
|
1
|
+
Before edit
|
@@ -0,0 +1 @@
|
|
1
|
+
Don't care
|
@@ -1,34 +1,33 @@
|
|
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
|
-
ignore
|
8
|
-
ignore
|
9
|
-
proxy
|
6
|
+
ignore '/should_be_ignored.html'
|
7
|
+
ignore '/should_be_ignored2.html'
|
8
|
+
proxy '/target_ignore.html', '/should_be_ignored3.html', ignore: true
|
10
9
|
|
11
|
-
ignore
|
12
|
-
ignore
|
13
|
-
proxy
|
14
|
-
proxy
|
15
|
-
proxy
|
10
|
+
ignore 'should_be_ignored4.html'
|
11
|
+
ignore 'should_be_ignored5.html'
|
12
|
+
proxy 'target_ignore2.html', '/should_be_ignored6.html', ignore: true
|
13
|
+
proxy 'target_ignore3.html', 'should_be_ignored7.html', ignore: true
|
14
|
+
proxy '/target_ignore4.html', 'should_be_ignored8.html', ignore: true
|
16
15
|
|
17
|
-
%w
|
18
|
-
proxy "/fake/#{num}.html",
|
19
|
-
proxy "fake2/#{num}.html",
|
20
|
-
proxy "fake3/#{num}.html",
|
21
|
-
proxy "/fake4/#{num}.html",
|
16
|
+
%w[one two].each do |num|
|
17
|
+
proxy "/fake/#{num}.html", '/real/index.html', ignore: true, locals: { num: num }
|
18
|
+
proxy "fake2/#{num}.html", '/real/index.html', ignore: true, locals: { num: num }
|
19
|
+
proxy "fake3/#{num}.html", 'real/index.html', ignore: true, locals: { num: num }
|
20
|
+
proxy "/fake4/#{num}.html", 'real/index.html', ignore: true, locals: { num: num }
|
22
21
|
end
|
23
22
|
|
24
|
-
proxy
|
23
|
+
proxy '明日がある.html', '/real.html', layout: false
|
25
24
|
|
26
|
-
page
|
27
|
-
page
|
28
|
-
page
|
29
|
-
page
|
30
|
-
page
|
25
|
+
page 'f*/*', locals: { all_glob: 'I am all glob' }
|
26
|
+
page 'fake/*', locals: { glob_var: 'I am one glob' }
|
27
|
+
page 'fake2/*', locals: { glob_var: 'I am two glob' }
|
28
|
+
page 'fake3/*', locals: { glob_var: 'I am three glob' }
|
29
|
+
page 'fake4/*', locals: { glob_var: 'I am four glob' }
|
31
30
|
|
32
|
-
[
|
33
|
-
proxy "/about/#{name}.html",
|
31
|
+
%w[tom dick harry].each do |name|
|
32
|
+
proxy "/about/#{name}.html", '/should_be_ignored9.html', locals: { person_name: name }, ignore: true
|
34
33
|
end
|