From 061d4934f1b1a7f5b9ebb6d4baedd95141f25b23 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Thu, 2 Jun 2016 15:41:33 +0100 Subject: [PATCH] use url attribute sent back by clsi --- services/web/app/coffee/Features/Compile/ClsiManager.coffee | 1 + .../test/UnitTests/coffee/Compile/ClsiManagerTests.coffee | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/services/web/app/coffee/Features/Compile/ClsiManager.coffee b/services/web/app/coffee/Features/Compile/ClsiManager.coffee index fde2e7dc4b..f874573d6f 100755 --- a/services/web/app/coffee/Features/Compile/ClsiManager.coffee +++ b/services/web/app/coffee/Features/Compile/ClsiManager.coffee @@ -77,6 +77,7 @@ module.exports = ClsiManager = for file in rawOutputFiles outputFiles.push path: file.path # the clsi is now sending this to web + url: Url.parse(file.url).path # the location of the file on the clsi, excluding the host part type: file.type build: file.build return outputFiles diff --git a/services/web/test/UnitTests/coffee/Compile/ClsiManagerTests.coffee b/services/web/test/UnitTests/coffee/Compile/ClsiManagerTests.coffee index 61b38501df..b5dce15e8e 100644 --- a/services/web/test/UnitTests/coffee/Compile/ClsiManagerTests.coffee +++ b/services/web/test/UnitTests/coffee/Compile/ClsiManagerTests.coffee @@ -41,12 +41,12 @@ describe "ClsiManager", -> compile: status: @status = "success" outputFiles: [{ - url: "#{@settings.apis.clsi.url}/project/#{@project_id}/output/output.pdf" + url: "#{@settings.apis.clsi.url}/project/#{@project_id}/build/1234/output/output.pdf" path: "output.pdf" type: "pdf" build: 1234 },{ - url: "#{@settings.apis.clsi.url}/project/#{@project_id}/output/output.log" + url: "#{@settings.apis.clsi.url}/project/#{@project_id}/build/1234/output/output.log" path: "output.log" type: "log" build: 1234 @@ -66,10 +66,12 @@ describe "ClsiManager", -> it "should call the callback with the status and output files", -> outputFiles = [{ + url: "/project/#{@project_id}/build/1234/output/output.pdf" path: "output.pdf" type: "pdf" build: 1234 },{ + url: "/project/#{@project_id}/build/1234/output/output.log" path: "output.log" type: "log" build: 1234