diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-02-19 19:20:53 +0200 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-02-26 16:06:49 +0200 |
| commit | 5bb435d0e75ad84e2fc379208cc36a25a4574453 (patch) | |
| tree | e65d8278aa37adb8467e05e4bbf15094b43b870c /config | |
| parent | b985fe95b6c30bc83725e9b5e18a79a8ceb900d3 (diff) | |
| download | gitlab-ce-5bb435d0e75ad84e2fc379208cc36a25a4574453.tar.gz | |
Remove plugin initializer and add plugins:validate rake task
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'config')
| -rw-r--r-- | config/initializers/9_plugins.rb | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/config/initializers/9_plugins.rb b/config/initializers/9_plugins.rb deleted file mode 100644 index 9f252ccd296..00000000000 --- a/config/initializers/9_plugins.rb +++ /dev/null @@ -1,29 +0,0 @@ -class PluginsSystem - attr_accessor :plugins, :files - - def initialize - @files = Dir.glob(Rails.root.join('plugins', '*_plugin.rb')) - end - - def valid_plugins - files.map do |file| - file_name = File.basename(file, '.rb') - - # Just give sample data to method and expect it to not crash. - begin - klass = Object.const_get(file_name.classify) - klass.new.execute(Gitlab::DataBuilder::Push::SAMPLE_DATA) - rescue => e - Rails.logger.warn("GitLab -> Plugins -> #{file_name} raised an exception during boot check. #{e}") - next - else - Rails.logger.info "GitLab -> Plugins -> #{file_name} passed boot check" - klass - end - end - end -end - -# Load external plugins from /plugins directory -# and set into PLUGINS variable -PLUGINS = PluginsSystem.new.valid_plugins |
