summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-09-05 14:45:02 +0100
committerNick Thomas <nick@gitlab.com>2018-09-05 15:10:39 +0100
commitca92fcd9de5863532bd54cc1b601883c8f1ad37c (patch)
tree91803a4e24b2d278e6cc7cc5333c8c8571c67d89 /app
parent03c733849c1fad9885b0b947e60744633b7f5bd6 (diff)
downloadgitlab-ce-ca92fcd9de5863532bd54cc1b601883c8f1ad37c.tar.gz
Allow the TemplateFinder to handle licenses as well
Diffstat (limited to 'app')
-rw-r--r--app/finders/template_finder.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/finders/template_finder.rb b/app/finders/template_finder.rb
index a9e6fc9edb3..ea0251bffb6 100644
--- a/app/finders/template_finder.rb
+++ b/app/finders/template_finder.rb
@@ -5,6 +5,16 @@ class TemplateFinder
gitlab_ci_ymls: ::Gitlab::Template::GitlabCiYmlTemplate
}.freeze
+ class << self
+ def build(type, params = {})
+ if type == :licenses
+ LicenseTemplateFinder.new(params)
+ else
+ new(type, params)
+ end
+ end
+ end
+
attr_reader :type, :params
attr_reader :vendored_templates