From 718b3ad88f8fa610be219ac9ced1c2112068e78f Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Fri, 19 Oct 2012 01:52:48 +0200 Subject: [PATCH] Fix spec.html serving --- lib/travis/web/app.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/travis/web/app.rb b/lib/travis/web/app.rb index 79ffd50a..2bc3ad70 100644 --- a/lib/travis/web/app.rb +++ b/lib/travis/web/app.rb @@ -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