Sha256: 755181cef37eee35faf219e3f1a6974494424f6a05eb2aa0825582068e176110

Contents?: true

Size: 664 Bytes

Versions: 10

Compression:

Stored size: 664 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::CSVExport::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

10 entries across 10 versions & 1 rubygems

Version Path
dradis-csv_export-4.15.0 lib/tasks/thorfile.rb
dradis-csv_export-4.14.0 lib/tasks/thorfile.rb
dradis-csv_export-4.13.0 lib/tasks/thorfile.rb
dradis-csv_export-4.11.0 lib/tasks/thorfile.rb
dradis-csv_export-4.10.0 lib/tasks/thorfile.rb
dradis-csv_export-4.9.0 lib/tasks/thorfile.rb
dradis-csv_export-4.8.0 lib/tasks/thorfile.rb
dradis-csv_export-4.7.0 lib/tasks/thorfile.rb
dradis-csv_export-4.6.0 lib/tasks/thorfile.rb
dradis-csv_export-4.5.0 lib/tasks/thorfile.rb