Skip to content

Commit c55645f

Browse files
author
winton
committed
Merge branch 'master' of github.com:winton/stasis
2 parents 9405075 + d4ec22f commit c55645f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/stasis.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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.

lib/stasis/dev_mode.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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
)

0 commit comments

Comments
 (0)