Skip to content

Commit

Permalink
Prepare for dradis-plugins 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
etdsoft committed Mar 13, 2017
1 parent 8c71981 commit 9beb038
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 28 deletions.
2 changes: 1 addition & 1 deletion dradis-acunetix.gemspec
Expand Up @@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
# versions of Rails (a sure recipe for disaster, I'm sure), which is needed
# until we bump Dradis Pro to 4.1.
# s.add_dependency 'rails', '~> 4.1.1'
spec.add_dependency 'dradis-plugins', '~> 3.2'
spec.add_dependency 'dradis-plugins', '~> 3.6'
spec.add_dependency 'nokogiri', '~> 1.3'

spec.add_development_dependency 'bundler', '~> 1.6'
Expand Down
7 changes: 0 additions & 7 deletions lib/dradis/plugins/acunetix/engine.rb
Expand Up @@ -5,12 +5,5 @@ class Engine < ::Rails::Engine
include ::Dradis::Plugins::Base
description 'Processes Acunetix XML format'
provides :upload

# Configuring the gem
# class Configuration < Core::Configurator
# configure :namespace => 'burp'
# setting :category, :default => 'Burp Scanner output'
# setting :author, :default => 'Burp Scanner plugin'
# end
end
end
4 changes: 2 additions & 2 deletions lib/dradis/plugins/acunetix/gem_version.rb
Expand Up @@ -8,8 +8,8 @@ def self.gem_version

module VERSION
MAJOR = 3
MINOR = 2
TINY = 1
MINOR = 4
TINY = 0
PRE = nil

STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
Expand Down
20 changes: 2 additions & 18 deletions lib/tasks/thorfile.rb
@@ -1,5 +1,5 @@
class AcunetixTasks < Thor
include Core::Pro::ProjectScopedTask if defined?(::Core::Pro)
include Rails.application.config.dradis.thor_helper_module

namespace "dradis:plugins:acunetix"

Expand All @@ -15,23 +15,7 @@ def upload(file_path)
exit -1
end

content_service = nil
template_service = nil

template_service = Dradis::Plugins::TemplateService.new(plugin: Dradis::Plugins::Acunetix)
if defined?(Dradis::Pro)
detect_and_set_project_scope
content_service = Dradis::Pro::Plugins::ContentService.new(plugin: Dradis::Plugins::Acunetix)
else
content_service = Dradis::Plugins::ContentService.new(plugin: Dradis::Plugins::Acunetix)
end

importer = Dradis::Plugins::Acunetix::Importer.new(
logger: logger,
content_service: content_service,
template_service: template_service
)

importer = Dradis::Plugins::Acunetix::Importer.new(logger: logger)
importer.import(file: file_path)

logger.close
Expand Down

0 comments on commit 9beb038

Please sign in to comment.