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)
|
def response_for(file)
|
||||||
content = File.read(file)
|
content = File.read(file)
|
||||||
set_config(content) if index? file
|
set_config(content) if config_needed? file
|
||||||
|
|
||||||
headers = {
|
headers = {
|
||||||
'Content-Length' => content.bytesize.to_s,
|
'Content-Length' => content.bytesize.to_s,
|
||||||
|
@ -75,6 +75,10 @@ class Travis::Web::App
|
||||||
file =~ /^(styles|scripts)\//
|
file =~ /^(styles|scripts)\//
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def config_needed?(file)
|
||||||
|
index?(file) || file.end_with?('spec.html')
|
||||||
|
end
|
||||||
|
|
||||||
def index?(file)
|
def index?(file)
|
||||||
file.end_with? 'index.html'
|
file.end_with? 'index.html'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user