PageRenderTime 25ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/syntaxhighlighter_3.0.83/tests/webrick.rb

#
Ruby | 11 lines | 10 code | 1 blank | 0 comment | 0 complexity | c87c5f4cc59c5abbeff64cd57d8e039f MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0, BSD-3-Clause
  1. require 'webrick'
  2. include WEBrick
  3. s = HTTPServer.new(
  4. :Port => 2010,
  5. :DocumentRoot => Dir::pwd
  6. )
  7. s.mount('/sh/scripts', WEBrick::HTTPServlet::FileHandler, '../scripts')
  8. s.mount('/sh/styles', WEBrick::HTTPServlet::FileHandler, '../styles')
  9. trap('INT') { s.stop }
  10. s.start