reap 0.5.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/ANN-0.6.1 +3 -0
- data/Rakefile +19 -0
- data/Reapfile +46 -33
- data/data/site_ruby/reap/template.yaml +94 -0
- data/lib/reap/announce-task.rb +159 -0
- data/lib/reap/chmod-task.rb +82 -0
- data/lib/reap/package-task.rb +165 -0
- data/lib/reap/publish-task.rb +53 -0
- data/lib/reap/rdoc-task.rb +70 -0
- data/lib/reap/reap-all.rb +15 -0
- data/lib/reap/task.rb +177 -118
- data/lib/reap/template-task.rb +40 -0
- data/lib/reap/test-task.rb +159 -0
- data/pub/www/Reapfile +99 -0
- data/pub/www/images/appleboy.jpg +0 -0
- data/pub/www/index.html +49 -5
- data/{doc/files/LICENSE.html → pub/www/rdoc/classes/Reap.html} +32 -33
- data/pub/www/rdoc/classes/Reap/AnnounceTask.html +154 -0
- data/pub/www/rdoc/classes/Reap/AnnounceTask.src/M000031.html +111 -0
- data/pub/www/rdoc/classes/Reap/AnnounceTask.src/M000032.html +46 -0
- data/pub/www/rdoc/classes/Reap/ChmodTask.html +220 -0
- data/pub/www/rdoc/classes/Reap/ChmodTask.src/M000015.html +21 -0
- data/pub/www/rdoc/classes/Reap/ChmodTask.src/M000016.html +21 -0
- data/pub/www/rdoc/classes/Reap/ChmodTask.src/M000017.html +42 -0
- data/pub/www/rdoc/classes/Reap/ChmodTask.src/M000018.html +26 -0
- data/pub/www/rdoc/classes/Reap/PackageTask.html +181 -0
- data/pub/www/rdoc/classes/Reap/PackageTask.src/M000001.html +49 -0
- data/pub/www/rdoc/classes/Reap/PackageTask.src/M000002.html +74 -0
- data/pub/www/rdoc/classes/Reap/PackageTask.src/M000003.html +51 -0
- data/pub/www/rdoc/classes/Reap/PublishTask.html +160 -0
- data/pub/www/rdoc/classes/Reap/PublishTask.src/M000019.html +24 -0
- data/pub/www/rdoc/classes/Reap/PublishTask.src/M000020.html +38 -0
- data/pub/www/rdoc/classes/Reap/RDocTask.html +220 -0
- data/pub/www/rdoc/classes/Reap/RDocTask.src/M000004.html +24 -0
- data/pub/www/rdoc/classes/Reap/RDocTask.src/M000005.html +21 -0
- data/pub/www/rdoc/classes/Reap/RDocTask.src/M000006.html +53 -0
- data/pub/www/rdoc/classes/Reap/Task.html +319 -0
- data/pub/www/rdoc/classes/Reap/Task.src/M000024.html +21 -0
- data/pub/www/rdoc/classes/Reap/Task.src/M000025.html +18 -0
- data/pub/www/rdoc/classes/Reap/Task.src/M000026.html +18 -0
- data/pub/www/rdoc/classes/Reap/Task.src/M000027.html +28 -0
- data/pub/www/rdoc/classes/Reap/Task.src/M000028.html +16 -0
- data/pub/www/rdoc/classes/Reap/Task.src/M000029.html +18 -0
- data/pub/www/rdoc/classes/Reap/Task.src/M000030.html +19 -0
- data/pub/www/rdoc/classes/Reap/TemplateTask.html +182 -0
- data/pub/www/rdoc/classes/Reap/TemplateTask.src/M000021.html +18 -0
- data/pub/www/rdoc/classes/Reap/TemplateTask.src/M000022.html +21 -0
- data/pub/www/rdoc/classes/Reap/TemplateTask.src/M000023.html +34 -0
- data/pub/www/rdoc/classes/Reap/TestTask.html +228 -0
- data/pub/www/rdoc/classes/Reap/TestTask.src/M000007.html +25 -0
- data/pub/www/rdoc/classes/Reap/TestTask.src/M000008.html +21 -0
- data/pub/www/rdoc/classes/Reap/TestTask.src/M000009.html +77 -0
- data/pub/www/rdoc/classes/Reap/TestTask.src/M000010.html +27 -0
- data/pub/www/rdoc/classes/Reap/TestTask.src/M000011.html +36 -0
- data/{doc → pub/www/rdoc}/classes/Reap/TestTask/TestResults.html +23 -55
- data/pub/www/rdoc/classes/Reap/TestTask/TestResults.src/M000012.html +21 -0
- data/pub/www/rdoc/classes/Reap/TestTask/TestResults.src/M000013.html +21 -0
- data/pub/www/rdoc/classes/Reap/TestTask/TestResults.src/M000014.html +23 -0
- data/pub/www/rdoc/created.rid +1 -0
- data/{doc/files/lib/reap/tasks → pub/www/rdoc/files/lib/reap2}/announce-task_rb.html +3 -3
- data/{doc/files/lib/reap/task_rb.html → pub/www/rdoc/files/lib/reap2/chmod-task_rb.html} +5 -5
- data/pub/www/{doc/files/lib/reap/tasks → rdoc/files/lib/reap2}/package-task_rb.html +3 -3
- data/pub/www/{doc/files/lib/reap/template_rb.html → rdoc/files/lib/reap2/publish-task_rb.html} +10 -4
- data/pub/www/{doc/files/lib/reap/task_rb.html → rdoc/files/lib/reap2/rdoc-task_rb.html} +5 -5
- data/pub/www/{doc/files/lib/reap/reap_rb.html → rdoc/files/lib/reap2/reap-all_rb.html} +7 -7
- data/{doc/files/lib/reap/runner_rb.html → pub/www/rdoc/files/lib/reap2/task_rb.html} +7 -8
- data/pub/www/{doc/files/lib/reap/tasks → rdoc/files/lib/reap2}/template-task_rb.html +4 -4
- data/{doc/files/lib/reap/tasks → pub/www/rdoc/files/lib/reap2}/test-task_rb.html +10 -4
- data/{doc → pub/www/rdoc}/fr_class_index.html +0 -1
- data/pub/www/rdoc/fr_file_index.html +35 -0
- data/pub/www/rdoc/fr_method_index.html +58 -0
- data/{doc → pub/www/rdoc}/index.html +1 -1
- data/{doc → pub/www/rdoc}/rdoc-style.css +0 -0
- data/test/tc_reap.rb +11 -0
- metadata +98 -112
- data/bin/reap +0 -103
- data/doc/classes/Reap.html +0 -184
- data/doc/classes/Reap/AnnounceTask.html +0 -339
- data/doc/classes/Reap/ChmodTask.html +0 -277
- data/doc/classes/Reap/PackageTask.html +0 -374
- data/doc/classes/Reap/PublishTask.html +0 -237
- data/doc/classes/Reap/RDocTask.html +0 -254
- data/doc/classes/Reap/Runner.html +0 -299
- data/doc/classes/Reap/Task.html +0 -438
- data/doc/classes/Reap/TemplateTask.html +0 -226
- data/doc/classes/Reap/TestTask.html +0 -354
- data/doc/created.rid +0 -1
- data/doc/files/README.html +0 -194
- data/doc/files/lib/reap/reap_rb.html +0 -111
- data/doc/files/lib/reap/tasks/chmod-task_rb.html +0 -101
- data/doc/files/lib/reap/tasks/package-task_rb.html +0 -108
- data/doc/files/lib/reap/tasks/publish-task_rb.html +0 -101
- data/doc/files/lib/reap/tasks/rdoc-task_rb.html +0 -101
- data/doc/files/lib/reap/tasks/template-task_rb.html +0 -109
- data/doc/fr_file_index.html +0 -38
- data/doc/fr_method_index.html +0 -73
- data/lib/reap/reap.rb +0 -13
- data/lib/reap/runner.rb +0 -90
- data/lib/reap/tasks/announce-task.rb +0 -149
- data/lib/reap/tasks/chmod-task.rb +0 -69
- data/lib/reap/tasks/package-task.rb +0 -157
- data/lib/reap/tasks/publish-task.rb +0 -39
- data/lib/reap/tasks/rdoc-task.rb +0 -55
- data/lib/reap/tasks/template-task.rb +0 -39
- data/lib/reap/tasks/test-task.rb +0 -140
- data/pub/www/doc/classes/Reap.html +0 -184
- data/pub/www/doc/classes/Reap/AnnounceTask.html +0 -331
- data/pub/www/doc/classes/Reap/ChmodTask.html +0 -278
- data/pub/www/doc/classes/Reap/PackageTask.html +0 -372
- data/pub/www/doc/classes/Reap/PublishTask.html +0 -231
- data/pub/www/doc/classes/Reap/RDocTask.html +0 -254
- data/pub/www/doc/classes/Reap/Runner.html +0 -307
- data/pub/www/doc/classes/Reap/Task.html +0 -390
- data/pub/www/doc/classes/Reap/TemplateTask.html +0 -233
- data/pub/www/doc/classes/Reap/TestTask.html +0 -242
- data/pub/www/doc/created.rid +0 -1
- data/pub/www/doc/files/LICENSE.html +0 -119
- data/pub/www/doc/files/README.html +0 -194
- data/pub/www/doc/files/lib/reap/runner_rb.html +0 -113
- data/pub/www/doc/files/lib/reap/tasks/announce-task_rb.html +0 -113
- data/pub/www/doc/files/lib/reap/tasks/chmod-task_rb.html +0 -101
- data/pub/www/doc/files/lib/reap/tasks/publish-task_rb.html +0 -101
- data/pub/www/doc/files/lib/reap/tasks/rdoc-task_rb.html +0 -101
- data/pub/www/doc/files/lib/reap/tasks/test-task_rb.html +0 -101
- data/pub/www/doc/fr_class_index.html +0 -36
- data/pub/www/doc/fr_file_index.html +0 -39
- data/pub/www/doc/fr_method_index.html +0 -69
- data/pub/www/doc/index.html +0 -24
- data/pub/www/doc/rdoc-style.css +0 -208
- data/test/tc_require.rb +0 -11
@@ -1,278 +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::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>
|
92
|
-
<a href="#M000015">desc</a>
|
93
|
-
<a href="#M000017">run</a>
|
94
|
-
<a href="#M000016">set</a>
|
95
|
-
<a href="#M000014">task</a>
|
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">"Change the permissions of package files."</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">"Reap is shelling out work to chmod..."</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 "USER and GROUP are required CHMOD fields." 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">'"'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">files</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'" "'</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">'"'</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">'"'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">dirs</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'" "'</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">'"'</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>
|
@@ -1,372 +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::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>
|
102
|
-
<a href="#M000004">run</a>
|
103
|
-
<a href="#M000005">run_gem</a>
|
104
|
-
<a href="#M000003">set</a>
|
105
|
-
<a href="#M000001">task</a>
|
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">"Build standard .tar.gz, .tar.bzip2 and .zip packages."</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">"Directory '#{@dir}' already exists. Clobber? [y/N] "</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">"Removing old directory '#{File.expand_path(@dir)}'..."</span>
|
193
|
-
<span class="ruby-identifier">trash_dir</span> = <span class="ruby-node">".trash/#{File.basename(@dir)}"</span>
|
194
|
-
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-value str">".trash"</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">".trash"</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">"Reap package task canceled."</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">"#{@dir}/#{@package_name}"</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">"\nReap is shelling out work to tar and bzip2..."</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">"\nReap is shelling out work to tar and gzip..."</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">"\nReap is shelling out work to zip..."</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("lib/**/*").delete_if {|item| item.include?("CVS")}</span>
|
335
|
-
<span class="ruby-comment cmt"># s.files.concat Dir.glob("bin/**/*").delete_if {|item| item.include?("CVS")}</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">"bin"</span>
|
349
|
-
}
|
350
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-value str">"Reap is shelling out work to the Gem Package Manager..."</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>
|