diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 21:38:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 21:38:24 +0300 |
commit | 983a0bba5d2a042c4a3bbb22432ec192c7501d82 (patch) | |
tree | b153cd387c14ba23bd5a07514c7c01fddf6a78a0 /lib/gitlab/file_hook.rb | |
parent | a2bddee2cdb38673df0e004d5b32d9f77797de64 (diff) |
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'lib/gitlab/file_hook.rb')
-rw-r--r-- | lib/gitlab/file_hook.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/gitlab/file_hook.rb b/lib/gitlab/file_hook.rb index 38c19ff506f..f23ef2921d7 100644 --- a/lib/gitlab/file_hook.rb +++ b/lib/gitlab/file_hook.rb @@ -3,16 +3,17 @@ module Gitlab module FileHook def self.any? - plugin_glob.any? { |entry| File.file?(entry) } + dir_glob.any? { |entry| File.file?(entry) } end def self.files - plugin_glob.select { |entry| File.file?(entry) } + dir_glob.select { |entry| File.file?(entry) } end - def self.plugin_glob - Dir.glob(Rails.root.join('plugins/*')) + def self.dir_glob + Dir.glob([Rails.root.join('file_hooks/*'), Rails.root.join('plugins/*')]) end + private_class_method :dir_glob def self.execute_all_async(data) args = files.map { |file| [file, data] } |