-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.rb
72 lines (63 loc) · 2.05 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
require 'redmine'
require_dependency 'testlinklink_asset_tag_helper_patch'
require_dependency 'testlinklink_view_layouts_base_html_head_hook'
Redmine::Plugin.register :redmine_testlinklink do
name 'Testlink Link plugin'
author 'M. Yoshida'
description 'Links the test case, the project and so on from Redmine to TestLink.'
version '1.0.0'
url 'http://www.r-labs.org/projects/rp-testlinklink/wiki/TestLinkLinkEn'
author_url 'http://yohshiy.blog.fc2.com/'
requires_redmine :version_or_higher => '2'
settings :default => {
'testlink_address' => 'http://localhost/testlink',
'testlink_version' => '1.8',
'default_report_toc' => false,
'default_report_header' => false,
'default_report_summary' => 1,
'default_report_body' => false,
'default_report_author' => false,
'default_report_keyword' => false,
'default_report_cfields' => false,
'default_report_passfail' => 1,
'default_report_metrics' => false,
'default_planreport_toc' => false,
'default_planreport_header' => false,
'default_planreport_summary' => 1,
'default_planreport_body' => false,
'default_planreport_author' => false,
'default_planreport_keyword' => false,
'default_planreport_cfields' => false,
'default_planreport_testplan' => false
}, :partial => 'settings/testlinklink_settings'
end
Redmine::WikiFormatting::Macros.register do
desc "TestLink link macro"
macro :testlink do |obj, args|
tl = TestLinkLink.new(*args)
tl.link
end
end
Redmine::WikiFormatting::Macros.register do
desc "TestLink TestCase link macro"
macro :testcase do |obj, args|
tl = TestLinkLink.new('case', *args)
tl.link
end
end
Redmine::WikiFormatting::Macros.register do
desc "TestLink TestReport link macro"
macro :testreport do |obj, args|
tl = TestLinkLink.new('report', *args)
tl.link
end
end
Redmine::WikiFormatting::Macros.register do
desc "TestLink TestFile link macro"
macro :testfile do |obj, args|
fmtname = args.shift
tl = TestLinkLink.new(*args)
tl.formatname = fmtname
tl.link
end
end