dradis-json 4.16.0 → 4.18.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: eb2ce04e6b339afae212d9b7edea99cf49f1b37e67593c497ab7ce023f2e6e6b
4
+ data.tar.gz: 0fffeb040250d094bba5418a0d85f6e3e512648a82a05ee625406012882b9b79
5
5
  SHA512:
6
- metadata.gz: 0d681497d3d3deab2bd45e7e0bad01bd592bb328cca093b91630e5c2029946df8bbc689305c13d3e39f3733df9d28ab0784fc5cc60cc5aef9578431ee55d07b2
7
- data.tar.gz: e025a7991652523973973e52e8e70064aed8581f4b83628528336ff6111288387c9cdb711ebe12db1bb3f1dbcd69abe584c06d4b5630090aa11c82f7c9329d43
6
+ metadata.gz: c3ec45bca3b0cf57cb36637ef00424492964a1deec00d64c61ffa242820cd9b081800e6ef333ebf924f1c0e28914bf00fe2463ee0ac38c01309f56cf1a999226
7
+ data.tar.gz: 1685cfc7061261b2ee7048219543b7f2d1dc2dfac983ba51b954050b4a23d10e059c9df003681c88713673c965595d6156958dd4ec1eaa5f1921aee596295b13
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ v4.18.0 (September 2025)
2
+ - No changes
3
+
4
+ v4.17.0 (July 2025)
5
+ - No changes
6
+
7
+ v4.16.1 (Month 2025)
8
+ - Fix compatbility of the JSON exporter with the current version of Dradis
9
+
1
10
  v4.16.0 (May 2025)
2
11
  - No changes
3
12
 
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 = 18
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,13 @@
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.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rachael Korinek
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-05-16 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: dradis-plugins
@@ -67,7 +66,6 @@ dependencies:
67
66
  - !ruby/object:Gem::Version
68
67
  version: '0'
69
68
  description: This plugin allows you to export your Dradis results in JSON format.
70
- email:
71
69
  executables: []
72
70
  extensions: []
73
71
  extra_rdoc_files: []
@@ -82,7 +80,7 @@ files:
82
80
  - LICENSE
83
81
  - README.md
84
82
  - Rakefile
85
- - app/controllers/dradis/plugins/json/base_controller.rb
83
+ - app/controllers/dradis/plugins/json/reports_controller.rb
86
84
  - app/views/dradis/plugins/json/export/_index-content.html.erb
87
85
  - app/views/dradis/plugins/json/export/_index-tabs.html.erb
88
86
  - config/routes.rb
@@ -100,7 +98,6 @@ homepage: http://dradis.com
100
98
  licenses:
101
99
  - GPL-2
102
100
  metadata: {}
103
- post_install_message:
104
101
  rdoc_options: []
105
102
  require_paths:
106
103
  - lib
@@ -115,8 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
112
  - !ruby/object:Gem::Version
116
113
  version: '0'
117
114
  requirements: []
118
- rubygems_version: 3.5.6
119
- signing_key:
115
+ rubygems_version: 3.6.9
120
116
  specification_version: 4
121
117
  summary: JSON export plugin for the Dradis Framework.
122
118
  test_files:
@@ -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