File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ def load_paths
9494
9595 # Reject paths that are directories or within the destination directory.
9696 @paths . reject! do |path |
97- !File . file? ( path ) || path [ 0 ..@destination . length - 1 ] == @destination
97+ !File . file? ( path ) || path [ 0 ..@destination . length ] == @destination + '/'
9898 end
9999
100100 # Reject paths that are controllers.
Original file line number Diff line number Diff line change @@ -38,11 +38,12 @@ def initialize(dir, options={})
3838 if options [ :development ] . is_a? ( ::Integer )
3939 mime_types = WEBrick ::HTTPUtils ::DefaultMimeTypes
4040 mime_types . store 'js' , 'application/javascript'
41-
42- server = WEBrick ::HTTPServer . new (
41+
42+ outfile = ( RUBY_PLATFORM =~ /mswin|mingw/ ) ? 'NUL:' : '/dev/null'
43+ server = WEBrick ::HTTPServer . new (
4344 :AccessLog => [ nil , nil ] ,
4445 :DocumentRoot => @stasis . destination ,
45- :Logger => WEBrick ::Log . new ( "/dev/null" ) ,
46+ :Logger => WEBrick ::Log . new ( outfile ) ,
4647 :MimeTypes => mime_types ,
4748 :Port => options [ :development ]
4849 )
You can’t perform that action at this time.
0 commit comments