Skip to content

Commit

Permalink
Merge branch 'master' of github.com:winton/stasis
Browse files Browse the repository at this point in the history
  • Loading branch information
winton committed Mar 28, 2012
2 parents 9405075 + d4ec22f commit c55645f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/stasis.rb
Expand Up @@ -94,7 +94,7 @@ def load_paths

# Reject paths that are directories or within the destination directory.
@paths.reject! do |path|
!File.file?(path) || path[0..@destination.length-1] == @destination
!File.file?(path) || path[0..@destination.length] == @destination+'/'
end

# Reject paths that are controllers.
Expand Down
7 changes: 4 additions & 3 deletions lib/stasis/dev_mode.rb
Expand Up @@ -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]
)
Expand Down

0 comments on commit c55645f

Please sign in to comment.