lib/dock_test/dsl.rb in dock_test-0.1.0 vs lib/dock_test/dsl.rb in dock_test-0.1.1
- old
+ new
@@ -8,9 +8,12 @@
@url = value
if localhost? && @server_thread.nil?
require "rack"
require 'webrick'
+
+ ARGV.clear # clear ARGV as it is used by Rack to configure server
+
server = WEBrick::HTTPServer.new(:Port => port).tap do |server|
server.mount '/', Rack::Handler::WEBrick, Rack::Server.new.app
end
@server_thread = Thread.new { server.start }
trap('INT') do