dradis-projects 4.9.0 → 4.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/app/controllers/dradis/plugins/projects/packages_controller.rb +4 -3
- data/app/controllers/dradis/plugins/projects/templates_controller.rb +2 -1
- data/app/views/dradis/plugins/projects/export/_index-content.html.erb +10 -14
- data/app/views/dradis/plugins/projects/export/_index-tabs.html.erb +1 -1
- data/config/routes.rb +4 -2
- data/dradis-projects.gemspec +3 -4
- data/lib/dradis/plugins/projects/engine.rb +2 -3
- data/lib/dradis/plugins/projects/gem_version.rb +2 -2
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb8e2e148e6e2d0ad9e0403e947d24d0d2034ec28104da116902eda72762ea5a
|
4
|
+
data.tar.gz: cfdc69afe3e175e7818fbe90d4c8d3063c9cfa34ddbf4710a67089a70dfdcf55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccdf52f09c54ab6148676b31565f89d7a5c94ab3f582d94e6c8e0764b708ada278d615c6b2988a8173bbce88748834f622217b00c8aae22bc1100fc184d3ef05
|
7
|
+
data.tar.gz: 10bba95968382a9c61a8328be902af03f6816daebb7540149414566605e82e3bbe8af18d8571e08e1bda83cdfcf482d60ebf918b84afdd3433c9f68c1f7fe723
|
data/CHANGELOG.md
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
module Dradis::Plugins::Projects
|
2
2
|
class PackagesController < Dradis::Plugins::Export::BaseController
|
3
3
|
skip_before_action :validate_scope
|
4
|
+
skip_before_action :validate_template
|
4
5
|
|
5
|
-
def
|
6
|
+
def create
|
6
7
|
filename = Rails.root.join('tmp', 'dradis-export.zip')
|
7
8
|
|
8
|
-
options
|
9
|
+
options = export_params.merge({
|
9
10
|
plugin: Dradis::Plugins::Projects,
|
10
11
|
scope: :all
|
11
|
-
)
|
12
|
+
})
|
12
13
|
exporter = Dradis::Plugins::Projects::Export::Package.new(options)
|
13
14
|
template = exporter.export(filename: filename)
|
14
15
|
|
@@ -1,8 +1,9 @@
|
|
1
1
|
module Dradis::Plugins::Projects
|
2
2
|
class TemplatesController < Dradis::Plugins::Export::BaseController
|
3
3
|
skip_before_action :validate_scope
|
4
|
+
skip_before_action :validate_template
|
4
5
|
|
5
|
-
def
|
6
|
+
def create
|
6
7
|
# this allows us to have different exporters in different editions
|
7
8
|
exporter_class = Rails.application.config.dradis.projects.template_exporter
|
8
9
|
|
@@ -1,19 +1,15 @@
|
|
1
1
|
<%= content_tag :div, id: 'plugin-projects', class: 'tab-pane fade' do %>
|
2
|
-
|
3
|
-
<%= hidden_field_tag :plugin, 'projects' %>
|
2
|
+
<h4 class="header-underline mb-0">Ready when you are!</h4>
|
4
3
|
|
5
|
-
|
4
|
+
<div class="mt-4">
|
5
|
+
<%= form_tag dradis_projects.project_package_path(current_project), class: 'd-inline' do %>
|
6
|
+
<button id="export-button" class="btn btn-lg btn-primary">Export All as Package</button>
|
7
|
+
<% end %>
|
6
8
|
|
7
|
-
|
8
|
-
<%= radio_button_tag :route, :package, true, :class => 'form-check-input' %>
|
9
|
-
<label class="form-check-label" for='route_package'>Package</label>
|
10
|
-
</div>
|
9
|
+
or
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<button id="export-button" class="btn btn-lg btn-primary mt-4">Export All Records</button>
|
18
|
-
<% end %>
|
11
|
+
<%= form_tag dradis_projects.project_template_path(current_project), class: 'd-inline' do %>
|
12
|
+
<button id="export-button" class="btn btn-lg">Export All as Template</button>
|
13
|
+
<% end %>
|
14
|
+
</div>
|
19
15
|
<% end%>
|
data/config/routes.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
Dradis::Plugins::Projects::Engine.routes.draw do
|
2
|
-
|
3
|
-
|
2
|
+
resources :projects, only: [] do
|
3
|
+
resource :package, only: [:create], path: '/export/projects/package'
|
4
|
+
resource :template, only: [:create], path: '/export/projects/template'
|
5
|
+
end
|
4
6
|
end
|
data/dradis-projects.gemspec
CHANGED
@@ -4,7 +4,7 @@ require 'dradis/plugins/projects/version'
|
|
4
4
|
|
5
5
|
# Describe your gem and declare its dependencies:
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.platform
|
7
|
+
spec.platform = Gem::Platform::RUBY
|
8
8
|
spec.name = 'dradis-projects'
|
9
9
|
spec.version = Dradis::Plugins::Projects::VERSION::STRING
|
10
10
|
spec.summary = 'Project export/upload for the Dradis Framework.'
|
@@ -13,11 +13,10 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.license = 'GPL-2'
|
14
14
|
|
15
15
|
spec.authors = ['Daniel Martin']
|
16
|
-
spec.
|
17
|
-
spec.homepage = 'http://dradisframework.org'
|
16
|
+
spec.homepage = 'http://dradis.com'
|
18
17
|
|
19
18
|
spec.files = `git ls-files`.split($\)
|
20
|
-
spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
19
|
+
spec.executables = spec.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
21
20
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
22
21
|
|
23
22
|
spec.add_development_dependency 'bundler', '~> 2.2'
|
@@ -12,17 +12,16 @@ module Dradis
|
|
12
12
|
|
13
13
|
initializer 'dradis-projects.mount_engine' do
|
14
14
|
Rails.application.routes.append do
|
15
|
-
mount Dradis::Plugins::Projects::Engine => '/
|
15
|
+
mount Dradis::Plugins::Projects::Engine => '/', as: :dradis_projects
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
initializer
|
19
|
+
initializer 'dradis-projects.set_configs' do |app|
|
20
20
|
options = app.config.dradis.projects
|
21
21
|
options.template_exporter ||= Dradis::Plugins::Projects::Export::V4::Template
|
22
22
|
options.template_uploader ||= Dradis::Plugins::Projects::Upload::V4::Template::Importer
|
23
23
|
end
|
24
24
|
|
25
|
-
|
26
25
|
# Because this plugin provides two export modules, we have to overwrite
|
27
26
|
# the default .uploaders() method.
|
28
27
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dradis-projects
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.10.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: 2023-
|
11
|
+
date: 2023-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -96,8 +96,7 @@ dependencies:
|
|
96
96
|
version: '0'
|
97
97
|
description: This plugin allows you to dump the contents of the repo into a zip archive
|
98
98
|
and restore the state from one of them.
|
99
|
-
email:
|
100
|
-
- etd@nomejortu.com
|
99
|
+
email:
|
101
100
|
executables: []
|
102
101
|
extensions: []
|
103
102
|
extra_rdoc_files: []
|
@@ -146,7 +145,7 @@ files:
|
|
146
145
|
- spec/lib/dradis/plugins/projects/upload/v1/template_spec.rb
|
147
146
|
- spec/lib/dradis/plugins/projects/upload/v2/template_spec.rb
|
148
147
|
- spec/lib/dradis/plugins/projects/upload/v4/template_spec.rb
|
149
|
-
homepage: http://
|
148
|
+
homepage: http://dradis.com
|
150
149
|
licenses:
|
151
150
|
- GPL-2
|
152
151
|
metadata: {}
|