diff options
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] } |