Sha256: 5234a4cfc7dd4aa10544d85597c2a9598afc1136c20fe714e3cb32c35b1838bf
Contents?: true
Size: 658 Bytes
Versions: 8
Compression:
Stored size: 658 Bytes
Contents
class CSVTasks < Thor include Rails.application.config.dradis.thor_helper_module namespace "dradis:plugins:csv" desc "export", "export issues to a CSV file" def export require 'config/environment' detect_and_set_project_scope exporter = Dradis::Plugins::CSV::Exporter.new(task_options) csv = exporter.export() date = DateTime.now.strftime("%Y-%m-%d") base_filename = "dradis-report_#{date}.csv" filename = NamingService.name_file( original_filename: base_filename, pathname: Rails.root ) File.open(filename, 'w') { |f| f.write csv } logger.info "File written to ./#{ filename }" end end
Version data entries
8 entries across 8 versions & 1 rubygems