Sha256: f67412883cc797071d53e4eba851e3d4980ab7161e9396f221a892f2958bbc9a

Contents?: true

Size: 392 Bytes

Versions: 31

Compression:

Stored size: 392 Bytes

Contents

require 'webrick'
class ::WEBrick::BasicLog
  def log(level, data)
    # nop
  end
end
port = 8000
webserver = Thread.new do
  WEBrick::HTTPServer.new(
    :Port => port, 
    :DocumentRoot => "#{Dir.pwd}/test/sample_data", 
    Logger: WEBrick::Log.new("/dev/null"),
    AccessLog: []
  ).start
end
puts "staring webserver on port #{port}"
webserver.run

at_exit { Thread.kill webserver }
 

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
dply-0.3.15 test/webserver.rb
dply-0.3.14 test/webserver.rb
dply-0.3.13 test/webserver.rb
dply-0.3.12 test/webserver.rb
dply-0.3.11 test/webserver.rb
dply-0.3.10 test/webserver.rb
dply-0.3.9 test/webserver.rb
dply-0.3.8 test/webserver.rb
dply-0.3.7 test/webserver.rb
dply-0.3.6 test/webserver.rb
dply-0.3.5 test/webserver.rb
dply-0.3.4 test/webserver.rb
dply-0.3.3 test/webserver.rb
dply-0.3.2 test/webserver.rb
dply-0.3.1 test/webserver.rb
dply-0.3.0 test/webserver.rb
dply-0.2.19 test/webserver.rb
dply-0.2.18 test/webserver.rb
dply-0.2.17 test/webserver.rb
dply-0.2.16 test/webserver.rb