From 9d070767fc9dc102c9c40f652c506de77ab86df1 Mon Sep 17 00:00:00 2001 From: Christopher Fenner Date: Mon, 26 Feb 2018 09:03:55 +0100 Subject: [PATCH] remove duplicate class --- test/groovy/ProjectSource.groovy | 39 -------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 test/groovy/ProjectSource.groovy diff --git a/test/groovy/ProjectSource.groovy b/test/groovy/ProjectSource.groovy deleted file mode 100644 index f524283ab..000000000 --- a/test/groovy/ProjectSource.groovy +++ /dev/null @@ -1,39 +0,0 @@ -import com.lesfurets.jenkins.unit.global.lib.SourceRetriever - -import groovy.transform.CompileStatic -import groovy.transform.Immutable - -/** - * Retrieves the shared lib sources of the current project which are expected to be - * at the default location "./vars". - */ - -@Immutable -@CompileStatic -class ProjectSource implements SourceRetriever { - - String sourceURL - - /* - * None of the parameters provided in the signature are used in the use-case of that retriever. - */ - @Override - List retrieve(String repository, String branch, String targetPath) { - def sourceDir = new File(sourceURL) - if (sourceDir.exists()) { - return [sourceDir.getAbsoluteFile().toURI().toURL()] - } - throw new IllegalStateException("Directory $sourceDir.path does not exists") - } - - static ProjectSource projectSource(String sourceDir = '.') { - new ProjectSource(sourceDir) - } - - @Override - String toString() { - return "${getClass().getSimpleName()}{" + - "sourceURL='" + sourceURL + '\'' + - '}' - } -}