use url attribute sent back by clsi

This commit is contained in:
Brian Gough 2016-06-02 15:41:33 +01:00
parent 5be1886d43
commit 061d4934f1
2 changed files with 5 additions and 2 deletions

View file

@ -77,6 +77,7 @@ module.exports = ClsiManager =
for file in rawOutputFiles for file in rawOutputFiles
outputFiles.push outputFiles.push
path: file.path # the clsi is now sending this to web 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 type: file.type
build: file.build build: file.build
return outputFiles return outputFiles

View file

@ -41,12 +41,12 @@ describe "ClsiManager", ->
compile: compile:
status: @status = "success" status: @status = "success"
outputFiles: [{ 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" path: "output.pdf"
type: "pdf" type: "pdf"
build: 1234 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" path: "output.log"
type: "log" type: "log"
build: 1234 build: 1234
@ -66,10 +66,12 @@ describe "ClsiManager", ->
it "should call the callback with the status and output files", -> it "should call the callback with the status and output files", ->
outputFiles = [{ outputFiles = [{
url: "/project/#{@project_id}/build/1234/output/output.pdf"
path: "output.pdf" path: "output.pdf"
type: "pdf" type: "pdf"
build: 1234 build: 1234
},{ },{
url: "/project/#{@project_id}/build/1234/output/output.log"
path: "output.log" path: "output.log"
type: "log" type: "log"
build: 1234 build: 1234