ratch 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/{log/history → CHANGES} +0 -0
- data/{log/todo → TODO} +0 -0
- data/bin/manifest +451 -0
- data/bin/ratch +3 -3
- data/demo/task/config.yaml +4 -0
- data/lib/ratch/{batch/argvutils.rb → dsl/argv.rb} +9 -4
- data/lib/ratch/dsl/batch.rb +226 -0
- data/lib/ratch/{batch → dsl}/build.rb +83 -4
- data/lib/ratch/{batch/consoleutils.rb → dsl/console.rb} +13 -5
- data/lib/ratch/{batch/emailutils.rb → dsl/email.rb} +21 -25
- data/lib/ratch/{batch/fileutils.rb → dsl/file.rb} +56 -56
- data/lib/ratch/dsl/meta.rb +132 -0
- data/lib/ratch/{batch → dsl}/options.rb +7 -5
- data/lib/ratch/dsl/setup.rb +124 -0
- data/lib/ratch/{support/signiture.rb → dsl/sign.rb} +9 -18
- data/lib/ratch/dsl/stage.rb +147 -0
- data/lib/ratch/dsl/task.rb +139 -0
- data/lib/ratch/{uploadutils.rb → dsl/upload.rb} +7 -5
- data/lib/ratch/{batch/task.rb → dsl/zip.rb} +30 -14
- data/lib/ratch/dsl.rb +52 -0
- data/lib/ratch/extra/email.rb +5 -0
- data/lib/ratch/extra/stage.rb +5 -0
- data/lib/ratch/extra/zip.rb +5 -0
- data/lib/ratch/manifest.rb +540 -0
- data/lib/ratch/{project → metadata}/information.rb +1 -0
- data/lib/ratch/{project → metadata}/package.rb +28 -2
- data/lib/ratch/{project → metadata}/project.rb +8 -16
- data/lib/ratch/{project → metadata}/release.rb +6 -6
- data/lib/ratch/support/errors.rb +4 -0
- data/lib/ratch/support/filename.rb +18 -0
- data/lib/ratch/toolset/ruby/compile +49 -0
- data/lib/ratch/toolset/ruby/pack/gem +26 -18
- data/lib/ratch/toolset/ruby/pack/tgz +25 -64
- data/lib/ratch/toolset/ruby/pack/zip +46 -0
- data/lib/ratch/toolset/ruby/publish +23 -24
- data/lib/ratch/toolset/ruby/release +8 -0
- data/lib/ratch/toolset/ruby/stamp +33 -0
- data/lib/ratch/toolset/sandbox +11 -0
- data/meta/MANIFEST +101 -23
- data/meta/ROLLRC +1 -1
- data/meta/config.yaml +10 -0
- data/meta/icli.yaml +2 -2
- data/meta/project.yaml +9 -10
- data/meta/xProjectInfo +41 -0
- data/task/release +1 -4
- metadata +82 -156
- data/demo/task/rdoc +0 -88
- data/demo/task/rdoc-old +0 -182
- data/doc/images/clipboard.jpg +0 -0
- data/doc/images/clipboard2.png +0 -0
- data/doc/images/milles-tn.jpg +0 -0
- data/doc/images/mints.png +0 -0
- data/doc/images/ratch2.png +0 -0
- data/doc/images/ruby-sm.png +0 -0
- data/doc/images/silver.gif +0 -0
- data/doc/images/toolbox.jpg +0 -0
- data/doc/index.html +0 -181
- data/doc/notes/original.rb +0 -308
- data/doc/rdoc/classes/Array.html +0 -194
- data/doc/rdoc/classes/Dir.html +0 -317
- data/doc/rdoc/classes/Hash.html +0 -217
- data/doc/rdoc/classes/Ratch/ArgvUtils/Ext.html +0 -285
- data/doc/rdoc/classes/Ratch/ArgvUtils.html +0 -173
- data/doc/rdoc/classes/Ratch/BatchFile.html +0 -207
- data/doc/rdoc/classes/Ratch/BatchManager.html +0 -250
- data/doc/rdoc/classes/Ratch/BatchScript.html +0 -127
- data/doc/rdoc/classes/Ratch/Batchable.html +0 -373
- data/doc/rdoc/classes/Ratch/Build.html +0 -321
- data/doc/rdoc/classes/Ratch/BuildManager.html +0 -319
- data/doc/rdoc/classes/Ratch/Buildable.html +0 -202
- data/doc/rdoc/classes/Ratch/ConfigUtils.html +0 -281
- data/doc/rdoc/classes/Ratch/ConsoleUtils.html +0 -189
- data/doc/rdoc/classes/Ratch/EmailUtils.html +0 -209
- data/doc/rdoc/classes/Ratch/FileUtils.html +0 -674
- data/doc/rdoc/classes/Ratch/GeneralOptions.html +0 -430
- data/doc/rdoc/classes/Ratch/Task.html +0 -201
- data/doc/rdoc/classes/Ratch/TaskManager.html +0 -330
- data/doc/rdoc/classes/Ratch/Taskable.html +0 -231
- data/doc/rdoc/classes/Ratch/UploadUtils.html +0 -566
- data/doc/rdoc/classes/Ratch.html +0 -201
- data/doc/rdoc/created.rid +0 -1
- data/doc/rdoc/files/COPYING.html +0 -1003
- data/doc/rdoc/files/README.html +0 -143
- data/doc/rdoc/files/lib/ratch/argvutils_rb.html +0 -131
- data/doc/rdoc/files/lib/ratch/batch_rb.html +0 -155
- data/doc/rdoc/files/lib/ratch/batchable_rb.html +0 -131
- data/doc/rdoc/files/lib/ratch/batchfile_rb.html +0 -148
- data/doc/rdoc/files/lib/ratch/buildable_rb.html +0 -131
- data/doc/rdoc/files/lib/ratch/consoleutils_rb.html +0 -131
- data/doc/rdoc/files/lib/ratch/emailutils_rb.html +0 -139
- data/doc/rdoc/files/lib/ratch/facets/multiglob_rb.html +0 -137
- data/doc/rdoc/files/lib/ratch/fileutils_rb.html +0 -139
- data/doc/rdoc/files/lib/ratch/options_rb.html +0 -131
- data/doc/rdoc/files/lib/ratch/taskable_rb.html +0 -131
- data/doc/rdoc/files/lib/ratch/uploadutils_rb.html +0 -150
- data/doc/rdoc/fr_class_index.html +0 -48
- data/doc/rdoc/fr_file_index.html +0 -41
- data/doc/rdoc/fr_method_index.html +0 -133
- data/doc/rdoc/index.html +0 -24
- data/doc/rdoc/rdoc-style.css +0 -208
- data/doc/scrap/flexihead-flip.jpg +0 -0
- data/doc/scrap/flexihead.jpg +0 -0
- data/doc/scrap/head1.jpg +0 -0
- data/doc/scrap/ratch.jpg +0 -0
- data/doc/scrap/ratch1.png +0 -0
- data/doc/scrap/ratch2.jpg +0 -0
- data/doc/scrap/ratch3.png +0 -0
- data/doc/scrap/red-ratch.jpg +0 -0
- data/doc/scrap/redratchet.jpg +0 -0
- data/doc/scrap/ruby-kit/ruby.png +0 -0
- data/doc/scrap/scrap.red +0 -256
- data/doc/sitemap.yaml +0 -10
- data/doc/siteparts/index.red +0 -100
- data/doc/siteparts/layout.rhtml +0 -56
- data/doc/siteparts/tutorial.red +0 -578
- data/doc/style.css +0 -112
- data/doc/tutorial.html +0 -722
- data/lib/ratch/batch.rb +0 -488
- data/lib/ratch/support/setuputils.rb +0 -124
- data/lib/ratch/support/stage.rb +0 -292
- data/lib/ratch/toolset/ruby/rdoc +0 -88
- data/task/rdoc +0 -6
- data/work/old/batchfile.rb +0 -95
- data/work/project-old.rb +0 -67
- data/work/scrap/install +0 -89
- data/work/scrap/install.0 +0 -49
- data/work/scrap/install.1 +0 -63
- data/work/scrap/ludo +0 -25
- data/work/scrap/oldtaskable.rb +0 -573
- data/work/scrap/ratch.man +0 -39
- data/work/scrap/taskable-simple.rb +0 -42
- data/work/scrap/taskable.rb +0 -120
@@ -1,321 +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: Ratch::Build</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">Ratch::Build</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/ratch/buildable_rb.html">
|
59
|
-
lib/ratch/buildable.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
Object
|
69
|
-
</td>
|
70
|
-
</tr>
|
71
|
-
</table>
|
72
|
-
</div>
|
73
|
-
<!-- banner header -->
|
74
|
-
|
75
|
-
<div id="bodyContent">
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
<div id="contextContent">
|
80
|
-
|
81
|
-
<div id="description">
|
82
|
-
<h1><a href="Build.html">Build</a> class</h1>
|
83
|
-
|
84
|
-
</div>
|
85
|
-
|
86
|
-
|
87
|
-
</div>
|
88
|
-
|
89
|
-
<div id="method-list">
|
90
|
-
<h3 class="section-bar">Methods</h3>
|
91
|
-
|
92
|
-
<div class="name-list">
|
93
|
-
<a href="#M000100">call</a>
|
94
|
-
<a href="#M000101">match?</a>
|
95
|
-
<a href="#M000102">needed_for?</a>
|
96
|
-
<a href="#M000103">needed_paths</a>
|
97
|
-
<a href="#M000099">new</a>
|
98
|
-
</div>
|
99
|
-
</div>
|
100
|
-
|
101
|
-
</div>
|
102
|
-
|
103
|
-
|
104
|
-
<!-- if includes -->
|
105
|
-
|
106
|
-
<div id="section">
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
<div id="aliases-list">
|
111
|
-
<h3 class="section-bar">External Aliases</h3>
|
112
|
-
|
113
|
-
<div class="name-list">
|
114
|
-
<table summary="aliases">
|
115
|
-
<tr class="top-aligned-row context-row">
|
116
|
-
<td class="context-item-name">match</td>
|
117
|
-
<td>-></td>
|
118
|
-
<td class="context-item-value">name</td>
|
119
|
-
</tr>
|
120
|
-
</table>
|
121
|
-
</div>
|
122
|
-
</div>
|
123
|
-
|
124
|
-
|
125
|
-
<div id="attribute-list">
|
126
|
-
<h3 class="section-bar">Attributes</h3>
|
127
|
-
|
128
|
-
<div class="name-list">
|
129
|
-
<table>
|
130
|
-
<tr class="top-aligned-row context-row">
|
131
|
-
<td class="context-item-name">action</td>
|
132
|
-
<td class="context-item-value"> [R] </td>
|
133
|
-
<td class="context-item-desc"></td>
|
134
|
-
</tr>
|
135
|
-
<tr class="top-aligned-row context-row">
|
136
|
-
<td class="context-item-name">match</td>
|
137
|
-
<td class="context-item-value"> [R] </td>
|
138
|
-
<td class="context-item-desc"></td>
|
139
|
-
</tr>
|
140
|
-
<tr class="top-aligned-row context-row">
|
141
|
-
<td class="context-item-name">needs</td>
|
142
|
-
<td class="context-item-value"> [R] </td>
|
143
|
-
<td class="context-item-desc"></td>
|
144
|
-
</tr>
|
145
|
-
</table>
|
146
|
-
</div>
|
147
|
-
</div>
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
<!-- if method_list -->
|
152
|
-
<div id="methods">
|
153
|
-
<h3 class="section-bar">Public Class methods</h3>
|
154
|
-
|
155
|
-
<div id="method-M000099" class="method-detail">
|
156
|
-
<a name="M000099"></a>
|
157
|
-
|
158
|
-
<div class="method-heading">
|
159
|
-
<a href="#M000099" class="method-signature">
|
160
|
-
<span class="method-name">new</span><span class="method-args">(match, *needs, &action)</span>
|
161
|
-
</a>
|
162
|
-
</div>
|
163
|
-
|
164
|
-
<div class="method-description">
|
165
|
-
<p>
|
166
|
-
Create a <a href="Build.html#M000099">new</a> build definition.
|
167
|
-
</p>
|
168
|
-
<p><a class="source-toggle" href="#"
|
169
|
-
onclick="toggleCode('M000099-source');return false;">[Source]</a></p>
|
170
|
-
<div class="method-source-code" id="M000099-source">
|
171
|
-
<pre>
|
172
|
-
<span class="ruby-comment cmt"># File lib/ratch/buildable.rb, line 131</span>
|
173
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">match</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">needs</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">action</span>)
|
174
|
-
<span class="ruby-ivar">@match</span> = <span class="ruby-identifier">match</span>
|
175
|
-
<span class="ruby-ivar">@needs</span> = <span class="ruby-identifier">needs</span>
|
176
|
-
<span class="ruby-ivar">@action</span> = <span class="ruby-identifier">action</span>
|
177
|
-
<span class="ruby-keyword kw">end</span>
|
178
|
-
</pre>
|
179
|
-
</div>
|
180
|
-
</div>
|
181
|
-
</div>
|
182
|
-
|
183
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
184
|
-
|
185
|
-
<div id="method-M000100" class="method-detail">
|
186
|
-
<a name="M000100"></a>
|
187
|
-
|
188
|
-
<div class="method-heading">
|
189
|
-
<a href="#M000100" class="method-signature">
|
190
|
-
<span class="method-name">call</span><span class="method-args">(path)</span>
|
191
|
-
</a>
|
192
|
-
</div>
|
193
|
-
|
194
|
-
<div class="method-description">
|
195
|
-
<p>
|
196
|
-
Call this build process for the given path.
|
197
|
-
</p>
|
198
|
-
<p><a class="source-toggle" href="#"
|
199
|
-
onclick="toggleCode('M000100-source');return false;">[Source]</a></p>
|
200
|
-
<div class="method-source-code" id="M000100-source">
|
201
|
-
<pre>
|
202
|
-
<span class="ruby-comment cmt"># File lib/ratch/buildable.rb, line 139</span>
|
203
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call</span>(<span class="ruby-identifier">path</span>)
|
204
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">path</span>)
|
205
|
-
<span class="ruby-identifier">mtime</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">mtime</span>(<span class="ruby-identifier">path</span>)
|
206
|
-
<span class="ruby-identifier">dated</span> = <span class="ruby-identifier">needs</span>.<span class="ruby-identifier">find</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
|
207
|
-
<span class="ruby-operator">!</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">file</span>) <span class="ruby-operator">||</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">mtime</span>(<span class="ruby-identifier">file</span>) <span class="ruby-operator">></span> <span class="ruby-identifier">mtime</span>
|
208
|
-
<span class="ruby-keyword kw">end</span>
|
209
|
-
<span class="ruby-keyword kw">else</span>
|
210
|
-
<span class="ruby-identifier">dated</span> = <span class="ruby-keyword kw">true</span>
|
211
|
-
<span class="ruby-keyword kw">end</span>
|
212
|
-
<span class="ruby-identifier">action</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">path</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dated</span>
|
213
|
-
<span class="ruby-keyword kw">end</span>
|
214
|
-
</pre>
|
215
|
-
</div>
|
216
|
-
</div>
|
217
|
-
</div>
|
218
|
-
|
219
|
-
<div id="method-M000101" class="method-detail">
|
220
|
-
<a name="M000101"></a>
|
221
|
-
|
222
|
-
<div class="method-heading">
|
223
|
-
<a href="#M000101" class="method-signature">
|
224
|
-
<span class="method-name">match?</span><span class="method-args">(path)</span>
|
225
|
-
</a>
|
226
|
-
</div>
|
227
|
-
|
228
|
-
<div class="method-description">
|
229
|
-
<p>
|
230
|
-
Does a file match this build definition?
|
231
|
-
</p>
|
232
|
-
<p><a class="source-toggle" href="#"
|
233
|
-
onclick="toggleCode('M000101-source');return false;">[Source]</a></p>
|
234
|
-
<div class="method-source-code" id="M000101-source">
|
235
|
-
<pre>
|
236
|
-
<span class="ruby-comment cmt"># File lib/ratch/buildable.rb, line 153</span>
|
237
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">match?</span>(<span class="ruby-identifier">path</span>)
|
238
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">match</span>
|
239
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">String</span>
|
240
|
-
<span class="ruby-constant">File</span>.<span class="ruby-identifier">fnmatch</span>(<span class="ruby-identifier">match</span>, <span class="ruby-identifier">path</span>)
|
241
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">Regexp</span>
|
242
|
-
<span class="ruby-identifier">match</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">path</span>
|
243
|
-
<span class="ruby-keyword kw">else</span>
|
244
|
-
<span class="ruby-keyword kw">false</span> <span class="ruby-comment cmt"># ???</span>
|
245
|
-
<span class="ruby-keyword kw">end</span>
|
246
|
-
<span class="ruby-keyword kw">end</span>
|
247
|
-
</pre>
|
248
|
-
</div>
|
249
|
-
</div>
|
250
|
-
</div>
|
251
|
-
|
252
|
-
<div id="method-M000102" class="method-detail">
|
253
|
-
<a name="M000102"></a>
|
254
|
-
|
255
|
-
<div class="method-heading">
|
256
|
-
<a href="#M000102" class="method-signature">
|
257
|
-
<span class="method-name">needed_for?</span><span class="method-args">(path)</span>
|
258
|
-
</a>
|
259
|
-
</div>
|
260
|
-
|
261
|
-
<div class="method-description">
|
262
|
-
<p>
|
263
|
-
Is this build needed to update/create path?
|
264
|
-
</p>
|
265
|
-
<p><a class="source-toggle" href="#"
|
266
|
-
onclick="toggleCode('M000102-source');return false;">[Source]</a></p>
|
267
|
-
<div class="method-source-code" id="M000102-source">
|
268
|
-
<pre>
|
269
|
-
<span class="ruby-comment cmt"># File lib/ratch/buildable.rb, line 166</span>
|
270
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">needed_for?</span>(<span class="ruby-identifier">path</span>)
|
271
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">path</span>)
|
272
|
-
<span class="ruby-identifier">mtimes</span> = <span class="ruby-identifier">needed_paths</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">mtime</span>(<span class="ruby-identifier">f</span>)}
|
273
|
-
<span class="ruby-identifier">mtimes</span>.<span class="ruby-identifier">max</span> <span class="ruby-operator">></span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">mtime</span>(<span class="ruby-identifier">path</span>)
|
274
|
-
<span class="ruby-keyword kw">end</span>
|
275
|
-
</pre>
|
276
|
-
</div>
|
277
|
-
</div>
|
278
|
-
</div>
|
279
|
-
|
280
|
-
<div id="method-M000103" class="method-detail">
|
281
|
-
<a name="M000103"></a>
|
282
|
-
|
283
|
-
<div class="method-heading">
|
284
|
-
<a href="#M000103" class="method-signature">
|
285
|
-
<span class="method-name">needed_paths</span><span class="method-args">()</span>
|
286
|
-
</a>
|
287
|
-
</div>
|
288
|
-
|
289
|
-
<div class="method-description">
|
290
|
-
<p>
|
291
|
-
Glob expanded needs.
|
292
|
-
</p>
|
293
|
-
<p><a class="source-toggle" href="#"
|
294
|
-
onclick="toggleCode('M000103-source');return false;">[Source]</a></p>
|
295
|
-
<div class="method-source-code" id="M000103-source">
|
296
|
-
<pre>
|
297
|
-
<span class="ruby-comment cmt"># File lib/ratch/buildable.rb, line 174</span>
|
298
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">needed_paths</span>
|
299
|
-
<span class="ruby-comment cmt">#exact = needs.select{|n| File.fnmatch?(n,n)} +</span>
|
300
|
-
<span class="ruby-identifier">exact</span> = <span class="ruby-identifier">needs</span>.<span class="ruby-identifier">select</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/[\[*?]/</span> }
|
301
|
-
<span class="ruby-identifier">globs</span> = <span class="ruby-identifier">needs</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span> <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>(<span class="ruby-identifier">n</span>)}.<span class="ruby-identifier">flatten</span>
|
302
|
-
(<span class="ruby-identifier">exact</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">globs</span>).<span class="ruby-identifier">uniq</span>
|
303
|
-
<span class="ruby-keyword kw">end</span>
|
304
|
-
</pre>
|
305
|
-
</div>
|
306
|
-
</div>
|
307
|
-
</div>
|
308
|
-
|
309
|
-
|
310
|
-
</div>
|
311
|
-
|
312
|
-
|
313
|
-
</div>
|
314
|
-
|
315
|
-
|
316
|
-
<div id="validator-badges">
|
317
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
318
|
-
</div>
|
319
|
-
|
320
|
-
</body>
|
321
|
-
</html>
|
@@ -1,319 +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: Ratch::BuildManager</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">Ratch::BuildManager</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/ratch/buildable_rb.html">
|
59
|
-
lib/ratch/buildable.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
Object
|
69
|
-
</td>
|
70
|
-
</tr>
|
71
|
-
</table>
|
72
|
-
</div>
|
73
|
-
<!-- banner header -->
|
74
|
-
|
75
|
-
<div id="bodyContent">
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
<div id="contextContent">
|
80
|
-
|
81
|
-
<div id="description">
|
82
|
-
<h1><a href="BuildManager.html">BuildManager</a> class</h1>
|
83
|
-
|
84
|
-
</div>
|
85
|
-
|
86
|
-
|
87
|
-
</div>
|
88
|
-
|
89
|
-
<div id="method-list">
|
90
|
-
<h3 class="section-bar">Methods</h3>
|
91
|
-
|
92
|
-
<div class="name-list">
|
93
|
-
<a href="#M000094">call</a>
|
94
|
-
<a href="#M000093">define_file</a>
|
95
|
-
<a href="#M000095">find</a>
|
96
|
-
<a href="#M000092">force?</a>
|
97
|
-
<a href="#M000091">new</a>
|
98
|
-
<a href="#M000096">plan</a>
|
99
|
-
</div>
|
100
|
-
</div>
|
101
|
-
|
102
|
-
</div>
|
103
|
-
|
104
|
-
|
105
|
-
<!-- if includes -->
|
106
|
-
|
107
|
-
<div id="section">
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
<div id="attribute-list">
|
114
|
-
<h3 class="section-bar">Attributes</h3>
|
115
|
-
|
116
|
-
<div class="name-list">
|
117
|
-
<table>
|
118
|
-
<tr class="top-aligned-row context-row">
|
119
|
-
<td class="context-item-name">builds</td>
|
120
|
-
<td class="context-item-value"> [R] </td>
|
121
|
-
<td class="context-item-desc"></td>
|
122
|
-
</tr>
|
123
|
-
</table>
|
124
|
-
</div>
|
125
|
-
</div>
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
<!-- if method_list -->
|
130
|
-
<div id="methods">
|
131
|
-
<h3 class="section-bar">Public Class methods</h3>
|
132
|
-
|
133
|
-
<div id="method-M000091" class="method-detail">
|
134
|
-
<a name="M000091"></a>
|
135
|
-
|
136
|
-
<div class="method-heading">
|
137
|
-
<a href="#M000091" class="method-signature">
|
138
|
-
<span class="method-name">new</span><span class="method-args">(runspace)</span>
|
139
|
-
</a>
|
140
|
-
</div>
|
141
|
-
|
142
|
-
<div class="method-description">
|
143
|
-
<p><a class="source-toggle" href="#"
|
144
|
-
onclick="toggleCode('M000091-source');return false;">[Source]</a></p>
|
145
|
-
<div class="method-source-code" id="M000091-source">
|
146
|
-
<pre>
|
147
|
-
<span class="ruby-comment cmt"># File lib/ratch/buildable.rb, line 66</span>
|
148
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">runspace</span>)
|
149
|
-
<span class="ruby-ivar">@runspace</span> = <span class="ruby-identifier">runspace</span>
|
150
|
-
<span class="ruby-ivar">@builds</span> = []
|
151
|
-
<span class="ruby-keyword kw">end</span>
|
152
|
-
</pre>
|
153
|
-
</div>
|
154
|
-
</div>
|
155
|
-
</div>
|
156
|
-
|
157
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
158
|
-
|
159
|
-
<div id="method-M000094" class="method-detail">
|
160
|
-
<a name="M000094"></a>
|
161
|
-
|
162
|
-
<div class="method-heading">
|
163
|
-
<a href="#M000094" class="method-signature">
|
164
|
-
<span class="method-name">call</span><span class="method-args">(path)</span>
|
165
|
-
</a>
|
166
|
-
</div>
|
167
|
-
|
168
|
-
<div class="method-description">
|
169
|
-
<p>
|
170
|
-
Call build.
|
171
|
-
</p>
|
172
|
-
<p><a class="source-toggle" href="#"
|
173
|
-
onclick="toggleCode('M000094-source');return false;">[Source]</a></p>
|
174
|
-
<div class="method-source-code" id="M000094-source">
|
175
|
-
<pre>
|
176
|
-
<span class="ruby-comment cmt"># File lib/ratch/buildable.rb, line 80</span>
|
177
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call</span>(<span class="ruby-identifier">path</span>)
|
178
|
-
<span class="ruby-comment cmt"># TODO How to handle more than one matching means of building?</span>
|
179
|
-
<span class="ruby-comment cmt">#warn "More than one build definition matches #{path} using #{means.first}" if means.size > 1</span>
|
180
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">build</span> = <span class="ruby-identifier">find</span>(<span class="ruby-identifier">path</span>)
|
181
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">build</span>.<span class="ruby-identifier">needed_for?</span>(<span class="ruby-identifier">path</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">force?</span>
|
182
|
-
<span class="ruby-identifier">list</span>, <span class="ruby-identifier">todo</span> = <span class="ruby-operator">*</span><span class="ruby-identifier">plan</span>(<span class="ruby-identifier">build</span>, <span class="ruby-identifier">path</span>)
|
183
|
-
<span class="ruby-identifier">todo</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">bld</span>, <span class="ruby-identifier">pth</span><span class="ruby-operator">|</span> <span class="ruby-identifier">bld</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">pth</span>) } <span class="ruby-comment cmt">#@builds[name].call }</span>
|
184
|
-
<span class="ruby-identifier">build</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">path</span>)
|
185
|
-
<span class="ruby-keyword kw">end</span>
|
186
|
-
<span class="ruby-keyword kw">else</span>
|
187
|
-
<span class="ruby-identifier">raise</span>
|
188
|
-
<span class="ruby-keyword kw">end</span>
|
189
|
-
<span class="ruby-keyword kw">end</span>
|
190
|
-
</pre>
|
191
|
-
</div>
|
192
|
-
</div>
|
193
|
-
</div>
|
194
|
-
|
195
|
-
<div id="method-M000093" class="method-detail">
|
196
|
-
<a name="M000093"></a>
|
197
|
-
|
198
|
-
<div class="method-heading">
|
199
|
-
<a href="#M000093" class="method-signature">
|
200
|
-
<span class="method-name">define_file</span><span class="method-args">(name, *depend, &block)</span>
|
201
|
-
</a>
|
202
|
-
</div>
|
203
|
-
|
204
|
-
<div class="method-description">
|
205
|
-
<p>
|
206
|
-
Define a file build task.
|
207
|
-
</p>
|
208
|
-
<p><a class="source-toggle" href="#"
|
209
|
-
onclick="toggleCode('M000093-source');return false;">[Source]</a></p>
|
210
|
-
<div class="method-source-code" id="M000093-source">
|
211
|
-
<pre>
|
212
|
-
<span class="ruby-comment cmt"># File lib/ratch/buildable.rb, line 74</span>
|
213
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">define_file</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">depend</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
214
|
-
<span class="ruby-identifier">build</span> = <span class="ruby-constant">Build</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">depend</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
215
|
-
<span class="ruby-identifier">builds</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">build</span>
|
216
|
-
<span class="ruby-keyword kw">end</span>
|
217
|
-
</pre>
|
218
|
-
</div>
|
219
|
-
</div>
|
220
|
-
</div>
|
221
|
-
|
222
|
-
<div id="method-M000095" class="method-detail">
|
223
|
-
<a name="M000095"></a>
|
224
|
-
|
225
|
-
<div class="method-heading">
|
226
|
-
<a href="#M000095" class="method-signature">
|
227
|
-
<span class="method-name">find</span><span class="method-args">(path)</span>
|
228
|
-
</a>
|
229
|
-
</div>
|
230
|
-
|
231
|
-
<div class="method-description">
|
232
|
-
<p><a class="source-toggle" href="#"
|
233
|
-
onclick="toggleCode('M000095-source');return false;">[Source]</a></p>
|
234
|
-
<div class="method-source-code" id="M000095-source">
|
235
|
-
<pre>
|
236
|
-
<span class="ruby-comment cmt"># File lib/ratch/buildable.rb, line 94</span>
|
237
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find</span>(<span class="ruby-identifier">path</span>)
|
238
|
-
<span class="ruby-identifier">builds</span>.<span class="ruby-identifier">find</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">match?</span>(<span class="ruby-identifier">path</span>) }
|
239
|
-
<span class="ruby-keyword kw">end</span>
|
240
|
-
</pre>
|
241
|
-
</div>
|
242
|
-
</div>
|
243
|
-
</div>
|
244
|
-
|
245
|
-
<div id="method-M000092" class="method-detail">
|
246
|
-
<a name="M000092"></a>
|
247
|
-
|
248
|
-
<div class="method-heading">
|
249
|
-
<a href="#M000092" class="method-signature">
|
250
|
-
<span class="method-name">force?</span><span class="method-args">()</span>
|
251
|
-
</a>
|
252
|
-
</div>
|
253
|
-
|
254
|
-
<div class="method-description">
|
255
|
-
<p><a class="source-toggle" href="#"
|
256
|
-
onclick="toggleCode('M000092-source');return false;">[Source]</a></p>
|
257
|
-
<div class="method-source-code" id="M000092-source">
|
258
|
-
<pre>
|
259
|
-
<span class="ruby-comment cmt"># File lib/ratch/buildable.rb, line 71</span>
|
260
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">force?</span> ; <span class="ruby-ivar">@runspace</span>.<span class="ruby-identifier">force?</span> ; <span class="ruby-keyword kw">end</span>
|
261
|
-
</pre>
|
262
|
-
</div>
|
263
|
-
</div>
|
264
|
-
</div>
|
265
|
-
|
266
|
-
<div id="method-M000096" class="method-detail">
|
267
|
-
<a name="M000096"></a>
|
268
|
-
|
269
|
-
<div class="method-heading">
|
270
|
-
<a href="#M000096" class="method-signature">
|
271
|
-
<span class="method-name">plan</span><span class="method-args">(build, path, list=[], todo=[])</span>
|
272
|
-
</a>
|
273
|
-
</div>
|
274
|
-
|
275
|
-
<div class="method-description">
|
276
|
-
<p>
|
277
|
-
Prepare <a href="BuildManager.html#M000096">plan</a>, checking for circular
|
278
|
-
dependencies.
|
279
|
-
</p>
|
280
|
-
<p><a class="source-toggle" href="#"
|
281
|
-
onclick="toggleCode('M000096-source');return false;">[Source]</a></p>
|
282
|
-
<div class="method-source-code" id="M000096-source">
|
283
|
-
<pre>
|
284
|
-
<span class="ruby-comment cmt"># File lib/ratch/buildable.rb, line 99</span>
|
285
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">plan</span>(<span class="ruby-identifier">build</span>, <span class="ruby-identifier">path</span>, <span class="ruby-identifier">list</span>=[], <span class="ruby-identifier">todo</span>=[])
|
286
|
-
<span class="ruby-comment cmt">#if list.include?(build)</span>
|
287
|
-
<span class="ruby-comment cmt"># raise "Circular build dependency #{build.name}."</span>
|
288
|
-
<span class="ruby-comment cmt">#end</span>
|
289
|
-
|
290
|
-
<span class="ruby-identifier">build</span>.<span class="ruby-identifier">needed_paths</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">npath</span><span class="ruby-operator">|</span>
|
291
|
-
<span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">npath</span>)
|
292
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">nbuild</span> = <span class="ruby-identifier">find</span>(<span class="ruby-identifier">npath</span>)
|
293
|
-
<span class="ruby-identifier">plan</span>(<span class="ruby-identifier">nbuild</span>, <span class="ruby-identifier">npath</span>, <span class="ruby-identifier">list</span>, <span class="ruby-identifier">todo</span>)
|
294
|
-
<span class="ruby-identifier">todo</span> <span class="ruby-operator"><<</span> [<span class="ruby-identifier">nbuild</span>, <span class="ruby-identifier">npath</span>]
|
295
|
-
<span class="ruby-keyword kw">else</span>
|
296
|
-
<span class="ruby-identifier">list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">npath</span>
|
297
|
-
<span class="ruby-keyword kw">end</span>
|
298
|
-
<span class="ruby-keyword kw">end</span>
|
299
|
-
|
300
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">list</span>, <span class="ruby-identifier">todo</span>
|
301
|
-
<span class="ruby-keyword kw">end</span>
|
302
|
-
</pre>
|
303
|
-
</div>
|
304
|
-
</div>
|
305
|
-
</div>
|
306
|
-
|
307
|
-
|
308
|
-
</div>
|
309
|
-
|
310
|
-
|
311
|
-
</div>
|
312
|
-
|
313
|
-
|
314
|
-
<div id="validator-badges">
|
315
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
316
|
-
</div>
|
317
|
-
|
318
|
-
</body>
|
319
|
-
</html>
|