lib/guard/rack/command.rb in guard-rack-2.1.0 vs lib/guard/rack/command.rb in guard-rack-2.1.1

- old
+ new

@@ -1,19 +1,16 @@ require 'guard/rack' module Guard class Rack < Plugin - class Command < String + class Command attr_reader :options def initialize(options = {}) @options = options - super(build.join(' ')) end - private - def build cmd = [options[:cmd]] cmd << configuration cmd << environment @@ -24,41 +21,43 @@ cmd << server cmd.flatten.compact end + private + def configuration [options[:config]] end def daemon return unless options[:daemon] - ['--daemonize', options[:daemon]] + ['--daemonize'] end def debug return unless options[:debugger] - ['--debug', options[:debugger]] + ['--debug'] end def environment - ['--env', options[:environment]] + ['--env', options[:environment].to_s] end def host ['--host', options[:host]] end def port - ['--port', options[:port]] + ['--port', options[:port].to_s] end def server return unless options[:server] - ['--server', options[:server]] + ['--server', options[:server].to_s] end end end end