10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/tasks/thorfile.rb', line 10
def export
require 'config/environment'
opts = {}
STDOUT.sync = true
logger = Logger.new(STDOUT)
logger.level = Logger::DEBUG
opts[:logger] = logger
content_service = nil
detect_and_set_project_scope
json = Dradis::Plugins::Json::Exporter.new.export({
content_service: content_service_for(Dradis::Plugins::Json),
})
File.open(report_path, 'w') do |f|
f << json
end
logger.info{ "Report file created at:\n\t#{report_path}" }
logger.close
end
|