Skip to content
Browse files

Adding win support

  • Loading branch information...
1 parent 37bff80 commit 6d5fe27e2090551237f144bc8179d63963f4326f Francesco Rodriguez committed
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/stasis/dev_mode.rb
View
7 lib/stasis/dev_mode.rb
@@ -38,11 +38,12 @@ def initialize(dir, options={})
if options[:development].is_a?(::Integer)
mime_types = WEBrick::HTTPUtils::DefaultMimeTypes
mime_types.store 'js', 'application/javascript'
-
- server = WEBrick::HTTPServer.new(
+
+ outfile = RUBY_PLATFORM =~ /mswin|mingw/ ? 'NUL:' : '/dev/null'
+ server = WEBrick::HTTPServer.new(
:AccessLog => [ nil, nil ],
:DocumentRoot => @stasis.destination,
- :Logger => WEBrick::Log.new("/dev/null"),
+ :Logger => WEBrick::Log.new(outfile),
:MimeTypes => mime_types,
:Port => options[:development]
)

0 comments on commit 6d5fe27

Please sign in to comment.
Something went wrong with that request. Please try again.