sprout 1.1.17.pre → 1.1.18.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.

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