dradis-calculator_dread 4.11.0 → 4.13.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: 7da485eedb9ab3c2caacc995c478dae8988390881981a225fbea11668e34ab16
4
- data.tar.gz: bd171807a4e3eac164d43f54dc5a1cc16bab422589411b189b8a55eadb53c5d2
3
+ metadata.gz: 56c87df30f8c0186ffa3a9d34e66c479c4a76c0655f632ebc258cbb718fe4e34
4
+ data.tar.gz: 0272411af65a9418dd2abcb42b5a04e53d23f4034d962911631bdeaa49520911
5
5
  SHA512:
6
- metadata.gz: 2ce89b6ec429814995296e998ad7a3237cc2fc4b48df86509baba15b6dae09f010eb62e43f82ed2968278668f0ac28c698c474ceaf377657ba7168d60a735819
7
- data.tar.gz: c596610daf0b7d713695e56559c5c6f11cd758dabb883c53f0d4715016ad8fabe928571d8c77b25069943e49c64b7c7d5652a8e2590e8a6ddfb08ac8f5a0384b
6
+ metadata.gz: 781ba1cfbba9179f3e2f51fe45a9a7dc23e516e108b7e042cee0fb8304b22f6ec53bdc442364edc83e56090c17d95b47f3b850382895649c860ff6f532685324
7
+ data.tar.gz: f449d0c7a74e2b7cf11fe9db555628f66e82daa8348408ae20244742fda594463f530effddd0af6ae5bcecbcdb9f55315e5dba842a4c61f901688703576737e9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ v4.13.0 (July 2024)
2
+ - Add ability to enable/disable calculator in the Tools Manager
3
+
4
+ v4.12.0 (May 2024)
5
+ - Update Dradis links in README
6
+
1
7
  v4.11.0 (January 2024)
2
8
  - No changes
3
9
 
data/README.md CHANGED
@@ -6,8 +6,7 @@ This simple addon adds a new page under `/calculators/dread` for you to perform
6
6
 
7
7
  DREAD stands for (D)amage, (R)eproducibility, (E)xploitability, (A)ffected users, (D)iscoverability and is a common risk assessment model [introduced by Microsoft](http://blogs.msdn.com/b/david_leblanc/archive/2007/08/13/dreadful.aspx).
8
8
 
9
- The add-on requires [Dradis CE](https://dradisframework.com/) > 3.0, or [Dradis Pro](https://dradisframework.com/pro/).
10
-
9
+ The add-on requires [Dradis CE](https://dradis.com/ce/) > 3.0, or [Dradis Pro](https://dradis.com/).
11
10
 
12
11
  ## Install
13
12
 
@@ -1,4 +1,3 @@
1
- <% if Dradis::Plugins::Calculators::DREAD::Engine.settings.show.to_i == 1 %>
2
1
  <div class="tab-pane" id="dread-tab">
3
2
  <div class="inner">
4
3
  <h4 class="header-underline">DREAD Risk Scoring -
@@ -19,4 +18,3 @@
19
18
  </div>
20
19
  </div>
21
20
  </div>
22
- <% end %>
@@ -1,5 +1,3 @@
1
- <% if Dradis::Plugins::Calculators::DREAD::Engine.settings.show.to_i == 1 %>
2
1
  <li class="nav-item">
3
2
  <a href="#dread-tab" data-bs-toggle="tab" class="nav-link"><i class="fa-solid fa-calculator"></i> DREAD</a>
4
3
  </li>
5
- <% end %>
@@ -25,6 +25,6 @@ Gem::Specification.new do |spec|
25
25
  # s.add_dependency 'rails', '~> 4.1.1'
26
26
  spec.add_dependency 'dradis-plugins', '~> 4.0'
27
27
 
28
- spec.add_development_dependency 'bundler', '~> 1.6'
28
+ spec.add_development_dependency 'bundler', '~> 2.0'
29
29
  spec.add_development_dependency 'rake', '~> 10.0'
30
30
  end
@@ -6,10 +6,6 @@ module Dradis::Plugins::Calculators::DREAD
6
6
  provides :addon
7
7
  description 'Risk Calculators: DREAD'
8
8
 
9
- addon_settings :calculator_dread do
10
- settings.default_show = 1
11
- end
12
-
13
9
  initializer 'calculator_dread.asset_precompile_paths' do |app|
14
10
  app.config.assets.precompile += [
15
11
  'dradis/plugins/calculators/dread/manifests/application.css',
@@ -25,10 +21,20 @@ module Dradis::Plugins::Calculators::DREAD
25
21
  end
26
22
 
27
23
  initializer 'calculator_dread.mount_engine' do
28
- Rails.application.routes.append do
29
- mount Dradis::Plugins::Calculators::DREAD::Engine => '/', as: :dread_calculator
24
+ # By default, this engine is loaded into the main app. So, upon app
25
+ # initialization, we first check if the DB is loaded and the Configuration
26
+ # table has been created, before checking if the engine is enabled
27
+ Rails.application.reloader.to_prepare do
28
+ if (ActiveRecord::Base.connection rescue false) && ::Configuration.table_exists?
29
+ Rails.application.routes.append do
30
+ # Enabling/disabling integrations calls Rails.application.reload_routes! we need the enable
31
+ # check inside the block to ensure the routes can be re-enabled without a server restart
32
+ if Engine.enabled?
33
+ mount Engine => '/', as: :dread_calculator
34
+ end
35
+ end
36
+ end
30
37
  end
31
38
  end
32
-
33
39
  end
34
40
  end
@@ -9,7 +9,7 @@ module Dradis
9
9
 
10
10
  module VERSION
11
11
  MAJOR = 4
12
- MINOR = 11
12
+ MINOR = 13
13
13
  TINY = 0
14
14
  PRE = nil
15
15
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dradis-calculator_dread
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.11.0
4
+ version: 4.13.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: 2024-01-17 00:00:00.000000000 Z
11
+ date: 2024-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dradis-plugins
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.6'
33
+ version: '2.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.6'
40
+ version: '2.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  requirements: []
111
- rubygems_version: 3.3.7
111
+ rubygems_version: 3.5.6
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: This plugin adds a DREAD score calculator to Dradis.