Merge branch 'master' into fix/asset-url-and-relative-paths
This commit is contained in:
commit
d539d4aa3d
8 changed files with 31 additions and 13 deletions
|
@ -47,6 +47,8 @@ end
|
||||||
::Middleman::Logger.singleton(3)
|
::Middleman::Logger.singleton(3)
|
||||||
::Middleman::Cli.config = ::Middleman::Application.new do
|
::Middleman::Cli.config = ::Middleman::Application.new do
|
||||||
config[:exit_before_ready] = true
|
config[:exit_before_ready] = true
|
||||||
|
config[:watcher_disable] = true
|
||||||
|
config[:disable_sitemap] = true
|
||||||
end.config
|
end.config
|
||||||
|
|
||||||
# Require the Middleman version
|
# Require the Middleman version
|
||||||
|
|
|
@ -23,6 +23,8 @@ module Middleman::Cli
|
||||||
::Middleman::Logger.singleton(2, false)
|
::Middleman::Logger.singleton(2, false)
|
||||||
|
|
||||||
app = ::Middleman::Application.new do
|
app = ::Middleman::Application.new do
|
||||||
|
config[:disable_sitemap] = true
|
||||||
|
config[:watcher_disable] = true
|
||||||
config[:exit_before_ready] = true
|
config[:exit_before_ready] = true
|
||||||
config[:environment] = opts[:environment].to_sym if opts[:environment]
|
config[:environment] = opts[:environment].to_sym if opts[:environment]
|
||||||
end
|
end
|
||||||
|
|
|
@ -31,7 +31,8 @@ Feature: Dynamic Pages
|
||||||
| should_be_ignored6.html |
|
| should_be_ignored6.html |
|
||||||
| should_be_ignored7.html |
|
| should_be_ignored7.html |
|
||||||
| should_be_ignored8.html |
|
| should_be_ignored8.html |
|
||||||
|
| should_be_ignored9.html |
|
||||||
|
|
||||||
Scenario: Preview basic proxy
|
Scenario: Preview basic proxy
|
||||||
Given the Server is running at "dynamic-pages-app"
|
Given the Server is running at "dynamic-pages-app"
|
||||||
When I go to "/fake.html"
|
When I go to "/fake.html"
|
||||||
|
@ -42,46 +43,46 @@ Feature: Dynamic Pages
|
||||||
Then I should see "I am real"
|
Then I should see "I am real"
|
||||||
When I go to "/fake4.html"
|
When I go to "/fake4.html"
|
||||||
Then I should see "I am real"
|
Then I should see "I am real"
|
||||||
|
|
||||||
Scenario: Preview proxy with variable one
|
Scenario: Preview proxy with variable one
|
||||||
Given the Server is running at "dynamic-pages-app"
|
Given the Server is running at "dynamic-pages-app"
|
||||||
When I go to "/fake/one.html"
|
When I go to "/fake/one.html"
|
||||||
Then I should see "I am real: one"
|
Then I should see "I am real: one"
|
||||||
Then I should see "Global: I am one glob"
|
Then I should see "Global: I am one glob"
|
||||||
Then I should see "All: I am all glob"
|
Then I should see "All: I am all glob"
|
||||||
|
|
||||||
When I go to "/fake2/one.html"
|
When I go to "/fake2/one.html"
|
||||||
Then I should see "I am real: one"
|
Then I should see "I am real: one"
|
||||||
Then I should see "Global: I am two glob"
|
Then I should see "Global: I am two glob"
|
||||||
Then I should see "All: I am all glob"
|
Then I should see "All: I am all glob"
|
||||||
|
|
||||||
When I go to "/fake3/one.html"
|
When I go to "/fake3/one.html"
|
||||||
Then I should see "I am real: one"
|
Then I should see "I am real: one"
|
||||||
Then I should see "Global: I am three glob"
|
Then I should see "Global: I am three glob"
|
||||||
Then I should see "All: I am all glob"
|
Then I should see "All: I am all glob"
|
||||||
|
|
||||||
When I go to "/fake4/one.html"
|
When I go to "/fake4/one.html"
|
||||||
Then I should see "I am real: one"
|
Then I should see "I am real: one"
|
||||||
Then I should see "Global: I am four glob"
|
Then I should see "Global: I am four glob"
|
||||||
Then I should see "All: I am all glob"
|
Then I should see "All: I am all glob"
|
||||||
|
|
||||||
Scenario: Preview proxy with variable two
|
Scenario: Preview proxy with variable two
|
||||||
Given the Server is running at "dynamic-pages-app"
|
Given the Server is running at "dynamic-pages-app"
|
||||||
When I go to "/fake/two.html"
|
When I go to "/fake/two.html"
|
||||||
Then I should see "I am real: two"
|
Then I should see "I am real: two"
|
||||||
Then I should see "Global: I am one glob"
|
Then I should see "Global: I am one glob"
|
||||||
Then I should see "All: I am all glob"
|
Then I should see "All: I am all glob"
|
||||||
|
|
||||||
When I go to "/fake2/two.html"
|
When I go to "/fake2/two.html"
|
||||||
Then I should see "I am real: two"
|
Then I should see "I am real: two"
|
||||||
Then I should see "Global: I am two glob"
|
Then I should see "Global: I am two glob"
|
||||||
Then I should see "All: I am all glob"
|
Then I should see "All: I am all glob"
|
||||||
|
|
||||||
When I go to "/fake3/two.html"
|
When I go to "/fake3/two.html"
|
||||||
Then I should see "I am real: two"
|
Then I should see "I am real: two"
|
||||||
Then I should see "Global: I am three glob"
|
Then I should see "Global: I am three glob"
|
||||||
Then I should see "All: I am all glob"
|
Then I should see "All: I am all glob"
|
||||||
|
|
||||||
When I go to "/fake4/two.html"
|
When I go to "/fake4/two.html"
|
||||||
Then I should see "I am real: two"
|
Then I should see "I am real: two"
|
||||||
Then I should see "Global: I am four glob"
|
Then I should see "Global: I am four glob"
|
||||||
|
@ -101,7 +102,7 @@ Feature: Dynamic Pages
|
||||||
Then the file "fake3/one.html" should contain "I am real: one"
|
Then the file "fake3/one.html" should contain "I am real: one"
|
||||||
Then the file "fake3/one.html" should contain "Global: I am three glob"
|
Then the file "fake3/one.html" should contain "Global: I am three glob"
|
||||||
Then the file "fake3/one.html" should contain "All: I am all glob"
|
Then the file "fake3/one.html" should contain "All: I am all glob"
|
||||||
|
|
||||||
Scenario: Target ignore
|
Scenario: Target ignore
|
||||||
Given the Server is running at "dynamic-pages-app"
|
Given the Server is running at "dynamic-pages-app"
|
||||||
When I go to "/target_ignore.html"
|
When I go to "/target_ignore.html"
|
||||||
|
@ -112,7 +113,7 @@ Feature: Dynamic Pages
|
||||||
Then I should see "Ignore me! 7"
|
Then I should see "Ignore me! 7"
|
||||||
When I go to "/target_ignore4.html"
|
When I go to "/target_ignore4.html"
|
||||||
Then I should see "Ignore me! 8"
|
Then I should see "Ignore me! 8"
|
||||||
|
|
||||||
Scenario: Preview ignored paths
|
Scenario: Preview ignored paths
|
||||||
Given the Server is running at "dynamic-pages-app"
|
Given the Server is running at "dynamic-pages-app"
|
||||||
When I go to "/should_be_ignored.html"
|
When I go to "/should_be_ignored.html"
|
||||||
|
@ -130,4 +131,6 @@ Feature: Dynamic Pages
|
||||||
When I go to "/should_be_ignored7.html"
|
When I go to "/should_be_ignored7.html"
|
||||||
Then I should see "File Not Found"
|
Then I should see "File Not Found"
|
||||||
When I go to "/should_be_ignored8.html"
|
When I go to "/should_be_ignored8.html"
|
||||||
Then I should see "File Not Found"
|
Then I should see "File Not Found"
|
||||||
|
When I go to "/should_be_ignored9.html"
|
||||||
|
Then I should see "File Not Found"
|
||||||
|
|
|
@ -28,3 +28,7 @@ page "fake/*", locals: { glob_var: "I am one glob" }
|
||||||
page "fake2/*", locals: { glob_var: "I am two glob" }
|
page "fake2/*", locals: { glob_var: "I am two glob" }
|
||||||
page "fake3/*", locals: { glob_var: "I am three glob" }
|
page "fake3/*", locals: { glob_var: "I am three glob" }
|
||||||
page "fake4/*", locals: { glob_var: "I am four 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
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<h1>Ignore me! 9</h1>
|
|
@ -96,6 +96,10 @@ module Middleman
|
||||||
# @return [String]
|
# @return [String]
|
||||||
define_setting :source, 'source', 'Name of the source directory'
|
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.
|
# If we should exit before ready event.
|
||||||
# @return [Boolean]
|
# @return [Boolean]
|
||||||
define_setting :exit_before_ready, false, 'If we should exit before ready event.'
|
define_setting :exit_before_ready, false, 'If we should exit before ready event.'
|
||||||
|
|
|
@ -216,6 +216,8 @@ module Middleman
|
||||||
# rebuild_resource_list! since the last time it was run. This is
|
# rebuild_resource_list! since the last time it was run. This is
|
||||||
# very expensive!
|
# very expensive!
|
||||||
def ensure_resource_list_updated!
|
def ensure_resource_list_updated!
|
||||||
|
return if @app.config[:disable_sitemap]
|
||||||
|
|
||||||
@lock.synchronize do
|
@lock.synchronize do
|
||||||
return unless @needs_sitemap_rebuild
|
return unless @needs_sitemap_rebuild
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Middleman
|
module Middleman
|
||||||
# Current Version
|
# Current Version
|
||||||
# @return [String]
|
# @return [String]
|
||||||
VERSION = '4.1.2'.freeze unless const_defined?(:VERSION)
|
VERSION = '4.1.3'.freeze unless const_defined?(:VERSION)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue