Merge branch 'master' into fix/asset-url-and-relative-paths

This commit is contained in:
Gregory McIntyre 2016-03-19 16:04:44 +11:00
commit d539d4aa3d
8 changed files with 31 additions and 13 deletions

View file

@ -47,6 +47,8 @@ end
::Middleman::Logger.singleton(3)
::Middleman::Cli.config = ::Middleman::Application.new do
config[:exit_before_ready] = true
config[:watcher_disable] = true
config[:disable_sitemap] = true
end.config
# Require the Middleman version

View file

@ -23,6 +23,8 @@ module Middleman::Cli
::Middleman::Logger.singleton(2, false)
app = ::Middleman::Application.new do
config[:disable_sitemap] = true
config[:watcher_disable] = true
config[:exit_before_ready] = true
config[:environment] = opts[:environment].to_sym if opts[:environment]
end

View file

@ -31,6 +31,7 @@ Feature: Dynamic Pages
| should_be_ignored6.html |
| should_be_ignored7.html |
| should_be_ignored8.html |
| should_be_ignored9.html |
Scenario: Preview basic proxy
Given the Server is running at "dynamic-pages-app"
@ -131,3 +132,5 @@ Feature: Dynamic Pages
Then I should see "File Not Found"
When I go to "/should_be_ignored8.html"
Then I should see "File Not Found"
When I go to "/should_be_ignored9.html"
Then I should see "File Not Found"

View file

@ -28,3 +28,7 @@ page "fake/*", locals: { glob_var: "I am one glob" }
page "fake2/*", locals: { glob_var: "I am two glob" }
page "fake3/*", locals: { glob_var: "I am three glob" }
page "fake4/*", locals: { glob_var: "I am four glob" }
["tom", "dick", "harry"].each do |name|
proxy "/about/#{name}.html", "/should_be_ignored9.html", locals: { person_name: name }, ignore: true
end

View file

@ -0,0 +1 @@
<h1>Ignore me! 9</h1>

View file

@ -96,6 +96,10 @@ module Middleman
# @return [String]
define_setting :source, 'source', 'Name of the source directory'
# If we should not run the sitemap.
# @return [Boolean]
define_setting :disable_sitemap, false, 'If we should not run the sitemap.'
# If we should exit before ready event.
# @return [Boolean]
define_setting :exit_before_ready, false, 'If we should exit before ready event.'

View file

@ -216,6 +216,8 @@ module Middleman
# rebuild_resource_list! since the last time it was run. This is
# very expensive!
def ensure_resource_list_updated!
return if @app.config[:disable_sitemap]
@lock.synchronize do
return unless @needs_sitemap_rebuild

View file

@ -1,5 +1,5 @@
module Middleman
# Current Version
# @return [String]
VERSION = '4.1.2'.freeze unless const_defined?(:VERSION)
VERSION = '4.1.3'.freeze unless const_defined?(:VERSION)
end