lib/spork/runner.rb in spork-0.5.8 vs lib/spork/runner.rb in spork-0.5.9
- old
+ new
@@ -20,10 +20,11 @@
opt.separator "Options:"
opt.on("-b", "--bootstrap") {|ignore| @options[:bootstrap] = true }
opt.on("-d", "--diagnose") {|ignore| @options[:diagnose] = true }
opt.on("-h", "--help") {|ignore| @options[:help] = true }
+ opt.on("-p", "--port [PORT]") {|port| @options[:port] = port }
non_option_args = args.select { |arg| ! args[0].match(/^-/) }
@options[:server_matcher] = non_option_args[0]
opt.parse!(args)
if @options[:help]
@@ -79,9 +80,12 @@
def run
return false unless find_server
ENV["DRB"] = 'true'
@error.puts "Using #{server.server_name}"
@error.flush
+
+ server.port = options[:port]
+
case
when options[:bootstrap]
server.bootstrap
when options[:diagnose]
require 'spork/diagnoser'