damagecontrol 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,86 @@
1
+ /*************************************************************************
2
+
3
+ dw_tooltip.js
4
+ version date: Nov 2003
5
+ requires: dw_event.js and dw_viewport.js
6
+
7
+ This code is from Dynamic Web Coding at http://www.dyn-web.com/
8
+ Copyright 2003 by Sharon Paine
9
+ See Terms of Use at http://www.dyn-web.com/bus/terms.html
10
+ regarding conditions under which you may use this code.
11
+ This notice must be retained in the code as is!
12
+
13
+ *************************************************************************/
14
+
15
+ var Tooltip = {
16
+ followMouse: true,
17
+ offX: 8,
18
+ offY: 12,
19
+
20
+ ready: false,
21
+ t1: null,
22
+ t2: null,
23
+ tipID: "tipDiv",
24
+ tip: null,
25
+
26
+ init: function() {
27
+ if ( document.createElement && document.body && typeof document.body.appendChild != "undefined" ) {
28
+ var el = document.createElement("DIV");
29
+ el.className = "tooltip";
30
+ el.id = this.tipID;
31
+ document.body.appendChild(el);
32
+ this.ready = true;
33
+ }
34
+ },
35
+
36
+ show: function(e, msg) {
37
+ if (this.t1) clearTimeout(this.t1);
38
+ if (this.t2) clearTimeout(this.t2);
39
+ this.tip = document.getElementById( this.tipID );
40
+ // set up mousemove
41
+ if (this.followMouse)
42
+ dw_event.add( document, "mousemove", this.trackMouse, true );
43
+ this.writeTip(""); // for mac ie
44
+ this.writeTip(msg);
45
+ viewport.getAll();
46
+ this.positionTip(e);
47
+ this.t1 = setTimeout("document.getElementById('" + Tooltip.tipID + "').style.visibility = 'visible'",200);
48
+ },
49
+
50
+ writeTip: function(msg) {
51
+ if ( this.tip && typeof this.tip.innerHTML != "undefined" ) this.tip.innerHTML = msg;
52
+ },
53
+
54
+ positionTip: function(e) {
55
+ var x = e.pageX? e.pageX: e.clientX + viewport.scrollX;
56
+ var y = e.pageY? e.pageY: e.clientY + viewport.scrollY;
57
+
58
+ if ( x + this.tip.offsetWidth + this.offX > viewport.width + viewport.scrollX )
59
+ x = x - this.tip.offsetWidth - this.offX;
60
+ else x = x + this.offX;
61
+
62
+ if ( y + this.tip.offsetHeight + this.offY > viewport.height + viewport.scrollY )
63
+ y = ( y - this.tip.offsetHeight - this.offY > viewport.scrollY )? y - this.tip.offsetHeight - this.offY : viewport.height + viewport.scrollY - this.tip.offsetHeight;
64
+ else y = y + this.offY;
65
+
66
+ this.tip.style.left = x + "px"; this.tip.style.top = y + "px";
67
+ },
68
+
69
+ hide: function() {
70
+ if (this.t1) clearTimeout(this.t1);
71
+ if (this.t2) clearTimeout(this.t2);
72
+ this.t2 = setTimeout("document.getElementById('" + this.tipID + "').style.visibility = 'hidden'",200);
73
+ // release mousemove
74
+ if (this.followMouse)
75
+ dw_event.remove( document, "mousemove", this.trackMouse, true );
76
+ this.tip = null;
77
+ },
78
+
79
+ trackMouse: function(e) {
80
+ e = dw_event.DOMit(e);
81
+ Tooltip.positionTip(e);
82
+ }
83
+
84
+ }
85
+
86
+ Tooltip.init();
@@ -0,0 +1,55 @@
1
+ /*************************************************************************
2
+ dw_viewport.js version date Nov 2003
3
+
4
+ This code is from Dynamic Web Coding at http://www.dyn-web.com/
5
+ Copyright 2003 by Sharon Paine
6
+ See Terms of Use at http://www.dyn-web.com/bus/terms.html
7
+ regarding conditions under which you may use this code.
8
+ This notice must be retained in the code as is!
9
+ *************************************************************************/
10
+
11
+ viewport = {
12
+ getWinWidth: function () {
13
+ this.width = 0;
14
+ if (window.innerWidth) this.width = window.innerWidth - 18;
15
+ else if (document.documentElement && document.documentElement.clientWidth)
16
+ this.width = document.documentElement.clientWidth;
17
+ else if (document.body && document.body.clientWidth)
18
+ this.width = document.body.clientWidth;
19
+ },
20
+
21
+ getWinHeight: function () {
22
+ this.height = 0;
23
+ if (window.innerHeight) this.height = window.innerHeight - 18;
24
+ else if (document.documentElement && document.documentElement.clientHeight)
25
+ this.height = document.documentElement.clientHeight;
26
+ else if (document.body && document.body.clientHeight)
27
+ this.height = document.body.clientHeight;
28
+ },
29
+
30
+ getScrollX: function () {
31
+ this.scrollX = 0;
32
+ if (typeof window.pageXOffset == "number") this.scrollX = window.pageXOffset;
33
+ else if (document.documentElement && document.documentElement.scrollLeft)
34
+ this.scrollX = document.documentElement.scrollLeft;
35
+ else if (document.body && document.body.scrollLeft)
36
+ this.scrollX = document.body.scrollLeft;
37
+ else if (window.scrollX) this.scrollX = window.scrollX;
38
+ },
39
+
40
+ getScrollY: function () {
41
+ this.scrollY = 0;
42
+ if (typeof window.pageYOffset == "number") this.scrollY = window.pageYOffset;
43
+ else if (document.documentElement && document.documentElement.scrollTop)
44
+ this.scrollY = document.documentElement.scrollTop;
45
+ else if (document.body && document.body.scrollTop)
46
+ this.scrollY = document.body.scrollTop;
47
+ else if (window.scrollY) this.scrollY = window.scrollY;
48
+ },
49
+
50
+ getAll: function () {
51
+ this.getWinWidth(); this.getWinHeight();
52
+ this.getScrollX(); this.getScrollY();
53
+ }
54
+
55
+ }
@@ -0,0 +1,29 @@
1
+
2
+ // Correctly handle PNG transparency in Win IE 5.5 or higher.
3
+ // http://homepage.ntlworld.com/bobosola. Updated 02-March-2004
4
+
5
+ function correctPNG()
6
+ {
7
+ for(var i=0; i<document.images.length; i++)
8
+ {
9
+ var img = document.images[i]
10
+ var imgName = img.src.toUpperCase()
11
+ if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
12
+ {
13
+ var imgID = (img.id) ? "id='" + img.id + "' " : ""
14
+ var imgClass = (img.className) ? "class='" + img.className + "' " : ""
15
+ var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
16
+ var imgStyle = "display:inline-block;" + img.style.cssText
17
+ if (img.align == "left") imgStyle = "float:left;" + imgStyle
18
+ if (img.align == "right") imgStyle = "float:right;" + imgStyle
19
+ if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
20
+ var strNewHTML = "<span " + imgID + imgClass + imgTitle
21
+ + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
22
+ + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
23
+ + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
24
+ img.outerHTML = strNewHTML
25
+ i = i-1
26
+ }
27
+ }
28
+ }
29
+ window.attachEvent("onload", correctPNG);
@@ -0,0 +1,25 @@
1
+ function popupCode( url ) {
2
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
3
+ }
4
+
5
+ function toggleCode( id ) {
6
+ if ( document.getElementById )
7
+ elem = document.getElementById( id );
8
+ else if ( document.all )
9
+ elem = eval( "document.all." + id );
10
+ else
11
+ return false;
12
+ elemStyle = elem.style;
13
+
14
+ if ( elemStyle.display != "block" ) {
15
+ elemStyle.display = "block"
16
+ } else {
17
+ elemStyle.display = "none"
18
+ }
19
+
20
+ return true;
21
+ }
22
+
23
+ // Make codeblocks hidden by default
24
+ document.writeln( "<style type=\"text/css\">div.diff { display: none }</style>" )
25
+
@@ -0,0 +1,28 @@
1
+ Copyright (c) 2004, DamageControl Organization, Jon Tirsen and Aslak Hellesoy
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+
7
+ Redistributions of source code must retain the above copyright notice, this
8
+ list of conditions and the following disclaimer.
9
+
10
+ Redistributions in binary form must reproduce the above copyright notice,
11
+ this list of conditions and the following disclaimer in the documentation
12
+ and/or other materials provided with the distribution.
13
+
14
+ Neither the name of the DamageControl Organization nor the names of its
15
+ contributors may be used to endorse or promote products derived from this
16
+ software without specific prior written permission.
17
+
18
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
+ POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,32 @@
1
+ License Agreement
2
+
3
+
4
+ This is a legal agreement between You, the purchaser, and INCORS GmbH
5
+ ("INCORS"). By downloading any icons from this website, you agree to be bound
6
+ by the terms of this agreement.
7
+
8
+ All ownership and copyright of the licensed icons remain the property of
9
+ INCORS. INCORS grants to you a nonexclusive, non-sublicensable right to use
10
+ the icons royalty-free according to the license terms for any commercial or
11
+ personal design and software projects. You may also display the icon in
12
+ related documentation, help files, and advertising materials.
13
+
14
+ You may modifiy the icons is shape, color, and/or file format and use the
15
+ modified icons royalty-free according to the license terms for any commercial
16
+ or personal design and software projects. You may also display the modified
17
+ icon in related documentation, help files, and advertising materials.
18
+
19
+ You may not lease, license or sub-license the icons, or a subset of the icons,
20
+ or any modified icons to any third party unless they are incorporated into
21
+ your own software or design products, which do not compete directly with the
22
+ IconExperience icon collections.
23
+
24
+ All icon files are provided "As is" without warranties of merchantability and
25
+ fitness for a particular purpose. You agree to hold INCORS harmless for any
26
+ result that may occur during the course of using the licensed icons.
27
+
28
+ This License Agreement shall be governed and construed in accordance with the
29
+ laws of Germany. No choice of law rules of any jurisdiction will apply. If any
30
+ provision of this License Agreement is held to be unenforceable, this License
31
+ Agreement will remain in effect with the provision omitted.
32
+
@@ -0,0 +1,23 @@
1
+ body {background-color:#ffffff;}
2
+ .file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
3
+ .pathname {font-family:monospace; float:right;}
4
+ .fileheader {margin-bottom:.5em;}
5
+ .diff {margin:0;}
6
+ .tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
7
+ .tasklist ul {margin-top:0;margin-bottom:0;}
8
+ tr.alt {background-color:#eeeeee}
9
+ #added {background-color:#ddffdd;}
10
+ #addedchars {background-color:#99ff99;font-weight:bolder;}
11
+ tr.alt #added {background-color:#ccf7cc;}
12
+ #removed {background-color:#ffdddd;}
13
+ #removedchars {background-color:#ff9999;font-weight:bolder;}
14
+ tr.alt #removed {background-color:#f7cccc;}
15
+ #info {color:#888888;}
16
+ #context {background-color:#eeeeee;}
17
+ td {padding-left:.3em;padding-right:.3em;}
18
+ tr.head {border-bottom-width:1px;border-bottom-style:solid;}
19
+ tr.head td {padding:0;padding-top:.2em;}
20
+ .code_task {background-color:#ffff00;}
21
+ .comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
22
+ .error {color:red;}
23
+ hr {border-width:0px;height:2px;background:black;}
@@ -0,0 +1,307 @@
1
+ body {
2
+ margin: 0;
3
+ padding: 0;
4
+ background: white;
5
+ }
6
+
7
+ body, table, form, input, td, th, p, textarea, select
8
+ {
9
+ font-family: Verdana, Helvetica, sans serif;
10
+ font-size: 11px;
11
+ }
12
+
13
+ td {
14
+ vertical-align: top;
15
+ }
16
+
17
+ #main-table {
18
+ padding: 0;
19
+ border-collapse: collapse;
20
+ }
21
+
22
+ #top-panel {
23
+ padding-bottom: 3pt;
24
+ margin-bottom: 3pt;
25
+ background: #6c0;
26
+ }
27
+
28
+ #left-top-nav {
29
+ text-align: left;
30
+ border-top: 1px solid #090;
31
+ border-bottom: 1px solid #090;
32
+ background: #090;
33
+ padding: 4px;
34
+ color: white;
35
+ }
36
+
37
+ #left-top-nav a, #right-top-nav a {
38
+ color: white;
39
+ }
40
+
41
+ #right-top-nav {
42
+ text-align: right;
43
+ border-top: 1px solid #090;
44
+ border-bottom: 1px solid #090;
45
+ background: #090;
46
+ padding: 4px;
47
+ }
48
+
49
+ #main-panel {
50
+ padding: 10px;
51
+ }
52
+
53
+ #side-panel {
54
+ padding: 4px;
55
+ width: 220px;
56
+ border-right: 1px solid #090;
57
+ background: #eed;
58
+ }
59
+
60
+ #footer {
61
+ text-align: center;
62
+ font-size: 8pt;
63
+ margin-top: 10em;
64
+ padding: 10px;
65
+ background-image: @url("images/footer_grad.gif");
66
+ border-top: 1px solid #090;
67
+ }
68
+
69
+ #tasks {
70
+ padding: 4px;
71
+ }
72
+
73
+ a.link {
74
+ text-decoration: underline;
75
+ }
76
+
77
+ a.hover {
78
+ text-decoration: underline;
79
+ }
80
+
81
+ /* tip - anchors of class info */
82
+ a.tip {
83
+ position:relative;
84
+ z-index:24;
85
+ text-decoration: underline;
86
+ }
87
+
88
+ a.tip:hover {
89
+ z-index:25;
90
+ }
91
+
92
+ a.tip span {
93
+ display: none
94
+ }
95
+
96
+ a.tip:hover span {
97
+ display:block;
98
+ position:absolute;
99
+ top:2em;
100
+ left:2em;
101
+ width:400px;
102
+ border:1px solid #bbbbbb;
103
+ background-color:#fffff0;
104
+ color:#000;
105
+ text-align: left
106
+ }
107
+
108
+ #top-nav .a {
109
+ color: white;
110
+ }
111
+
112
+ img {
113
+ vertical-align: middle;
114
+ border: 0;
115
+ }
116
+
117
+ table.tab {
118
+ border-collapse: collapse;
119
+ }
120
+
121
+ td.selected_tab {
122
+ vertical-align: middle;
123
+ border: 1px #090 solid;
124
+ background: #ffffff;
125
+ }
126
+
127
+ td.tab_filler {
128
+ background: #ffffff;
129
+ border-bottom: 1px #090 solid;
130
+ }
131
+
132
+ td.tab {
133
+ vertical-align: middle;
134
+ border: 1px #090 solid;
135
+ background: #f0f0f0;
136
+ }
137
+
138
+ table.progress-bar {
139
+ border-collapse: collapse;
140
+ border: 1px solid #ddc;
141
+ }
142
+
143
+ td.progress-bar-done {
144
+ background-color: #009900;
145
+ }
146
+
147
+ td.progress-bar-left {
148
+ background-color: #cc0000;
149
+ }
150
+
151
+ .dashboard td {
152
+ padding: 4px 4px 4px 4px;
153
+ }
154
+
155
+ pre.console {
156
+ overflow: auto;
157
+ }
158
+
159
+ .setting-name {
160
+ }
161
+
162
+ .setting-input {
163
+ width: 100%;
164
+ }
165
+
166
+ .setting-description {
167
+ font-size: 0.8em;
168
+ margin-top: 0;
169
+ padding-top: 0;
170
+ }
171
+
172
+ .setting-warning {
173
+ font-size: 1em;
174
+ margin-top: 0;
175
+ padding-top: 0;
176
+
177
+ }
178
+
179
+ .setting-warning:before {
180
+ content: "Warning: ";
181
+ color: red;
182
+ font-weight:bold;
183
+ }
184
+
185
+ .build-row {
186
+ padding: 3px 4px 3px 4px;
187
+ }
188
+
189
+ .build-rss-cell {
190
+ text-align: right;
191
+ }
192
+
193
+ .task-header {
194
+ display: block;
195
+ border-bottom: 1px #090 solid;
196
+ font-weight: bold;
197
+ font-size: 12pt;
198
+ }
199
+
200
+ .main-table {
201
+ }
202
+
203
+ table.dashboard {
204
+ width: 100%;
205
+ }
206
+
207
+ .pane {
208
+ margin-top: 4px;
209
+ }
210
+ .pane td {
211
+ padding: 4px 4px 3px 4px;
212
+ }
213
+
214
+ table.pane {
215
+ width: 100%;
216
+ background-color: #ffffff;
217
+ border-collapse: collapse;
218
+ border: 1px #bbb solid;
219
+ }
220
+
221
+ td.pane {
222
+ border: 1px #bbb solid;
223
+ background-color: #ffffff;
224
+ padding: 3px 4px 3px 4px;
225
+ vertical-align: middle;
226
+ }
227
+
228
+ td.pane-header {
229
+ border: 1px #bbb solid;
230
+ background-color: #f0f0f0;
231
+ font-weight: bold;
232
+ }
233
+
234
+ th.pane {
235
+ border: 1px #bbb solid;
236
+ font-weight: bold;
237
+ }
238
+
239
+ #projectstatus th {
240
+ font-weight: bold;
241
+ background-color: #f0f0f0;
242
+ padding: 3px 4px 3px 4px;
243
+ }
244
+
245
+ #projectstatus tr {
246
+ border: 1px solid #bbb;
247
+ padding: 3px 4px 3px 4px;
248
+ }
249
+
250
+ #projectstatus td {
251
+ vertical-align: middle;
252
+ padding: 3px 4px 3px 4px;
253
+ }
254
+
255
+ .smallfont {
256
+ font-size: 9px;
257
+ }
258
+
259
+ #foldertab {
260
+ padding: 4px 0;
261
+ margin-left: 0;
262
+ border-bottom: 1px solid #090;
263
+ font: bold 12px Verdana, sans-serif;
264
+ }
265
+
266
+ #foldertab li {
267
+ list-style: none;
268
+ margin: 0;
269
+ display: inline;
270
+ }
271
+
272
+ #foldertab li a {
273
+ padding: 4px 0.5em;
274
+ margin-left: 3px;
275
+ border: 1px solid #090;
276
+ border-bottom: none;
277
+ background: #090;
278
+ text-decoration: none;
279
+ }
280
+
281
+ #foldertab li a:link { color: white; }
282
+ #foldertab li a:visited { color: white; }
283
+
284
+ #foldertab li a:hover {
285
+ color: white;
286
+ background: #6c0;
287
+ border-color: #6c0;
288
+ }
289
+
290
+ #foldertab li a#current {
291
+ background: white;
292
+ border-bottom: 1px solid white;
293
+ color: black;
294
+ }
295
+
296
+ .highlighted-build {
297
+ /*border: 1px solid #ddc;*/
298
+ background: #ffe;
299
+ padding: 3px;
300
+ margin-left: -4px;
301
+ }
302
+
303
+ .changeset-message {
304
+ border: 1px solid #ccb;
305
+ background: #eed;
306
+ padding: 4px;
307
+ }
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require_gem 'rails'
5
+ require 'breakpoint_client'
data/script/console ADDED
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ if ARGV[0]
4
+ ENV['RAILS_ENV'] = ARGV[0]
5
+ puts "Loading environment..."
6
+ exec "irb -r config/environment.rb -r irb/completion --noinspect"
7
+ else
8
+ puts <<-HELP
9
+
10
+ NAME
11
+ console - interact with the domain model through a environment console (on IRB)
12
+
13
+ SYNOPSIS
14
+ console [environment]
15
+
16
+ DESCRIPTION
17
+ Starts an environment console using IRB that lets you manipulate and interrogate
18
+ the domain model or even trigger controller actions. The database connection and
19
+ configuration available to the web application is already setup.
20
+
21
+ Tab completion is available to see classes and methods on individual objects.
22
+
23
+ EXAMPLE
24
+ console production
25
+
26
+ This will initialize the production environment (as setup in config/database.yml
27
+ and config/environments/production.rb). You would now be ready to start requiring
28
+ models using require_dependency.
29
+ HELP
30
+ end
data/script/generate ADDED
@@ -0,0 +1,70 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require File.dirname(__FILE__) + '/../config/environment'
4
+ require 'rails_generator'
5
+
6
+ ARGV.shift unless ARGV.empty? or not ['--help', '-h'].include?(ARGV[0])
7
+
8
+ def find_synonyms(word)
9
+ require 'open-uri'
10
+ uri = "http://wordnet.princeton.edu/cgi-bin/webwn2.0?stage=2" +
11
+ "&word=%s&posnumber=1&searchtypenumber=2&senses=&showglosses=1"
12
+
13
+ open(uri % word) do |stream|
14
+ data = stream.read.gsub("&nbsp;", " ").gsub("<BR>", "")
15
+ data.scan(/^Sense \d+\n.+?\n\n/m)
16
+ end
17
+ rescue Exception
18
+ return nil
19
+ end
20
+
21
+ unless ARGV.empty?
22
+ begin
23
+ name = ARGV.shift
24
+ generator = Rails::Generator.instance(name, ARGV)
25
+
26
+ if msg = generator.collision_with_builtin? then
27
+ $stderr.puts msg
28
+
29
+ if synonyms = find_synonyms(generator.class_name) then
30
+ $stderr.puts(
31
+ "", "Here are a few synonyms from WordNet. Maybe they will help you find an alternative name.",
32
+ "", synonyms
33
+ )
34
+ end
35
+ else
36
+ generator.generate
37
+ end
38
+ rescue Rails::Generator::UsageError => e
39
+ puts e.message
40
+ end
41
+ else
42
+ builtin_generators = Rails::Generator.builtin_generators.join(', ')
43
+ contrib_generators = Rails::Generator.contrib_generators.join(', ')
44
+
45
+ $stderr.puts <<end_usage
46
+ #{$0} generator [args]
47
+
48
+ Rails comes with #{builtin_generators} generators.
49
+ #{$0} controller Login login logout
50
+ #{$0} model Account
51
+ #{$0} mailer AccountMailer
52
+ #{$0} scaffold Account action another_action
53
+
54
+ end_usage
55
+
56
+ unless contrib_generators.empty?
57
+ $stderr.puts " Installed generators (in #{RAILS_ROOT}/script/generators):"
58
+ $stderr.puts " #{contrib_generators}"
59
+ $stderr.puts
60
+ end
61
+
62
+ $stderr.puts <<end_usage
63
+ More generators are available at http://rubyonrails.org/show/Generators
64
+ 1. Download, for example, login_generator.tar.gz
65
+ 2. Unzip to directory #{RAILS_ROOT}/script/generators/login
66
+ 3. Generate without args for usage information
67
+ #{$0} login
68
+ end_usage
69
+ exit 0
70
+ end