-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit.rb
59 lines (48 loc) · 2.07 KB
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
require 'redmine'
require 'testit_projects_helper_patch'
require 'testit_issue_patch'
require_dependency 'testit/hooks'
Rails.configuration.to_prepare do
unless ProjectsHelper.included_modules.include? TestitProjectsHelperPatch
ProjectsHelper.send(:include, TestitProjectsHelperPatch)
end
Issue.send :include, TestitIssuePatch
end
Redmine::Plugin.register :testit do
name 'TestIt'
author 'Vasco Santos'
description 'Test management tool'
version '0.2.12'
url 'https://github.com/valexsantos/testit'
author_url 'https://github.com/valexsantos'
settings :partial => 'testit/setting'
project_module :testit do
permission :view_testcases, {
'testit' => [:index ],
'testit_issues' => [:index, :show ],
'testit_suites' => [ :show ],
'testit_tests' => [:index, :show ],
'testit_plans' => [:index, :show ],
'testit_runs' => [:index, :show ],
'testit_relations' => [:show ],
'testit_reports' => [:index]
}
permission :manage_testcases, {
'testit' => [:index ],
'testit_issues' => [:new, :edit, :destroy, :create, :update, :copy, :move ],
'testit_suites' => [:new, :edit, :destroy, :create, :update, :copy, :move ],
'testit_tests' => [:new, :edit, :destroy, :create, :update, :copy, :move, :new_tr, :destroy_tr ],
'testit_plans' => [:new, :edit, :destroy, :create, :update, :copy ],
'testit_runs' => [:new, :edit, :destroy, :create, :update, :run ],
'testit_relations' => [:destroy, :create, :new_tc, :new_tr, :new_ts, :new_tp, :new_req ],
'testit_reports' => [:index]
}, :require => :member
permission :setting_testcases, {
'testit' => [:index ],
'testit_settings' => [:index, :show, :edit],
}, :require => :member
end
menu :project_menu, :testit, { :controller => :testit, :action => :index },
:caption => :label_testit,
:param => :project_id
end