reap 0.5.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. data/ANN-0.6.1 +3 -0
  2. data/Rakefile +19 -0
  3. data/Reapfile +46 -33
  4. data/data/site_ruby/reap/template.yaml +94 -0
  5. data/lib/reap/announce-task.rb +159 -0
  6. data/lib/reap/chmod-task.rb +82 -0
  7. data/lib/reap/package-task.rb +165 -0
  8. data/lib/reap/publish-task.rb +53 -0
  9. data/lib/reap/rdoc-task.rb +70 -0
  10. data/lib/reap/reap-all.rb +15 -0
  11. data/lib/reap/task.rb +177 -118
  12. data/lib/reap/template-task.rb +40 -0
  13. data/lib/reap/test-task.rb +159 -0
  14. data/pub/www/Reapfile +99 -0
  15. data/pub/www/images/appleboy.jpg +0 -0
  16. data/pub/www/index.html +49 -5
  17. data/{doc/files/LICENSE.html → pub/www/rdoc/classes/Reap.html} +32 -33
  18. data/pub/www/rdoc/classes/Reap/AnnounceTask.html +154 -0
  19. data/pub/www/rdoc/classes/Reap/AnnounceTask.src/M000031.html +111 -0
  20. data/pub/www/rdoc/classes/Reap/AnnounceTask.src/M000032.html +46 -0
  21. data/pub/www/rdoc/classes/Reap/ChmodTask.html +220 -0
  22. data/pub/www/rdoc/classes/Reap/ChmodTask.src/M000015.html +21 -0
  23. data/pub/www/rdoc/classes/Reap/ChmodTask.src/M000016.html +21 -0
  24. data/pub/www/rdoc/classes/Reap/ChmodTask.src/M000017.html +42 -0
  25. data/pub/www/rdoc/classes/Reap/ChmodTask.src/M000018.html +26 -0
  26. data/pub/www/rdoc/classes/Reap/PackageTask.html +181 -0
  27. data/pub/www/rdoc/classes/Reap/PackageTask.src/M000001.html +49 -0
  28. data/pub/www/rdoc/classes/Reap/PackageTask.src/M000002.html +74 -0
  29. data/pub/www/rdoc/classes/Reap/PackageTask.src/M000003.html +51 -0
  30. data/pub/www/rdoc/classes/Reap/PublishTask.html +160 -0
  31. data/pub/www/rdoc/classes/Reap/PublishTask.src/M000019.html +24 -0
  32. data/pub/www/rdoc/classes/Reap/PublishTask.src/M000020.html +38 -0
  33. data/pub/www/rdoc/classes/Reap/RDocTask.html +220 -0
  34. data/pub/www/rdoc/classes/Reap/RDocTask.src/M000004.html +24 -0
  35. data/pub/www/rdoc/classes/Reap/RDocTask.src/M000005.html +21 -0
  36. data/pub/www/rdoc/classes/Reap/RDocTask.src/M000006.html +53 -0
  37. data/pub/www/rdoc/classes/Reap/Task.html +319 -0
  38. data/pub/www/rdoc/classes/Reap/Task.src/M000024.html +21 -0
  39. data/pub/www/rdoc/classes/Reap/Task.src/M000025.html +18 -0
  40. data/pub/www/rdoc/classes/Reap/Task.src/M000026.html +18 -0
  41. data/pub/www/rdoc/classes/Reap/Task.src/M000027.html +28 -0
  42. data/pub/www/rdoc/classes/Reap/Task.src/M000028.html +16 -0
  43. data/pub/www/rdoc/classes/Reap/Task.src/M000029.html +18 -0
  44. data/pub/www/rdoc/classes/Reap/Task.src/M000030.html +19 -0
  45. data/pub/www/rdoc/classes/Reap/TemplateTask.html +182 -0
  46. data/pub/www/rdoc/classes/Reap/TemplateTask.src/M000021.html +18 -0
  47. data/pub/www/rdoc/classes/Reap/TemplateTask.src/M000022.html +21 -0
  48. data/pub/www/rdoc/classes/Reap/TemplateTask.src/M000023.html +34 -0
  49. data/pub/www/rdoc/classes/Reap/TestTask.html +228 -0
  50. data/pub/www/rdoc/classes/Reap/TestTask.src/M000007.html +25 -0
  51. data/pub/www/rdoc/classes/Reap/TestTask.src/M000008.html +21 -0
  52. data/pub/www/rdoc/classes/Reap/TestTask.src/M000009.html +77 -0
  53. data/pub/www/rdoc/classes/Reap/TestTask.src/M000010.html +27 -0
  54. data/pub/www/rdoc/classes/Reap/TestTask.src/M000011.html +36 -0
  55. data/{doc → pub/www/rdoc}/classes/Reap/TestTask/TestResults.html +23 -55
  56. data/pub/www/rdoc/classes/Reap/TestTask/TestResults.src/M000012.html +21 -0
  57. data/pub/www/rdoc/classes/Reap/TestTask/TestResults.src/M000013.html +21 -0
  58. data/pub/www/rdoc/classes/Reap/TestTask/TestResults.src/M000014.html +23 -0
  59. data/pub/www/rdoc/created.rid +1 -0
  60. data/{doc/files/lib/reap/tasks → pub/www/rdoc/files/lib/reap2}/announce-task_rb.html +3 -3
  61. data/{doc/files/lib/reap/task_rb.html → pub/www/rdoc/files/lib/reap2/chmod-task_rb.html} +5 -5
  62. data/pub/www/{doc/files/lib/reap/tasks → rdoc/files/lib/reap2}/package-task_rb.html +3 -3
  63. data/pub/www/{doc/files/lib/reap/template_rb.html → rdoc/files/lib/reap2/publish-task_rb.html} +10 -4
  64. data/pub/www/{doc/files/lib/reap/task_rb.html → rdoc/files/lib/reap2/rdoc-task_rb.html} +5 -5
  65. data/pub/www/{doc/files/lib/reap/reap_rb.html → rdoc/files/lib/reap2/reap-all_rb.html} +7 -7
  66. data/{doc/files/lib/reap/runner_rb.html → pub/www/rdoc/files/lib/reap2/task_rb.html} +7 -8
  67. data/pub/www/{doc/files/lib/reap/tasks → rdoc/files/lib/reap2}/template-task_rb.html +4 -4
  68. data/{doc/files/lib/reap/tasks → pub/www/rdoc/files/lib/reap2}/test-task_rb.html +10 -4
  69. data/{doc → pub/www/rdoc}/fr_class_index.html +0 -1
  70. data/pub/www/rdoc/fr_file_index.html +35 -0
  71. data/pub/www/rdoc/fr_method_index.html +58 -0
  72. data/{doc → pub/www/rdoc}/index.html +1 -1
  73. data/{doc → pub/www/rdoc}/rdoc-style.css +0 -0
  74. data/test/tc_reap.rb +11 -0
  75. metadata +98 -112
  76. data/bin/reap +0 -103
  77. data/doc/classes/Reap.html +0 -184
  78. data/doc/classes/Reap/AnnounceTask.html +0 -339
  79. data/doc/classes/Reap/ChmodTask.html +0 -277
  80. data/doc/classes/Reap/PackageTask.html +0 -374
  81. data/doc/classes/Reap/PublishTask.html +0 -237
  82. data/doc/classes/Reap/RDocTask.html +0 -254
  83. data/doc/classes/Reap/Runner.html +0 -299
  84. data/doc/classes/Reap/Task.html +0 -438
  85. data/doc/classes/Reap/TemplateTask.html +0 -226
  86. data/doc/classes/Reap/TestTask.html +0 -354
  87. data/doc/created.rid +0 -1
  88. data/doc/files/README.html +0 -194
  89. data/doc/files/lib/reap/reap_rb.html +0 -111
  90. data/doc/files/lib/reap/tasks/chmod-task_rb.html +0 -101
  91. data/doc/files/lib/reap/tasks/package-task_rb.html +0 -108
  92. data/doc/files/lib/reap/tasks/publish-task_rb.html +0 -101
  93. data/doc/files/lib/reap/tasks/rdoc-task_rb.html +0 -101
  94. data/doc/files/lib/reap/tasks/template-task_rb.html +0 -109
  95. data/doc/fr_file_index.html +0 -38
  96. data/doc/fr_method_index.html +0 -73
  97. data/lib/reap/reap.rb +0 -13
  98. data/lib/reap/runner.rb +0 -90
  99. data/lib/reap/tasks/announce-task.rb +0 -149
  100. data/lib/reap/tasks/chmod-task.rb +0 -69
  101. data/lib/reap/tasks/package-task.rb +0 -157
  102. data/lib/reap/tasks/publish-task.rb +0 -39
  103. data/lib/reap/tasks/rdoc-task.rb +0 -55
  104. data/lib/reap/tasks/template-task.rb +0 -39
  105. data/lib/reap/tasks/test-task.rb +0 -140
  106. data/pub/www/doc/classes/Reap.html +0 -184
  107. data/pub/www/doc/classes/Reap/AnnounceTask.html +0 -331
  108. data/pub/www/doc/classes/Reap/ChmodTask.html +0 -278
  109. data/pub/www/doc/classes/Reap/PackageTask.html +0 -372
  110. data/pub/www/doc/classes/Reap/PublishTask.html +0 -231
  111. data/pub/www/doc/classes/Reap/RDocTask.html +0 -254
  112. data/pub/www/doc/classes/Reap/Runner.html +0 -307
  113. data/pub/www/doc/classes/Reap/Task.html +0 -390
  114. data/pub/www/doc/classes/Reap/TemplateTask.html +0 -233
  115. data/pub/www/doc/classes/Reap/TestTask.html +0 -242
  116. data/pub/www/doc/created.rid +0 -1
  117. data/pub/www/doc/files/LICENSE.html +0 -119
  118. data/pub/www/doc/files/README.html +0 -194
  119. data/pub/www/doc/files/lib/reap/runner_rb.html +0 -113
  120. data/pub/www/doc/files/lib/reap/tasks/announce-task_rb.html +0 -113
  121. data/pub/www/doc/files/lib/reap/tasks/chmod-task_rb.html +0 -101
  122. data/pub/www/doc/files/lib/reap/tasks/publish-task_rb.html +0 -101
  123. data/pub/www/doc/files/lib/reap/tasks/rdoc-task_rb.html +0 -101
  124. data/pub/www/doc/files/lib/reap/tasks/test-task_rb.html +0 -101
  125. data/pub/www/doc/fr_class_index.html +0 -36
  126. data/pub/www/doc/fr_file_index.html +0 -39
  127. data/pub/www/doc/fr_method_index.html +0 -69
  128. data/pub/www/doc/index.html +0 -24
  129. data/pub/www/doc/rdoc-style.css +0 -208
  130. data/test/tc_require.rb +0 -11
@@ -1,226 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: Reap::TemplateTask</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">Reap::TemplateTask</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/reap/tasks/template-task_rb.html">
59
- lib/reap/tasks/template-task.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- <a href="Task.html">
69
- Task
70
- </a>
71
- </td>
72
- </tr>
73
- </table>
74
- </div>
75
- <!-- banner header -->
76
-
77
- <div id="bodyContent">
78
-
79
-
80
-
81
- <div id="contextContent">
82
-
83
-
84
-
85
- </div>
86
-
87
- <div id="method-list">
88
- <h3 class="section-bar">Methods</h3>
89
-
90
- <div class="name-list">
91
- <a href="#M000029">desc</a>&nbsp;&nbsp;
92
- <a href="#M000030">run</a>&nbsp;&nbsp;
93
- <a href="#M000028">task</a>&nbsp;&nbsp;
94
- </div>
95
- </div>
96
-
97
- </div>
98
-
99
-
100
- <!-- if includes -->
101
-
102
- <div id="section">
103
-
104
-
105
- <div id="constants-list">
106
- <h3 class="section-bar">Constants</h3>
107
-
108
- <div class="name-list">
109
- <table summary="Constants">
110
- <tr class="top-aligned-row context-row">
111
- <td class="context-item-name">DATA_DIR</td>
112
- <td>=</td>
113
- <td class="context-item-value">'site_ruby/reap'</td>
114
- </tr>
115
- </table>
116
- </div>
117
- </div>
118
-
119
-
120
-
121
-
122
-
123
-
124
- <!-- if method_list -->
125
- <div id="methods">
126
- <h3 class="section-bar">Public Class methods</h3>
127
-
128
- <div id="method-M000029" class="method-detail">
129
- <a name="M000029"></a>
130
-
131
- <div class="method-heading">
132
- <a href="#M000029" class="method-signature">
133
- <span class="method-name">desc</span><span class="method-args">()</span>
134
- </a>
135
- </div>
136
-
137
- <div class="method-description">
138
- <p><a class="source-toggle" href="#"
139
- onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
140
- <div class="method-source-code" id="M000029-source">
141
- <pre>
142
- <span class="ruby-comment cmt"># File lib/reap/tasks/template-task.rb, line 12</span>
143
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">desc</span> ; <span class="ruby-value str">&quot;Create template configuration file in current directory.&quot;</span> ; <span class="ruby-keyword kw">end</span>
144
- </pre>
145
- </div>
146
- </div>
147
- </div>
148
-
149
- <div id="method-M000028" class="method-detail">
150
- <a name="M000028"></a>
151
-
152
- <div class="method-heading">
153
- <a href="#M000028" class="method-signature">
154
- <span class="method-name">task</span><span class="method-args">()</span>
155
- </a>
156
- </div>
157
-
158
- <div class="method-description">
159
- <p><a class="source-toggle" href="#"
160
- onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
161
- <div class="method-source-code" id="M000028-source">
162
- <pre>
163
- <span class="ruby-comment cmt"># File lib/reap/tasks/template-task.rb, line 11</span>
164
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">task</span> ; <span class="ruby-identifier">:template</span> ; <span class="ruby-keyword kw">end</span>
165
- </pre>
166
- </div>
167
- </div>
168
- </div>
169
-
170
- <h3 class="section-bar">Public Instance methods</h3>
171
-
172
- <div id="method-M000030" class="method-detail">
173
- <a name="M000030"></a>
174
-
175
- <div class="method-heading">
176
- <a href="#M000030" class="method-signature">
177
- <span class="method-name">run</span><span class="method-args">()</span>
178
- </a>
179
- </div>
180
-
181
- <div class="method-description">
182
- <p>
183
- def setup end
184
- </p>
185
- <p><a class="source-toggle" href="#"
186
- onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
187
- <div class="method-source-code" id="M000030-source">
188
- <pre>
189
- <span class="ruby-comment cmt"># File lib/reap/tasks/template-task.rb, line 17</span>
190
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>
191
- <span class="ruby-identifier">dir</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>( <span class="ruby-operator">::</span><span class="ruby-constant">Config</span><span class="ruby-operator">::</span><span class="ruby-constant">CONFIG</span>[<span class="ruby-value str">'datadir'</span>], <span class="ruby-constant">DATA_DIR</span> ) <span class="ruby-comment cmt">#File.dirname(File.dirname(__FILE__))</span>
192
- <span class="ruby-identifier">tmpf</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>( <span class="ruby-identifier">dir</span>, <span class="ruby-value str">'template.yaml'</span> )
193
- <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>( <span class="ruby-identifier">tmpf</span> )
194
- <span class="ruby-identifier">puts</span> <span class="ruby-identifier">tmpf</span>
195
- <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Tempfile is missing.&quot;</span>
196
- <span class="ruby-keyword kw">end</span>
197
-
198
- <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-value str">&quot;Reapfile&quot;</span>)
199
- <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Why is Reapfile a directory? Cannot comply.&quot;</span>
200
- <span class="ruby-keyword kw">return</span>
201
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-value str">&quot;Reapfile&quot;</span>)
202
- <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Reapfile already exists.&quot;</span>
203
- <span class="ruby-keyword kw">return</span>
204
- <span class="ruby-keyword kw">end</span>
205
- <span class="ruby-comment cmt"># copy tmpf to Reapfile</span>
206
- <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">cp</span>( <span class="ruby-identifier">tmpf</span>, <span class="ruby-value str">&quot;Reapfile&quot;</span> )
207
- <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Reapfile created. You'll need to fill it out.&quot;</span>
208
- <span class="ruby-keyword kw">end</span>
209
- </pre>
210
- </div>
211
- </div>
212
- </div>
213
-
214
-
215
- </div>
216
-
217
-
218
- </div>
219
-
220
-
221
- <div id="validator-badges">
222
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
223
- </div>
224
-
225
- </body>
226
- </html>
@@ -1,354 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: Reap::TestTask</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">Reap::TestTask</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/reap/tasks/test-task_rb.html">
59
- lib/reap/tasks/test-task.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- <a href="Task.html">
69
- Task
70
- </a>
71
- </td>
72
- </tr>
73
- </table>
74
- </div>
75
- <!-- banner header -->
76
-
77
- <div id="bodyContent">
78
-
79
-
80
-
81
- <div id="contextContent">
82
-
83
-
84
-
85
- </div>
86
-
87
- <div id="method-list">
88
- <h3 class="section-bar">Methods</h3>
89
-
90
- <div class="name-list">
91
- <a href="#M000011">desc</a>&nbsp;&nbsp;
92
- <a href="#M000015">fork_test</a>&nbsp;&nbsp;
93
- <a href="#M000013">run</a>&nbsp;&nbsp;
94
- <a href="#M000014">run_test</a>&nbsp;&nbsp;
95
- <a href="#M000012">setup</a>&nbsp;&nbsp;
96
- <a href="#M000010">task</a>&nbsp;&nbsp;
97
- </div>
98
- </div>
99
-
100
- </div>
101
-
102
-
103
- <!-- if includes -->
104
-
105
- <div id="section">
106
-
107
- <div id="class-list">
108
- <h3 class="section-bar">Classes and Modules</h3>
109
-
110
- Class <a href="TestTask/TestResults.html" class="link">Reap::TestTask::TestResults</a><br />
111
-
112
- </div>
113
-
114
-
115
-
116
-
117
-
118
-
119
-
120
- <!-- if method_list -->
121
- <div id="methods">
122
- <h3 class="section-bar">Public Class methods</h3>
123
-
124
- <div id="method-M000011" class="method-detail">
125
- <a name="M000011"></a>
126
-
127
- <div class="method-heading">
128
- <a href="#M000011" class="method-signature">
129
- <span class="method-name">desc</span><span class="method-args">()</span>
130
- </a>
131
- </div>
132
-
133
- <div class="method-description">
134
- <p><a class="source-toggle" href="#"
135
- onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
136
- <div class="method-source-code" id="M000011-source">
137
- <pre>
138
- <span class="ruby-comment cmt"># File lib/reap/tasks/test-task.rb, line 14</span>
139
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">desc</span> ; <span class="ruby-value str">&quot;Run unit tests.&quot;</span> ; <span class="ruby-keyword kw">end</span>
140
- </pre>
141
- </div>
142
- </div>
143
- </div>
144
-
145
- <div id="method-M000010" class="method-detail">
146
- <a name="M000010"></a>
147
-
148
- <div class="method-heading">
149
- <a href="#M000010" class="method-signature">
150
- <span class="method-name">task</span><span class="method-args">()</span>
151
- </a>
152
- </div>
153
-
154
- <div class="method-description">
155
- <p><a class="source-toggle" href="#"
156
- onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
157
- <div class="method-source-code" id="M000010-source">
158
- <pre>
159
- <span class="ruby-comment cmt"># File lib/reap/tasks/test-task.rb, line 13</span>
160
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">task</span> ; <span class="ruby-identifier">:test</span> ; <span class="ruby-keyword kw">end</span>
161
- </pre>
162
- </div>
163
- </div>
164
- </div>
165
-
166
- <h3 class="section-bar">Public Instance methods</h3>
167
-
168
- <div id="method-M000015" class="method-detail">
169
- <a name="M000015"></a>
170
-
171
- <div class="method-heading">
172
- <a href="#M000015" class="method-signature">
173
- <span class="method-name">fork_test</span><span class="method-args">( testfile )</span>
174
- </a>
175
- </div>
176
-
177
- <div class="method-description">
178
- <p><a class="source-toggle" href="#"
179
- onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
180
- <div class="method-source-code" id="M000015-source">
181
- <pre>
182
- <span class="ruby-comment cmt"># File lib/reap/tasks/test-task.rb, line 94</span>
183
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fork_test</span>( <span class="ruby-identifier">testfile</span> )
184
- <span class="ruby-identifier">src</span> = <span class="ruby-node">%Q{
185
- #require 'test/unit'
186
- require 'test/unit/collector'
187
- require 'test/unit/collector/objectspace'
188
- require 'test/unit/ui/testrunnermediator'
189
- load('#{testfile}')
190
- tests = Test::Unit::Collector::ObjectSpace.new.collect
191
- runner = Test::Unit::UI::TestRunnerMediator.new( tests )
192
- result = runner.run_suite
193
- puts Marshal.dump(result)
194
- }</span>
195
- <span class="ruby-identifier">result</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">popen</span>(<span class="ruby-value str">&quot;ruby&quot;</span>,<span class="ruby-value str">&quot;w+&quot;</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ruby</span><span class="ruby-operator">|</span>
196
- <span class="ruby-identifier">ruby</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">src</span>
197
- <span class="ruby-identifier">ruby</span>.<span class="ruby-identifier">close_write</span>
198
- <span class="ruby-identifier">ruby</span>.<span class="ruby-identifier">read</span>
199
- <span class="ruby-keyword kw">end</span>
200
- <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Marshal</span>.<span class="ruby-identifier">load</span>(<span class="ruby-identifier">result</span>)
201
- <span class="ruby-keyword kw">end</span>
202
- </pre>
203
- </div>
204
- </div>
205
- </div>
206
-
207
- <div id="method-M000013" class="method-detail">
208
- <a name="M000013"></a>
209
-
210
- <div class="method-heading">
211
- <a href="#M000013" class="method-signature">
212
- <span class="method-name">run</span><span class="method-args">()</span>
213
- </a>
214
- </div>
215
-
216
- <div class="method-description">
217
- <p><a class="source-toggle" href="#"
218
- onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
219
- <div class="method-source-code" id="M000013-source">
220
- <pre>
221
- <span class="ruby-comment cmt"># File lib/reap/tasks/test-task.rb, line 27</span>
222
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>
223
- <span class="ruby-comment cmt"># get test files</span>
224
- <span class="ruby-identifier">test_libs</span> = <span class="ruby-ivar">@libs</span>
225
- <span class="ruby-identifier">test_files</span> = <span class="ruby-constant">FileList</span>.<span class="ruby-identifier">new</span>
226
- <span class="ruby-identifier">test_files</span>.<span class="ruby-identifier">include</span>(<span class="ruby-operator">*</span><span class="ruby-ivar">@files</span>)
227
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">test_files</span>.<span class="ruby-identifier">empty?</span>
228
- <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;No test files found.&quot;</span>
229
- <span class="ruby-keyword kw">return</span>
230
- <span class="ruby-keyword kw">end</span>
231
- <span class="ruby-identifier">print</span> <span class="ruby-value str">&quot;Reap is shelling out work to Ruby's Test Suite...&quot;</span>
232
-
233
- <span class="ruby-identifier">test_files</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
234
- <span class="ruby-identifier">$stdout</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'.'</span>; <span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">flush</span>
235
- <span class="ruby-identifier">run_test</span>( <span class="ruby-identifier">f</span> )
236
- <span class="ruby-comment cmt">#ruby %{-r&quot;test/unit&quot; &quot;#{f}&quot;}</span>
237
- }
238
- <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;done.&quot;</span>
239
-
240
- <span class="ruby-comment cmt"># Display Failures</span>
241
- <span class="ruby-identifier">puts</span>
242
- <span class="ruby-identifier">puts</span> <span class="ruby-node">%{FAILURES:#{@failures.empty? ? ' []' : ''}}</span>
243
- <span class="ruby-ivar">@failures</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">fails</span><span class="ruby-operator">|</span>
244
- <span class="ruby-identifier">fails</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">failure</span><span class="ruby-operator">|</span>
245
- <span class="ruby-identifier">puts</span>
246
- <span class="ruby-identifier">puts</span> <span class="ruby-node">%{ - test : #{failure.test_name}}</span>
247
- <span class="ruby-identifier">puts</span> <span class="ruby-node">%{ message : #{failure.message.gsub(&quot;\n&quot;,&quot; &quot;)}}</span>
248
- <span class="ruby-identifier">puts</span> <span class="ruby-node">%{ location : #{failure.location}}</span>
249
- }
250
- }
251
-
252
- <span class="ruby-comment cmt"># Display Errors</span>
253
- <span class="ruby-identifier">puts</span>
254
- <span class="ruby-identifier">puts</span> <span class="ruby-node">%{ERRORS:#{@errors.empty? ? ' []' : ''}}</span>
255
- <span class="ruby-ivar">@errors</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">errs</span><span class="ruby-operator">|</span>
256
- <span class="ruby-identifier">errs</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">err</span><span class="ruby-operator">|</span>
257
- <span class="ruby-identifier">puts</span>
258
- <span class="ruby-identifier">puts</span> <span class="ruby-node">%{ - test : #{err.test_name}}</span>
259
- <span class="ruby-identifier">puts</span> <span class="ruby-node">%{ message : #{err.exception.message}}</span>
260
- <span class="ruby-identifier">puts</span> <span class="ruby-value str">%{ backtrace :}</span>
261
- <span class="ruby-identifier">err</span>.<span class="ruby-identifier">exception</span>.<span class="ruby-identifier">backtrace</span>[<span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-value">-1</span>].<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">bt</span><span class="ruby-operator">|</span> <span class="ruby-identifier">puts</span> <span class="ruby-node">%Q{ - #{bt}}</span> }
262
- }
263
- }
264
-
265
- <span class="ruby-comment cmt"># Display Final Results</span>
266
- <span class="ruby-identifier">puts</span>
267
- <span class="ruby-identifier">puts</span> <span class="ruby-ivar">@results</span>
268
- <span class="ruby-identifier">puts</span>
269
-
270
- <span class="ruby-comment cmt"># old way (don't work right)</span>
271
- <span class="ruby-comment cmt">#puts %Q{ ruby %{-I#{test_libs} -e0 -r&quot;test/unit&quot; \\\n#{test_reqs}#{test_opts}} } if $DEBUG</span>
272
- <span class="ruby-comment cmt">#ruby %{-I#{test_libs} -e0 -r&quot;test/unit&quot; \\\n#{test_reqs}#{test_opts}}</span>
273
- <span class="ruby-comment cmt">#ruby %{-e0 -r&quot;test/unit&quot; \\\n#{test_reqs}#{test_opts}}</span>
274
- <span class="ruby-keyword kw">end</span>
275
- </pre>
276
- </div>
277
- </div>
278
- </div>
279
-
280
- <div id="method-M000014" class="method-detail">
281
- <a name="M000014"></a>
282
-
283
- <div class="method-heading">
284
- <a href="#M000014" class="method-signature">
285
- <span class="method-name">run_test</span><span class="method-args">( test_file )</span>
286
- </a>
287
- </div>
288
-
289
- <div class="method-description">
290
- <p><a class="source-toggle" href="#"
291
- onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
292
- <div class="method-source-code" id="M000014-source">
293
- <pre>
294
- <span class="ruby-comment cmt"># File lib/reap/tasks/test-task.rb, line 81</span>
295
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run_test</span>( <span class="ruby-identifier">test_file</span> )
296
- <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>( <span class="ruby-identifier">test_file</span> )
297
- <span class="ruby-identifier">r</span> = <span class="ruby-keyword kw">nil</span>
298
- <span class="ruby-keyword kw">else</span>
299
- <span class="ruby-identifier">r</span> = <span class="ruby-identifier">fork_test</span>( <span class="ruby-identifier">test_file</span> )
300
- <span class="ruby-keyword kw">end</span>
301
- <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">passed?</span>
302
- <span class="ruby-ivar">@errors</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-value str">'@errors'</span>)
303
- <span class="ruby-ivar">@failures</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-value str">'@failures'</span>)
304
- <span class="ruby-keyword kw">end</span>
305
- <span class="ruby-ivar">@results</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">r</span>
306
- <span class="ruby-keyword kw">end</span>
307
- </pre>
308
- </div>
309
- </div>
310
- </div>
311
-
312
- <div id="method-M000012" class="method-detail">
313
- <a name="M000012"></a>
314
-
315
- <div class="method-heading">
316
- <a href="#M000012" class="method-signature">
317
- <span class="method-name">setup</span><span class="method-args">()</span>
318
- </a>
319
- </div>
320
-
321
- <div class="method-description">
322
- <p><a class="source-toggle" href="#"
323
- onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
324
- <div class="method-source-code" id="M000012-source">
325
- <pre>
326
- <span class="ruby-comment cmt"># File lib/reap/tasks/test-task.rb, line 16</span>
327
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>
328
- <span class="ruby-ivar">@libs</span> = ( <span class="ruby-identifier">section</span>[<span class="ruby-value str">&quot;libs&quot;</span>] <span class="ruby-operator">||</span> [<span class="ruby-value str">'lib'</span>] ).<span class="ruby-identifier">join</span>(<span class="ruby-value str">':'</span>)
329
- <span class="ruby-comment cmt">#@libs = (section[&quot;libs&quot;] || []).join(':')</span>
330
- <span class="ruby-ivar">@files</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">&quot;files&quot;</span>] <span class="ruby-operator">||</span> [ <span class="ruby-value str">'test/**/tc*.rb'</span>, <span class="ruby-value str">'test/**/test*.rb'</span>, <span class="ruby-value str">'test/**/*test.rb'</span> ]
331
- <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'options'</span>]
332
-
333
- <span class="ruby-ivar">@results</span> = <span class="ruby-constant">TestResults</span>.<span class="ruby-identifier">new</span>
334
- <span class="ruby-ivar">@errors</span> = []
335
- <span class="ruby-ivar">@failures</span> = []
336
- <span class="ruby-keyword kw">end</span>
337
- </pre>
338
- </div>
339
- </div>
340
- </div>
341
-
342
-
343
- </div>
344
-
345
-
346
- </div>
347
-
348
-
349
- <div id="validator-badges">
350
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
351
- </div>
352
-
353
- </body>
354
- </html>