Merge pull request #923 from pulletsforever/feature/rack-block

Allow block to be passed through from Middleman.server()
This commit is contained in:
Thomas Reynolds 2013-06-03 13:35:01 -07:00
commit d3d85f8bc7

View file

@ -130,7 +130,7 @@ module Middleman
def server(&block)
@@servercounter ||= 0
@@servercounter += 1
const_set("MiddlemanApplication#{@@servercounter}", Class.new(Middleman::Application))
const_set("MiddlemanApplication#{@@servercounter}", Class.new(Middleman::Application, &block))
end
end
@ -142,7 +142,7 @@ module Middleman
#
# @return [Class]
def server(&block)
::Middleman::Application.server
::Middleman::Application.server(&block)
end
end