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,299 +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::Runner</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::Runner</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/reap/runner_rb.html">
59
- lib/reap/runner.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
- Object
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
- <div id="description">
82
- <p>
83
- Main <a href="Runner.html">Runner</a> class
84
- </p>
85
-
86
- </div>
87
-
88
-
89
- </div>
90
-
91
- <div id="method-list">
92
- <h3 class="section-bar">Methods</h3>
93
-
94
- <div class="name-list">
95
- <a href="#M000035">acknowledge</a>&nbsp;&nbsp;
96
- <a href="#M000033">call</a>&nbsp;&nbsp;
97
- <a href="#M000031">new</a>&nbsp;&nbsp;
98
- <a href="#M000034">run</a>&nbsp;&nbsp;
99
- <a href="#M000032">task?</a>&nbsp;&nbsp;
100
- </div>
101
- </div>
102
-
103
- </div>
104
-
105
-
106
- <!-- if includes -->
107
-
108
- <div id="section">
109
-
110
-
111
-
112
-
113
-
114
- <div id="attribute-list">
115
- <h3 class="section-bar">Attributes</h3>
116
-
117
- <div class="name-list">
118
- <table>
119
- <tr class="top-aligned-row context-row">
120
- <td class="context-item-name">config</td>
121
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
122
- <td class="context-item-desc"></td>
123
- </tr>
124
- </table>
125
- </div>
126
- </div>
127
-
128
-
129
-
130
- <!-- if method_list -->
131
- <div id="methods">
132
- <h3 class="section-bar">Public Class methods</h3>
133
-
134
- <div id="method-M000031" class="method-detail">
135
- <a name="M000031"></a>
136
-
137
- <div class="method-heading">
138
- <a href="#M000031" class="method-signature">
139
- <span class="method-name">new</span><span class="method-args">( config_file=nil )</span>
140
- </a>
141
- </div>
142
-
143
- <div class="method-description">
144
- <p><a class="source-toggle" href="#"
145
- onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
146
- <div class="method-source-code" id="M000031-source">
147
- <pre>
148
- <span class="ruby-comment cmt"># File lib/reap/runner.rb, line 32</span>
149
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>( <span class="ruby-identifier">config_file</span>=<span class="ruby-keyword kw">nil</span> )
150
- <span class="ruby-identifier">config_file</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">'Reapfile'</span>
151
- <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>( <span class="ruby-identifier">config_file</span> )
152
- <span class="ruby-comment cmt"># load config file</span>
153
- <span class="ruby-ivar">@config</span> = <span class="ruby-constant">YAML</span>.<span class="ruby-identifier">load</span>( <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>( <span class="ruby-identifier">config_file</span> ) ).<span class="ruby-identifier">traverse</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> [<span class="ruby-identifier">k</span>.<span class="ruby-identifier">downcase</span>, <span class="ruby-identifier">v</span>] }
154
- <span class="ruby-comment cmt"># required main parameters</span>
155
- <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;TITLE is a required configuration field&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@config</span>[<span class="ruby-value str">'title'</span>]
156
- <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;NAME is a required configuration field&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@config</span>[<span class="ruby-value str">'name'</span>]
157
- <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;VERSION is a required configuration field&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@config</span>[<span class="ruby-value str">'version'</span>]
158
- <span class="ruby-keyword kw">else</span>
159
- <span class="ruby-ivar">@config</span> = {}
160
- <span class="ruby-keyword kw">end</span>
161
- <span class="ruby-keyword kw">end</span>
162
- </pre>
163
- </div>
164
- </div>
165
- </div>
166
-
167
- <h3 class="section-bar">Public Instance methods</h3>
168
-
169
- <div id="method-M000035" class="method-detail">
170
- <a name="M000035"></a>
171
-
172
- <div class="method-heading">
173
- <a href="#M000035" class="method-signature">
174
- <span class="method-name">acknowledge</span><span class="method-args">()</span>
175
- </a>
176
- </div>
177
-
178
- <div class="method-description">
179
- <p><a class="source-toggle" href="#"
180
- onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
181
- <div class="method-source-code" id="M000035-source">
182
- <pre>
183
- <span class="ruby-comment cmt"># File lib/reap/runner.rb, line 84</span>
184
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">acknowledge</span>
185
- <span class="ruby-identifier">y</span> <span class="ruby-ivar">@config</span>
186
- <span class="ruby-keyword kw">end</span>
187
- </pre>
188
- </div>
189
- </div>
190
- </div>
191
-
192
- <div id="method-M000033" class="method-detail">
193
- <a name="M000033"></a>
194
-
195
- <div class="method-heading">
196
- <a href="#M000033" class="method-signature">
197
- <span class="method-name">call</span><span class="method-args">( tsk, *args )</span>
198
- </a>
199
- </div>
200
-
201
- <div class="method-description">
202
- <p><a class="source-toggle" href="#"
203
- onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
204
- <div class="method-source-code" id="M000033-source">
205
- <pre>
206
- <span class="ruby-comment cmt"># File lib/reap/runner.rb, line 57</span>
207
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call</span>( <span class="ruby-identifier">tsk</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> )
208
- <span class="ruby-identifier">tsk</span> = <span class="ruby-identifier">tsk</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span>.<span class="ruby-identifier">to_sym</span>
209
- <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">tsk</span>
210
- <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:acknowledge</span>, <span class="ruby-identifier">:show</span>
211
- <span class="ruby-identifier">acknowledge</span>
212
- <span class="ruby-keyword kw">else</span>
213
- <span class="ruby-identifier">run</span>( <span class="ruby-identifier">tsk</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> )
214
- <span class="ruby-keyword kw">end</span>
215
- <span class="ruby-keyword kw">end</span>
216
- </pre>
217
- </div>
218
- </div>
219
- </div>
220
-
221
- <div id="method-M000034" class="method-detail">
222
- <a name="M000034"></a>
223
-
224
- <div class="method-heading">
225
- <a href="#M000034" class="method-signature">
226
- <span class="method-name">run</span><span class="method-args">( tsk, *args )</span>
227
- </a>
228
- </div>
229
-
230
- <div class="method-description">
231
- <p><a class="source-toggle" href="#"
232
- onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
233
- <div class="method-source-code" id="M000034-source">
234
- <pre>
235
- <span class="ruby-comment cmt"># File lib/reap/runner.rb, line 67</span>
236
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>( <span class="ruby-identifier">tsk</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> )
237
- <span class="ruby-identifier">task_class</span> = <span class="ruby-constant">Task</span>.<span class="ruby-identifier">registry</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">task</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">tsk</span> }
238
- <span class="ruby-comment cmt">#raise &quot;Task undefined.&quot; unless task_class # should not happen</span>
239
- <span class="ruby-identifier">name</span> = <span class="ruby-identifier">task_class</span>.<span class="ruby-identifier">task</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span>
240
- <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Array</span> <span class="ruby-operator">===</span> <span class="ruby-ivar">@config</span>[<span class="ruby-identifier">name</span>]
241
- <span class="ruby-ivar">@config</span>[<span class="ruby-identifier">name</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
242
- <span class="ruby-identifier">sect</span> = <span class="ruby-identifier">s</span>.<span class="ruby-identifier">traverse</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> [<span class="ruby-identifier">k</span>.<span class="ruby-identifier">downcase</span>, <span class="ruby-identifier">v</span>] }
243
- <span class="ruby-identifier">task</span> = <span class="ruby-identifier">task_class</span>.<span class="ruby-identifier">new</span>( <span class="ruby-ivar">@config</span>, <span class="ruby-identifier">sect</span> )
244
- <span class="ruby-identifier">task</span>.<span class="ruby-identifier">run</span>
245
- <span class="ruby-keyword kw">end</span>
246
- <span class="ruby-keyword kw">else</span>
247
- <span class="ruby-identifier">sect</span> = <span class="ruby-ivar">@config</span>[<span class="ruby-identifier">name</span>] <span class="ruby-operator">||</span> {}
248
- <span class="ruby-identifier">task</span> = <span class="ruby-identifier">task_class</span>.<span class="ruby-identifier">new</span>( <span class="ruby-ivar">@config</span>, <span class="ruby-identifier">sect</span> )
249
- <span class="ruby-identifier">task</span>.<span class="ruby-identifier">run</span>
250
- <span class="ruby-keyword kw">end</span>
251
- <span class="ruby-keyword kw">end</span>
252
- </pre>
253
- </div>
254
- </div>
255
- </div>
256
-
257
- <div id="method-M000032" class="method-detail">
258
- <a name="M000032"></a>
259
-
260
- <div class="method-heading">
261
- <a href="#M000032" class="method-signature">
262
- <span class="method-name">task?</span><span class="method-args">( tsk )</span>
263
- </a>
264
- </div>
265
-
266
- <div class="method-description">
267
- <p><a class="source-toggle" href="#"
268
- onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
269
- <div class="method-source-code" id="M000032-source">
270
- <pre>
271
- <span class="ruby-comment cmt"># File lib/reap/runner.rb, line 46</span>
272
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">task?</span>( <span class="ruby-identifier">tsk</span> )
273
- <span class="ruby-identifier">tsk</span> = <span class="ruby-identifier">tsk</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span>.<span class="ruby-identifier">to_sym</span>
274
- <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">tsk</span>
275
- <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:acknowledge</span>, <span class="ruby-identifier">:show</span>
276
- <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
277
- <span class="ruby-keyword kw">else</span>
278
- <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Reap</span><span class="ruby-operator">::</span><span class="ruby-constant">Task</span>.<span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">include?</span>( <span class="ruby-identifier">tsk</span> )
279
- <span class="ruby-keyword kw">end</span>
280
- <span class="ruby-keyword kw">false</span>
281
- <span class="ruby-keyword kw">end</span>
282
- </pre>
283
- </div>
284
- </div>
285
- </div>
286
-
287
-
288
- </div>
289
-
290
-
291
- </div>
292
-
293
-
294
- <div id="validator-badges">
295
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
296
- </div>
297
-
298
- </body>
299
- </html>
@@ -1,438 +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::Task</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::Task</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/reap/task_rb.html">
59
- lib/reap/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
- Object
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
- <div id="description">
82
- <p>
83
- Base class for all tasks.
84
- </p>
85
- <p>
86
- When creating a specifc task, subclass this one and create two class-level
87
- methods task and desc. task will return the name of the task and desc a
88
- description of the task. Then create an instance method called setup to do
89
- any initial preping. Usually that means assigning some instance vars from
90
- the Reapfile configutration. You can use section[&lt;name&gt;] for settings
91
- from the task&#8217;s particular section (as determined by self.task method
92
- above) and/or use master[&lt;name&gt;] for top-level settings. Finally
93
- write a run method that preforms the actual task.
94
- </p>
95
- <p>
96
- Here&#8217;s an oh so simple example:
97
- </p>
98
- <pre>
99
- class MyTask &lt; Task
100
- def self.task ; 'mytask' ; end
101
- def self.desc ; 'This is my first custom task.' ; end
102
-
103
- def setup
104
- @message = section['message'] || master['default'] || 'None Found!'
105
- end
106
-
107
- def run
108
- puts @message
109
- end
110
- end
111
- </pre>
112
- <p>
113
- This corresponding settings in the Reapfile will then be:
114
- </p>
115
- <pre>
116
- default: Default text, if any.
117
-
118
- mytask:
119
- message: Message text, if any.
120
- </pre>
121
- <p>
122
- <a href="../Reap.html">Reap</a> automatically handles multiple task runs if
123
- an array is provided under the task section instead of a single mapping.
124
- For example:
125
- </p>
126
- <pre>
127
- mytask:
128
- -
129
- message: First Run.
130
- -
131
- message: Second Run.
132
- </pre>
133
-
134
- </div>
135
-
136
-
137
- </div>
138
-
139
- <div id="method-list">
140
- <h3 class="section-bar">Methods</h3>
141
-
142
- <div class="name-list">
143
- <a href="#M000040">[]</a>&nbsp;&nbsp;
144
- <a href="#M000036">inherited</a>&nbsp;&nbsp;
145
- <a href="#M000039">new</a>&nbsp;&nbsp;
146
- <a href="#M000043">package_name</a>&nbsp;&nbsp;
147
- <a href="#M000037">registry</a>&nbsp;&nbsp;
148
- <a href="#M000042">ruby</a>&nbsp;&nbsp;
149
- <a href="#M000041">sh</a>&nbsp;&nbsp;
150
- <a href="#M000038">tasks</a>&nbsp;&nbsp;
151
- </div>
152
- </div>
153
-
154
- </div>
155
-
156
-
157
- <!-- if includes -->
158
-
159
- <div id="section">
160
-
161
-
162
- <div id="constants-list">
163
- <h3 class="section-bar">Constants</h3>
164
-
165
- <div class="name-list">
166
- <table summary="Constants">
167
- <tr class="top-aligned-row context-row">
168
- <td class="context-item-name">RUBY</td>
169
- <td>=</td>
170
- <td class="context-item-value">Config::CONFIG['ruby_install_name']</td>
171
- </tr>
172
- <tr class="top-aligned-row context-row">
173
- <td class="context-item-name">DEFAULT_INCLUDE</td>
174
- <td>=</td>
175
- <td class="context-item-value">[ '[A-Z]*', 'setup.rb', 'lib/**/*', 'bin/**/*', 'data/**/*', 'doc/**/*', 'rdoc/**/*', 'test/**/*', 'bench/**/*', 'demo/**/*', 'samples/**/*', 'examples/**/*' ]</td>
176
- </tr>
177
- <tr class="top-aligned-row context-row">
178
- <td class="context-item-name">MUST_EXCLUDE</td>
179
- <td>=</td>
180
- <td class="context-item-value">[ 'InstalledFiles', '**/CVS/**/*', '**/*~' ]</td>
181
- </tr>
182
- </table>
183
- </div>
184
- </div>
185
-
186
-
187
-
188
- <div id="attribute-list">
189
- <h3 class="section-bar">Attributes</h3>
190
-
191
- <div class="name-list">
192
- <table>
193
- <tr class="top-aligned-row context-row">
194
- <td class="context-item-name">master</td>
195
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
196
- <td class="context-item-desc"></td>
197
- </tr>
198
- <tr class="top-aligned-row context-row">
199
- <td class="context-item-name">section</td>
200
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
201
- <td class="context-item-desc"></td>
202
- </tr>
203
- </table>
204
- </div>
205
- </div>
206
-
207
-
208
-
209
- <!-- if method_list -->
210
- <div id="methods">
211
- <h3 class="section-bar">Public Class methods</h3>
212
-
213
- <div id="method-M000036" class="method-detail">
214
- <a name="M000036"></a>
215
-
216
- <div class="method-heading">
217
- <a href="#M000036" class="method-signature">
218
- <span class="method-name">inherited</span><span class="method-args">( klass )</span>
219
- </a>
220
- </div>
221
-
222
- <div class="method-description">
223
- <p><a class="source-toggle" href="#"
224
- onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
225
- <div class="method-source-code" id="M000036-source">
226
- <pre>
227
- <span class="ruby-comment cmt"># File lib/reap/task.rb, line 60</span>
228
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inherited</span>( <span class="ruby-identifier">klass</span> )
229
- (<span class="ruby-ivar">@task_registry</span> <span class="ruby-operator">||=</span> []) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">klass</span>
230
- <span class="ruby-keyword kw">end</span>
231
- </pre>
232
- </div>
233
- </div>
234
- </div>
235
-
236
- <div id="method-M000039" class="method-detail">
237
- <a name="M000039"></a>
238
-
239
- <div class="method-heading">
240
- <a href="#M000039" class="method-signature">
241
- <span class="method-name">new</span><span class="method-args">( master_config, section_config )</span>
242
- </a>
243
- </div>
244
-
245
- <div class="method-description">
246
- <p><a class="source-toggle" href="#"
247
- onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
248
- <div class="method-source-code" id="M000039-source">
249
- <pre>
250
- <span class="ruby-comment cmt"># File lib/reap/task.rb, line 69</span>
251
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>( <span class="ruby-identifier">master_config</span>, <span class="ruby-identifier">section_config</span> )
252
- <span class="ruby-ivar">@master</span> = <span class="ruby-identifier">master_config</span>
253
- <span class="ruby-ivar">@section</span> = <span class="ruby-identifier">section_config</span>
254
- <span class="ruby-identifier">setup</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:setup</span>)
255
- <span class="ruby-keyword kw">end</span>
256
- </pre>
257
- </div>
258
- </div>
259
- </div>
260
-
261
- <div id="method-M000037" class="method-detail">
262
- <a name="M000037"></a>
263
-
264
- <div class="method-heading">
265
- <a href="#M000037" class="method-signature">
266
- <span class="method-name">registry</span><span class="method-args">()</span>
267
- </a>
268
- </div>
269
-
270
- <div class="method-description">
271
- <p><a class="source-toggle" href="#"
272
- onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
273
- <div class="method-source-code" id="M000037-source">
274
- <pre>
275
- <span class="ruby-comment cmt"># File lib/reap/task.rb, line 63</span>
276
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">registry</span> ; <span class="ruby-ivar">@task_registry</span> <span class="ruby-operator">||=</span> [] ; <span class="ruby-keyword kw">end</span>
277
- </pre>
278
- </div>
279
- </div>
280
- </div>
281
-
282
- <div id="method-M000038" class="method-detail">
283
- <a name="M000038"></a>
284
-
285
- <div class="method-heading">
286
- <a href="#M000038" class="method-signature">
287
- <span class="method-name">tasks</span><span class="method-args">()</span>
288
- </a>
289
- </div>
290
-
291
- <div class="method-description">
292
- <p><a class="source-toggle" href="#"
293
- onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
294
- <div class="method-source-code" id="M000038-source">
295
- <pre>
296
- <span class="ruby-comment cmt"># File lib/reap/task.rb, line 64</span>
297
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tasks</span> ; <span class="ruby-ivar">@task</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">registry</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">task</span> } ; <span class="ruby-keyword kw">end</span>
298
- </pre>
299
- </div>
300
- </div>
301
- </div>
302
-
303
- <h3 class="section-bar">Public Instance methods</h3>
304
-
305
- <div id="method-M000040" class="method-detail">
306
- <a name="M000040"></a>
307
-
308
- <div class="method-heading">
309
- <a href="#M000040" class="method-signature">
310
- <span class="method-name">[]</span><span class="method-args">(x)</span>
311
- </a>
312
- </div>
313
-
314
- <div class="method-description">
315
- <p><a class="source-toggle" href="#"
316
- onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
317
- <div class="method-source-code" id="M000040-source">
318
- <pre>
319
- <span class="ruby-comment cmt"># File lib/reap/task.rb, line 75</span>
320
- <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">x</span>) ; <span class="ruby-ivar">@section</span>[<span class="ruby-identifier">x</span>] ; <span class="ruby-keyword kw">end</span>
321
- </pre>
322
- </div>
323
- </div>
324
- </div>
325
-
326
- <div id="method-M000043" class="method-detail">
327
- <a name="M000043"></a>
328
-
329
- <div class="method-heading">
330
- <a href="#M000043" class="method-signature">
331
- <span class="method-name">package_name</span><span class="method-args">()</span>
332
- </a>
333
- </div>
334
-
335
- <div class="method-description">
336
- <p>
337
- Returns the full package name which combines package name and version.
338
- </p>
339
- <p><a class="source-toggle" href="#"
340
- onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
341
- <div class="method-source-code" id="M000043-source">
342
- <pre>
343
- <span class="ruby-comment cmt"># File lib/reap/task.rb, line 121</span>
344
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">package_name</span>
345
- <span class="ruby-ivar">@config</span>[<span class="ruby-value str">'name'</span>] <span class="ruby-operator">+</span> <span class="ruby-value str">'-'</span> <span class="ruby-operator">+</span> ( <span class="ruby-ivar">@config</span>[<span class="ruby-value str">'version'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'0.0.1'</span> )
346
- <span class="ruby-keyword kw">end</span>
347
- </pre>
348
- </div>
349
- </div>
350
- </div>
351
-
352
- <div id="method-M000042" class="method-detail">
353
- <a name="M000042"></a>
354
-
355
- <div class="method-heading">
356
- <a href="#M000042" class="method-signature">
357
- <span class="method-name">ruby</span><span class="method-args">(*args)</span>
358
- </a>
359
- </div>
360
-
361
- <div class="method-description">
362
- <p>
363
- Run a Ruby interpreter with the given arguments.
364
- </p>
365
- <p>
366
- Example:
367
- </p>
368
- <pre>
369
- ruby %{-pe '$_.upcase!' &lt;README}
370
- </pre>
371
- <p><a class="source-toggle" href="#"
372
- onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
373
- <div class="method-source-code" id="M000042-source">
374
- <pre>
375
- <span class="ruby-comment cmt"># File lib/reap/task.rb, line 95</span>
376
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ruby</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
377
- <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Hash</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">last</span>
378
- <span class="ruby-identifier">options</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">pop</span>
379
- <span class="ruby-keyword kw">else</span>
380
- <span class="ruby-identifier">options</span> = {}
381
- <span class="ruby-keyword kw">end</span>
382
- <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{RUBY} #{args.join(' ')}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
383
- <span class="ruby-identifier">sh</span> <span class="ruby-node">&quot;#{RUBY} #{args.join(' ')}&quot;</span>, <span class="ruby-identifier">options</span>
384
- <span class="ruby-keyword kw">end</span>
385
- </pre>
386
- </div>
387
- </div>
388
- </div>
389
-
390
- <div id="method-M000041" class="method-detail">
391
- <a name="M000041"></a>
392
-
393
- <div class="method-heading">
394
- <a href="#M000041" class="method-signature">
395
- <span class="method-name">sh</span><span class="method-args">(cmd, options={})</span>
396
- </a>
397
- </div>
398
-
399
- <div class="method-description">
400
- <p>
401
- Run the system command <tt>cmd</tt>.
402
- </p>
403
- <p>
404
- Example:
405
- </p>
406
- <pre>
407
- sh %{ls -ltr}
408
- </pre>
409
- <p><a class="source-toggle" href="#"
410
- onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
411
- <div class="method-source-code" id="M000041-source">
412
- <pre>
413
- <span class="ruby-comment cmt"># File lib/reap/task.rb, line 82</span>
414
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sh</span>(<span class="ruby-identifier">cmd</span>, <span class="ruby-identifier">options</span>={})
415
- <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">send</span>( <span class="ruby-identifier">:fu_check_options</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">:noop</span>, <span class="ruby-identifier">:verbose</span> )
416
- <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">send</span>( <span class="ruby-identifier">:fu_output_message</span>, <span class="ruby-identifier">cmd</span> ) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:verbose</span>]
417
- <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:noop</span>]
418
- <span class="ruby-identifier">system</span>(<span class="ruby-identifier">cmd</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">fail</span> <span class="ruby-node">&quot;Command Failed: [#{cmd}]&quot;</span>
419
- <span class="ruby-keyword kw">end</span>
420
- <span class="ruby-keyword kw">end</span>
421
- </pre>
422
- </div>
423
- </div>
424
- </div>
425
-
426
-
427
- </div>
428
-
429
-
430
- </div>
431
-
432
-
433
- <div id="validator-badges">
434
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
435
- </div>
436
-
437
- </body>
438
- </html>