dradis-plugins 3.12.0 → 3.17.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
- SHA1:
3
- metadata.gz: 7cd282bb6be363601085a2036165cc2a5fc2058a
4
- data.tar.gz: 3739f1f425deb1b08c4009977b51a996d70570a7
2
+ SHA256:
3
+ metadata.gz: 63c73b9308963a281e182f68ce2eaaa1d1da5c0dab9fb3a042e63ff9f6f4668d
4
+ data.tar.gz: b7d3cab673e307dc688828d9a1735295e6d1da9e1c4450aab4f4210993163e03
5
5
  SHA512:
6
- metadata.gz: 775b95969fc26c4bf634fb27d4c9624fb1cd3459dbde64859329acc6bac3eb762d305dbaeb20d76412cfb4917a3642ebea510b124c885584c7f08855e3be05ba
7
- data.tar.gz: 3bebbd6c98a08671bfa7753d7ce72a2c246d6b9ca9a5e689d4577ff9145e5df2074842593e54ac6d452e41d272a4881a007829e3717dfee09addf3cde156c256
6
+ metadata.gz: 0d557b0eb64458639b1ec6df6ddf38977e017eb0a0f4bf14d5b18b1e3265295b5753dd79dfe757bbade80ec46d8786ab8daeeb2373240cf838ddb6bf4e109702
7
+ data.tar.gz: 0547b4ca3771a9f2aa8db971295292063a5a9ff6afb67dd89cc6a2d92393ae27ca6ba8bb452ef553fe75f04cb783f0ba4900084c80cc47ce2c15cb2fe9427e41
@@ -1,3 +1,23 @@
1
+ ## Dradis Framework 3.17 (May, 2020) ##
2
+
3
+ * No changes.
4
+
5
+ ## Dradis Framework 3.16 (February, 2020) ##
6
+
7
+ * No changes.
8
+
9
+ ## Dradis Framework 3.15 (November, 2019) ##
10
+
11
+ * Make ContentService Boards available in CE
12
+
13
+ ## Dradis Framework 3.14 (August, 2019) ##
14
+
15
+ * Add node to boards
16
+
17
+ ## Dradis Framework 3.13 (June, 2019) ##
18
+
19
+ * No changes.
20
+
1
21
  ## Dradis Framework 3.12 (March, 2019) ##
2
22
 
3
23
  * No changes.
@@ -12,7 +12,7 @@ module Dradis::Plugins::ContentService
12
12
  class Base
13
13
  include Core
14
14
 
15
- include Boards if defined?(Dradis::Pro)
15
+ include Boards
16
16
  include Categories
17
17
  include ContentBlocks if defined?(Dradis::Pro)
18
18
  include Evidence
@@ -3,17 +3,30 @@ module Dradis::Plugins::ContentService
3
3
  extend ActiveSupport::Concern
4
4
 
5
5
  def all_boards
6
- Board.where(project_id: project.id)
6
+ project.boards
7
+ end
8
+
9
+ def project_boards
10
+ project.methodology_library.boards
7
11
  end
8
12
 
9
13
  def create_board(args={})
10
- name = args.fetch(:name, default_board_name)
11
- Board.create(name: name, project_id: project.id)
14
+ name = args.fetch(:name, default_board_name)
15
+ node_id = args.fetch(:node_id, default_node_id)
16
+ Board.create(
17
+ name: name,
18
+ node_id: node_id,
19
+ project: project
20
+ )
12
21
  end
13
22
 
14
23
  private
15
24
  def default_board_name
16
25
  "create_board() invoked by #{plugin} without a :name parameter"
17
26
  end
27
+
28
+ def default_node_id
29
+ project.methodology_library.id
30
+ end
18
31
  end
19
32
  end
@@ -7,7 +7,7 @@ module Dradis
7
7
 
8
8
  module VERSION
9
9
  MAJOR = 3
10
- MINOR = 12
10
+ MINOR = 17
11
11
  TINY = 0
12
12
  PRE = nil
13
13
 
@@ -0,0 +1,45 @@
1
+ require 'rails_helper'
2
+
3
+ # To run, execute from Dradis main app folder:
4
+ # bin/rspec [dradis-plugins path]/spec/lib/dradis/plugins/content_service/boards_spec.rb
5
+ describe Dradis::Plugins::ContentService::Boards do
6
+ let(:plugin) { Dradis::Plugins::Nessus }
7
+ let(:project) { create(:project) }
8
+ let(:service) do
9
+ Dradis::Plugins::ContentService::Base.new(
10
+ plugin: plugin,
11
+ logger: Rails.logger,
12
+ project: project
13
+ )
14
+ end
15
+
16
+ describe 'Boards' do
17
+ describe '#all_boards' do
18
+ it 'returns all the project-level boards' do
19
+ board = create(:board, project: project)
20
+ node = create(:node, project: project)
21
+ node_board = create(:board, node: node, project: project)
22
+
23
+ boards = service.all_boards
24
+
25
+ expect(boards).to include(board)
26
+ expect(boards).to_not include(node_board)
27
+ end
28
+ end
29
+
30
+ describe '#create_board' do
31
+ it 'creates a board without a node' do
32
+ service.create_board(name: 'NodelessBoard')
33
+
34
+ expect(project.reload.boards.where(name: 'NodelessBoard')).to_not be_nil
35
+ end
36
+
37
+ it 'creates a board with a node' do
38
+ node = create(:node, project: project)
39
+ service.create_board(name: 'NodeBoard', node_id: node.id)
40
+
41
+ expect(project.reload.boards.where(name: 'NodeBoard')).to_not be_nil
42
+ end
43
+ end
44
+ end
45
+ end
@@ -2,7 +2,7 @@ require 'rails_helper'
2
2
 
3
3
  # These specs are coming from engines/dradispro-rules/spec/content_service_spec.rb
4
4
  # To run, execute from Dradis main app folder:
5
- # bin/rspec [dradis-plugins path]/spec/lib/dradis/plugins/content_service_spec.rb
5
+ # bin/rspec [dradis-plugins path]/spec/lib/dradis/plugins/content_service/issues_spec.rb
6
6
 
7
7
  describe Dradis::Plugins::ContentService::Base do
8
8
  let(:plugin) { Dradis::Plugins::Nessus }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dradis-plugins
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.12.0
4
+ version: 3.17.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: 2019-04-01 00:00:00.000000000 Z
11
+ date: 2020-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -102,7 +102,8 @@ files:
102
102
  - lib/dradis/plugins/upload/importer.rb
103
103
  - lib/dradis/plugins/version.rb
104
104
  - spec/internal/log/test.log
105
- - spec/lib/dradis/plugins/content_service_spec.rb
105
+ - spec/lib/dradis/plugins/content_service/boards_spec.rb
106
+ - spec/lib/dradis/plugins/content_service/issues_spec.rb
106
107
  - spec/settings_spec.rb
107
108
  - spec/spec_helper.rb
108
109
  homepage: http://dradisframework.org
@@ -124,13 +125,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
125
  - !ruby/object:Gem::Version
125
126
  version: '0'
126
127
  requirements: []
127
- rubyforge_project:
128
- rubygems_version: 2.6.12
128
+ rubygems_version: 3.0.1
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: Plugin manager for the Dradis Framework project.
132
132
  test_files:
133
133
  - spec/internal/log/test.log
134
- - spec/lib/dradis/plugins/content_service_spec.rb
134
+ - spec/lib/dradis/plugins/content_service/boards_spec.rb
135
+ - spec/lib/dradis/plugins/content_service/issues_spec.rb
135
136
  - spec/settings_spec.rb
136
137
  - spec/spec_helper.rb