Skip to content

Commit 85e7518

Browse files
authored
Merge pull request #97 from common-workflow-language/footer-change
Change to footer to update year and correct typo
2 parents 5ee9483 + dc6b4b6 commit 85e7518

File tree

4 files changed

+13
-24
lines changed

4 files changed

+13
-24
lines changed

src/main/java/org/commonwl/view/MongoConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
package org.commonwl.viewer;
20+
package org.commonwl.view;
2121

2222
import org.springframework.beans.factory.annotation.Autowired;
2323
import org.springframework.context.annotation.Bean;

src/main/java/org/commonwl/view/researchobject/ROBundleService.java

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import org.apache.taverna.robundle.manifest.Manifest;
2828
import org.apache.taverna.robundle.manifest.PathMetadata;
2929
import org.apache.taverna.robundle.manifest.Proxy;
30-
import org.commonwl.viewer.services.GitHubService;
3130
import org.commonwl.view.github.GitHubService;
3231
import org.commonwl.view.github.GithubDetails;
3332
import org.eclipse.egit.github.core.CommitUser;
@@ -137,19 +136,6 @@ public Bundle newBundleFromGithub(GithubDetails githubInfo) throws IOException {
137136

138137
}
139138

140-
/**
141-
* Save the Research Object bundle to disk
142-
* @param roBundle The bundle to be saved
143-
* @return The path to the research object
144-
* @throws IOException Any errors in saving
145-
*/
146-
public Path saveToFile(Bundle roBundle) throws IOException {
147-
String fileName = "bundle-" + java.util.UUID.randomUUID() + ".zip";
148-
Path bundleLocation = Files.createFile(bundleStorage.resolve(fileName));
149-
Bundles.closeAndSaveBundle(roBundle, bundleLocation);
150-
return bundleLocation;
151-
}
152-
153139
/**
154140
* Add files to this bundle from a list of Github repository contents
155141
* @param bundle The RO bundle to add files/directories to
@@ -207,13 +193,12 @@ private void addFilesToBundle(Bundle bundle, GithubDetails githubInfo,
207193
fileContent = githubService.downloadFile(githubFile, commitSha);
208194

209195
// Save file to research object bundle
210-
Path bundleFilePath = path.resolve(repoContent.getName());
211196
Bundles.setStringValue(bundleFilePath, fileContent);
212197

213198
// Set retrieved information for this file in the manifest
214199
aggregation = bundle.getManifest().getAggregation(bundleFilePath);
215200
aggregation.setRetrievedFrom(rawURI);
216-
aggregation.setRetrievedBy(thisApp);
201+
aggregation.setRetrievedBy(appAgent);
217202
aggregation.setRetrievedOn(aggregation.getCreatedOn());
218203
} else {
219204
logger.info("File " + repoContent.getName() + " is too large to download - " +
@@ -279,14 +264,14 @@ private void addFilesToBundle(Bundle bundle, GithubDetails githubInfo,
279264

280265
/**
281266
* Save the Research Object bundle to disk
282-
* @param directory The directory in which the RO will be saved
267+
* @param roBundle The bundle to be saved
283268
* @return The path to the research object
284269
* @throws IOException Any errors in saving
285270
*/
286-
public Path saveToFile(Path directory) throws IOException {
271+
public Path saveToFile(Bundle roBundle) throws IOException {
287272
String fileName = "bundle-" + java.util.UUID.randomUUID() + ".zip";
288-
Path bundleLocation = Files.createFile(directory.resolve(fileName));
289-
Bundles.closeAndSaveBundle(bundle, bundleLocation);
273+
Path bundleLocation = Files.createFile(bundleStorage.resolve(fileName));
274+
Bundles.closeAndSaveBundle(roBundle, bundleLocation);
290275
return bundleLocation;
291276
}
292277

src/main/resources/templates/fragments/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<hr />
3030
<div class="col-lg-12 muted text-center">
3131
<a href="https://github.com/common-workflow-language/cwlviewer" rel="noopener" target="_blank">CWL Viewer</a>
32-
&copy; 2016 <a href="https://github.com/common-workflow-language/" rel="noopener" target="_blank">Common Workflow Project</a>
32+
&copy; 2016-2017 <a href="https://github.com/common-workflow-language/" rel="noopener" target="_blank">Common Workflow Language Project</a>
3333
and <a href="https://github.com/orgs/common-workflow-language/people" rel="noopener" target="_blank">contributors</a>,
3434
distributed under <a href="https://www.apache.org/licenses/LICENSE-2.0" rel="noopener" target="_blank">Apache license, version 2.0</a>
3535
<br />

src/test/java/org/commonwl/view/researchobject/ROBundleServiceTest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import org.mockito.stubbing.Answer;
3636

3737
import java.io.File;
38+
import java.net.URI;
3839
import java.nio.file.Path;
3940
import java.util.ArrayList;
4041
import java.util.List;
@@ -119,9 +120,12 @@ public void filesOverLimit() throws Exception {
119120
Manifest manifest = bundle.getManifest();
120121

121122
// Check files are externally linked in the aggregate
122-
Path bundleRoot = bundle.getRoot().resolve("workflow");
123+
assertEquals(12, manifest.getAggregates().size());
124+
123125
PathMetadata urlAggregate = manifest.getAggregation(
124-
bundleRoot.resolve("lobSTR-demo.url"));
126+
new URI("https://raw.githubusercontent.com/common-workflow-language/workflows/" +
127+
"933bf2a1a1cce32d88f88f136275535da9df0954/workflows/lobSTR/models/" +
128+
"illumina_v3.pcrfree.stepmodel"));
125129
assertEquals("Mark Robinson", urlAggregate.getAuthoredBy().get(0).getName());
126130

127131
}

0 commit comments

Comments
 (0)