From ba95015a09bc465533666b38609b4fb1e0177139 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 26 Feb 2018 13:32:14 +0200 Subject: [PATCH] Reorganize plugins dir structure Signed-off-by: Dmitriy Zaporozhets --- lib/gitlab/plugin.rb | 5 +++-- plugins/enabled/.gitkeep | 0 plugins/{available => examples}/save_to_file.clj | 0 plugins/{available => examples}/save_to_file.rb | 0 4 files changed, 3 insertions(+), 2 deletions(-) delete mode 100644 plugins/enabled/.gitkeep rename plugins/{available => examples}/save_to_file.clj (100%) rename plugins/{available => examples}/save_to_file.rb (100%) diff --git a/lib/gitlab/plugin.rb b/lib/gitlab/plugin.rb index 1035d258907..be5d6d6b1c1 100644 --- a/lib/gitlab/plugin.rb +++ b/lib/gitlab/plugin.rb @@ -1,12 +1,13 @@ module Gitlab module Plugin def self.files - Dir.glob(Rails.root.join('plugins/enabled/*')) + Dir.glob(Rails.root.join('plugins/*')).select do |entry| + File.file?(entry) + end end def self.execute_all_async(data) files.each do |file| - puts file PluginWorker.perform_async(file, data) end end diff --git a/plugins/enabled/.gitkeep b/plugins/enabled/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/plugins/available/save_to_file.clj b/plugins/examples/save_to_file.clj similarity index 100% rename from plugins/available/save_to_file.clj rename to plugins/examples/save_to_file.clj diff --git a/plugins/available/save_to_file.rb b/plugins/examples/save_to_file.rb similarity index 100% rename from plugins/available/save_to_file.rb rename to plugins/examples/save_to_file.rb