middleman-core 4.3.0.rc.4 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cucumber.yml +2 -2
- data/features/builder.feature +1 -1
- data/features/chained_templates.feature +0 -7
- data/features/coffee-script.feature +1 -1
- data/features/collections.feature +2 -2
- data/features/console.feature +1 -1
- data/features/data.feature +31 -0
- data/features/extension_api_deprecations.feature +3 -1
- data/features/extension_hooks.feature +3 -1
- data/features/helpers_external.feature +1 -17
- data/features/i18n_link_to.feature +0 -23
- data/features/i18n_mixed_sources.feature +0 -8
- data/features/i18n_preview.feature +1 -30
- data/features/ignore.feature +11 -67
- data/features/ignore_already_minified.feature +1 -1
- data/features/markdown.feature +1 -0
- data/features/minify_javascript.feature +35 -35
- data/features/mount_rack.feature +0 -1
- data/features/page-id.feature +2 -2
- data/features/partials.feature +1 -1
- data/features/relative_assets_helpers_only.feature +6 -4
- data/features/scss-support.feature +6 -1
- data/features/support/env.rb +5 -5
- data/features/tilde_directories.feature +2 -0
- data/features/unicode_filenames.feature +1 -1
- data/fixtures/asset-hash-app/config.rb +1 -0
- 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-minified-app/config.rb +1 -1
- data/fixtures/asset-hash-prefix/config.rb +2 -1
- data/fixtures/asset-hash-prefix/lib/middleware.rb +2 -2
- data/fixtures/asset-hash-source-map/config.rb +1 -0
- 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 +1 -0
- 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/dynamic-pages-app/config.rb +26 -25
- 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/env-app/source/stylesheets/site.css.scss +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 +1 -3
- data/fixtures/external-helpers/helpers/four_helpers.rb +1 -3
- data/fixtures/external-helpers/helpers/one_helper.rb +1 -3
- data/fixtures/external-helpers/helpers/yet_another_thingy.rb +1 -3
- 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/generator-test/config.rb +15 -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-test-app/locales/en.yml +1 -7
- data/fixtures/i18n-test-app/locales/es.yml +1 -2
- 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-duplicate-file-names-app/config.rb +1 -1
- 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/page-id-app/source/{forty-two.html.erb → fourty-two.html.erb} +0 -0
- 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 +14 -13
- data/fixtures/sass-assets-path-app/config.rb +2 -2
- data/fixtures/scss-app/source/stylesheets/error.css.sass +1 -0
- 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/rack.rb +7 -0
- data/lib/middleman-core/application.rb +9 -10
- data/lib/middleman-core/builder.rb +21 -50
- 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/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/collections.rb +1 -1
- data/lib/middleman-core/core_extensions/data.rb +11 -11
- data/lib/middleman-core/core_extensions/default_helpers.rb +29 -26
- data/lib/middleman-core/core_extensions/external_helpers.rb +1 -1
- 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 +23 -44
- data/lib/middleman-core/core_extensions/inline_url_rewriter.rb +7 -10
- data/lib/middleman-core/core_extensions/routing.rb +1 -1
- data/lib/middleman-core/core_extensions.rb +2 -2
- 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/dns_resolver.rb +1 -1
- data/lib/middleman-core/extension.rb +32 -34
- data/lib/middleman-core/extension_manager.rb +2 -6
- data/lib/middleman-core/extensions/asset_hash.rb +22 -24
- 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 +9 -14
- data/lib/middleman-core/extensions/gzip.rb +6 -8
- data/lib/middleman-core/extensions/lorem.rb +9 -9
- data/lib/middleman-core/extensions/minify_css.rb +16 -14
- data/lib/middleman-core/extensions/minify_javascript.rb +13 -13
- data/lib/middleman-core/extensions/relative_assets.rb +8 -8
- data/lib/middleman-core/extensions.rb +7 -8
- data/lib/middleman-core/file_renderer.rb +6 -7
- data/lib/middleman-core/load_paths.rb +10 -13
- data/lib/middleman-core/logger.rb +4 -3
- data/lib/middleman-core/meta_pages/sitemap_resource.rb +2 -0
- data/lib/middleman-core/meta_pages/sitemap_tree.rb +1 -1
- data/lib/middleman-core/meta_pages.rb +1 -1
- 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_information_callback_proxy.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/preview_server.rb +25 -25
- 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 +4 -8
- data/lib/middleman-core/renderers/less.rb +1 -1
- data/lib/middleman-core/renderers/liquid.rb +2 -3
- 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 +23 -26
- data/lib/middleman-core/renderers/sass_functions.rb +14 -17
- data/lib/middleman-core/renderers/slim.rb +2 -2
- data/lib/middleman-core/sitemap/extensions/ignores.rb +4 -2
- 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 +1 -2
- 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 +25 -80
- data/lib/middleman-core/sitemap/resource.rb +20 -21
- data/lib/middleman-core/sitemap/store.rb +6 -6
- data/lib/middleman-core/sources/source_watcher.rb +11 -17
- data/lib/middleman-core/sources.rb +12 -12
- data/lib/middleman-core/step_definitions/builder_steps.rb +12 -38
- data/lib/middleman-core/step_definitions/commandline_steps.rb +6 -6
- data/lib/middleman-core/step_definitions/middleman_steps.rb +14 -13
- data/lib/middleman-core/step_definitions/server_steps.rb +16 -18
- data/lib/middleman-core/template_context.rb +10 -17
- data/lib/middleman-core/template_renderer.rb +33 -35
- data/lib/middleman-core/util/binary.rb +1 -3
- data/lib/middleman-core/util/data.rb +22 -12
- data/lib/middleman-core/util/files.rb +3 -3
- data/lib/middleman-core/util/paths.rb +44 -47
- data/lib/middleman-core/util/rack.rb +3 -3
- data/lib/middleman-core/util/uri_templates.rb +0 -1
- data/lib/middleman-core/util.rb +2 -2
- data/lib/middleman-core/version.rb +1 -1
- data/lib/middleman-core.rb +3 -3
- data/middleman-core.gemspec +13 -12
- data/spec/middleman-core/callbacks_spec.rb +14 -15
- data/spec/middleman-core/core_extensions/data_spec.rb +74 -70
- data/spec/middleman-core/dns_resolver_spec.rb +6 -6
- data/spec/middleman-core/util_spec.rb +86 -81
- data/spec/spec_helper.rb +6 -1
- data/spec/support/given.rb +15 -11
- metadata +59 -76
- data/features/multiple-sources-reload.feature +0 -40
- data/fixtures/chained-app/source/stylesheets/main.css.scss.erb +0 -3
- data/fixtures/chained-app/source/stylesheets/sub.scss +0 -1
- data/fixtures/destination-dir-different-from-source-dir-name/external/page.html.erb +0 -1
- data/fixtures/destination-dir-different-from-source-dir-name/my-app/config.rb +0 -2
- data/fixtures/destination-dir-different-from-source-dir-name/my-app/source/index.html.erb +0 -1
- data/fixtures/i18n-default-app/source/name.html.erb +0 -1
- data/fixtures/i18n-mixed-sources/source/c/d/index.html.erb +0 -9
- data/fixtures/i18n-mixed-sources/source/localizable/c/d/index.html.erb +0 -9
- data/fixtures/i18n-test-app/source/localizable/tac.html.erb +0 -1
- data/fixtures/multiple-sources-with-destination-dir/config.rb +0 -2
- data/fixtures/multiple-sources-with-destination-dir/external/page.html.erb +0 -1
- data/fixtures/multiple-sources-with-destination-dir/source/index.html.erb +0 -1
- data/fixtures/multiple-sources-without-destination-dir/config.rb +0 -1
- data/fixtures/multiple-sources-without-destination-dir/external/page.html.erb +0 -1
- data/fixtures/multiple-sources-without-destination-dir/source/index.html.erb +0 -1
@@ -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 {
|
10
|
-
if
|
9
|
+
response.each {|part| body += part }
|
10
|
+
if (env["PATH_INFO"] =~ /css$/)
|
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 {
|
10
|
-
if
|
9
|
+
response.each {|part| body += part }
|
10
|
+
if (env["PATH_INFO"] =~ /css$/)
|
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 {
|
10
|
-
if
|
9
|
+
response.each {|part| body += part }
|
10
|
+
if (env["PATH_INFO"] =~ /css$/)
|
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
|
-
activate :asset_host, host:
|
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
|
@@ -1,33 +1,34 @@
|
|
1
|
-
|
2
|
-
proxy
|
3
|
-
proxy
|
4
|
-
proxy
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
proxy "/fake.html", "/real.html", layout: false
|
3
|
+
proxy "fake2.html", "/real.html", layout: false
|
4
|
+
proxy "fake3.html", "real.html", layout: false
|
5
|
+
proxy "/fake4.html", "real.html", layout: false
|
5
6
|
|
6
|
-
ignore
|
7
|
-
ignore
|
8
|
-
proxy
|
7
|
+
ignore "/should_be_ignored.html"
|
8
|
+
ignore "/should_be_ignored2.html"
|
9
|
+
proxy "/target_ignore.html", "/should_be_ignored3.html", ignore: true
|
9
10
|
|
10
|
-
ignore
|
11
|
-
ignore
|
12
|
-
proxy
|
13
|
-
proxy
|
14
|
-
proxy
|
11
|
+
ignore "should_be_ignored4.html"
|
12
|
+
ignore "should_be_ignored5.html"
|
13
|
+
proxy "target_ignore2.html", "/should_be_ignored6.html", ignore: true
|
14
|
+
proxy "target_ignore3.html", "should_be_ignored7.html", ignore: true
|
15
|
+
proxy "/target_ignore4.html", "should_be_ignored8.html", ignore: true
|
15
16
|
|
16
|
-
%w
|
17
|
-
proxy "/fake/#{num}.html",
|
18
|
-
proxy "fake2/#{num}.html",
|
19
|
-
proxy "fake3/#{num}.html",
|
20
|
-
proxy "/fake4/#{num}.html",
|
17
|
+
%w(one two).each do |num|
|
18
|
+
proxy "/fake/#{num}.html", "/real/index.html", ignore: true, locals: { num: num }
|
19
|
+
proxy "fake2/#{num}.html", "/real/index.html", ignore: true, locals: { num: num }
|
20
|
+
proxy "fake3/#{num}.html", "real/index.html", ignore: true, locals: { num: num }
|
21
|
+
proxy "/fake4/#{num}.html", "real/index.html", ignore: true, locals: { num: num }
|
21
22
|
end
|
22
23
|
|
23
|
-
proxy
|
24
|
+
proxy "明日がある.html", "/real.html", layout: false
|
24
25
|
|
25
|
-
page
|
26
|
-
page
|
27
|
-
page
|
28
|
-
page
|
29
|
-
page
|
26
|
+
page "f*/*", locals: { all_glob: "I am all glob" }
|
27
|
+
page "fake/*", locals: { glob_var: "I am one glob" }
|
28
|
+
page "fake2/*", locals: { glob_var: "I am two glob" }
|
29
|
+
page "fake3/*", locals: { glob_var: "I am three glob" }
|
30
|
+
page "fake4/*", locals: { glob_var: "I am four glob" }
|
30
31
|
|
31
|
-
|
32
|
-
proxy "/about/#{name}.html",
|
32
|
+
["tom", "dick", "harry"].each do |name|
|
33
|
+
proxy "/about/#{name}.html", "/should_be_ignored9.html", locals: { person_name: name }, ignore: true
|
33
34
|
end
|
@@ -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(\\--- \\---)
|
@@ -1,3 +1,16 @@
|
|
1
|
+
###
|
2
|
+
# Compass
|
3
|
+
###
|
4
|
+
|
5
|
+
# Susy grids in Compass
|
6
|
+
# First: gem install compass-susy-plugin
|
7
|
+
# require 'susy'
|
8
|
+
|
9
|
+
# Change Compass configuration
|
10
|
+
# compass_config do |config|
|
11
|
+
# config.output_style = :compact
|
12
|
+
# end
|
13
|
+
|
1
14
|
###
|
2
15
|
# Page options, layouts, aliases and proxies
|
3
16
|
###
|
@@ -40,9 +53,10 @@
|
|
40
53
|
|
41
54
|
# Production configuration
|
42
55
|
configure :production do
|
56
|
+
# For example, change the Compass output style for deployment
|
43
57
|
# activate :minify_css
|
44
58
|
|
45
|
-
# Minify
|
59
|
+
# Minify Javascript
|
46
60
|
# activate :minify_javascript
|
47
61
|
|
48
62
|
# Enable cache buster
|
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
|
+
[: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: [: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
|
@@ -1,2 +1,2 @@
|
|
1
1
|
files.watch :source, path: File.join(root, 'source2'),
|
2
|
-
destination_dir: 'source2'
|
2
|
+
destination_dir: 'source2'
|