Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab_edition.rb')
-rw-r--r--lib/gitlab_edition.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/gitlab_edition.rb b/lib/gitlab_edition.rb
index 02006148a34..5e3ed35ace4 100644
--- a/lib/gitlab_edition.rb
+++ b/lib/gitlab_edition.rb
@@ -7,6 +7,21 @@ module GitlabEdition
Pathname.new(File.expand_path('..', __dir__))
end
+ def self.path_glob(path)
+ "#{root}/#{extension_path_prefixes}#{path}"
+ end
+
+ def self.extension_path_prefixes
+ path_prefixes = extensions
+ return '' if path_prefixes.empty?
+
+ path_prefixes.map! { "#{_1}/" }
+ path_prefixes.unshift ''
+
+ # For example `{,ee/,jh/}`
+ "{#{path_prefixes.join(',')}}"
+ end
+
def self.extensions
if jh?
%w[ee jh]