debug flag
This commit is contained in:
parent
9bfd345849
commit
d018511606
|
@ -57,12 +57,17 @@ module Middleman
|
||||||
:aliases => "-p",
|
:aliases => "-p",
|
||||||
:default => "4567",
|
:default => "4567",
|
||||||
:desc => "The port Middleman will listen on"
|
:desc => "The port Middleman will listen on"
|
||||||
|
method_option "debug",
|
||||||
|
:type => :boolean,
|
||||||
|
:default => false,
|
||||||
|
:desc => 'Print debug messages'
|
||||||
def server
|
def server
|
||||||
v1_check
|
v1_check
|
||||||
|
|
||||||
params = {
|
params = {
|
||||||
:port => options[:port],
|
:port => options["port"],
|
||||||
:environment => options[:environment]
|
:environment => options["environment"],
|
||||||
|
:debug => options["debug"]
|
||||||
}
|
}
|
||||||
|
|
||||||
puts "== The Middleman is loading"
|
puts "== The Middleman is loading"
|
||||||
|
|
|
@ -22,7 +22,8 @@ module Middleman
|
||||||
options.each do |k,v|
|
options.each do |k,v|
|
||||||
options_hash << ", :#{k} => '#{v}'"
|
options_hash << ", :#{k} => '#{v}'"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
$stderr.puts options_hash.inspect
|
||||||
guardfile_contents = %Q{
|
guardfile_contents = %Q{
|
||||||
guard 'middleman'#{options_hash} do
|
guard 'middleman'#{options_hash} do
|
||||||
watch(%r{(.*)})
|
watch(%r{(.*)})
|
||||||
|
@ -81,6 +82,7 @@ module Guard
|
||||||
def server_start
|
def server_start
|
||||||
app = ::Middleman.server
|
app = ::Middleman.server
|
||||||
app.set :environment, @options[:environment].to_sym
|
app.set :environment, @options[:environment].to_sym
|
||||||
|
app.set :logging, @options[:debug] == "true"
|
||||||
|
|
||||||
puts "== The Middleman is standing watch on port #{@options[:Port]||4567}"
|
puts "== The Middleman is standing watch on port #{@options[:Port]||4567}"
|
||||||
@app = app.new!
|
@app = app.new!
|
||||||
|
|
Loading…
Reference in a new issue