damagecontrol 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. data/README +75 -0
  2. data/README.license +5 -0
  3. data/Rakefile +111 -0
  4. data/app/controllers/admin_controller.rb +10 -0
  5. data/app/controllers/application.rb +163 -0
  6. data/app/controllers/files_controller.rb +19 -0
  7. data/app/controllers/project_controller.rb +284 -0
  8. data/app/controllers/scm_controller.rb +49 -0
  9. data/app/helpers/admin_helper.rb +2 -0
  10. data/app/helpers/application_helper.rb +3 -0
  11. data/app/helpers/project_helper.rb +2 -0
  12. data/app/views/dhtml_sites.txt +6 -0
  13. data/app/views/files/list.rhtml +4 -0
  14. data/app/views/layouts/rscm.rhtml +79 -0
  15. data/app/views/project/_bugzilla.rhtml +13 -0
  16. data/app/views/project/_changesets_list.rhtml +52 -0
  17. data/app/views/project/_cvs.rhtml +171 -0
  18. data/app/views/project/_jira.rhtml +19 -0
  19. data/app/views/project/_mooky.rhtml +23 -0
  20. data/app/views/project/_null.rhtml +0 -0
  21. data/app/views/project/_project.rhtml +36 -0
  22. data/app/views/project/_rubyforge.rhtml +19 -0
  23. data/app/views/project/_scarab.rhtml +19 -0
  24. data/app/views/project/_scms.rhtml +15 -0
  25. data/app/views/project/_sourceforge.rhtml +19 -0
  26. data/app/views/project/_starteam.rhtml +43 -0
  27. data/app/views/project/_svn.rhtml +22 -0
  28. data/app/views/project/_trac.rhtml +13 -0
  29. data/app/views/project/_trackers.rhtml +18 -0
  30. data/app/views/project/changesets.rhtml +31 -0
  31. data/app/views/project/index.rhtml +23 -0
  32. data/app/views/project/view.rhtml +70 -0
  33. data/app/views/scm/checkout_status.rhtml +44 -0
  34. data/app/views/scm/diff.rhtml +1 -0
  35. data/app/views/scm/scroll.html +27 -0
  36. data/bin/damagecontrol +7 -0
  37. data/bin/damagecontrol-webrick +2 -0
  38. data/config/database.yml +20 -0
  39. data/config/environment.rb +60 -0
  40. data/config/environments/development.rb +3 -0
  41. data/config/environments/production.rb +2 -0
  42. data/config/environments/test.rb +3 -0
  43. data/lib/damagecontrol/app.rb +74 -0
  44. data/lib/damagecontrol/build.rb +104 -0
  45. data/lib/damagecontrol/diff_htmlizer.rb +82 -0
  46. data/lib/damagecontrol/diff_parser.rb +153 -0
  47. data/lib/damagecontrol/directories.rb +126 -0
  48. data/lib/damagecontrol/poller.rb +72 -0
  49. data/lib/damagecontrol/project.rb +213 -0
  50. data/lib/damagecontrol/project_dependencies.rb +8 -0
  51. data/lib/damagecontrol/scm_web.rb +50 -0
  52. data/lib/damagecontrol/standard_persister.rb +49 -0
  53. data/lib/damagecontrol/tracker.rb +164 -0
  54. data/lib/damagecontrol/visitor/build_executor.rb +32 -0
  55. data/lib/damagecontrol/visitor/diff_persister.rb +41 -0
  56. data/lib/damagecontrol/visitor/rss_writer.rb +43 -0
  57. data/lib/damagecontrol/visitor/yaml_persister.rb +71 -0
  58. data/public/404.html +6 -0
  59. data/public/500.html +6 -0
  60. data/public/dispatch.cgi +10 -0
  61. data/public/dispatch.fcgi +7 -0
  62. data/public/dispatch.rb +10 -0
  63. data/public/images/16x16/about.png +0 -0
  64. data/public/images/16x16/bug_green.png +0 -0
  65. data/public/images/16x16/bug_red.png +0 -0
  66. data/public/images/16x16/bug_yellow.png +0 -0
  67. data/public/images/16x16/component.png +0 -0
  68. data/public/images/16x16/console.png +0 -0
  69. data/public/images/16x16/console_error.png +0 -0
  70. data/public/images/16x16/document_add.png +0 -0
  71. data/public/images/16x16/document_delete.png +0 -0
  72. data/public/images/16x16/document_edit.png +0 -0
  73. data/public/images/16x16/document_exchange.png +0 -0
  74. data/public/images/16x16/document_new.png +0 -0
  75. data/public/images/16x16/document_warning.png +0 -0
  76. data/public/images/16x16/safe.png +0 -0
  77. data/public/images/16x16/scroll_information.png +0 -0
  78. data/public/images/16x16/wrench.png +0 -0
  79. data/public/images/24x24/box_delete.png +0 -0
  80. data/public/images/24x24/box_into.png +0 -0
  81. data/public/images/24x24/box_new.png +0 -0
  82. data/public/images/24x24/console_network.png +0 -0
  83. data/public/images/24x24/document_edit.png +0 -0
  84. data/public/images/24x24/find.png +0 -0
  85. data/public/images/24x24/folders.png +0 -0
  86. data/public/images/24x24/garbage.png +0 -0
  87. data/public/images/24x24/gear_connection.png +0 -0
  88. data/public/images/24x24/gear_delete.png +0 -0
  89. data/public/images/24x24/gears_run.png +0 -0
  90. data/public/images/24x24/home.png +0 -0
  91. data/public/images/24x24/navigate_left.png +0 -0
  92. data/public/images/24x24/navigate_right.png +0 -0
  93. data/public/images/24x24/package_new.png +0 -0
  94. data/public/images/24x24/safe.png +0 -0
  95. data/public/images/24x24/safe_new.png +0 -0
  96. data/public/images/24x24/safe_out.png +0 -0
  97. data/public/images/24x24/scroll_information.png +0 -0
  98. data/public/images/24x24/stop.png +0 -0
  99. data/public/images/24x24/wrench.png +0 -0
  100. data/public/images/README.license +2 -0
  101. data/public/images/blue-16.gif +0 -0
  102. data/public/images/blue-32.gif +0 -0
  103. data/public/images/bugzilla.png +0 -0
  104. data/public/images/cvs.png +0 -0
  105. data/public/images/footer.gif +0 -0
  106. data/public/images/green-128.gif +0 -0
  107. data/public/images/green-16.gif +0 -0
  108. data/public/images/green-32.gif +0 -0
  109. data/public/images/grey-16.gif +0 -0
  110. data/public/images/grey-32.gif +0 -0
  111. data/public/images/jira.gif +0 -0
  112. data/public/images/red-16.gif +0 -0
  113. data/public/images/red-32.gif +0 -0
  114. data/public/images/red-pulse-32.gif +0 -0
  115. data/public/images/rss.gif +0 -0
  116. data/public/images/rubyforge.png +0 -0
  117. data/public/images/scarab.gif +0 -0
  118. data/public/images/sourceforge.gif +0 -0
  119. data/public/images/starteam.png +0 -0
  120. data/public/images/svnlogo64.png +0 -0
  121. data/public/images/trac.png +0 -0
  122. data/public/index.html +1 -0
  123. data/public/javascripts/dw_event.js +34 -0
  124. data/public/javascripts/dw_tooltip.js +86 -0
  125. data/public/javascripts/dw_viewport.js +55 -0
  126. data/public/javascripts/pngfix.js +29 -0
  127. data/public/javascripts/toggle_diff.js +25 -0
  128. data/public/licenses/DAMAGECONTROL.license +28 -0
  129. data/public/licenses/INCORS.license +32 -0
  130. data/public/stylesheets/diff.css +23 -0
  131. data/public/stylesheets/style.css +307 -0
  132. data/script/breakpointer +5 -0
  133. data/script/console +30 -0
  134. data/script/generate +70 -0
  135. data/script/server +61 -0
  136. data/test/damagecontrol/a_program.rb +3 -0
  137. data/test/damagecontrol/a_slow_program.rb +3 -0
  138. data/test/damagecontrol/build_test.rb +59 -0
  139. data/test/damagecontrol/diff_htmlizer_test.rb +31 -0
  140. data/test/damagecontrol/diff_parser_test.rb +61 -0
  141. data/test/damagecontrol/file_ext.rb +12 -0
  142. data/test/damagecontrol/poller_test.rb +56 -0
  143. data/test/damagecontrol/project_test.rb +144 -0
  144. data/test/damagecontrol/scm_web_test.rb +22 -0
  145. data/test/damagecontrol/test.diff +38 -0
  146. data/test/damagecontrol/test.html +40 -0
  147. data/test/damagecontrol/tracker_test.rb +48 -0
  148. data/test/damagecontrol/visitor/changesets.rss +34 -0
  149. data/test/damagecontrol/visitor/diff_persister_test.rb +49 -0
  150. data/test/damagecontrol/visitor/rss_writer_test.rb +40 -0
  151. data/test/damagecontrol/visitor/yaml_persister_test.rb +40 -0
  152. data/test/functional/admin_controller_test.rb +17 -0
  153. data/test/functional/project_controller_test.rb +17 -0
  154. data/test/test_helper.rb +14 -0
  155. metadata +245 -0
@@ -0,0 +1,49 @@
1
+ require 'rscm/directories'
2
+
3
+ class ScmController < ApplicationController
4
+
5
+ # Checks out a working copy into the project's checkout dir.
6
+ def checkout
7
+ load_project
8
+
9
+ # Do this asynch to give a fast response
10
+ # TODO: guard against multiple concurrent checkouts
11
+ # TODO: put the thread on the daemon side instead
12
+ Thread.new do
13
+ @project.checkout
14
+ end
15
+
16
+ # Doing a redirect since this *should* be called via HTTP POST. TODO: verify METHOD
17
+ redirect_to :action => "checkout_status", :id => @project.name
18
+ end
19
+
20
+ # Shows the status page with the JS magic that
21
+ # will pull the checkout_list
22
+ def checkout_status
23
+ @checkout_list_path = "/scm/checkout_list/#{@params['id']}"
24
+ end
25
+
26
+ # Sends the file containing the files currently being checked out.to the client
27
+ def checkout_list
28
+ load_project
29
+ if(File.exist?(@project.checkout_list_file))
30
+ send_file(@project.checkout_list_file)
31
+ else
32
+ render_text("No files checked out yet")
33
+ end
34
+ end
35
+
36
+ # Creates the SCM repo
37
+ def create
38
+ load_project
39
+ @project.scm.create
40
+ redirect_to :controller => "project", :action => "view", :id => @project.name
41
+ end
42
+
43
+ def delete_working_copy
44
+ load_project
45
+ @project.delete_working_copy
46
+ redirect_to :controller => "project", :action => "view", :id => @project.name
47
+ end
48
+
49
+ end
@@ -0,0 +1,2 @@
1
+ module AdminHelper
2
+ end
@@ -0,0 +1,3 @@
1
+ # The methods added to this helper will be available to all templates in the application.
2
+ module ApplicationHelper
3
+ end
@@ -0,0 +1,2 @@
1
+ module ProjectHelper
2
+ end
@@ -0,0 +1,6 @@
1
+ http://www.dyn-web.com/
2
+ http://www.twinhelix.com/
3
+ http://www.dynamicdrive.com/
4
+ http://www.milonic.com/
5
+ http://www.dhtmlcentral.com/
6
+ http://www.smartmenus.org/
@@ -0,0 +1,4 @@
1
+ <H1>WARNING: This is a little quirky.</H1>
2
+ <% @relative_paths.each do |f| %>
3
+ <%= link_to(f, :controller => "files", :action => "list", :id => @project.name, :params => {"path" => f}) %><br>
4
+ <% end %>
@@ -0,0 +1,79 @@
1
+ <html>
2
+ <head>
3
+ <title>RSCM</title>
4
+ <script src="/javascripts/toggle_diff.js" type="text/javascript"></script>
5
+ <link type="text/css" rel="stylesheet" href="/stylesheets/style.css">
6
+ <link type="text/css" rel="stylesheet" href="/stylesheets/diff.css">
7
+ <script>
8
+
9
+ // http://developer.irt.org/script/1428.htm - add timezone
10
+ function intercept(a) {
11
+ if(a.href.indexOf('?') == -1) a.href += '?'; else a.href += '&';
12
+ a.href += 'timezone=' + new Date().getTimezoneOffset() + '&tab=' + stickyTab
13
+ }
14
+ </script>
15
+ </head>
16
+ <body onLoad="executeOnLoad()">
17
+
18
+ <table id="header" cellpadding="0" cellspacing="0" width="100%" border="0">
19
+ <tr id="top-panel">
20
+ <td>
21
+ <a href="http://damagecontrol.codehaus.org/"><img class="logo" src="images/damagecontrol-logo.gif"/></a>
22
+ </td>
23
+ </tr>
24
+ <tr id="top-nav">
25
+ <td id="left-top-nav">
26
+ <%= "TODO: breadcrumbs here" %>
27
+ </td>
28
+ </tr>
29
+ </table>
30
+
31
+ <table id="main-table" width="100%" height="70%" border="0">
32
+ <tr>
33
+
34
+ <td id="side-panel" width="20%">
35
+ <div id="tasks">
36
+ <% @sidebar_links.each do |link|
37
+ image = link.delete(:image)
38
+ name = link.delete(:name)
39
+ href = link.delete(:href)
40
+ if(href)
41
+ %>
42
+ <div class="task">
43
+ <%= content_tag("a", tag("img", :src => image), {:href => href}) %> <%= content_tag("a", name, {:href => href}) %>
44
+ </div>
45
+ <% else %>
46
+ <div class="task">
47
+ <%= link_to_image(image, link) %> <%= link_to(name, link) %>
48
+ </div>
49
+ <% end %>
50
+ <% end %>
51
+ </div>
52
+
53
+ <div id="navigation">
54
+ <%= render_partial(@navigation_name, nil) if @navigation_name %>
55
+ </div>
56
+ </td>
57
+
58
+ <td id="main-panel" width="80%" height="100%">
59
+ <%= @content_for_layout %>
60
+ </td>
61
+
62
+ </tr>
63
+
64
+ <tr><td id="footer" colspan="2" background="/images/footer.gif">
65
+ This stuff displays best in a Mozilla based browser. Try <a href="http://www.mozilla.org/products/firefox/">Firefox</a>.
66
+ <br>
67
+ </td></tr>
68
+
69
+ </table>
70
+
71
+ <!-- These scripts must be inside or after the body tag since they check for the presence of document.body -->
72
+ <script src="/javascripts/dw_tooltip.js" type="text/javascript"></script>
73
+ <script src="/javascripts/dw_event.js" type="text/javascript"></script>
74
+ <script src="/javascripts/dw_viewport.js" type="text/javascript"></script>
75
+ <!--[if gte IE 5.5000]>
76
+ <script type="text/javascript" src="/javascripts/pngfix.js"></script>
77
+ <![endif]-->
78
+ </body>
79
+ </html>
@@ -0,0 +1,13 @@
1
+ <script>
2
+ var bugzilla_url_tip = "<div class='tp1'>The URL of the Bugzilla installation.</div>";
3
+ </script>
4
+
5
+ <table width="100%">
6
+ <tr>
7
+ <td width="25%" class="setting-name">Bugzilla URL</td>
8
+ <td><%= tip(:txt => 'bugzilla_url_tip') %></td>
9
+ <td width="75%"><%= text_or_input(@edit, :name => "DamageControl::Tracker::Bugzilla[url]", :value => bugzilla.url) %></td>
10
+ </tr>
11
+ </table>
12
+
13
+ <img src="/images/bugzilla.png"/>
@@ -0,0 +1,52 @@
1
+ <table nowrap="nowrap" class="pane" nowrap="nowrap">
2
+
3
+ <%
4
+ if @linkable_changesets.nil?
5
+ %>
6
+ <%
7
+ elsif @linkable_changesets.empty?
8
+ %>
9
+ <tr class="pane">
10
+ <td class="pane">
11
+ No Changesets
12
+ </td>
13
+ </tr>
14
+ <% else %>
15
+ <%
16
+ @linkable_changesets.reverse.each do |changeset|
17
+ %>
18
+ <tr class="build-row">
19
+ <td nowrap="nowrap">
20
+ <%= link_to("#{changeset.identifier} (#{changeset.developer})", :action => "changesets", :id => @project.name, :params => {"changeset" => changeset.identifier}) %>
21
+ </td>
22
+ <td width="100%">
23
+ <% @project.builds(changeset.identifier).each do |build| %>
24
+ <%= tag("img", :src => build.small_image) %>
25
+ <% end %>
26
+ </td>
27
+ </tr>
28
+ <% end %>
29
+
30
+ <% if(!@select_changeset_identifiers.empty?) %>
31
+ <tr class="build-row">
32
+ <td class="build-cell-even">
33
+ <form method="get" action="<%= url_for(:action => "changesets", :id => @project.name) %>">
34
+ <input type="hidden" name="project_name" value="<%= "bar" %>" />
35
+ <select name="changeset" onchange="submit()">
36
+
37
+ <%
38
+ @select_changeset_identifiers.reverse.each do |changeset_identifier|
39
+ %>
40
+ <option value="<%= changeset_identifier %>"><%= changeset_identifier %></option>
41
+ <% end %>
42
+
43
+ </select>
44
+ </form>
45
+ </td>
46
+ </tr>
47
+ <% end %>
48
+
49
+ <% end %>
50
+
51
+ </table>
52
+
@@ -0,0 +1,171 @@
1
+ <script>
2
+ cvs_port = new RegExp("^:([^:]*):(.*)@([^:]*):([0-9]*):([a-zA-Z]?.*)")
3
+ cvs_noport = new RegExp("^:([^:]*):(.*)@([^:]*):([a-zA-Z]?.*)")
4
+ cvs_local = new RegExp("^:(local):(.*)")
5
+
6
+ // distributes fields from the value of cvsroot. called on load and on edit of cvsroot field
7
+ function cvs_init() {
8
+ cvsroot = document.getElementById('cvsroot').value
9
+
10
+ protocolIndex = 1
11
+ userIndex = -1
12
+ serverIndex = -1
13
+ portIndex = -1
14
+ pathIndex = -1
15
+ if(tokens = cvs_port.exec(cvsroot)) {
16
+ userIndex = 2
17
+ serverIndex = 3
18
+ portIndex = 4
19
+ pathIndex = 5
20
+ } else if(tokens = cvs_noport.exec(cvsroot)) {
21
+ userIndex = 2
22
+ serverIndex = 3
23
+ pathIndex = 4
24
+ } else if(tokens = cvs_local.exec(cvsroot)) {
25
+ pathIndex = 2
26
+ }
27
+ if(pathIndex != -1) {
28
+ document.getElementById('cvsprotocol').selectedIndex = findIndex(tokens[protocolIndex])
29
+
30
+ if(userIndex != -1) {
31
+ document.getElementById('cvsuser').value = tokens[userIndex]
32
+ document.getElementById('cvsserver').value = tokens[serverIndex]
33
+ } else {
34
+ document.getElementById('cvsuser').value = ""
35
+ document.getElementById('cvsserver').value = ""
36
+ }
37
+
38
+ if(portIndex != -1) {
39
+ document.getElementById('cvsport').value = tokens[portIndex]
40
+ } else {
41
+ document.getElementById('cvsport').value = ""
42
+ }
43
+
44
+ document.getElementById('cvsrepodir').value = tokens[pathIndex]
45
+ } else {
46
+ // didn't match
47
+ clearCvsFields()
48
+ // TODO: make CVSROOT yellow and blank all the others. Also disable submit.
49
+ }
50
+ enableOrDisableCvsFields()
51
+ }
52
+
53
+ function clearCvsFields() {
54
+ document.getElementById('cvsprotocol').selectedIndex = 0
55
+ document.getElementById('cvsuser').value = ""
56
+ document.getElementById('cvsserver').value = ""
57
+ document.getElementById('cvsport').value = ""
58
+ document.getElementById('cvsrepodir').value = ""
59
+ }
60
+
61
+ function findIndex(protocol) {
62
+ arr = new Array("ext", "pserver", "local")
63
+ for (var i=0; i < arr.length; i++) {
64
+ if(arr[i] == protocol) {
65
+ return i + 1
66
+ }
67
+ }
68
+ return 0
69
+ }
70
+
71
+ function updateCvsRootField() {
72
+ userAtServerAtPort = ""
73
+ if(document.getElementById('cvsprotocol').value != "local") {
74
+ // it's proper client/server
75
+ port = document.getElementById('cvsport').value != "" ? document.getElementById('cvsport').value + ":" : ""
76
+ userAtServerAtPort =
77
+ document.getElementById('cvsuser').value + "@" +
78
+ document.getElementById('cvsserver').value + ":" +
79
+ port
80
+ }
81
+ document.getElementById('cvsroot').value = ":" +
82
+ document.getElementById('cvsprotocol').value + ":" +
83
+ userAtServerAtPort +
84
+ document.getElementById('cvsrepodir').value
85
+ enableOrDisableCvsFields()
86
+ }
87
+
88
+ function enableOrDisableCvsFields() {
89
+ if(document.getElementById('cvsprotocol').value == "local") {
90
+ document.getElementById('cvsuser').disabled = true
91
+ document.getElementById('cvspassword').disabled = true
92
+ document.getElementById('cvsserver').disabled = true
93
+ document.getElementById('cvsport').disabled = true
94
+ } else if(document.getElementById('cvsprotocol').value == "ext") {
95
+ document.getElementById('cvsuser').disabled = false
96
+ document.getElementById('cvspassword').disabled = true
97
+ document.getElementById('cvsserver').disabled = false
98
+ document.getElementById('cvsport').disabled = false
99
+ } else if(document.getElementById('cvsprotocol').value == "pserver") {
100
+ document.getElementById('cvsuser').disabled = false
101
+ document.getElementById('cvspassword').disabled = false
102
+ document.getElementById('cvsserver').disabled = false
103
+ document.getElementById('cvsport').disabled = false
104
+ }
105
+ }
106
+
107
+ var scm_password_tip = "<div class='tp1'><b>Warning!</b> Password will be shown in cleartext in configuration files.</div>";
108
+ var cvs_protocol_tip = "<div class='tp1'>If you specify :local: DamageControl can create the repository for you after you save (unless the repository already exists).</div>";
109
+ // not displayed yet - not appropriate for rscm...
110
+ var cvs_mod_tip = "<div class='tp1'>Note that you can't use trigged build if you are using DC to build multiple branches for the same project, use polling instead.</div>";
111
+
112
+ </script>
113
+
114
+ <table width="100%">
115
+ <tr>
116
+ <td width="25%" class="setting-name">CVSROOT</td>
117
+ <td>&nbsp;</td>
118
+ <td width="75%"><%= text_or_input(@edit, :name => "RSCM::CVS[root]", :value => cvs.root, :onKeyUp => "cvs_init()", :id => "cvsroot") %></td>
119
+ </tr>
120
+ <% if(@edit) %>
121
+ <tr>
122
+ <td>Protocol</td>
123
+ <td><%= tip(:txt => 'cvs_protocol_tip') %></td>
124
+ <td>
125
+ <select class="setting-input" id="cvsprotocol" onchange="updateCvsRootField()">
126
+ <option value=""></option>
127
+ <option value="ext" selected>Secure shell (:ext:)</option>
128
+ <option value="pserver">Password server (:pserver:)</option>
129
+ <option value="local">Locally mounted folder (:local:)</option>
130
+ </select>
131
+ </td>
132
+ </tr>
133
+ <tr>
134
+ <td>User name</td>
135
+ <td>&nbsp;</td>
136
+ <td width="75%"><%= text_or_input(@edit, :onKeyUp => "updateCvsRootField()", :id => "cvsuser") %></td>
137
+ </tr>
138
+ <tr>
139
+ <td>Password</td>
140
+ <td><%= tip(:txt => 'scm_password_tip') %></td>
141
+ <td width="75%"><%= text_or_input(@edit, :name => "RSCM::CVS[password]", :onKeyUp => "updateCvsRootField()", :id => "cvspassword") %></td>
142
+ </tr>
143
+ <tr>
144
+ <td>Server</td>
145
+ <td>&nbsp;</td>
146
+ <td width="75%"><%= text_or_input(@edit, :onKeyUp => "updateCvsRootField()", :id => "cvsserver") %></td>
147
+ </tr>
148
+ <tr>
149
+ <td>Port</td>
150
+ <td>&nbsp;</td>
151
+ <td width="75%"><%= text_or_input(@edit, :onKeyUp => "updateCvsRootField()", :id => "cvsport") %></td>
152
+ </tr>
153
+ <tr>
154
+ <td>Repository directory</td>
155
+ <td>&nbsp;</td>
156
+ <td width="75%"><%= text_or_input(@edit, :onKeyUp => "updateCvsRootField()", :id => "cvsrepodir") %></td>
157
+ </tr>
158
+ <% end %>
159
+ <tr>
160
+ <td>Module</td>
161
+ <td>&nbsp;</td>
162
+ <td width="75%"><%= text_or_input(@edit, :name => "RSCM::CVS[mod]", :value => cvs.mod, :id => "cvsmodule") %></td>
163
+ </tr>
164
+ <tr>
165
+ <td>Branch</td>
166
+ <td>&nbsp;</td>
167
+ <td width="75%"><%= text_or_input(@edit, :name => "RSCM::CVS[branch]", :value => cvs.branch, :id => "cvsmodule") %></td>
168
+ </tr>
169
+ </table>
170
+
171
+ <img src="/images/cvs.png"/>
@@ -0,0 +1,19 @@
1
+ <script>
2
+ var jira_baseurl_tip = "<div class='tp1'>The base URL of the JIRA installation (not the URL to the specific JIRA project).</div>";
3
+ var jira_project_id_tip = "<div class='tp1'>The id of the JIRA project.</div>";
4
+ </script>
5
+
6
+ <table width="100%">
7
+ <tr>
8
+ <td width="25%" class="setting-name">Base URL</td>
9
+ <td><%= tip(:txt => 'jira_baseurl_tip') %></td>
10
+ <td width="75%"><%= text_or_input(@edit, :name => "DamageControl::Tracker::JIRA[baseurl]", :value => jira.baseurl) %></td>
11
+ </tr>
12
+ <tr>
13
+ <td class="setting-name">Project id</td>
14
+ <td><%= tip(:txt => 'jira_project_id_tip') %></td>
15
+ <td width="75%"><%= text_or_input(@edit, :name => "DamageControl::Tracker::JIRA[project_id]", :value => jira.project_id) %></td>
16
+ </tr>
17
+ </table>
18
+
19
+ <img src="/images/jira.gif"/>
@@ -0,0 +1,23 @@
1
+ <script>
2
+ function mooky_init() {
3
+ alert("Mooky! You'll find me under the 'Source Control' tab.")
4
+ }
5
+
6
+ var mooky_foo_tip = "<div class='tp1'>The bar value.</div>";
7
+ var mooky_bar_tip = "<div class='tp1'>The foo value.</div>";
8
+
9
+ </script>
10
+
11
+ <img src="images/mooky.png"/>
12
+ <table width="100%">
13
+ <tr>
14
+ <td width="25%" class="setting-name">Foo</td>
15
+ <td><%= tip(:txt => 'mooky_foo_tip') %></td>
16
+ <td width="75%"><%= text_or_input(@edit, :name => "RSCM::Mooky[foo]", :value => mooky.foo) %></td>
17
+ </tr>
18
+ <tr>
19
+ <td class="setting-name">Bar</td>
20
+ <td><%= tip(:txt => 'mooky_bar_tip') %></td>
21
+ <td width="75%"><%= text_or_input(@edit, :name => "RSCM::Mooky[bar]", :value => mooky.bar) %></td>
22
+ </tr>
23
+ </table>
File without changes
@@ -0,0 +1,36 @@
1
+ <script>
2
+ var project_name_page_tip = "<div class='tp1'>The project name should not use space characters, as it will be used to create a folder on the server.</div>";
3
+ var build_command_tip = "<div class='tp1'>The command-line that will execute the build.</div>";
4
+ var project_description_tip = "<div class='tp1'>A short description of the project. Will be used in various notifications such as RSS.</div>";
5
+ var project_home_page_tip = "<div class='tp1'>URL to the project's home page or documentation.</div>";
6
+ </script>
7
+
8
+ <input name="project" type="hidden" value="<%= project.class.name %>"/>
9
+
10
+ <table width="100%">
11
+ <tr>
12
+ <td width="25%" class="setting-name">Project name</td>
13
+ <td><%= tip(:txt => 'project_name_page_tip') %></td>
14
+ <td width="75%">
15
+ <%= text_or_input(@new_project, :name => "DamageControl::Project[name]", :value => project.name) %>
16
+ <% if(@edit) %>
17
+ <%= tag("input", :type => "hidden", :name => "DamageControl::Project[name]", :value => project.name) %>
18
+ <% end %>
19
+ </td>
20
+ </tr>
21
+ <tr>
22
+ <td>Build command</td>
23
+ <td><%= tip(:txt => 'build_command_tip') %></td>
24
+ <td><%= text_or_input(@edit, :name => "DamageControl::Project[build_command]", :value => project.build_command) %></td>
25
+ </tr>
26
+ <tr>
27
+ <td>Project description</td>
28
+ <td><%= tip(:txt => 'project_description_tip') %></td>
29
+ <td><%= text_or_input(@edit, :name => "DamageControl::Project[description]", :value => project.description) %></td>
30
+ </tr>
31
+ <tr>
32
+ <td>Project home page</td>
33
+ <td><%= tip(:txt => 'project_home_page_tip') %></td>
34
+ <td><%= text_or_input(@edit, :name => "DamageControl::Project[home_page]", :value => project.home_page) %></td>
35
+ </tr>
36
+ </table>
@@ -0,0 +1,19 @@
1
+ <script>
2
+ var rubyforge_group_id_tip = "<div class='tp1'>The ID of the project (group_id). Example: <br><tt>http://rubyforge.org/tracker/index.php?func=detail&amp;aid=1120&amp;group_id=<strong>426</strong>&amp;atid=1698</tt>.</div>";
3
+ var rubyforge_tracker_id_tip = "<div class='tp1'>The ID of the tracker (aid). Example: <br><tt>http://rubyforge.org/tracker/index.php?func=detail&amp;aid=<strong>1120</strong>&amp;group_id=426&amp;atid=1698</tt>.</div>";
4
+ </script>
5
+
6
+ <table width="100%">
7
+ <tr>
8
+ <td width="25%" class="setting-name">Project ID</td>
9
+ <td><%= tip(:txt => 'rubyforge_group_id_tip') %></td>
10
+ <td width="75%"><%= text_or_input(@edit, :name => "DamageControl::Tracker::RubyForge[group_id]", :value => rubyforge.group_id) %></td>
11
+ </tr>
12
+ <tr>
13
+ <td class="setting-name">Tracker ID</td>
14
+ <td><%= tip(:txt => 'rubyforge_tracker_id_tip') %></td>
15
+ <td width="75%"><%= text_or_input(@edit, :name => "DamageControl::Tracker::RubyForge[tracker_id]", :value => rubyforge.tracker_id) %></td>
16
+ </tr>
17
+ </table>
18
+
19
+ <img src="/images/rubyforge.png"/>
@@ -0,0 +1,19 @@
1
+ <script>
2
+ var scarab_baseurl_tip = "<div class='tp1'>The URL of the Scarab installation.</div>";
3
+ var scarab_module_key_tip = "<div class='tp1'>The Scarab module key.</div>";
4
+ </script>
5
+
6
+ <table width="100%">
7
+ <tr>
8
+ <td width="25%" class="setting-name">Scarab Base URL</td>
9
+ <td><%= tip(:txt => 'scarab_baseurl_tip') %></td>
10
+ <td width="75%"><%= text_or_input(@edit, :name => "DamageControl::Tracker::Scarab[baseurl]", :value => scarab.baseurl) %></td>
11
+ </tr>
12
+ <tr>
13
+ <td class="setting-name">Scarab Module</td>
14
+ <td><%= tip(:txt => 'scarab_module_key_tip') %></td>
15
+ <td width="75%"><%= text_or_input(@edit, :name => "DamageControl::Tracker::Scarab[module_key]", :value => scarab.module_key) %></td>
16
+ </tr>
17
+ </table>
18
+
19
+ <img align="center" src="/images/scarab.gif"/>
@@ -0,0 +1,15 @@
1
+ <table width="100%">
2
+ <tr>
3
+ <td width="25%">Source Control</td>
4
+ <td class="config_cell"><%= tip(:txt => "scm_tip") %></td>
5
+ <td width="75%">
6
+ <%= text_or_select(@edit, :name => "scm", :values => scms, :onchange => "showElement(this.value, scms)") %>
7
+ </td>
8
+ </tr>
9
+ </table>
10
+
11
+ <% scms.each do |scm| %>
12
+ <div id="<%= scm.class.name %>" style="<% if(scm.selected?)%>display:block<%else%>display:none<%end%>">
13
+ <%= render_partial(scm.short, scm) %>
14
+ </div>
15
+ <% end %>
@@ -0,0 +1,19 @@
1
+ <script>
2
+ var sourceforge_group_id_tip = "<div class='tp1'>The ID of the project (group_id). Example: <br><tt>http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1051927&amp;group_id=<strong>7856</strong>&amp;atid=107856</tt>.</div>";
3
+ var sourceforge_tracker_id_tip = "<div class='tp1'>The ID of the tracker (aid). Example: <br><tt>http://sourceforge.net/tracker/index.php?func=detail&amp;aid=<strong>1051927</strong>&amp;group_id=7856&amp;atid=107856</tt>.</div>";
4
+ </script>
5
+
6
+ <table width="100%">
7
+ <tr>
8
+ <td width="25%" class="setting-name">Project ID</td>
9
+ <td><%= tip(:txt => 'sourceforge_group_id_tip') %></td>
10
+ <td width="75%"><%= text_or_input(@edit, :name => "DamageControl::Tracker::SourceForge[group_id]", :value => sourceforge.group_id) %></td>
11
+ </tr>
12
+ <tr>
13
+ <td class="setting-name">Tracker ID</td>
14
+ <td><%= tip(:txt => 'sourceforge_tracker_id_tip') %></td>
15
+ <td width="75%"><%= text_or_input(@edit, :name => "DamageControl::Tracker::SourceForge[tracker_id]", :value => sourceforge.tracker_id) %></td>
16
+ </tr>
17
+ </table>
18
+
19
+ <img src="/images/sourceforge.gif"/>
@@ -0,0 +1,43 @@
1
+ <script>
2
+ function starteam_init() {}
3
+ </script>
4
+
5
+ <table width="100%">
6
+ <tr>
7
+ <td width="25%" class="config_cell">User name</td>
8
+ <td>&nbsp;</td>
9
+ <td width="75%"><%= text_or_input(@edit, :name => "RSCM::StarTeam[user_name]", :value => starteam.user_name) %></td>
10
+ </tr>
11
+ <tr>
12
+ <td class="config_cell">Password</td>
13
+ <td><%= tip(:txt => 'scm_password_tip') %></td>
14
+ <td width="75%"><%= text_or_input(@edit, :name => "RSCM::StarTeam[password]", :value => starteam.password) %></td>
15
+ </tr>
16
+ <tr>
17
+ <td class="config_cell">Server name</td>
18
+ <td>&nbsp;</td>
19
+ <td width="75%"><%= text_or_input(@edit, :name => "RSCM::StarTeam[server_name]", :value => starteam.server_name) %></td>
20
+ </tr>
21
+ <tr>
22
+ <td class="config_cell">Server port</td>
23
+ <td>&nbsp;</td>
24
+ <td width="75%"><%= text_or_input(@edit, :name => "RSCM::StarTeam[server_port]", :value => starteam.server_port) %></td>
25
+ </tr>
26
+ <tr>
27
+ <td class="config_cell">Project name</td>
28
+ <td>&nbsp;</td>
29
+ <td width="75%"><%= text_or_input(@edit, :name => "RSCM::StarTeam[project_name]", :value => starteam.project_name) %></td>
30
+ </tr>
31
+ <tr>
32
+ <td class="config_cell">View name</td>
33
+ <td>&nbsp;</td>
34
+ <td width="75%"><%= text_or_input(@edit, :name => "RSCM::StarTeam[view_name]", :value => starteam.view_name) %></td>
35
+ </tr>
36
+ <tr>
37
+ <td class="config_cell">Folder name</td>
38
+ <td>&nbsp;</td>
39
+ <td width="75%"><%= text_or_input(@edit, :name => "RSCM::StarTeam[folder_name]", :value => starteam.folder_name) %></td>
40
+ </tr>
41
+ </table>
42
+
43
+ <img src="/images/starteam.png"/>
@@ -0,0 +1,22 @@
1
+ <script>
2
+ function svn_init() {}
3
+
4
+ var svn_url_tip = "<div class='tp1'>If you specify a local URL (starting with file://) DamageControl can create the repository for you after you save (unless the repository already exists).<br>Using a file:// URL will also give you the option to have DamageControl install a trigger in Subversion, so that you don't have to use polling to detect changes.<br>On Windows, file URLs must look like file:///C:/jupiter/mars</div>";
5
+ var svn_path_tip = "<div class='tp1'>This is the relative path from the start of the repository <br>to the end of the URL. For example, if your URL is <br>svn://your.server/path/to/repository/path/within/repository <br>then this value should be path/within/repository.</div>";
6
+
7
+ </script>
8
+
9
+ <table width="100%">
10
+ <tr>
11
+ <td width="25%" class="config_cell">Url</td>
12
+ <td><%= tip(:txt => 'svn_url_tip') %></td>
13
+ <td width="75%"><%= text_or_input(@edit, :name => "RSCM::SVN[url]", :value => svn.url) %></td>
14
+ </tr>
15
+ <tr>
16
+ <td width="25%" class="config_cell">Directory</td>
17
+ <td><%= tip(:txt => 'svn_path_tip') %></td>
18
+ <td width="75%"><%= text_or_input(@edit, :name => "RSCM::SVN[path]", :value => svn.path) %></td>
19
+ </tr>
20
+ </table>
21
+
22
+ <img src="/images/svnlogo64.png"/>
@@ -0,0 +1,13 @@
1
+ <script>
2
+ var trac_url_tip = "<div class='tp1'>The URL of the Trac installation. This URL should include no trailing slash. Example: http://my.trac.home/cgi-bin/trac.cgi</div>";
3
+ </script>
4
+
5
+ <table width="100%">
6
+ <tr>
7
+ <td width="25%" class="setting-name">Trac URL</td>
8
+ <td><%= tip(:txt => 'trac_url_tip') %></td>
9
+ <td width="75%"><%= text_or_input(@edit, :name => "DamageControl::Tracker::Trac[url]", :value => trac.url) %></td>
10
+ </tr>
11
+ </table>
12
+
13
+ <img src="/images/trac.png"/>