Fix spec.html serving
This commit is contained in:
parent
a29e3003cb
commit
718b3ad88f
|
@ -49,7 +49,7 @@ class Travis::Web::App
|
|||
|
||||
def response_for(file)
|
||||
content = File.read(file)
|
||||
set_config(content) if index? file
|
||||
set_config(content) if config_needed? file
|
||||
|
||||
headers = {
|
||||
'Content-Length' => content.bytesize.to_s,
|
||||
|
@ -75,6 +75,10 @@ class Travis::Web::App
|
|||
file =~ /^(styles|scripts)\//
|
||||
end
|
||||
|
||||
def config_needed?(file)
|
||||
index?(file) || file.end_with?('spec.html')
|
||||
end
|
||||
|
||||
def index?(file)
|
||||
file.end_with? 'index.html'
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user