lib/tasks/thorfile.rb in dradis-burp-3.0.2 vs lib/tasks/thorfile.rb in dradis-burp-3.6.0

- old
+ new

@@ -1,7 +1,7 @@ class BurpTasks < Thor - include Core::Pro::ProjectScopedTask if defined?(::Core::Pro) + include Rails.application.config.dradis.thor_helper_module namespace "dradis:plugins:burp" desc "upload FILE", "upload Burp XML results" def upload(file_path) @@ -13,26 +13,12 @@ unless File.exists?(file_path) $stderr.puts "** the file [#{file_path}] does not exist" exit -1 end - content_service = nil - template_service = nil + detect_and_set_project_scope - template_service = Dradis::Plugins::TemplateService.new(plugin: Dradis::Plugins::Burp) - if defined?(Dradis::Pro) - detect_and_set_project_scope - content_service = Dradis::Pro::Plugins::ContentService.new(plugin: Dradis::Plugins::Burp) - else - content_service = Dradis::Plugins::ContentService.new(plugin: Dradis::Plugins::Burp) - end - - importer = Dradis::Plugins::Burp::Importer.new( - logger: logger, - content_service: content_service, - template_service: template_service - ) - + importer = Dradis::Plugins::Burp::Importer.new(logger: logger) importer.import(file: file_path) logger.close end