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,372 @@
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::PackageTask</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::PackageTask</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/reap/tasks/package-task_rb.html">
59
+ lib/reap/tasks/package-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
+ <div id="description">
84
+ <p>
85
+ Package <a href="Task.html">Task</a>
86
+ </p>
87
+ <p>
88
+ This task allows on to create standard .zip, .tgz, or .tbz packages, plus
89
+ create gem distributions.
90
+ </p>
91
+
92
+ </div>
93
+
94
+
95
+ </div>
96
+
97
+ <div id="method-list">
98
+ <h3 class="section-bar">Methods</h3>
99
+
100
+ <div class="name-list">
101
+ <a href="#M000002">desc</a>&nbsp;&nbsp;
102
+ <a href="#M000004">run</a>&nbsp;&nbsp;
103
+ <a href="#M000005">run_gem</a>&nbsp;&nbsp;
104
+ <a href="#M000003">set</a>&nbsp;&nbsp;
105
+ <a href="#M000001">task</a>&nbsp;&nbsp;
106
+ </div>
107
+ </div>
108
+
109
+ </div>
110
+
111
+
112
+ <!-- if includes -->
113
+
114
+ <div id="section">
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <!-- if method_list -->
124
+ <div id="methods">
125
+ <h3 class="section-bar">Public Class methods</h3>
126
+
127
+ <div id="method-M000002" class="method-detail">
128
+ <a name="M000002"></a>
129
+
130
+ <div class="method-heading">
131
+ <a href="#M000002" class="method-signature">
132
+ <span class="method-name">desc</span><span class="method-args">()</span>
133
+ </a>
134
+ </div>
135
+
136
+ <div class="method-description">
137
+ <p><a class="source-toggle" href="#"
138
+ onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
139
+ <div class="method-source-code" id="M000002-source">
140
+ <pre>
141
+ <span class="ruby-comment cmt"># File lib/reap/tasks/package-task.rb, line 16</span>
142
+ <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;Build standard .tar.gz, .tar.bzip2 and .zip packages.&quot;</span> ; <span class="ruby-keyword kw">end</span>
143
+ </pre>
144
+ </div>
145
+ </div>
146
+ </div>
147
+
148
+ <div id="method-M000001" class="method-detail">
149
+ <a name="M000001"></a>
150
+
151
+ <div class="method-heading">
152
+ <a href="#M000001" class="method-signature">
153
+ <span class="method-name">task</span><span class="method-args">()</span>
154
+ </a>
155
+ </div>
156
+
157
+ <div class="method-description">
158
+ <p><a class="source-toggle" href="#"
159
+ onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
160
+ <div class="method-source-code" id="M000001-source">
161
+ <pre>
162
+ <span class="ruby-comment cmt"># File lib/reap/tasks/package-task.rb, line 14</span>
163
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">task</span> ; <span class="ruby-identifier">:package</span> ; <span class="ruby-keyword kw">end</span>
164
+ </pre>
165
+ </div>
166
+ </div>
167
+ </div>
168
+
169
+ <h3 class="section-bar">Public Instance methods</h3>
170
+
171
+ <div id="method-M000004" class="method-detail">
172
+ <a name="M000004"></a>
173
+
174
+ <div class="method-heading">
175
+ <a href="#M000004" class="method-signature">
176
+ <span class="method-name">run</span><span class="method-args">()</span>
177
+ </a>
178
+ </div>
179
+
180
+ <div class="method-description">
181
+ <p><a class="source-toggle" href="#"
182
+ onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
183
+ <div class="method-source-code" id="M000004-source">
184
+ <pre>
185
+ <span class="ruby-comment cmt"># File lib/reap/tasks/package-task.rb, line 52</span>
186
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>
187
+ <span class="ruby-comment cmt"># create package image</span>
188
+ <span class="ruby-keyword kw">if</span> <span class="ruby-constant">FileTest</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-ivar">@dir</span>)
189
+ <span class="ruby-identifier">print</span> <span class="ruby-node">&quot;Directory '#{@dir}' already exists. Clobber? [y/N] &quot;</span>
190
+ <span class="ruby-keyword kw">until</span> <span class="ruby-identifier">inp</span> = <span class="ruby-identifier">$stdin</span>.<span class="ruby-identifier">gets</span>[<span class="ruby-value">0</span>,<span class="ruby-value">1</span>] ; <span class="ruby-identifier">sleep</span> <span class="ruby-value">1</span> ; <span class="ruby-keyword kw">end</span>
191
+ <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">inp</span> <span class="ruby-operator">||</span> <span class="ruby-value str">'y'</span>).<span class="ruby-identifier">downcase</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'y'</span>
192
+ <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Removing old directory '#{File.expand_path(@dir)}'...&quot;</span>
193
+ <span class="ruby-identifier">trash_dir</span> = <span class="ruby-node">&quot;.trash/#{File.basename(@dir)}&quot;</span>
194
+ <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-value str">&quot;.trash&quot;</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">FileTest</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-value str">&quot;.trash&quot;</span>)
195
+ <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_r</span>(<span class="ruby-identifier">trash_dir</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-constant">FileTest</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">trash_dir</span>)
196
+ <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mv</span>(<span class="ruby-ivar">@dir</span>, <span class="ruby-identifier">trash_dir</span>)
197
+ <span class="ruby-keyword kw">else</span>
198
+ <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Reap package task canceled.&quot;</span>
199
+ <span class="ruby-identifier">exit</span> <span class="ruby-value">0</span>
200
+ <span class="ruby-keyword kw">end</span>
201
+ <span class="ruby-keyword kw">end</span>
202
+ <span class="ruby-identifier">package_dir_path</span> = <span class="ruby-node">&quot;#{@dir}/#{@package_name}&quot;</span>
203
+ <span class="ruby-identifier">package_files</span> = <span class="ruby-constant">FileList</span>.<span class="ruby-identifier">new</span>
204
+ <span class="ruby-identifier">package_files</span>.<span class="ruby-identifier">include</span>(<span class="ruby-operator">*</span><span class="ruby-ivar">@include</span>)
205
+ <span class="ruby-identifier">package_files</span>.<span class="ruby-identifier">exclude</span>(<span class="ruby-operator">*</span><span class="ruby-ivar">@exclude</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@exclude</span> <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@exclude</span>.<span class="ruby-identifier">empty?</span>
206
+ <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span> <span class="ruby-ivar">@dir</span> <span class="ruby-comment cmt">#rescue nil</span>
207
+ <span class="ruby-identifier">package_files</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">fn</span><span class="ruby-operator">|</span>
208
+ <span class="ruby-identifier">f</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">package_dir_path</span>, <span class="ruby-identifier">fn</span>)
209
+ <span class="ruby-identifier">fdir</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">f</span>)
210
+ <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">fdir</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">fdir</span>)
211
+ <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">fn</span>)
212
+ <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">f</span>)
213
+ <span class="ruby-keyword kw">else</span>
214
+ <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_f</span>(<span class="ruby-identifier">f</span>)
215
+ <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">safe_ln</span>(<span class="ruby-identifier">fn</span>, <span class="ruby-identifier">f</span>)
216
+ <span class="ruby-keyword kw">end</span>
217
+ <span class="ruby-keyword kw">end</span>
218
+
219
+ <span class="ruby-comment cmt"># create standard package files</span>
220
+ <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-ivar">@dir</span>) <span class="ruby-keyword kw">do</span>
221
+ <span class="ruby-comment cmt"># tar bzip2 for unix</span>
222
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@bzip2</span>
223
+ <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;\nReap is shelling out work to tar and bzip2...&quot;</span>
224
+ <span class="ruby-identifier">sh</span> <span class="ruby-node">%{tar --bzip2 -cvf #{@package_name}.tbz #{@package_name}}</span>
225
+ <span class="ruby-keyword kw">end</span>
226
+ <span class="ruby-comment cmt"># tar gzip for unix</span>
227
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@gzip</span>
228
+ <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;\nReap is shelling out work to tar and gzip...&quot;</span>
229
+ <span class="ruby-identifier">sh</span> <span class="ruby-node">%{tar --gzip -cvf #{@package_name}.tgz #{@package_name}}</span>
230
+ <span class="ruby-keyword kw">end</span>
231
+ <span class="ruby-comment cmt"># zip for windows</span>
232
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@zip</span>
233
+ <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;\nReap is shelling out work to zip...&quot;</span>
234
+ <span class="ruby-identifier">sh</span> <span class="ruby-node">%{zip -r #{@package_name}.zip #{@package_name}}</span>
235
+ <span class="ruby-keyword kw">end</span>
236
+ <span class="ruby-identifier">puts</span>
237
+ <span class="ruby-keyword kw">end</span>
238
+
239
+ <span class="ruby-comment cmt"># create gem package</span>
240
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@gem</span>
241
+ <span class="ruby-identifier">run_gem</span>
242
+ <span class="ruby-keyword kw">end</span>
243
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
244
+ <span class="ruby-keyword kw">end</span>
245
+ </pre>
246
+ </div>
247
+ </div>
248
+ </div>
249
+
250
+ <div id="method-M000003" class="method-detail">
251
+ <a name="M000003"></a>
252
+
253
+ <div class="method-heading">
254
+ <a href="#M000003" class="method-signature">
255
+ <span class="method-name">set</span><span class="method-args">( section )</span>
256
+ </a>
257
+ </div>
258
+
259
+ <div class="method-description">
260
+ <p><a class="source-toggle" href="#"
261
+ onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
262
+ <div class="method-source-code" id="M000003-source">
263
+ <pre>
264
+ <span class="ruby-comment cmt"># File lib/reap/tasks/package-task.rb, line 19</span>
265
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set</span>( <span class="ruby-identifier">section</span> )
266
+ <span class="ruby-ivar">@dir</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'dir'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'pkg'</span>
267
+
268
+ <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'name'</span>] <span class="ruby-operator">||</span> <span class="ruby-ivar">@config</span>[<span class="ruby-value str">'name'</span>]
269
+ <span class="ruby-ivar">@version</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'version'</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>
270
+ <span class="ruby-ivar">@package_name</span> = <span class="ruby-ivar">@name</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'--'</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@version</span>
271
+
272
+ <span class="ruby-ivar">@author</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'author'</span>] <span class="ruby-operator">||</span> <span class="ruby-ivar">@config</span>[<span class="ruby-value str">'author'</span>]
273
+ <span class="ruby-ivar">@email</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'email'</span>] <span class="ruby-operator">||</span> <span class="ruby-ivar">@config</span>[<span class="ruby-value str">'email'</span>]
274
+ <span class="ruby-ivar">@summary</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'summary'</span>] <span class="ruby-operator">||</span> <span class="ruby-ivar">@config</span>[<span class="ruby-value str">'summary'</span>]
275
+ <span class="ruby-ivar">@project</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'project'</span>] <span class="ruby-operator">||</span> <span class="ruby-ivar">@config</span>[<span class="ruby-value str">'rubyforge'</span>][<span class="ruby-value str">'project'</span>]
276
+ <span class="ruby-ivar">@homepage</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'homepage'</span>] <span class="ruby-operator">||</span> <span class="ruby-ivar">@config</span>[<span class="ruby-value str">'homepage'</span>] <span class="ruby-operator">||</span> <span class="ruby-ivar">@config</span>[<span class="ruby-value str">'rubyforge'</span>][<span class="ruby-value str">'homepage'</span>]
277
+
278
+ <span class="ruby-ivar">@include</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'include'</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">DEFAULT_INCLUDE</span>
279
+ <span class="ruby-ivar">@exclude</span> = <span class="ruby-constant">MUST_EXCLUDE</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">section</span>[<span class="ruby-value str">'exclude'</span>]
280
+
281
+ <span class="ruby-ivar">@zip</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'zip'</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">section</span>[<span class="ruby-value str">'zip'</span>]
282
+ <span class="ruby-ivar">@gzip</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'gzip'</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">section</span>[<span class="ruby-value str">'zip'</span>]
283
+ <span class="ruby-ivar">@bzip2</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'bzip2'</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">section</span>[<span class="ruby-value str">'zip'</span>]
284
+ <span class="ruby-ivar">@gem</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'gem'</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">section</span>[<span class="ruby-value str">'gem'</span>]
285
+
286
+ <span class="ruby-comment cmt"># gem specific</span>
287
+ <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>[<span class="ruby-value str">'platform'</span>]
288
+ <span class="ruby-ivar">@platform</span> = <span class="ruby-operator">::</span><span class="ruby-constant">Gem</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-identifier">section</span>[<span class="ruby-value str">'platform'</span>])
289
+ <span class="ruby-keyword kw">else</span>
290
+ <span class="ruby-ivar">@platform</span> = <span class="ruby-operator">::</span><span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Platform</span><span class="ruby-operator">::</span><span class="ruby-constant">RUBY</span>
291
+ <span class="ruby-keyword kw">end</span>
292
+ <span class="ruby-ivar">@autorequire</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'autorequire'</span>]
293
+ <span class="ruby-ivar">@requirements</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'requirements'</span>] <span class="ruby-operator">||</span> []
294
+ <span class="ruby-ivar">@dependencies</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'dependencies'</span>] <span class="ruby-operator">||</span> []
295
+ <span class="ruby-ivar">@executables</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">'executables'</span>] <span class="ruby-operator">||</span> []
296
+ <span class="ruby-keyword kw">end</span>
297
+ </pre>
298
+ </div>
299
+ </div>
300
+ </div>
301
+
302
+ <h3 class="section-bar">Private Instance methods</h3>
303
+
304
+ <div id="method-M000005" class="method-detail">
305
+ <a name="M000005"></a>
306
+
307
+ <div class="method-heading">
308
+ <a href="#M000005" class="method-signature">
309
+ <span class="method-name">run_gem</span><span class="method-args">()</span>
310
+ </a>
311
+ </div>
312
+
313
+ <div class="method-description">
314
+ <p><a class="source-toggle" href="#"
315
+ onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
316
+ <div class="method-source-code" id="M000005-source">
317
+ <pre>
318
+ <span class="ruby-comment cmt"># File lib/reap/tasks/package-task.rb, line 114</span>
319
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run_gem</span>
320
+ <span class="ruby-identifier">spec</span> = <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Specification</span>.<span class="ruby-identifier">new</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
321
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">name</span> = <span class="ruby-ivar">@name</span>
322
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">version</span> = <span class="ruby-ivar">@version</span>
323
+ <span class="ruby-ivar">@dependencies</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">d</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
324
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span>
325
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">add_dependency</span>(<span class="ruby-identifier">d</span>, <span class="ruby-identifier">v</span>)
326
+ <span class="ruby-keyword kw">else</span>
327
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">add_dependency</span>(<span class="ruby-identifier">d</span>)
328
+ <span class="ruby-keyword kw">end</span>
329
+ }
330
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">platform</span> = <span class="ruby-ivar">@platform</span>
331
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">summary</span> = <span class="ruby-ivar">@summary</span>
332
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">requirements</span> = <span class="ruby-ivar">@requirements</span>
333
+
334
+ <span class="ruby-comment cmt"># s.files = Dir.glob(&quot;lib/**/*&quot;).delete_if {|item| item.include?(&quot;CVS&quot;)}</span>
335
+ <span class="ruby-comment cmt"># s.files.concat Dir.glob(&quot;bin/**/*&quot;).delete_if {|item| item.include?(&quot;CVS&quot;)}</span>
336
+ <span class="ruby-identifier">package_files</span> = <span class="ruby-constant">FileList</span>.<span class="ruby-identifier">new</span>
337
+ <span class="ruby-identifier">package_files</span>.<span class="ruby-identifier">include</span>(<span class="ruby-operator">*</span><span class="ruby-ivar">@include</span>)
338
+ <span class="ruby-identifier">package_files</span>.<span class="ruby-identifier">exclude</span>(<span class="ruby-operator">*</span><span class="ruby-ivar">@exclude</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@exclude</span> <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@exclude</span>.<span class="ruby-identifier">empty?</span>
339
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">files</span> = <span class="ruby-identifier">package_files</span>.<span class="ruby-identifier">to_a</span>
340
+
341
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">require_path</span> = <span class="ruby-value str">'lib'</span>
342
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">autorequire</span> = <span class="ruby-ivar">@autorequire</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@autorequire</span>
343
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">author</span> = <span class="ruby-ivar">@author</span>
344
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">email</span> = <span class="ruby-ivar">@email</span>
345
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">rubyforge_project</span> = <span class="ruby-ivar">@project</span>
346
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">homepage</span> = <span class="ruby-ivar">@homepage</span>
347
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">executables</span> = <span class="ruby-ivar">@executables</span>
348
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">bindir</span> = <span class="ruby-value str">&quot;bin&quot;</span>
349
+ }
350
+ <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Reap is shelling out work to the Gem Package Manager...&quot;</span>
351
+ <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">manage_gems</span>
352
+ <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Builder</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">spec</span>).<span class="ruby-identifier">build</span>
353
+ <span class="ruby-identifier">sh</span> <span class="ruby-node">%{mv ./*.gem #{@dir}/}</span>
354
+ <span class="ruby-keyword kw">end</span>
355
+ </pre>
356
+ </div>
357
+ </div>
358
+ </div>
359
+
360
+
361
+ </div>
362
+
363
+
364
+ </div>
365
+
366
+
367
+ <div id="validator-badges">
368
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
369
+ </div>
370
+
371
+ </body>
372
+ </html>
@@ -0,0 +1,231 @@
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::PublishTask</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::PublishTask</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/reap/tasks/publish-task_rb.html">
59
+ lib/reap/tasks/publish-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="#M000020">desc</a>&nbsp;&nbsp;
92
+ <a href="#M000022">run</a>&nbsp;&nbsp;
93
+ <a href="#M000021">set</a>&nbsp;&nbsp;
94
+ <a href="#M000019">task</a>&nbsp;&nbsp;
95
+ </div>
96
+ </div>
97
+
98
+ </div>
99
+
100
+
101
+ <!-- if includes -->
102
+
103
+ <div id="section">
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+ <!-- if method_list -->
113
+ <div id="methods">
114
+ <h3 class="section-bar">Public Class methods</h3>
115
+
116
+ <div id="method-M000020" class="method-detail">
117
+ <a name="M000020"></a>
118
+
119
+ <div class="method-heading">
120
+ <a href="#M000020" class="method-signature">
121
+ <span class="method-name">desc</span><span class="method-args">()</span>
122
+ </a>
123
+ </div>
124
+
125
+ <div class="method-description">
126
+ <p><a class="source-toggle" href="#"
127
+ onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
128
+ <div class="method-source-code" id="M000020-source">
129
+ <pre>
130
+ <span class="ruby-comment cmt"># File lib/reap/tasks/publish-task.rb, line 8</span>
131
+ <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;Publish documents to the web.&quot;</span> ; <span class="ruby-keyword kw">end</span>
132
+ </pre>
133
+ </div>
134
+ </div>
135
+ </div>
136
+
137
+ <div id="method-M000019" class="method-detail">
138
+ <a name="M000019"></a>
139
+
140
+ <div class="method-heading">
141
+ <a href="#M000019" class="method-signature">
142
+ <span class="method-name">task</span><span class="method-args">()</span>
143
+ </a>
144
+ </div>
145
+
146
+ <div class="method-description">
147
+ <p><a class="source-toggle" href="#"
148
+ onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
149
+ <div class="method-source-code" id="M000019-source">
150
+ <pre>
151
+ <span class="ruby-comment cmt"># File lib/reap/tasks/publish-task.rb, line 6</span>
152
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">task</span> ; <span class="ruby-identifier">:publish</span> ; <span class="ruby-keyword kw">end</span>
153
+ </pre>
154
+ </div>
155
+ </div>
156
+ </div>
157
+
158
+ <h3 class="section-bar">Public Instance methods</h3>
159
+
160
+ <div id="method-M000022" class="method-detail">
161
+ <a name="M000022"></a>
162
+
163
+ <div class="method-heading">
164
+ <a href="#M000022" class="method-signature">
165
+ <span class="method-name">run</span><span class="method-args">()</span>
166
+ </a>
167
+ </div>
168
+
169
+ <div class="method-description">
170
+ <p><a class="source-toggle" href="#"
171
+ onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
172
+ <div class="method-source-code" id="M000022-source">
173
+ <pre>
174
+ <span class="ruby-comment cmt"># File lib/reap/tasks/publish-task.rb, line 18</span>
175
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>
176
+ <span class="ruby-comment cmt">#current_dir = Dir.pwd</span>
177
+ <span class="ruby-comment cmt">#Dir.chdir( @web_dir )</span>
178
+ <span class="ruby-comment cmt">#web_files = FileList.new</span>
179
+ <span class="ruby-comment cmt">#web_files.include('**/*')</span>
180
+ <span class="ruby-comment cmt">#web_files.exclude(*@web_exclude) if @web_exclude</span>
181
+ <span class="ruby-comment cmt">#web_files = '&quot;' &lt;&lt; web_files.join('&quot; &quot;') &lt;&lt; '&quot;'</span>
182
+ <span class="ruby-identifier">cmd</span> = <span class="ruby-node">&quot;scp -r #{@web_dir}/* #{@username}@rubyforge.org:/var/www/gforge-projects/#{@project}/&quot;</span>
183
+ <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;Reap is shelling out work to scp...&quot;</span>
184
+ <span class="ruby-identifier">puts</span> <span class="ruby-identifier">cmd</span>
185
+ <span class="ruby-identifier">sh</span>(<span class="ruby-identifier">cmd</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">$PRETEND</span>
186
+ <span class="ruby-comment cmt">#Dir.chdir( current_dir )</span>
187
+ <span class="ruby-keyword kw">end</span>
188
+ </pre>
189
+ </div>
190
+ </div>
191
+ </div>
192
+
193
+ <div id="method-M000021" class="method-detail">
194
+ <a name="M000021"></a>
195
+
196
+ <div class="method-heading">
197
+ <a href="#M000021" class="method-signature">
198
+ <span class="method-name">set</span><span class="method-args">( section )</span>
199
+ </a>
200
+ </div>
201
+
202
+ <div class="method-description">
203
+ <p><a class="source-toggle" href="#"
204
+ onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
205
+ <div class="method-source-code" id="M000021-source">
206
+ <pre>
207
+ <span class="ruby-comment cmt"># File lib/reap/tasks/publish-task.rb, line 11</span>
208
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set</span>( <span class="ruby-identifier">section</span> )
209
+ <span class="ruby-ivar">@web_dir</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">&quot;web_dir&quot;</span>]
210
+ <span class="ruby-ivar">@web_exclude</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">&quot;web_exclude&quot;</span>]
211
+ <span class="ruby-ivar">@project</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">&quot;project&quot;</span>]
212
+ <span class="ruby-ivar">@username</span> = <span class="ruby-identifier">section</span>[<span class="ruby-value str">&quot;username&quot;</span>]
213
+ <span class="ruby-keyword kw">end</span>
214
+ </pre>
215
+ </div>
216
+ </div>
217
+ </div>
218
+
219
+
220
+ </div>
221
+
222
+
223
+ </div>
224
+
225
+
226
+ <div id="validator-badges">
227
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
228
+ </div>
229
+
230
+ </body>
231
+ </html>