dradis-csv_export 4.19.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f3442c9d7f885d16ecf0dcfda0321796637069b13528968cb4c768f7e6db6ec
4
- data.tar.gz: 84be7cf5b3e3450b33ef917fe7cf98613014e4ad05f0520bc93e5395364edea0
3
+ metadata.gz: 34d7d6a63db1f914a8ee1ef1001234a7935614078d026b2d0ddcc6b9bd2bf8f9
4
+ data.tar.gz: 84ebf13c783f0d27c6d9f654a9eed9377d110fbb5b53acdd781ce0f0accd8fa2
5
5
  SHA512:
6
- metadata.gz: b5a7e7d4ed6944b4c802247a0ae362229c6907dbde1fe37596966d2e1c21c302fc41fd1550aaa5a315c3686a6793bdb09f426739cbf2e382a08fc981473fcedf
7
- data.tar.gz: d3a277290ae8b2587dc6e7c74146bfb9255685144cebf5ea0cb31c063b3d26744d030bc8fce339a1c4cd7c4cfabf289da9cdc8befad6d47610e85210f9dfccf5
6
+ metadata.gz: 6fd969af2e1cbd9929239f9ee07cb10fc8e5cd2ab84ecd5ffb353980b6072e12e2486b04921a589eb0d0ebc4d0bdd698a0bcddcf6bea682dc991e7cbe72d8d62
7
+ data.tar.gz: 3b37c49f91f0168a8a1898b8cbc9e2f0b1daadb7eb02d38d35d8298588b8b11e9597fd074b5c1c35d4f10427607284112a3c5a3c1921d4ac02bf8dc078460ae4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ v5.1.0 (May 2026)
2
+ - No changes
3
+
4
+ v5.0.0 (March 2026)
5
+ - Accept file path argument when exporting via the command line
6
+
1
7
  v4.19.0 (November 2025)
2
8
  - No changes
3
9
 
@@ -7,8 +7,8 @@ module Dradis
7
7
  end
8
8
 
9
9
  module VERSION
10
- MAJOR = 4
11
- MINOR = 19
10
+ MAJOR = 5
11
+ MINOR = 1
12
12
  TINY = 0
13
13
  PRE = nil
14
14
 
@@ -4,25 +4,31 @@ class CSVTasks < Thor
4
4
  namespace "dradis:plugins:csv"
5
5
 
6
6
  desc "export", "export issues to a CSV file"
7
+ method_option :output, required: false, type: :string, desc: "the report file to create (if ends in .csv), or directory to create it in"
7
8
  def export
8
9
  require 'config/environment'
9
10
 
11
+ report_path = options.output || Rails.root.join('tmp')
12
+ unless report_path.to_s =~ /\.csv\z/
13
+ date = DateTime.now.strftime("%Y-%m-%d")
14
+ base_filename = "dradis-report_#{date}.csv"
15
+
16
+ report_filename = NamingService.name_file(
17
+ original_filename: base_filename,
18
+ pathname: Pathname.new(report_path)
19
+ )
20
+
21
+ report_path = File.join(report_path, report_filename)
22
+ end
23
+
10
24
  detect_and_set_project_scope
11
25
 
12
26
  exporter = Dradis::Plugins::CSVExport::Exporter.new(task_options)
13
27
  csv = exporter.export()
14
28
 
15
- date = DateTime.now.strftime("%Y-%m-%d")
16
- base_filename = "dradis-report_#{date}.csv"
17
-
18
- filename = NamingService.name_file(
19
- original_filename: base_filename,
20
- pathname: Rails.root
21
- )
22
-
23
- File.open(filename, 'w') { |f| f.write csv }
29
+ File.open(report_path, 'w') { |f| f.write csv }
24
30
 
25
- logger.info "File written to ./#{ filename }"
31
+ logger.info "Report file created at:\n\t#{report_path}"
26
32
  end
27
33
 
28
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dradis-csv_export
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.19.0
4
+ version: 5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Martin