Merge stable

This commit is contained in:
Thomas Reynolds 2015-04-26 11:32:47 -07:00
commit 2403fa2d81
17 changed files with 184 additions and 15 deletions

View file

@ -29,12 +29,17 @@ module Middleman::Cli
::Middleman::Logger.singleton(opts[:debug] ? 0 : 1, opts[:instrumenting] || false)
end
# TODO: get file watcher / reload! working in console
interact_with @app
end
# Start an interactive console in the context of the provided object.
# @param [Object] context
# @return [void]
def interact_with(context)
IRB.setup nil
IRB.conf[:MAIN_CONTEXT] = IRB::Irb.new.context
require 'irb/ext/multi-irb'
IRB.irb nil, @app
IRB.irb nil, context
end
# Add to CLI

View file

@ -11,11 +11,9 @@ module Middleman::Cli
class_option :host,
type: :string,
aliases: '-h',
default: '0.0.0.0',
desc: 'Bind to HOST address'
class_option :port,
aliases: '-p',
default: '4567',
desc: 'The port Middleman will listen on'
class_option :verbose,
type: :boolean,
@ -40,7 +38,7 @@ module Middleman::Cli
class_option :latency,
type: :numeric,
aliases: '-l',
default: 0.25,
default: 0.5,
desc: 'Set file watcher latency, in seconds'
# Start the server