reap 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/ChangeLog +2 -0
  2. data/LICENSE +11 -0
  3. data/README +59 -0
  4. data/Reapfile +85 -0
  5. data/bin/reap +103 -0
  6. data/doc/classes/Reap/AnnounceTask.html +331 -0
  7. data/doc/classes/Reap/ChmodTask.html +278 -0
  8. data/doc/classes/Reap/PackageTask.html +372 -0
  9. data/doc/classes/Reap/PublishTask.html +231 -0
  10. data/doc/classes/Reap/RDocTask.html +254 -0
  11. data/doc/classes/Reap/Runner.html +307 -0
  12. data/doc/classes/Reap/Task.html +390 -0
  13. data/doc/classes/Reap/TemplateTask.html +233 -0
  14. data/doc/classes/Reap/TestTask.html +242 -0
  15. data/doc/classes/Reap.html +184 -0
  16. data/doc/created.rid +1 -0
  17. data/doc/files/LICENSE.html +119 -0
  18. data/doc/files/README.html +194 -0
  19. data/doc/files/lib/reap/reap_rb.html +110 -0
  20. data/doc/files/lib/reap/runner_rb.html +113 -0
  21. data/doc/files/lib/reap/task_rb.html +108 -0
  22. data/doc/files/lib/reap/tasks/announce-task_rb.html +113 -0
  23. data/doc/files/lib/reap/tasks/chmod-task_rb.html +101 -0
  24. data/doc/files/lib/reap/tasks/package-task_rb.html +108 -0
  25. data/doc/files/lib/reap/tasks/publish-task_rb.html +101 -0
  26. data/doc/files/lib/reap/tasks/rdoc-task_rb.html +101 -0
  27. data/doc/files/lib/reap/tasks/template-task_rb.html +108 -0
  28. data/doc/files/lib/reap/tasks/test-task_rb.html +101 -0
  29. data/doc/files/lib/reap/template_rb.html +101 -0
  30. data/doc/fr_class_index.html +36 -0
  31. data/doc/fr_file_index.html +39 -0
  32. data/doc/fr_method_index.html +69 -0
  33. data/doc/index.html +24 -0
  34. data/doc/rdoc-style.css +208 -0
  35. data/lib/reap/reap.rb +11 -0
  36. data/lib/reap/runner.rb +95 -0
  37. data/lib/reap/task.rb +103 -0
  38. data/lib/reap/tasks/announce-task.rb +140 -0
  39. data/lib/reap/tasks/chmod-task.rb +72 -0
  40. data/lib/reap/tasks/package-task.rb +153 -0
  41. data/lib/reap/tasks/publish-task.rb +33 -0
  42. data/lib/reap/tasks/rdoc-task.rb +57 -0
  43. data/lib/reap/tasks/template-task.rb +38 -0
  44. data/lib/reap/tasks/test-task.rb +45 -0
  45. data/lib/reap/template.rb +72 -0
  46. data/setup.rb +1361 -0
  47. data/test/test_require.rb +11 -0
  48. metadata +112 -0
@@ -0,0 +1,278 @@
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::ChmodTask</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::ChmodTask</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/reap/tasks/chmod-task_rb.html">
59
+ lib/reap/tasks/chmod-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="#M000018">chmod</a>&nbsp;&nbsp;
92
+ <a href="#M000015">desc</a>&nbsp;&nbsp;
93
+ <a href="#M000017">run</a>&nbsp;&nbsp;
94
+ <a href="#M000016">set</a>&nbsp;&nbsp;
95
+ <a href="#M000014">task</a>&nbsp;&nbsp;
96
+ </div>
97
+ </div>
98
+
99
+ </div>
100
+
101
+
102
+ <!-- if includes -->
103
+
104
+ <div id="section">
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+ <!-- if method_list -->
114
+ <div id="methods">
115
+ <h3 class="section-bar">Public Class methods</h3>
116
+
117
+ <div id="method-M000015" class="method-detail">
118
+ <a name="M000015"></a>
119
+
120
+ <div class="method-heading">
121
+ <a href="#M000015" class="method-signature">
122
+ <span class="method-name">desc</span><span class="method-args">()</span>
123
+ </a>
124
+ </div>
125
+
126
+ <div class="method-description">
127
+ <p><a class="source-toggle" href="#"
128
+ onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
129
+ <div class="method-source-code" id="M000015-source">
130
+ <pre>
131
+ <span class="ruby-comment cmt"># File lib/reap/tasks/chmod-task.rb, line 8</span>
132
+ <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;Change the permissions of package files.&quot;</span> ; <span class="ruby-keyword kw">end</span>
133
+ </pre>
134
+ </div>
135
+ </div>
136
+ </div>
137
+
138
+ <div id="method-M000014" class="method-detail">
139
+ <a name="M000014"></a>
140
+
141
+ <div class="method-heading">
142
+ <a href="#M000014" class="method-signature">
143
+ <span class="method-name">task</span><span class="method-args">()</span>
144
+ </a>
145
+ </div>
146
+
147
+ <div class="method-description">
148
+ <p><a class="source-toggle" href="#"
149
+ onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
150
+ <div class="method-source-code" id="M000014-source">
151
+ <pre>
152
+ <span class="ruby-comment cmt"># File lib/reap/tasks/chmod-task.rb, line 6</span>
153
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">task</span>; <span class="ruby-identifier">:chmod</span> ; <span class="ruby-keyword kw">end</span>
154
+ </pre>
155
+ </div>
156
+ </div>
157
+ </div>
158
+
159
+ <h3 class="section-bar">Public Instance methods</h3>
160
+
161
+ <div id="method-M000017" class="method-detail">
162
+ <a name="M000017"></a>
163
+
164
+ <div class="method-heading">
165
+ <a href="#M000017" class="method-signature">
166
+ <span class="method-name">run</span><span class="method-args">()</span>
167
+ </a>
168
+ </div>
169
+
170
+ <div class="method-description">
171
+ <p><a class="source-toggle" href="#"
172
+ onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
173
+ <div class="method-source-code" id="M000017-source">
174
+ <pre>
175
+ <span class="ruby-comment cmt"># File lib/reap/tasks/chmod-task.rb, line 17</span>
176
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>
177
+ <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Reap is shelling out work to chmod...&quot;</span>
178
+
179
+ <span class="ruby-comment cmt"># misc</span>
180
+ <span class="ruby-identifier">misc</span> = <span class="ruby-constant">FileList</span>.<span class="ruby-identifier">new</span>
181
+ <span class="ruby-identifier">misc</span>.<span class="ruby-identifier">include</span>(<span class="ruby-value str">'[A-Z]*'</span>)
182
+ <span class="ruby-identifier">misc</span>.<span class="ruby-identifier">exclude</span>(<span class="ruby-value str">'InstalledFiles'</span>)
183
+ <span class="ruby-identifier">chmod</span>( <span class="ruby-identifier">misc</span> ) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">misc</span>.<span class="ruby-identifier">empty?</span>
184
+
185
+ <span class="ruby-comment cmt"># lib</span>
186
+ <span class="ruby-identifier">libs</span> = <span class="ruby-constant">FileList</span>.<span class="ruby-identifier">new</span>
187
+ <span class="ruby-identifier">libs</span>.<span class="ruby-identifier">include</span>(<span class="ruby-value str">'lib/**/*'</span>)
188
+ <span class="ruby-identifier">libs</span>.<span class="ruby-identifier">exclude</span>(<span class="ruby-value str">'lib/CVS/**/*'</span>)
189
+ <span class="ruby-identifier">libs</span>.<span class="ruby-identifier">include</span>(<span class="ruby-value str">'packages/*/lib/**/*'</span>)
190
+ <span class="ruby-identifier">libs</span>.<span class="ruby-identifier">exclude</span>(<span class="ruby-value str">'packages/*/lib/CVS/**/*'</span>)
191
+ <span class="ruby-identifier">libs</span>.<span class="ruby-identifier">exclude</span>(<span class="ruby-value str">'packages/CVS/**/*'</span>)
192
+ <span class="ruby-identifier">chmod</span>( <span class="ruby-identifier">libs</span> ) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">libs</span>.<span class="ruby-identifier">empty?</span>
193
+
194
+ <span class="ruby-comment cmt"># bin</span>
195
+ <span class="ruby-identifier">bins</span> = <span class="ruby-constant">FileList</span>.<span class="ruby-identifier">new</span>
196
+ <span class="ruby-identifier">bins</span>.<span class="ruby-identifier">include</span>(<span class="ruby-value str">'bin/**/*'</span>)
197
+ <span class="ruby-identifier">bins</span>.<span class="ruby-identifier">exclude</span>(<span class="ruby-value str">'bin/CVS/**/*'</span>)
198
+ <span class="ruby-identifier">bins</span>.<span class="ruby-identifier">include</span>(<span class="ruby-value str">'packages/*/bin/**/*'</span>)
199
+ <span class="ruby-identifier">bins</span>.<span class="ruby-identifier">exclude</span>(<span class="ruby-value str">'packages/*/bin/CVS/**/*'</span>)
200
+ <span class="ruby-identifier">bins</span>.<span class="ruby-identifier">exclude</span>(<span class="ruby-value str">'packages/CVS/**/*'</span>)
201
+ <span class="ruby-identifier">chmod</span>( <span class="ruby-identifier">bins</span>, <span class="ruby-value">755</span> ) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">bins</span>.<span class="ruby-identifier">empty?</span>
202
+ <span class="ruby-keyword kw">end</span>
203
+ </pre>
204
+ </div>
205
+ </div>
206
+ </div>
207
+
208
+ <div id="method-M000016" class="method-detail">
209
+ <a name="M000016"></a>
210
+
211
+ <div class="method-heading">
212
+ <a href="#M000016" class="method-signature">
213
+ <span class="method-name">set</span><span class="method-args">( section )</span>
214
+ </a>
215
+ </div>
216
+
217
+ <div class="method-description">
218
+ <p><a class="source-toggle" href="#"
219
+ onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
220
+ <div class="method-source-code" id="M000016-source">
221
+ <pre>
222
+ <span class="ruby-comment cmt"># File lib/reap/tasks/chmod-task.rb, line 11</span>
223
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set</span>( <span class="ruby-identifier">section</span> )
224
+ <span class="ruby-comment cmt"># @user = section['user']</span>
225
+ <span class="ruby-comment cmt"># @group = section['group']</span>
226
+ <span class="ruby-comment cmt"># #raise &quot;USER and GROUP are required CHMOD fields.&quot; unless @user and @group</span>
227
+ <span class="ruby-keyword kw">end</span>
228
+ </pre>
229
+ </div>
230
+ </div>
231
+ </div>
232
+
233
+ <h3 class="section-bar">Private Instance methods</h3>
234
+
235
+ <div id="method-M000018" class="method-detail">
236
+ <a name="M000018"></a>
237
+
238
+ <div class="method-heading">
239
+ <a href="#M000018" class="method-signature">
240
+ <span class="method-name">chmod</span><span class="method-args">( file_list, file_mode=644, dir_mode=755 )</span>
241
+ </a>
242
+ </div>
243
+
244
+ <div class="method-description">
245
+ <p><a class="source-toggle" href="#"
246
+ onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
247
+ <div class="method-source-code" id="M000018-source">
248
+ <pre>
249
+ <span class="ruby-comment cmt"># File lib/reap/tasks/chmod-task.rb, line 47</span>
250
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">chmod</span>( <span class="ruby-identifier">file_list</span>, <span class="ruby-identifier">file_mode</span>=<span class="ruby-value">644</span>, <span class="ruby-identifier">dir_mode</span>=<span class="ruby-value">755</span> )
251
+ <span class="ruby-identifier">dirs</span>, <span class="ruby-identifier">files</span> = <span class="ruby-identifier">file_list</span>.<span class="ruby-identifier">partition</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">l</span>) }
252
+ <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">files</span>.<span class="ruby-identifier">empty?</span>
253
+ <span class="ruby-identifier">fstr</span> = <span class="ruby-value str">'&quot;'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">files</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'&quot; &quot;'</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">'&quot;'</span>
254
+ <span class="ruby-identifier">sh</span> <span class="ruby-node">%{chmod #{file_mode} #{fstr}}</span>
255
+ <span class="ruby-keyword kw">end</span>
256
+ <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">dirs</span>.<span class="ruby-identifier">empty?</span>
257
+ <span class="ruby-identifier">fstr</span> = <span class="ruby-value str">'&quot;'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">dirs</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'&quot; &quot;'</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">'&quot;'</span>
258
+ <span class="ruby-identifier">sh</span> <span class="ruby-node">%{chmod #{dir_mode} #{fstr}}</span>
259
+ <span class="ruby-keyword kw">end</span>
260
+ <span class="ruby-keyword kw">end</span>
261
+ </pre>
262
+ </div>
263
+ </div>
264
+ </div>
265
+
266
+
267
+ </div>
268
+
269
+
270
+ </div>
271
+
272
+
273
+ <div id="validator-badges">
274
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
275
+ </div>
276
+
277
+ </body>
278
+ </html>