debug flag

This commit is contained in:
Thomas Reynolds 2011-11-10 15:24:24 -08:00
parent 9bfd345849
commit d018511606
2 changed files with 10 additions and 3 deletions

View file

@ -57,12 +57,17 @@ module Middleman
:aliases => "-p",
:default => "4567",
:desc => "The port Middleman will listen on"
method_option "debug",
:type => :boolean,
:default => false,
:desc => 'Print debug messages'
def server
v1_check
params = {
:port => options[:port],
:environment => options[:environment]
:port => options["port"],
:environment => options["environment"],
:debug => options["debug"]
}
puts "== The Middleman is loading"

View file

@ -22,7 +22,8 @@ module Middleman
options.each do |k,v|
options_hash << ", :#{k} => '#{v}'"
end
$stderr.puts options_hash.inspect
guardfile_contents = %Q{
guard 'middleman'#{options_hash} do
watch(%r{(.*)})
@ -81,6 +82,7 @@ module Guard
def server_start
app = ::Middleman.server
app.set :environment, @options[:environment].to_sym
app.set :logging, @options[:debug] == "true"
puts "== The Middleman is standing watch on port #{@options[:Port]||4567}"
@app = app.new!