sprout 1.1.15.pre → 1.1.16.pre
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sprout might be problematic. Click here for more details.
- data/VERSION +1 -1
- data/lib/sprout/executable/base.rb +7 -7
- metadata +101 -252
- data/Gemfile.lock +0 -50
- data/doc/Dir.html +0 -288
- data/doc/Rake/Task.html +0 -184
- data/doc/Sprout.html +0 -740
- data/doc/Sprout/ArchiveUnpacker.html +0 -1246
- data/doc/Sprout/CommandLine.html +0 -520
- data/doc/Sprout/Concern.html +0 -351
- data/doc/Sprout/Errors.html +0 -101
- data/doc/Sprout/Errors/ArchiveUnpackerError.html +0 -125
- data/doc/Sprout/Errors/DestinationExistsError.html +0 -133
- data/doc/Sprout/Errors/DuplicateMemberError.html +0 -132
- data/doc/Sprout/Errors/ExecutableError.html +0 -125
- data/doc/Sprout/Errors/ExecutableRegistrationError.html +0 -132
- data/doc/Sprout/Errors/ExecutionError.html +0 -121
- data/doc/Sprout/Errors/GeneratorError.html +0 -125
- data/doc/Sprout/Errors/InvalidArgumentError.html +0 -132
- data/doc/Sprout/Errors/LoadError.html +0 -121
- data/doc/Sprout/Errors/MissingArgumentError.html +0 -132
- data/doc/Sprout/Errors/MissingExecutableError.html +0 -132
- data/doc/Sprout/Errors/MissingGeneratorError.html +0 -132
- data/doc/Sprout/Errors/MissingTemplateError.html +0 -132
- data/doc/Sprout/Errors/ProcessRunnerError.html +0 -121
- data/doc/Sprout/Errors/RemoteFileLoaderError.html +0 -110
- data/doc/Sprout/Errors/SproutError.html +0 -114
- data/doc/Sprout/Errors/UnknownArchiveType.html +0 -122
- data/doc/Sprout/Errors/UsageError.html +0 -121
- data/doc/Sprout/Errors/ValidationError.html +0 -121
- data/doc/Sprout/Errors/VersionRequirementNotMetError.html +0 -121
- data/doc/Sprout/Executable.html +0 -169
- data/doc/Sprout/Executable/Base.html +0 -2813
- data/doc/Sprout/Executable/Boolean.html +0 -534
- data/doc/Sprout/Executable/CollectionParam.html +0 -483
- data/doc/Sprout/Executable/FileParam.html +0 -484
- data/doc/Sprout/Executable/Files.html +0 -292
- data/doc/Sprout/Executable/Number.html +0 -141
- data/doc/Sprout/Executable/Param.html +0 -2874
- data/doc/Sprout/Executable/ParameterFactory.html +0 -232
- data/doc/Sprout/Executable/Path.html +0 -223
- data/doc/Sprout/Executable/Paths.html +0 -253
- data/doc/Sprout/Executable/Session.html +0 -1513
- data/doc/Sprout/Executable/StringParam.html +0 -213
- data/doc/Sprout/Executable/Strings.html +0 -167
- data/doc/Sprout/Executable/Url.html +0 -160
- data/doc/Sprout/Executable/Urls.html +0 -170
- data/doc/Sprout/FileTarget.html +0 -1109
- data/doc/Sprout/Generator.html +0 -750
- data/doc/Sprout/Generator/Base.html +0 -1902
- data/doc/Sprout/Generator/Command.html +0 -690
- data/doc/Sprout/Generator/DirectoryManifest.html +0 -476
- data/doc/Sprout/Generator/FileManifest.html +0 -643
- data/doc/Sprout/Generator/Manifest.html +0 -377
- data/doc/Sprout/Generator/TemplateManifest.html +0 -194
- data/doc/Sprout/GeneratorGenerator.html +0 -1115
- data/doc/Sprout/Library.html +0 -1146
- data/doc/Sprout/LibraryGenerator.html +0 -331
- data/doc/Sprout/OutputBuffer.html +0 -445
- data/doc/Sprout/Platform.html +0 -714
- data/doc/Sprout/ProcessRunner.html +0 -1707
- data/doc/Sprout/ProgressBar.html +0 -366
- data/doc/Sprout/ProgressBarImpl.html +0 -2109
- data/doc/Sprout/ProgressBarManager.html +0 -424
- data/doc/Sprout/ProgressBarOutputStream.html +0 -406
- data/doc/Sprout/RDocParser.html +0 -211
- data/doc/Sprout/RemoteFileLoader.html +0 -172
- data/doc/Sprout/RemoteFileTarget.html +0 -679
- data/doc/Sprout/ReversedProgressBar.html +0 -184
- data/doc/Sprout/RubyFeature.html +0 -155
- data/doc/Sprout/RubyFeature/ClassMethods.html +0 -1065
- data/doc/Sprout/RubyGenerator.html +0 -786
- data/doc/Sprout/Specification.html +0 -767
- data/doc/Sprout/System.html +0 -191
- data/doc/Sprout/System/BaseSystem.html +0 -1660
- data/doc/Sprout/System/JavaSystem.html +0 -122
- data/doc/Sprout/System/OSXSystem.html +0 -335
- data/doc/Sprout/System/ThreadMock.html +0 -183
- data/doc/Sprout/System/UnixSystem.html +0 -584
- data/doc/Sprout/System/VistaSystem.html +0 -251
- data/doc/Sprout/System/WinNixSystem.html +0 -325
- data/doc/Sprout/System/WinSystem.html +0 -571
- data/doc/Sprout/TestHelper.html +0 -2165
- data/doc/Sprout/ToolGenerator.html +0 -953
- data/doc/Sprout/VERSION.html +0 -118
- data/doc/String.html +0 -290
- data/doc/_index.html +0 -820
- data/doc/class_list.html +0 -36
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -53
- data/doc/css/style.css +0 -310
- data/doc/file.README.html +0 -96
- data/doc/file_list.html +0 -41
- data/doc/frames.html +0 -13
- data/doc/index.html +0 -96
- data/doc/js/app.js +0 -202
- data/doc/js/full_list.js +0 -149
- data/doc/js/jquery.js +0 -154
- data/doc/method_list.html +0 -3603
- data/doc/top-level-namespace.html +0 -192
- data/test/fixtures/library/archive/Archive.swc +0 -0
@@ -1,643 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
<head>
|
5
|
-
<meta name="Content-Type" content="text/html; charset=utf-8" />
|
6
|
-
<title>Class: Sprout::Generator::FileManifest</title>
|
7
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
8
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
9
|
-
|
10
|
-
<script type="text/javascript" charset="utf-8">
|
11
|
-
relpath = '../..';
|
12
|
-
if (relpath != '') relpath += '/';
|
13
|
-
</script>
|
14
|
-
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
15
|
-
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
16
|
-
|
17
|
-
</head>
|
18
|
-
<body>
|
19
|
-
<script type="text/javascript" charset="utf-8">
|
20
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
21
|
-
</script>
|
22
|
-
|
23
|
-
<div id="header">
|
24
|
-
<div id="menu">
|
25
|
-
|
26
|
-
<a href="../../_index.html">Index (F)</a> »
|
27
|
-
<span class='title'><span class='object_link'><a href="../../Sprout.html" title="Sprout (module)">Sprout</a></span></span> » <span class='title'><span class='object_link'><a href="../Generator.html" title="Sprout::Generator (module)">Generator</a></span></span>
|
28
|
-
»
|
29
|
-
<span class="title">FileManifest</span>
|
30
|
-
|
31
|
-
|
32
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div id="search">
|
36
|
-
<a id="class_list_link" href="#">Class List</a>
|
37
|
-
<a id="method_list_link" href="#">Method List</a>
|
38
|
-
<a id ="file_list_link" href="#">File List</a>
|
39
|
-
</div>
|
40
|
-
|
41
|
-
<div class="clear"></div>
|
42
|
-
</div>
|
43
|
-
|
44
|
-
<iframe id="search_frame"></iframe>
|
45
|
-
|
46
|
-
<div id="content"><h1>Class: Sprout::Generator::FileManifest
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
</h1>
|
51
|
-
|
52
|
-
<dl class="box">
|
53
|
-
|
54
|
-
<dt class="r1">Inherits:</dt>
|
55
|
-
<dd class="r1">
|
56
|
-
<span class="inheritName"><span class='object_link'><a href="Manifest.html" title="Sprout::Generator::Manifest (class)">Manifest</a></span></span>
|
57
|
-
|
58
|
-
<ul class="fullTree">
|
59
|
-
<li>Object</li>
|
60
|
-
|
61
|
-
<li class="next"><span class='object_link'><a href="Manifest.html" title="Sprout::Generator::Manifest (class)">Manifest</a></span></li>
|
62
|
-
|
63
|
-
<li class="next">Sprout::Generator::FileManifest</li>
|
64
|
-
|
65
|
-
</ul>
|
66
|
-
<a href="#" class="inheritanceTree">show all</a>
|
67
|
-
|
68
|
-
</dd>
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
<dt class="r2 last">Defined in:</dt>
|
79
|
-
<dd class="r2 last">lib/sprout/generator/file_manifest.rb</dd>
|
80
|
-
|
81
|
-
</dl>
|
82
|
-
<div class="clear"></div>
|
83
|
-
|
84
|
-
<div id="subclasses">
|
85
|
-
<h2>Direct Known Subclasses</h2>
|
86
|
-
<p class="children"><span class='object_link'><a href="TemplateManifest.html" title="Sprout::Generator::TemplateManifest (class)">TemplateManifest</a></span></p>
|
87
|
-
</div>
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
95
|
-
<ul class="summary">
|
96
|
-
|
97
|
-
<li class="public ">
|
98
|
-
<span class="summary_signature">
|
99
|
-
|
100
|
-
<a href="#template-instance_method" title="#template (instance method)">- (Object) <strong>template</strong> </a>
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
</span>
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
<span class="summary_desc"><div class='inline'>
|
117
|
-
<p>Returns the value of attribute template.</p>
|
118
|
-
</div></span>
|
119
|
-
|
120
|
-
</li>
|
121
|
-
|
122
|
-
|
123
|
-
<li class="public ">
|
124
|
-
<span class="summary_signature">
|
125
|
-
|
126
|
-
<a href="#templates-instance_method" title="#templates (instance method)">- (Object) <strong>templates</strong> </a>
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
</span>
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
<span class="summary_desc"><div class='inline'>
|
143
|
-
<p>Returns the value of attribute templates.</p>
|
144
|
-
</div></span>
|
145
|
-
|
146
|
-
</li>
|
147
|
-
|
148
|
-
|
149
|
-
</ul>
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
<h2>
|
154
|
-
Instance Method Summary
|
155
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
156
|
-
</h2>
|
157
|
-
|
158
|
-
<ul class="summary">
|
159
|
-
|
160
|
-
<li class="public ">
|
161
|
-
<span class="summary_signature">
|
162
|
-
|
163
|
-
<a href="#create-instance_method" title="#create (instance method)">- (Object) <strong>create</strong> </a>
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
</span>
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
177
|
-
|
178
|
-
</li>
|
179
|
-
|
180
|
-
|
181
|
-
<li class="public ">
|
182
|
-
<span class="summary_signature">
|
183
|
-
|
184
|
-
<a href="#destroy-instance_method" title="#destroy (instance method)">- (Object) <strong>destroy</strong> </a>
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
</span>
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
198
|
-
|
199
|
-
</li>
|
200
|
-
|
201
|
-
|
202
|
-
<li class="protected ">
|
203
|
-
<span class="summary_signature">
|
204
|
-
|
205
|
-
<a href="#read_source-instance_method" title="#read_source (instance method)">- (Object) <strong>read_source</strong> </a>
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
</span>
|
210
|
-
|
211
|
-
|
212
|
-
<span class="note title protected">protected</span>
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
219
|
-
|
220
|
-
</li>
|
221
|
-
|
222
|
-
|
223
|
-
<li class="protected ">
|
224
|
-
<span class="summary_signature">
|
225
|
-
|
226
|
-
<a href="#resolve_template-instance_method" title="#resolve_template (instance method)">- (Object) <strong>resolve_template</strong> </a>
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
</span>
|
231
|
-
|
232
|
-
|
233
|
-
<span class="note title protected">protected</span>
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
240
|
-
|
241
|
-
</li>
|
242
|
-
|
243
|
-
|
244
|
-
<li class="protected ">
|
245
|
-
<span class="summary_signature">
|
246
|
-
|
247
|
-
<a href="#source_name-instance_method" title="#source_name (instance method)">- (Object) <strong>source_name</strong> </a>
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
</span>
|
252
|
-
|
253
|
-
|
254
|
-
<span class="note title protected">protected</span>
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
261
|
-
|
262
|
-
</li>
|
263
|
-
|
264
|
-
|
265
|
-
<li class="protected ">
|
266
|
-
<span class="summary_signature">
|
267
|
-
|
268
|
-
<a href="#write_file-instance_method" title="#write_file (instance method)">- (Object) <strong>write_file</strong>(path, content) </a>
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
</span>
|
273
|
-
|
274
|
-
|
275
|
-
<span class="note title protected">protected</span>
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
282
|
-
|
283
|
-
</li>
|
284
|
-
|
285
|
-
|
286
|
-
</ul>
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Manifest.html" title="Sprout::Generator::Manifest (class)">Manifest</a></span></h3>
|
298
|
-
<p class="inherited"><span class='object_link'><a href="Manifest.html#say-instance_method" title="Sprout::Generator::Manifest#say (method)">#say</a></span></p>
|
299
|
-
|
300
|
-
<div id="instance_attr_details" class="attr_details">
|
301
|
-
<h2>Instance Attribute Details</h2>
|
302
|
-
|
303
|
-
|
304
|
-
<span id="template=-instance_method"></span>
|
305
|
-
<span id="template-instance_method"></span>
|
306
|
-
<div class="method_details first">
|
307
|
-
<p class="signature first" id="template-instance_method">
|
308
|
-
|
309
|
-
- (<tt>Object</tt>) <strong>template</strong>
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
</p><div class="docstring">
|
314
|
-
<div class="discussion">
|
315
|
-
|
316
|
-
<p>Returns the value of attribute template</p>
|
317
|
-
|
318
|
-
|
319
|
-
</div>
|
320
|
-
</div>
|
321
|
-
<div class="tags">
|
322
|
-
|
323
|
-
</div><table class="source_code">
|
324
|
-
<tr>
|
325
|
-
<td>
|
326
|
-
<pre class="lines">
|
327
|
-
|
328
|
-
|
329
|
-
4
|
330
|
-
5
|
331
|
-
6</pre>
|
332
|
-
</td>
|
333
|
-
<td>
|
334
|
-
<pre class="code"><span class="info file"># File 'lib/sprout/generator/file_manifest.rb', line 4</span>
|
335
|
-
|
336
|
-
<span class='kw'>def</span> <span class='id template'>template</span>
|
337
|
-
<span class='ivar'>@template</span>
|
338
|
-
<span class='kw'>end</span></pre>
|
339
|
-
</td>
|
340
|
-
</tr>
|
341
|
-
</table>
|
342
|
-
</div>
|
343
|
-
|
344
|
-
|
345
|
-
<span id="templates=-instance_method"></span>
|
346
|
-
<span id="templates-instance_method"></span>
|
347
|
-
<div class="method_details ">
|
348
|
-
<p class="signature " id="templates-instance_method">
|
349
|
-
|
350
|
-
- (<tt>Object</tt>) <strong>templates</strong>
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
</p><div class="docstring">
|
355
|
-
<div class="discussion">
|
356
|
-
|
357
|
-
<p>Returns the value of attribute templates</p>
|
358
|
-
|
359
|
-
|
360
|
-
</div>
|
361
|
-
</div>
|
362
|
-
<div class="tags">
|
363
|
-
|
364
|
-
</div><table class="source_code">
|
365
|
-
<tr>
|
366
|
-
<td>
|
367
|
-
<pre class="lines">
|
368
|
-
|
369
|
-
|
370
|
-
5
|
371
|
-
6
|
372
|
-
7</pre>
|
373
|
-
</td>
|
374
|
-
<td>
|
375
|
-
<pre class="code"><span class="info file"># File 'lib/sprout/generator/file_manifest.rb', line 5</span>
|
376
|
-
|
377
|
-
<span class='kw'>def</span> <span class='id templates'>templates</span>
|
378
|
-
<span class='ivar'>@templates</span>
|
379
|
-
<span class='kw'>end</span></pre>
|
380
|
-
</td>
|
381
|
-
</tr>
|
382
|
-
</table>
|
383
|
-
</div>
|
384
|
-
|
385
|
-
</div>
|
386
|
-
|
387
|
-
|
388
|
-
<div id="instance_method_details" class="method_details_list">
|
389
|
-
<h2>Instance Method Details</h2>
|
390
|
-
|
391
|
-
|
392
|
-
<div class="method_details first">
|
393
|
-
<p class="signature first" id="create-instance_method">
|
394
|
-
|
395
|
-
- (<tt>Object</tt>) <strong>create</strong>
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
</p><table class="source_code">
|
400
|
-
<tr>
|
401
|
-
<td>
|
402
|
-
<pre class="lines">
|
403
|
-
|
404
|
-
|
405
|
-
7
|
406
|
-
8
|
407
|
-
9
|
408
|
-
10
|
409
|
-
11
|
410
|
-
12
|
411
|
-
13
|
412
|
-
14
|
413
|
-
15
|
414
|
-
16
|
415
|
-
17
|
416
|
-
18
|
417
|
-
19
|
418
|
-
20
|
419
|
-
21
|
420
|
-
22
|
421
|
-
23
|
422
|
-
24</pre>
|
423
|
-
</td>
|
424
|
-
<td>
|
425
|
-
<pre class="code"><span class="info file"># File 'lib/sprout/generator/file_manifest.rb', line 7</span>
|
426
|
-
|
427
|
-
<span class='kw'>def</span> <span class='id create'>create</span>
|
428
|
-
<span class='id content'>content</span> <span class='op'>=</span> <span class='id resolve_template'>resolve_template</span>
|
429
|
-
|
430
|
-
<span class='kw'>if</span> <span class='const'>File</span><span class='period'>.</span><span class='id exists?'>exists?</span><span class='lparen'>(</span><span class='id path'>path</span><span class='rparen'>)</span>
|
431
|
-
<span class='kw'>if</span> <span class='id generator'>generator</span><span class='period'>.</span><span class='id force'>force</span>
|
432
|
-
<span class='id write_file'>write_file</span> <span class='id path'>path</span><span class='comma'>,</span> <span class='id content'>content</span>
|
433
|
-
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Replaced file: </span><span class='embexpr_beg'>#{</span><span class='id path'>path</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
434
|
-
<span class='kw'>true</span>
|
435
|
-
<span class='kw'>else</span>
|
436
|
-
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Skipped file: </span><span class='embexpr_beg'>#{</span><span class='id path'>path</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
437
|
-
<span class='kw'>false</span>
|
438
|
-
<span class='kw'>end</span>
|
439
|
-
<span class='kw'>else</span>
|
440
|
-
<span class='id write_file'>write_file</span> <span class='id path'>path</span><span class='comma'>,</span> <span class='id content'>content</span>
|
441
|
-
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Created file: </span><span class='embexpr_beg'>#{</span><span class='id path'>path</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
442
|
-
<span class='kw'>true</span>
|
443
|
-
<span class='kw'>end</span>
|
444
|
-
<span class='kw'>end</span></pre>
|
445
|
-
</td>
|
446
|
-
</tr>
|
447
|
-
</table>
|
448
|
-
</div>
|
449
|
-
|
450
|
-
<div class="method_details ">
|
451
|
-
<p class="signature " id="destroy-instance_method">
|
452
|
-
|
453
|
-
- (<tt>Object</tt>) <strong>destroy</strong>
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
</p><table class="source_code">
|
458
|
-
<tr>
|
459
|
-
<td>
|
460
|
-
<pre class="lines">
|
461
|
-
|
462
|
-
|
463
|
-
26
|
464
|
-
27
|
465
|
-
28
|
466
|
-
29
|
467
|
-
30
|
468
|
-
31
|
469
|
-
32
|
470
|
-
33
|
471
|
-
34
|
472
|
-
35
|
473
|
-
36
|
474
|
-
37
|
475
|
-
38
|
476
|
-
39
|
477
|
-
40
|
478
|
-
41</pre>
|
479
|
-
</td>
|
480
|
-
<td>
|
481
|
-
<pre class="code"><span class="info file"># File 'lib/sprout/generator/file_manifest.rb', line 26</span>
|
482
|
-
|
483
|
-
<span class='kw'>def</span> <span class='id destroy'>destroy</span>
|
484
|
-
<span class='kw'>if</span> <span class='op'>!</span><span class='const'>File</span><span class='period'>.</span><span class='id exists?'>exists?</span><span class='lparen'>(</span><span class='id path'>path</span><span class='rparen'>)</span>
|
485
|
-
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Skipped remove missing file: </span><span class='embexpr_beg'>#{</span><span class='id path'>path</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
486
|
-
<span class='kw'>return</span> <span class='kw'>true</span>
|
487
|
-
<span class='kw'>end</span>
|
488
|
-
<span class='id expected_content'>expected_content</span> <span class='op'>=</span> <span class='id resolve_template'>resolve_template</span>
|
489
|
-
<span class='id actual_content'>actual_content</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id read'>read</span> <span class='id path'>path</span>
|
490
|
-
<span class='kw'>if</span> <span class='id generator'>generator</span><span class='period'>.</span><span class='id force'>force</span> <span class='op'>||</span> <span class='id actual_content'>actual_content</span> <span class='op'>==</span> <span class='id expected_content'>expected_content</span>
|
491
|
-
<span class='const'>FileUtils</span><span class='period'>.</span><span class='id rm'>rm</span> <span class='id path'>path</span>
|
492
|
-
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Removed file: </span><span class='embexpr_beg'>#{</span><span class='id path'>path</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
493
|
-
<span class='kw'>true</span>
|
494
|
-
<span class='kw'>else</span>
|
495
|
-
<span class='id say'>say</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Skipped remove file: </span><span class='embexpr_beg'>#{</span><span class='id path'>path</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
496
|
-
<span class='kw'>false</span>
|
497
|
-
<span class='kw'>end</span>
|
498
|
-
<span class='kw'>end</span></pre>
|
499
|
-
</td>
|
500
|
-
</tr>
|
501
|
-
</table>
|
502
|
-
</div>
|
503
|
-
|
504
|
-
<div class="method_details ">
|
505
|
-
<p class="signature " id="read_source-instance_method">
|
506
|
-
|
507
|
-
- (<tt>Object</tt>) <strong>read_source</strong> <span class="extras">(protected)</span>
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
</p><table class="source_code">
|
512
|
-
<tr>
|
513
|
-
<td>
|
514
|
-
<pre class="lines">
|
515
|
-
|
516
|
-
|
517
|
-
55
|
518
|
-
56
|
519
|
-
57
|
520
|
-
58
|
521
|
-
59
|
522
|
-
60
|
523
|
-
61
|
524
|
-
62
|
525
|
-
63</pre>
|
526
|
-
</td>
|
527
|
-
<td>
|
528
|
-
<pre class="code"><span class="info file"># File 'lib/sprout/generator/file_manifest.rb', line 55</span>
|
529
|
-
|
530
|
-
<span class='kw'>def</span> <span class='id read_source'>read_source</span>
|
531
|
-
<span class='id templates'>templates</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id template_path'>template_path</span><span class='op'>|</span>
|
532
|
-
<span class='id path'>path</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id join'>join</span> <span class='id template_path'>template_path</span><span class='comma'>,</span> <span class='id source_name'>source_name</span>
|
533
|
-
<span class='kw'>if</span> <span class='const'>File</span><span class='period'>.</span><span class='id exists?'>exists?</span><span class='lparen'>(</span><span class='id path'>path</span><span class='rparen'>)</span>
|
534
|
-
<span class='kw'>return</span> <span class='const'>File</span><span class='period'>.</span><span class='id read'>read</span> <span class='id path'>path</span>
|
535
|
-
<span class='kw'>end</span>
|
536
|
-
<span class='kw'>end</span>
|
537
|
-
<span class='id raise'>raise</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>MissingTemplateError</span><span class='period'>.</span><span class='id new'>new</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Could not find template (</span><span class='embexpr_beg'>#{</span><span class='id source_name'>source_name</span><span class='rbrace'>}</span><span class='tstring_content'>) in any of the following paths:\n\n (</span><span class='embexpr_beg'>#{</span><span class='id templates'>templates</span><span class='period'>.</span><span class='id inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_content'>)\n\n</span><span class='tstring_end'>"</span></span>
|
538
|
-
<span class='kw'>end</span></pre>
|
539
|
-
</td>
|
540
|
-
</tr>
|
541
|
-
</table>
|
542
|
-
</div>
|
543
|
-
|
544
|
-
<div class="method_details ">
|
545
|
-
<p class="signature " id="resolve_template-instance_method">
|
546
|
-
|
547
|
-
- (<tt>Object</tt>) <strong>resolve_template</strong> <span class="extras">(protected)</span>
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
</p><table class="source_code">
|
552
|
-
<tr>
|
553
|
-
<td>
|
554
|
-
<pre class="lines">
|
555
|
-
|
556
|
-
|
557
|
-
51
|
558
|
-
52
|
559
|
-
53</pre>
|
560
|
-
</td>
|
561
|
-
<td>
|
562
|
-
<pre class="code"><span class="info file"># File 'lib/sprout/generator/file_manifest.rb', line 51</span>
|
563
|
-
|
564
|
-
<span class='kw'>def</span> <span class='id resolve_template'>resolve_template</span>
|
565
|
-
<span class='id read_source'>read_source</span>
|
566
|
-
<span class='kw'>end</span></pre>
|
567
|
-
</td>
|
568
|
-
</tr>
|
569
|
-
</table>
|
570
|
-
</div>
|
571
|
-
|
572
|
-
<div class="method_details ">
|
573
|
-
<p class="signature " id="source_name-instance_method">
|
574
|
-
|
575
|
-
- (<tt>Object</tt>) <strong>source_name</strong> <span class="extras">(protected)</span>
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
</p><table class="source_code">
|
580
|
-
<tr>
|
581
|
-
<td>
|
582
|
-
<pre class="lines">
|
583
|
-
|
584
|
-
|
585
|
-
65
|
586
|
-
66
|
587
|
-
67</pre>
|
588
|
-
</td>
|
589
|
-
<td>
|
590
|
-
<pre class="code"><span class="info file"># File 'lib/sprout/generator/file_manifest.rb', line 65</span>
|
591
|
-
|
592
|
-
<span class='kw'>def</span> <span class='id source_name'>source_name</span>
|
593
|
-
<span class='id template'>template</span> <span class='op'>||</span> <span class='const'>File</span><span class='period'>.</span><span class='id basename'>basename</span><span class='lparen'>(</span><span class='id path'>path</span><span class='rparen'>)</span>
|
594
|
-
<span class='kw'>end</span></pre>
|
595
|
-
</td>
|
596
|
-
</tr>
|
597
|
-
</table>
|
598
|
-
</div>
|
599
|
-
|
600
|
-
<div class="method_details ">
|
601
|
-
<p class="signature " id="write_file-instance_method">
|
602
|
-
|
603
|
-
- (<tt>Object</tt>) <strong>write_file</strong>(path, content) <span class="extras">(protected)</span>
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
</p><table class="source_code">
|
608
|
-
<tr>
|
609
|
-
<td>
|
610
|
-
<pre class="lines">
|
611
|
-
|
612
|
-
|
613
|
-
45
|
614
|
-
46
|
615
|
-
47
|
616
|
-
48
|
617
|
-
49</pre>
|
618
|
-
</td>
|
619
|
-
<td>
|
620
|
-
<pre class="code"><span class="info file"># File 'lib/sprout/generator/file_manifest.rb', line 45</span>
|
621
|
-
|
622
|
-
<span class='kw'>def</span> <span class='id write_file'>write_file</span> <span class='id path'>path</span><span class='comma'>,</span> <span class='id content'>content</span>
|
623
|
-
<span class='const'>File</span><span class='period'>.</span><span class='id open'>open</span> <span class='id path'>path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>w+</span><span class='tstring_end'>'</span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id file'>file</span><span class='op'>|</span>
|
624
|
-
<span class='id file'>file</span><span class='period'>.</span><span class='id write'>write</span> <span class='id content'>content</span>
|
625
|
-
<span class='kw'>end</span>
|
626
|
-
<span class='kw'>end</span></pre>
|
627
|
-
</td>
|
628
|
-
</tr>
|
629
|
-
</table>
|
630
|
-
</div>
|
631
|
-
|
632
|
-
</div>
|
633
|
-
|
634
|
-
</div>
|
635
|
-
|
636
|
-
<div id="footer">
|
637
|
-
Generated on Fri Apr 29 18:33:09 2011 by
|
638
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
639
|
-
0.6.3 (ruby-1.9.2).
|
640
|
-
</div>
|
641
|
-
|
642
|
-
</body>
|
643
|
-
</html>
|