dradis-json 4.16.0 → 4.17.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: 7122133b6fe0a967a0532992f8f07905d5aaf216d963945ed672d0b5096e821e
4
- data.tar.gz: 26d6cd9fa5aa8ba4648f57f369f59b3f9caa3ab989dd3eec6865980124a1abd7
3
+ metadata.gz: bc7819dd69e05ff6cd96411448c1e3deb846ca44121c3c9d2156c0803bca60de
4
+ data.tar.gz: b452d9f8ad688bfc89c1faa004756259bd9c3b41a823696be37f62caabe9e83b
5
5
  SHA512:
6
- metadata.gz: 0d681497d3d3deab2bd45e7e0bad01bd592bb328cca093b91630e5c2029946df8bbc689305c13d3e39f3733df9d28ab0784fc5cc60cc5aef9578431ee55d07b2
7
- data.tar.gz: e025a7991652523973973e52e8e70064aed8581f4b83628528336ff6111288387c9cdb711ebe12db1bb3f1dbcd69abe584c06d4b5630090aa11c82f7c9329d43
6
+ metadata.gz: 8be1fbe587608cf75c40a95b0af362e7322ad9da6fd866cd863e194d28cb7e76e82deb70b6acd36d4b4fede66b1e0491dc5cc75e17f4cda67a222fb1ce530be1
7
+ data.tar.gz: 350e42325ff127f330940bf9caf7e61c9a8f320cac4520b4e7f0a19180d34976680d964e442bf66e5ee35ba400b48303c37dbd1830be86289a0116a7e3238c4c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ v4.17.0 (July 2025)
2
+ - No changes
3
+
4
+ v4.16.1 (Month 2025)
5
+ - Fix compatbility of the JSON exporter with the current version of Dradis
6
+
1
7
  v4.16.0 (May 2025)
2
8
  - No changes
3
9
 
data/README.md CHANGED
@@ -5,7 +5,7 @@ Export Dradis findings into JavaScript Object Notation (JSON) format.
5
5
 
6
6
  ## Installation
7
7
 
8
- The plugin requires [Dradis CE](http://dradis.com/ce/) > 3.0 or [Dradis Pro](http://dradis.com/) 2.0 or higher.
8
+ The plugin requires [Dradis CE](http://dradis.com/ce/) or [Dradis Pro](http://dradis.com/) 4.16 or higher.
9
9
 
10
10
  Add the JSON plugin to your `Gemfile.plugins`:
11
11
 
@@ -0,0 +1,16 @@
1
+ module Dradis
2
+ module Plugins
3
+ module JSON
4
+ class ReportsController < Dradis::Plugins::Export::BaseController
5
+ skip_before_action :validate_template
6
+
7
+ def create
8
+ exporter = Dradis::Plugins::JSON::Exporter.new(export_params)
9
+ json = exporter.export
10
+
11
+ render json: json
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -1,10 +1,9 @@
1
1
  <%= content_tag :div, id: 'plugin-json', class: 'tab-pane fade' do %>
2
- <%= form_tag project_export_manager_path(current_project), target: '_blank' do %>
3
- <%= hidden_field_tag :plugin, :json %>
4
- <%= hidden_field_tag :route, :root %>
5
-
2
+ <%= form_tag json_export.project_report_path(current_project), target: '_blank' do %>
6
3
  <h4 class="header-underline">Ready when you are!</h4>
7
4
 
8
- <button id="export-button" class="btn btn-lg btn-primary mt-4">Export</button>
5
+ <div class="mt-4">
6
+ <%= render partial: 'export/submit_button', locals: { plugin_name: Dradis::Plugins::JSON::Engine.plugin_name } %>
7
+ </div>
9
8
  <% end %>
10
9
  <% end%>
@@ -1,3 +1,3 @@
1
1
  <li class='nav-item'>
2
- <a href='#json' class='nav-link' data-toggle='tab' data-target='#plugin-json'>Generate JSON reports</a>
2
+ <a href='#plugin-json' class='nav-link' data-bs-toggle='tab'><i class='fa-solid fa-file-excel fa-fw'></i>JSON</a>
3
3
  </li>
data/config/routes.rb CHANGED
@@ -1,3 +1,5 @@
1
- Dradis::Plugins::Json::Engine.routes.draw do
2
- root to: 'base#index'
1
+ Dradis::Plugins::JSON::Engine.routes.draw do
2
+ resources :projects, only: [] do
3
+ resource :report, only: [:create], path: '/export/json/reports'
4
+ end
3
5
  end
data/dradis-json.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  $:.push File.expand_path('../lib', __FILE__)
2
2
  require 'dradis/plugins/json/version'
3
- version = Dradis::Plugins::Json::VERSION::STRING
3
+ version = Dradis::Plugins::JSON::VERSION::STRING
4
4
 
5
5
  # Describe your gem and declare its dependencies:
6
6
  Gem::Specification.new do |spec|
@@ -1,6 +1,6 @@
1
- module Dradis::Plugins::Json
1
+ module Dradis::Plugins::JSON
2
2
  class Engine < ::Rails::Engine
3
- isolate_namespace Dradis::Plugins::Json
3
+ isolate_namespace Dradis::Plugins::JSON
4
4
 
5
5
  include Dradis::Plugins::Base
6
6
  provides :export
@@ -8,9 +8,8 @@ module Dradis::Plugins::Json
8
8
 
9
9
  initializer 'dradis-json.mount_engine' do
10
10
  Rails.application.routes.append do
11
- mount Dradis::Plugins::Json::Engine => '/export/json'
11
+ mount Dradis::Plugins::JSON::Engine => '/', as: :json_export
12
12
  end
13
13
  end
14
-
15
14
  end
16
15
  end
@@ -1,7 +1,6 @@
1
- module Dradis::Plugins::Json
2
-
1
+ module Dradis::Plugins::JSON
3
2
  class Exporter < Dradis::Plugins::Export::Base
4
- def export(args={})
3
+ def export(args = {})
5
4
 
6
5
  issues = content_service.all_issues
7
6
 
@@ -1,6 +1,6 @@
1
1
  module Dradis
2
2
  module Plugins
3
- module Json
3
+ module JSON
4
4
  # Returns the version of the currently loaded JSON as a <tt>Gem::Version</tt>
5
5
  def self.gem_version
6
6
  Gem::Version.new VERSION::STRING
@@ -8,7 +8,7 @@ module Dradis
8
8
 
9
9
  module VERSION
10
10
  MAJOR = 4
11
- MINOR = 16
11
+ MINOR = 17
12
12
  TINY = 0
13
13
  PRE = nil
14
14
 
@@ -2,7 +2,7 @@ require_relative 'gem_version'
2
2
 
3
3
  module Dradis
4
4
  module Plugins
5
- module Json
5
+ module JSON
6
6
  # Returns the version of the currently loaded JSON as a
7
7
  # <tt>Gem::Version</tt>.
8
8
  def self.version
@@ -21,8 +21,8 @@ class JsonExportTasks < Thor
21
21
 
22
22
  detect_and_set_project_scope
23
23
 
24
- json = Dradis::Plugins::Json::Exporter.new.export({
25
- content_service: content_service_for(Dradis::Plugins::Json),
24
+ json = Dradis::Plugins::JSON::Exporter.new.export({
25
+ content_service: content_service_for(Dradis::Plugins::JSON),
26
26
  })
27
27
 
28
28
  File.open(report_path, 'w') do |f|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dradis-json
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.16.0
4
+ version: 4.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rachael Korinek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-16 00:00:00.000000000 Z
11
+ date: 2025-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dradis-plugins
@@ -82,7 +82,7 @@ files:
82
82
  - LICENSE
83
83
  - README.md
84
84
  - Rakefile
85
- - app/controllers/dradis/plugins/json/base_controller.rb
85
+ - app/controllers/dradis/plugins/json/reports_controller.rb
86
86
  - app/views/dradis/plugins/json/export/_index-content.html.erb
87
87
  - app/views/dradis/plugins/json/export/_index-tabs.html.erb
88
88
  - config/routes.rb
@@ -1,16 +0,0 @@
1
- module Dradis
2
- module Plugins
3
- module Json
4
- class BaseController < Dradis::Plugins::Export::BaseController
5
-
6
- def index
7
- exporter = Dradis::Plugins::Json::Exporter.new(export_options)
8
- json = exporter.export
9
-
10
- render json: json
11
- end
12
- end
13
-
14
- end
15
- end
16
- end