dradis-csv 3.19.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1c40bf09c0f9da20ebb1842ebd10c6a33b213ea46c81d8984a8906d0b7981e8d
4
- data.tar.gz: 9e704f9ca5e85f802466ba26f25235d06a0935242483682773f11a4f5fe3cbc2
3
+ metadata.gz: 394ce2e8926a3fbf22d9c3f7df00b3ab73eb77e6f2ce3bab74250aaac427ba66
4
+ data.tar.gz: 33e33c35e396a5fc529fbdb90ee5e5cb24ed09278bc30064fc6b66731b64b934
5
5
  SHA512:
6
- metadata.gz: c26d6638e7f097f80cf11e393a20f0f963aac4cd5904093c979aff661c9d0f6948dba3e9302df3671856a5927f40623e52399f2fefab7c3d14a11ab9c6a9075c
7
- data.tar.gz: f906942bd46707849b732e942eead9ebe3de3292779db52a0f1c903608de2a8db68a71afd49eeca78be300f993eb9001e59ccaa20bab41ac49fb9fd7d13d9137
6
+ metadata.gz: 876effdf0d1b08ea83c78a0e481bf450433e969293ebff32b5d6919c3a1a1b5b003cb29df15d7d1d7d8946dcaa0ded6afb679331bf4d73da57142f9ff33945b3
7
+ data.tar.gz: 45dfb0074872ee1c15a22353fb3aad92fb7748319ca0a6596098cce67a0bf48120d90b9afb32629f002b649d643fb917f61584bd9f70e587ccfe0aa77ec80c0a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ## Dradis Framework 4.0.0 (July, 2021) ##
2
+
3
+ * No changes.
4
+
5
+ ## Dradis Framework 3.22 (April, 2021) ##
6
+
7
+ * No changes.
8
+
9
+ ## Dradis Framework 3.21 (February, 2021) ##
10
+
11
+ * No changes.
12
+
13
+ ## Dradis Framework 3.20 (December, 2020) ##
14
+
15
+ * Add views for the export view.
16
+ * Use NamingService to build export filename.
17
+
1
18
  ## Dradis Framework 3.19 (September, 2020) ##
2
19
 
3
20
  * No changes.
@@ -0,0 +1,10 @@
1
+ <%= content_tag :div, id: 'plugin-csv', class: 'tab-pane fade' do %>
2
+
3
+ <%= form_tag project_export_manager_path(current_project), target: '_blank' do %>
4
+ <%= hidden_field_tag :plugin, :csv %>
5
+ <%= hidden_field_tag :route, :root %>
6
+
7
+ <h4 class="header-underline mb-0">Ready when you are!</h4>
8
+ <button id="export-button" class="btn btn-lg btn-primary mt-4">Export</button>
9
+ <% end %>
10
+ <% end%>
@@ -0,0 +1,3 @@
1
+ <li class='nav-item'>
2
+ <a href='#csv' class='nav-link' data-toggle='tab' data-target='#plugin-csv'>Export results in CSV format</a>
3
+ </li>
data/dradis-csv.gemspec CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  # versions of Rails (a sure recipe for disaster, I'm sure), which is needed
26
26
  # until we bump Dradis Pro to 4.1.
27
27
  # s.add_dependency 'rails', '~> 4.1.1'
28
- spec.add_dependency 'dradis-plugins', '~> 3.6'
28
+ spec.add_dependency 'dradis-plugins', '~> 4.0.0'
29
29
 
30
30
  spec.add_development_dependency 'bundler', '~> 1.6'
31
31
  spec.add_development_dependency 'rake', '~> 10.0'
@@ -1,3 +1,10 @@
1
+ module Dradis
2
+ module Plugins
3
+ module CVS
4
+ end
5
+ end
6
+ end
7
+
1
8
  require 'dradis/plugins/csv/engine'
2
9
  require 'dradis/plugins/csv/exporter'
3
10
  require 'dradis/plugins/csv/version'
@@ -7,8 +7,8 @@ module Dradis
7
7
  end
8
8
 
9
9
  module VERSION
10
- MAJOR = 3
11
- MINOR = 19
10
+ MAJOR = 4
11
+ MINOR = 0
12
12
  TINY = 0
13
13
  PRE = nil
14
14
 
@@ -12,7 +12,14 @@ class CSVTasks < Thor
12
12
  exporter = Dradis::Plugins::CSV::Exporter.new(task_options)
13
13
  csv = exporter.export()
14
14
 
15
- filename = "dradis-report_#{Time.now.to_i}.csv"
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
+
16
23
  File.open(filename, 'w') { |f| f.write csv }
17
24
 
18
25
  logger.info "File written to ./#{ filename }"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dradis-csv
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.19.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Martin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-04 00:00:00.000000000 Z
11
+ date: 2021-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dradis-plugins
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.6'
19
+ version: 4.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.6'
26
+ version: 4.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -84,6 +84,8 @@ files:
84
84
  - README.md
85
85
  - Rakefile
86
86
  - app/controllers/dradis/plugins/csv/base_controller.rb
87
+ - app/views/dradis/plugins/csv/export/_index-content.html.erb
88
+ - app/views/dradis/plugins/csv/export/_index-tabs.html.erb
87
89
  - config/routes.rb
88
90
  - dradis-csv.gemspec
89
91
  - lib/dradis-csv.rb
@@ -114,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
116
  - !ruby/object:Gem::Version
115
117
  version: '0'
116
118
  requirements: []
117
- rubygems_version: 3.0.1
119
+ rubygems_version: 3.1.4
118
120
  signing_key:
119
121
  specification_version: 4
120
122
  summary: CSV export plugin for the Dradis Framework.