damagecontrol 0.5.0 → 0.5.0.1391

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. data/README +67 -11
  2. data/Rakefile +15 -6
  3. data/app/controllers/admin_controller.rb +0 -3
  4. data/app/controllers/application.rb +42 -163
  5. data/app/controllers/build_controller.rb +33 -0
  6. data/app/controllers/files_controller.rb +1 -1
  7. data/app/controllers/project_controller.rb +23 -65
  8. data/app/controllers/rails_ext.rb +247 -0
  9. data/app/controllers/rscm_ext.rb +52 -0
  10. data/app/helpers/build_helper.rb +2 -0
  11. data/app/views/build/email.rhtml +18 -0
  12. data/app/views/build/status.rhtml +20 -0
  13. data/app/views/build/tests.rhtml +2 -0
  14. data/app/views/layouts/{rscm.rhtml → default.rhtml} +10 -4
  15. data/app/views/project/_changesets_list.rhtml +2 -2
  16. data/app/views/project/_cvs.rhtml +4 -5
  17. data/app/views/project/_project.rhtml +9 -9
  18. data/app/views/project/_select_pane.rhtml +26 -0
  19. data/app/views/project/_tab_pane.rhtml +23 -0
  20. data/app/views/project/changeset.rhtml +35 -0
  21. data/app/views/project/view.rhtml +18 -32
  22. data/app/views/setup/welcome.rhtml +118 -0
  23. data/config/database.yml +20 -20
  24. data/config/environment.rb +66 -60
  25. data/config/environments/development.rb +3 -2
  26. data/config/environments/production.rb +3 -2
  27. data/config/environments/test.rb +3 -2
  28. data/config/routes.rb +15 -0
  29. data/lib/damagecontrol/app.rb +11 -40
  30. data/lib/damagecontrol/build.rb +50 -8
  31. data/lib/damagecontrol/directories.rb +7 -6
  32. data/lib/damagecontrol/poller.rb +11 -20
  33. data/lib/damagecontrol/project.rb +83 -16
  34. data/lib/damagecontrol/publisher/ambient_orb.rb +16 -0
  35. data/lib/damagecontrol/publisher/archive.rb +16 -0
  36. data/lib/damagecontrol/publisher/base.rb +25 -0
  37. data/lib/damagecontrol/publisher/build_duration.rb +16 -0
  38. data/lib/damagecontrol/publisher/email.rb +59 -0
  39. data/lib/damagecontrol/publisher/execute.rb +49 -0
  40. data/lib/damagecontrol/publisher/ftp.rb +16 -0
  41. data/lib/damagecontrol/publisher/growl.rb +44 -0
  42. data/lib/damagecontrol/publisher/irc.rb +31 -0
  43. data/lib/damagecontrol/publisher/jabber.rb +68 -0
  44. data/lib/damagecontrol/publisher/scp.rb +16 -0
  45. data/lib/damagecontrol/publisher/x10cm11a.rb +17 -0
  46. data/lib/damagecontrol/publisher/x10cm17a.rb +17 -0
  47. data/lib/damagecontrol/publisher/yahoo.rb +16 -0
  48. data/lib/damagecontrol/standard_persister.rb +2 -2
  49. data/lib/damagecontrol/tracker.rb +48 -6
  50. data/lib/damagecontrol/visitor/rss_writer.rb +1 -1
  51. data/lib/damagecontrol/visitor/yaml_persister.rb +10 -1
  52. data/public/404.html +5 -5
  53. data/public/500.html +5 -5
  54. data/public/dispatch.cgi +2 -2
  55. data/public/dispatch.fcgi +1 -1
  56. data/public/dispatch.rb +2 -2
  57. data/public/images/growlicon.png +0 -0
  58. data/public/images/megaphone.png +0 -0
  59. data/public/images/monotone-logo.png +0 -0
  60. data/public/images/publisher/ambient_orb.png +0 -0
  61. data/public/images/publisher/build_duration.png +0 -0
  62. data/public/images/publisher/email.png +0 -0
  63. data/public/images/publisher/execute.png +0 -0
  64. data/public/images/publisher/growl.png +0 -0
  65. data/public/images/publisher/irc.png +0 -0
  66. data/public/images/publisher/jabber.png +0 -0
  67. data/public/images/publisher/x10cm11a.png +0 -0
  68. data/public/images/publisher/x10cm17a.png +0 -0
  69. data/public/images/publisher/yahoo.png +0 -0
  70. data/public/index.html +70 -1
  71. data/public/javascripts/dateFormat.js +283 -0
  72. data/public/javascripts/jscalendar/ChangeLog +500 -0
  73. data/public/javascripts/jscalendar/README +33 -0
  74. data/public/javascripts/jscalendar/bugtest-hidden-selects.html +108 -0
  75. data/public/javascripts/jscalendar/calendar-blue.css +231 -0
  76. data/public/javascripts/jscalendar/calendar-blue2.css +235 -0
  77. data/public/javascripts/jscalendar/calendar-brown.css +224 -0
  78. data/public/javascripts/jscalendar/calendar-green.css +228 -0
  79. data/public/javascripts/jscalendar/calendar-setup.js +181 -0
  80. data/public/javascripts/jscalendar/calendar-setup_stripped.js +21 -0
  81. data/public/javascripts/jscalendar/calendar-system.css +250 -0
  82. data/public/javascripts/jscalendar/calendar-tas.css +238 -0
  83. data/public/javascripts/jscalendar/calendar-win2k-1.css +270 -0
  84. data/public/javascripts/jscalendar/calendar-win2k-2.css +270 -0
  85. data/public/javascripts/jscalendar/calendar-win2k-cold-1.css +264 -0
  86. data/public/javascripts/jscalendar/calendar-win2k-cold-2.css +270 -0
  87. data/public/javascripts/jscalendar/calendar.js +1715 -0
  88. data/public/javascripts/jscalendar/calendar.php +119 -0
  89. data/public/javascripts/jscalendar/calendar_stripped.js +12 -0
  90. data/public/javascripts/jscalendar/doc/html/reference-Z-S.css +0 -0
  91. data/public/javascripts/jscalendar/doc/html/reference.css +34 -0
  92. data/public/javascripts/jscalendar/doc/html/reference.html +1316 -0
  93. data/public/javascripts/jscalendar/doc/reference.pdf +0 -0
  94. data/public/javascripts/jscalendar/img.gif +0 -0
  95. data/public/javascripts/jscalendar/index.html +333 -0
  96. data/public/javascripts/jscalendar/lang/calendar-af.js +39 -0
  97. data/public/javascripts/jscalendar/lang/calendar-br.js +45 -0
  98. data/public/javascripts/jscalendar/lang/calendar-ca.js +45 -0
  99. data/public/javascripts/jscalendar/lang/calendar-cs-win.js +34 -0
  100. data/public/javascripts/jscalendar/lang/calendar-da.js +63 -0
  101. data/public/javascripts/jscalendar/lang/calendar-de.js +100 -0
  102. data/public/javascripts/jscalendar/lang/calendar-du.js +45 -0
  103. data/public/javascripts/jscalendar/lang/calendar-el.js +89 -0
  104. data/public/javascripts/jscalendar/lang/calendar-en.js +123 -0
  105. data/public/javascripts/jscalendar/lang/calendar-es.js +114 -0
  106. data/public/javascripts/jscalendar/lang/calendar-fi.js +98 -0
  107. data/public/javascripts/jscalendar/lang/calendar-fr.js +86 -0
  108. data/public/javascripts/jscalendar/lang/calendar-hr-utf8.js +49 -0
  109. data/public/javascripts/jscalendar/lang/calendar-hr.js +0 -0
  110. data/public/javascripts/jscalendar/lang/calendar-hu.js +45 -0
  111. data/public/javascripts/jscalendar/lang/calendar-it.js +79 -0
  112. data/public/javascripts/jscalendar/lang/calendar-jp.js +45 -0
  113. data/public/javascripts/jscalendar/lang/calendar-ko-utf8.js +120 -0
  114. data/public/javascripts/jscalendar/lang/calendar-ko.js +120 -0
  115. data/public/javascripts/jscalendar/lang/calendar-lt-utf8.js +114 -0
  116. data/public/javascripts/jscalendar/lang/calendar-lt.js +114 -0
  117. data/public/javascripts/jscalendar/lang/calendar-nl.js +45 -0
  118. data/public/javascripts/jscalendar/lang/calendar-no.js +45 -0
  119. data/public/javascripts/jscalendar/lang/calendar-pl-utf8.js +93 -0
  120. data/public/javascripts/jscalendar/lang/calendar-pl.js +56 -0
  121. data/public/javascripts/jscalendar/lang/calendar-pt.js +45 -0
  122. data/public/javascripts/jscalendar/lang/calendar-ro.js +66 -0
  123. data/public/javascripts/jscalendar/lang/calendar-ru.js +45 -0
  124. data/public/javascripts/jscalendar/lang/calendar-si.js +94 -0
  125. data/public/javascripts/jscalendar/lang/calendar-sk.js +99 -0
  126. data/public/javascripts/jscalendar/lang/calendar-sp.js +63 -0
  127. data/public/javascripts/jscalendar/lang/calendar-sv.js +93 -0
  128. data/public/javascripts/jscalendar/lang/calendar-tr.js +58 -0
  129. data/public/javascripts/jscalendar/lang/calendar-zh.js +45 -0
  130. data/public/javascripts/jscalendar/menuarrow.gif +0 -0
  131. data/public/javascripts/jscalendar/menuarrow2.gif +0 -0
  132. data/public/javascripts/jscalendar/release-notes.html +334 -0
  133. data/public/javascripts/jscalendar/simple-1.html +244 -0
  134. data/public/javascripts/jscalendar/simple-2.html +108 -0
  135. data/public/javascripts/jscalendar/simple-3.html +130 -0
  136. data/public/javascripts/jscalendar/test-position.html +40 -0
  137. data/public/javascripts/jscalendar/test.php +116 -0
  138. data/public/javascripts/toggle_div.js +18 -0
  139. data/public/stylesheets/niceones.txt +1 -0
  140. data/public/stylesheets/style.css +8 -1
  141. data/script/breakpointer +4 -5
  142. data/script/console +19 -27
  143. data/script/console_sandbox.rb +7 -0
  144. data/script/destroy +5 -0
  145. data/script/generate +3 -68
  146. data/script/server +6 -16
  147. data/test/damagecontrol/build_test.rb +8 -8
  148. data/test/damagecontrol/poller_test.rb +10 -18
  149. data/test/damagecontrol/project_test.rb +49 -13
  150. data/test/damagecontrol/publisher/base_test.rb +26 -0
  151. data/test/damagecontrol/publisher/build/email.rhtml +0 -0
  152. data/test/damagecontrol/publisher/email_test.rb +26 -0
  153. data/test/damagecontrol/publisher/fixture.rb +34 -0
  154. data/test/damagecontrol/publisher/growl_test.rb +15 -0
  155. data/test/damagecontrol/publisher/jabber_test.rb +15 -0
  156. data/test/damagecontrol/scm_web_test.rb +1 -1
  157. data/test/damagecontrol/visitor/changesets.rss +1 -1
  158. data/test/damagecontrol/visitor/diff_persister_test.rb +4 -4
  159. data/test/functional/build_controller_test.rb +17 -0
  160. data/test/test_helper.rb +13 -13
  161. metadata +185 -24
  162. data/app/views/project/_bugzilla.rhtml +0 -13
  163. data/app/views/project/_jira.rhtml +0 -19
  164. data/app/views/project/_mooky.rhtml +0 -23
  165. data/app/views/project/_rubyforge.rhtml +0 -19
  166. data/app/views/project/_scarab.rhtml +0 -19
  167. data/app/views/project/_scms.rhtml +0 -15
  168. data/app/views/project/_sourceforge.rhtml +0 -19
  169. data/app/views/project/_starteam.rhtml +0 -43
  170. data/app/views/project/_svn.rhtml +0 -22
  171. data/app/views/project/_trac.rhtml +0 -13
  172. data/app/views/project/_trackers.rhtml +0 -18
  173. data/app/views/project/changesets.rhtml +0 -31
@@ -0,0 +1,247 @@
1
+ require 'rscm/annotations'
2
+
3
+ class ActionController::Base
4
+
5
+ # Instantiates an Array of object from +class_name_2_attr_hash_hash+
6
+ # which should be a hash where the keys are class names and the values
7
+ # a Hash containing {attr_name => attr_value} pairs.
8
+ def instantiate_array_from_hashes(class_name_2_attr_hash_hash)
9
+ result = []
10
+ class_name_2_attr_hash_hash.each do |class_name, attr_hash|
11
+ result << instantiate_from_hash(eval(class_name), attr_hash)
12
+ end
13
+ result
14
+ end
15
+
16
+ def instantiate_from_hash(clazz, attr_hash)
17
+ object = clazz.new
18
+ attr_hash.each do |attr_name, attr_value|
19
+ setter = attr_name[1..-1] + "="
20
+ object.__send__(setter.to_sym, attr_value) if object.respond_to?(setter.to_sym)
21
+ end
22
+ object
23
+ end
24
+
25
+ # Returns the selected object from a select_pane and defines
26
+ # the selected? method on it to return true (so that define_selected
27
+ # will work properly
28
+ #
29
+ def find_selected(name)
30
+ array = instantiate_array_from_hashes(@params[name])
31
+ selected = @params["#{name}_selected"]
32
+ selected_object = array.find { |o| o.class.name == selected }
33
+ def selected_object.selected?
34
+ true
35
+ end
36
+ selected_object
37
+ end
38
+
39
+ protected
40
+
41
+ # Override so we can get rid of the Content-Disposition
42
+ # headers by specifying :no_disposition => true in options
43
+ # This is needed when we want to send big files that are
44
+ # *not* intended to pop up a save-as dialog in the browser,
45
+ # such as content to display in iframes (logs and files)
46
+ def send_file_headers!(options)
47
+ options.update(DEFAULT_SEND_FILE_OPTIONS.merge(options))
48
+ [:length, :type, :disposition].each do |arg|
49
+ raise ArgumentError, ":#{arg} option required" if options[arg].nil?
50
+ end
51
+
52
+ headers = {
53
+ 'Content-Length' => options[:length],
54
+ 'Content-Type' => options[:type]
55
+ }
56
+ unless(options[:no_disposition])
57
+ disposition = options[:disposition].dup || 'attachment'
58
+ disposition <<= %(; filename="#{options[:filename]}") if options[:filename]
59
+ headers.merge!(
60
+ 'Content-Disposition' => disposition,
61
+ 'Content-Transfer-Encoding' => 'binary'
62
+ )
63
+ end
64
+
65
+ @headers.update(headers);
66
+ end
67
+
68
+ end
69
+
70
+ module ActionView
71
+ module Helpers
72
+ module UrlHelper
73
+ # Modify the original behaviour of +link_to+ so that the link
74
+ # includes the client's timezone as URL param +timezone+ in the request.
75
+ # Can be used by server to adjust formatting of UTC dates so they match the client's time zone.
76
+ def convert_confirm_option_to_javascript!(html_options)
77
+ # We're adding this JS call to add the timezone info as a URL param.
78
+ html_options["onclick"] = "intercept(this);"
79
+ if html_options.include?(:confirm)
80
+ html_options["onclick"] += "return confirm('#{html_options[:confirm]}');"
81
+ html_options.delete(:confirm)
82
+ end
83
+ end
84
+ end
85
+ end
86
+
87
+ class Base
88
+ include Inflector
89
+
90
+ def breadcrumbs
91
+ link_to_unless_current("Dashboard", :controller => "project", :action => "index")
92
+ end
93
+
94
+ # Renders plain text (if +input+ is true) or a text field if not.
95
+ def text_or_input(input, options)
96
+ if(input)
97
+ options[:class] = "setting-input" unless options[:class]
98
+ tag("input", options)
99
+ elsif(options[:value] =~ /^http?:\/\//)
100
+ content_tag("a", options[:value], "href" => options[:value] ? options[:value] : "")
101
+ else
102
+ options[:value] ? options[:value] : ""
103
+ end
104
+ end
105
+
106
+ # Renders an editable or read-only element describing a boolean value.
107
+ #
108
+ # Options:
109
+ # * <tt>:name</tt> - The name of the variable/attribute.
110
+ # * <tt>:value</tt> - True or False
111
+ # * <tt>:editable</tt> - True or False
112
+ def text_or_checkbox(options)
113
+ value = options.delete(:value)
114
+ if(options.delete(:editable))
115
+ options[:type] = "checkbox"
116
+ options[:value] = "true"
117
+ options[:checked] = "true" if value
118
+ tag("input", options)
119
+ else
120
+ value ? "on" : "off"
121
+ end
122
+ end
123
+
124
+ def text_or_select(input, options)
125
+ values = options.delete(:values)
126
+ if(input)
127
+ #options[:class] = "setting-input" unless options[:class]
128
+
129
+ option_tags = "\n"
130
+ values.each do |value|
131
+ option_attrs = {:value => value.class.name}
132
+ option_attrs[:selected] = "true" if value.selected?
133
+ option_tag = content_tag("option", value.name, option_attrs)
134
+ option_tags << option_tag << "\n"
135
+ end
136
+ content_tag("select", option_tags, options)
137
+ else
138
+ values.find {|v| v.selected?}.name
139
+ end
140
+ end
141
+
142
+ # Renders a tab pane where each tab contains rendered objects
143
+ def tab_pane(name, array)
144
+ define_selected!(array)
145
+ $pane_name = name
146
+ def array.name
147
+ $pane_name
148
+ end
149
+ render_partial("tab_pane", array)
150
+ end
151
+
152
+ # Renders a pane (div) with a combo (select) that will
153
+ # Show one of the objects in the array (which are rendered with render_object).
154
+ # If one of the objects in the array respond to selected? and return true,
155
+ # it is preselected in the combo.
156
+ def select_pane(description, name, array)
157
+ define_selected!(array)
158
+ $pane_name = name
159
+ $pane_description = description
160
+ def array.name
161
+ $pane_name
162
+ end
163
+ def array.description
164
+ $pane_description
165
+ end
166
+ render_partial("select_pane", array)
167
+ end
168
+
169
+ # defines selected? => false on each object that doesn't already have selected? defined.
170
+ def define_selected!(array)
171
+ array.each do |o|
172
+ unless(o.respond_to?(:selected?))
173
+ def o.selected?
174
+ false
175
+ end
176
+ end
177
+ end
178
+ end
179
+
180
+ # Creates a table rendering +o+'s attributes.
181
+ # Uses a default rendering, but a custom template
182
+ # will be used if there is a "_<underscored_class_name>.rhtml"
183
+ # under the project directory
184
+ def render_object(o, collection_name, edit)
185
+ underscored_name = underscore(demodulize(o.class.name))
186
+ template = File.expand_path(File.dirname(__FILE__) + "/../views/project/_#{underscored_name}.rhtml")
187
+ if(File.exist?(template))
188
+ render_partial(underscored_name, o)
189
+ else
190
+ r = "<table>\n"
191
+ o.instance_variables.each do |attr_name|
192
+ attr_anns = o.class.send(attr_name[1..-1])
193
+ if(attr_anns && attr_anns[:description])
194
+ # Only render attributes with :description annotations
195
+ attr_value = o.instance_variable_get(attr_name)
196
+ r << " <tr>\n"
197
+ r << " <td width='25%'>#{attr_anns[:description]}</td>\n"
198
+ html_value = text_or_input(edit, :name => "#{collection_name}[#{o.class.name}][#{attr_name}]", :value => attr_value)
199
+ r << " <td width='75%'>#{html_value}</td>\n"
200
+ r << " </tr>\n"
201
+ end
202
+ end
203
+ r << "</table>"
204
+ r
205
+ end
206
+ end
207
+
208
+ # Creates an image with a tooltip that will show on mouseover.
209
+ #
210
+ # Options:
211
+ # * <tt>:txt</tt> - The text to put in the tooltip. Can be HTML.
212
+ # * <tt>:img</tt> - The image to display on the page. Defaults to '/images/16x16/about.png'
213
+ def tip(options)
214
+ tip = options.delete(:txt)
215
+ options[:src] = options.delete(:img) || "/images/16x16/about.png"
216
+ options[:onmouseover] = "Tooltip.show(event,#{tip})"
217
+ options[:onmouseout] = "Tooltip.hide()"
218
+
219
+ tag("img", options)
220
+ end
221
+
222
+ # Renders a Calendar widget
223
+ # The view (or layout) must load the jscalendar and dateFormat javascripts
224
+ # Note that the value is posted back as a ymdHMS string
225
+ #
226
+ # * <tt>:name</tt> - The name of the (hidden) field containing the date
227
+ # * <tt>:time</tt> - The time to initialise the widget with
228
+ # * <tt>:editable</tt> - Whether or not to make the widget editable
229
+ def calendar(options)
230
+ t = options[:time]
231
+ name = options[:name]
232
+ js_function = "change" + name.gsub(/:/, '_').gsub(/@/, '_').gsub(/\[/, '_').gsub(/\]/, '_')
233
+ js_format = "format('%yyyy%%mm%%dd%%hh%%nn%%ss%')"
234
+ js_date = "new Date(#{t.year}, #{t.month - 1}, #{t.day}, #{t.hour}, #{t.min}, #{t.sec})"
235
+ <<EOF
236
+ <input type="hidden" id="#{options[:name]}" name="#{options[:name]}" value="">
237
+ <div id="#{options[:name]}_calendar"></div>
238
+ <script type="text/javascript">
239
+ document.getElementById('#{options[:name]}').value = #{js_date}.#{js_format}
240
+ function #{js_function}(calendar) {
241
  if (calendar.dateClicked) {
1
242
  document.getElementById('#{options[:name]}').value = calendar.date.#{js_format};
243
+ }
2
244
  };
3
245
  Calendar.setup(
4
246
  {
5
247
  flat : "#{options[:name]}_calendar", // ID of the parent element
6
248
  flatCallback : #{js_function}, // our callback function
249
+ showsTime : true,
250
+ date : #{js_date}
7
251
  }
8
252
  );
253
+ EOF
254
+ end
255
+ end
256
+ end
@@ -0,0 +1,52 @@
1
+ require 'rscm'
2
+ require 'damagecontrol/tracker'
3
+
4
+ module DamageControl
5
+
6
+ class Build
7
+ def small_image
8
+ exit_code == 0 ? "/images/green-16.gif" : "/images/red-16.gif"
9
+ end
10
+ end
11
+
12
+ # Add some generic web capabilities to the RSCM classes
13
+ module Web
14
+ module Configuration
15
+
16
+ def selected?
17
+ false
18
+ end
19
+
20
+ # Returns the short lowercase name. Used for javascript and render_partial.
21
+ def short
22
+ $1.downcase if self.class.name =~ /.*::(.*)/
23
+ end
24
+
25
+ end
26
+ end
27
+ end
28
+
29
+ class RSCM::AbstractSCM
30
+ include DamageControl::Web::Configuration
31
+ end
32
+
33
+ class DamageControl::Tracker::Base
34
+ include DamageControl::Web::Configuration
35
+ end
36
+
37
+ class DamageControl::Project
38
+ include DamageControl::Web::Configuration
39
+ end
40
+
41
+ class RSCM::Change
42
+ ICONS = {
43
+ MODIFIED => "/images/16x16/document_edit.png",
44
+ DELETED => "/images/16x16/document_delete.png",
45
+ ADDED => "/images/16x16/document_add.png",
46
+ MOVED => "/images/16x16/document_exchange.png",
47
+ }
48
+
49
+ def icon
50
+ ICONS[@status] || "/images/16x16/document_warning.png"
51
+ end
52
+ end
@@ -0,0 +1,2 @@
1
+ module BuildHelper
2
+ end
@@ -0,0 +1,18 @@
1
+ <html>
2
+ <%
3
+ message = nil
4
+ if(@build.successful?)
5
+ message = "#{@build.project.name}: #{@build.status_message} build (by #{@build.changeset.developer})"
6
+ else
7
+ message = "#{@build.project.name}: #{@build.changeset.developer} broke the build"
8
+ end
9
+ %>
10
+ <h1><%= message %></h1>
11
+ <h2>Changed files:</h2>
12
+ <ul>
13
+ <% @build.
14
+ changeset.each do |change| %>
15
+ <li><%= change.path %></li>
16
+ <% end %>
17
+ </ul>
18
+ </html>
@@ -0,0 +1,20 @@
1
+ <!--div class="simplebox">
2
+ <h4 class="simpleboxhead"><img src="/images/16x16/component.png" align="absmiddle"> Artifacts</h4>
3
+ <img src="/images/16x16/bug_green.png" align="absmiddle">
4
+ <a href="#">foo.jar</a>
5
+ <br>
6
+ <img src="/images/16x16/bug_green.png" align="absmiddle">
7
+ <a href="#">bababa.jar</a>
8
+ <br>
9
+ </div-->
10
+
11
+ <div id="stdout" class="console">
12
+ Standard out
13
+ <iframe src="<%= url_for(:action => "stdout", :id => @params["id"], :params => {"changeset" => @params["changeset"], "build" => @params["build"]}) %>" width="100%" height="400"></iframe>
14
+ </div>
15
+
16
+ <div id="stderr" class="console">
17
+ Standard err
18
+ <iframe src="<%= url_for(:action => "stderr", :id => @params["id"], :params => {"changeset" => @params["changeset"], "build" => @params["build"]}) %>" width="100%" height="400"></iframe>
19
+ </div>
20
+
@@ -0,0 +1,2 @@
1
+ <h1>Build#tests</h1>
2
+ <p>Find me in app/views/build/tests.rhtml</p>
@@ -1,7 +1,13 @@
1
1
  <html>
2
2
  <head>
3
- <title>RSCM</title>
4
- <script src="/javascripts/toggle_diff.js" type="text/javascript"></script>
3
+ <title>DamageControl</title>
4
+ <script type="text/javascript" src="/javascripts/toggle_diff.js"></script>
5
+ <script type="text/javascript" src="/javascripts/toggle_div.js"></script>
6
+ <script type="text/javascript" src="/javascripts/dateFormat.js"></script>
7
+
8
+ <script type="text/javascript" src="/javascripts/jscalendar/calendar.js"></script>
5
9
  <script type="text/javascript" src="/javascripts/jscalendar/lang/calendar-en.js"></script>
6
10
  <script type="text/javascript" src="/javascripts/jscalendar/calendar-setup.js"></script>
11
+ <link type="text/css" rel="stylesheet" href="/javascripts/jscalendar/calendar-win2k-2.css">
12
+
7
13
  <link type="text/css" rel="stylesheet" href="/stylesheets/style.css">
8
14
  <link type="text/css" rel="stylesheet" href="/stylesheets/diff.css">
9
15
  <script>
@@ -18,12 +24,12 @@ function intercept(a) {
18
24
  <table id="header" cellpadding="0" cellspacing="0" width="100%" border="0">
19
25
  <tr id="top-panel">
20
26
  <td>
21
- <a href="http://damagecontrol.codehaus.org/"><img class="logo" src="images/damagecontrol-logo.gif"/></a>
27
+ <a href="http://damagecontrol.codehaus.org/"><!--img class="logo" src="images/damagecontrol-logo.gif"/--></a>
22
28
  </td>
23
29
  </tr>
24
30
  <tr id="top-nav">
25
31
  <td id="left-top-nav">
26
- <%= "TODO: breadcrumbs here" %>
32
+ <%= breadcrumbs %>
27
33
  </td>
28
34
  </tr>
29
35
  </table>
@@ -17,7 +17,7 @@
17
17
  %>
18
18
  <tr class="build-row">
19
19
  <td nowrap="nowrap">
20
- <%= link_to("#{changeset.identifier} (#{changeset.developer})", :action => "changesets", :id => @project.name, :params => {"changeset" => changeset.identifier}) %>
20
+ <%= link_to("#{changeset.identifier} (#{changeset.developer})", :action => "changeset", :id => @project.name, :params => {"changeset" => changeset.identifier}) %>
21
21
  </td>
22
22
  <td width="100%">
23
23
  <% @project.builds(changeset.identifier).each do |build| %>
@@ -30,7 +30,7 @@
30
30
  <% if(!@select_changeset_identifiers.empty?) %>
31
31
  <tr class="build-row">
32
32
  <td class="build-cell-even">
33
- <form method="get" action="<%= url_for(:action => "changesets", :id => @project.name) %>">
33
+ <form method="get" action="<%= url_for(:action => "changeset", :id => @project.name) %>">
34
34
  <input type="hidden" name="project_name" value="<%= "bar" %>" />
35
35
  <select name="changeset" onchange="submit()">
36
36
 
@@ -104,7 +104,6 @@ function enableOrDisableCvsFields() {
104
104
  }
105
105
  }
106
106
 
107
- var scm_password_tip = "<div class='tp1'><b>Warning!</b> Password will be shown in cleartext in configuration files.</div>";
108
107
  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
108
  // not displayed yet - not appropriate for rscm...
110
109
  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>";
@@ -115,7 +114,7 @@ var cvs_mod_tip = "<div class='tp1'>Note that you can't use trigged build if yo
115
114
  <tr>
116
115
  <td width="25%" class="setting-name">CVSROOT</td>
117
116
  <td>&nbsp;</td>
118
- <td width="75%"><%= text_or_input(@edit, :name => "RSCM::CVS[root]", :value => cvs.root, :onKeyUp => "cvs_init()", :id => "cvsroot") %></td>
117
+ <td width="75%"><%= text_or_input(@edit, :name => "scms[RSCM::Cvs][@root]", :value => cvs.root, :onKeyUp => "cvs_init()", :id => "cvsroot") %></td>
119
118
  </tr>
120
119
  <% if(@edit) %>
121
120
  <tr>
@@ -138,7 +137,7 @@ var cvs_mod_tip = "<div class='tp1'>Note that you can't use trigged build if yo
138
137
  <tr>
139
138
  <td>Password</td>
140
139
  <td><%= tip(:txt => 'scm_password_tip') %></td>
141
- <td width="75%"><%= text_or_input(@edit, :name => "RSCM::CVS[password]", :onKeyUp => "updateCvsRootField()", :id => "cvspassword") %></td>
140
+ <td width="75%"><%= text_or_input(@edit, :name => "scms[RSCM::Cvs][@password]", :onKeyUp => "updateCvsRootField()", :id => "cvspassword") %></td>
142
141
  </tr>
143
142
  <tr>
144
143
  <td>Server</td>
@@ -159,12 +158,12 @@ var cvs_mod_tip = "<div class='tp1'>Note that you can't use trigged build if yo
159
158
  <tr>
160
159
  <td>Module</td>
161
160
  <td>&nbsp;</td>
162
- <td width="75%"><%= text_or_input(@edit, :name => "RSCM::CVS[mod]", :value => cvs.mod, :id => "cvsmodule") %></td>
161
+ <td width="75%"><%= text_or_input(@edit, :name => "scms[RSCM::Cvs][@mod]", :value => cvs.mod, :id => "cvsmodule") %></td>
163
162
  </tr>
164
163
  <tr>
165
164
  <td>Branch</td>
166
165
  <td>&nbsp;</td>
167
- <td width="75%"><%= text_or_input(@edit, :name => "RSCM::CVS[branch]", :value => cvs.branch, :id => "cvsmodule") %></td>
166
+ <td width="75%"><%= text_or_input(@edit, :name => "scms[RSCM::Cvs][@branch]", :value => cvs.branch, :id => "cvsmodule") %></td>
168
167
  </tr>
169
168
  </table>
170
169