module Dradis::Plugins::Upload::Base::ClassMethods

Public Instance Methods

templates() click to toggle source

Return the list of templates that the module provides

def self.template_names
  { Dradis::Plugins::Burp::Html => { evidence: 'html_evidence', issue: 'issue' } },
  { Dradis::Plugins::Burp::Xml => { evidence: 'evidence', issue: 'issue' } }
end

The default implementation returns nothing at all.

# File lib/dradis/plugins/upload/base.rb, line 54
def templates
  uploaders.each_with_object({}) { |uploader, acc| acc[uploader] = uploader::Importer.templates }
end
uploaders() click to toggle source

Return the list of modules that provide upload functionality. This is useful if one plugin provides uploading functionality for more than one file type (e.g. the Projects plugin allows you to upload a Package or a Template).

The default implementation just returns this plugin’s namespace (e.g. Dradis::Plugins::Nessus). If a plugin provides multiple uploaders, they can override this method:

def self.uploders
  [
    Dradis::Plugins::Projects::Package,
    Dradis::Plugins::Projects::Template
  ]
end
# File lib/dradis/plugins/upload/base.rb, line 43
def uploaders
  [module_parent]
end