diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /lib/gitlab_edition.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'lib/gitlab_edition.rb')
-rw-r--r-- | lib/gitlab_edition.rb | 15 |
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] |