rack-blogengine 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +21 -0
- data/MANIFEST +4 -35
- data/README.md +10 -20
- data/bin/rack-blogengine +2 -2
- data/checksum/rack-blogengine-1.0.6.gem.sha512 +1 -0
- data/checksum/rack-blogengine-1.0.7.gem.sha512 +1 -0
- data/lib/rack/blogengine/command_line_interface.rb +26 -31
- data/lib/rack/blogengine/document_parser.rb +1 -16
- data/lib/rack/blogengine/version.rb +1 -1
- data/rack-blogengine.gemspec +9 -6
- metadata +53 -54
- checksums.yaml.gz.sig +0 -2
- data/.yardopts +0 -1
- data/LICENSE.txt +0 -22
- data/doc/Operator.html +0 -236
- data/doc/Rack/Blogengine/Application.html +0 -278
- data/doc/Rack/Blogengine/ApplicationRouter.html +0 -413
- data/doc/Rack/Blogengine/CommandLineInterface.html +0 -991
- data/doc/Rack/Blogengine/Document.html +0 -680
- data/doc/Rack/Blogengine/DocumentParser.html +0 -1708
- data/doc/Rack/Blogengine.html +0 -419
- data/doc/Rack.html +0 -117
- data/doc/_index.html +0 -197
- data/doc/class_list.html +0 -54
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -57
- data/doc/css/style.css +0 -339
- data/doc/file.README.html +0 -237
- data/doc/file_list.html +0 -56
- data/doc/frames.html +0 -26
- data/doc/index.html +0 -237
- data/doc/js/app.js +0 -219
- data/doc/js/full_list.js +0 -178
- data/doc/js/jquery.js +0 -4
- data/doc/method_list.html +0 -263
- data/doc/top-level-namespace.html +0 -114
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -0
@@ -1,991 +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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
-
<title>
|
7
|
-
Module: Rack::Blogengine::CommandLineInterface
|
8
|
-
|
9
|
-
— Documentation by YARD 0.8.7.4
|
10
|
-
|
11
|
-
</title>
|
12
|
-
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
14
|
-
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
|
-
|
17
|
-
<script type="text/javascript" charset="utf-8">
|
18
|
-
hasFrames = window.top.frames.main ? true : false;
|
19
|
-
relpath = '../../';
|
20
|
-
framesUrl = "../../frames.html#!Rack/Blogengine/CommandLineInterface.html";
|
21
|
-
</script>
|
22
|
-
|
23
|
-
|
24
|
-
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
25
|
-
|
26
|
-
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
27
|
-
|
28
|
-
|
29
|
-
</head>
|
30
|
-
<body>
|
31
|
-
<div id="header">
|
32
|
-
<div id="menu">
|
33
|
-
|
34
|
-
<a href="../../_index.html">Index (C)</a> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../../Rack.html" title="Rack (module)">Rack</a></span></span> » <span class='title'><span class='object_link'><a href="../Blogengine.html" title="Rack::Blogengine (module)">Blogengine</a></span></span>
|
36
|
-
»
|
37
|
-
<span class="title">CommandLineInterface</span>
|
38
|
-
|
39
|
-
|
40
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
-
</div>
|
42
|
-
|
43
|
-
<div id="search">
|
44
|
-
|
45
|
-
<a class="full_list_link" id="class_list_link"
|
46
|
-
href="../../class_list.html">
|
47
|
-
Class List
|
48
|
-
</a>
|
49
|
-
|
50
|
-
<a class="full_list_link" id="method_list_link"
|
51
|
-
href="../../method_list.html">
|
52
|
-
Method List
|
53
|
-
</a>
|
54
|
-
|
55
|
-
<a class="full_list_link" id="file_list_link"
|
56
|
-
href="../../file_list.html">
|
57
|
-
File List
|
58
|
-
</a>
|
59
|
-
|
60
|
-
</div>
|
61
|
-
<div class="clear"></div>
|
62
|
-
</div>
|
63
|
-
|
64
|
-
<iframe id="search_frame"></iframe>
|
65
|
-
|
66
|
-
<div id="content"><h1>Module: Rack::Blogengine::CommandLineInterface
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
</h1>
|
71
|
-
|
72
|
-
<dl class="box">
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<dt class="r1 last">Defined in:</dt>
|
82
|
-
<dd class="r1 last">lib/rack/blogengine/command_line_interface.rb</dd>
|
83
|
-
|
84
|
-
</dl>
|
85
|
-
<div class="clear"></div>
|
86
|
-
|
87
|
-
<h2>Overview</h2><div class="docstring">
|
88
|
-
<div class="discussion">
|
89
|
-
|
90
|
-
<p>This Module handles all cli input (running the app, generate folder
|
91
|
-
skeleton)</p>
|
92
|
-
|
93
|
-
|
94
|
-
</div>
|
95
|
-
</div>
|
96
|
-
<div class="tags">
|
97
|
-
|
98
|
-
<p class="tag_title">Author:</p>
|
99
|
-
<ul class="author">
|
100
|
-
|
101
|
-
<li>
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
<div class='inline'><dl class="rdoc-list label-list"><dt>benny
|
108
|
-
<dd></dd></dl>
|
109
|
-
</div>
|
110
|
-
|
111
|
-
</li>
|
112
|
-
|
113
|
-
</ul>
|
114
|
-
|
115
|
-
</div>
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
<h2>
|
124
|
-
Class Method Summary
|
125
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
126
|
-
</h2>
|
127
|
-
|
128
|
-
<ul class="summary">
|
129
|
-
|
130
|
-
<li class="private ">
|
131
|
-
<span class="summary_signature">
|
132
|
-
|
133
|
-
<a href="#build_rack_app-class_method" title="build_rack_app (class method)">+ (Rack::Builder) <strong>build_rack_app</strong>(target, config) </a>
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
</span>
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
<span class="note title private">private</span>
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
<span class="summary_desc"><div class='inline'>
|
148
|
-
<p>Build rack app via Rack::Builder.</p>
|
149
|
-
</div></span>
|
150
|
-
|
151
|
-
</li>
|
152
|
-
|
153
|
-
|
154
|
-
<li class="public ">
|
155
|
-
<span class="summary_signature">
|
156
|
-
|
157
|
-
<a href="#generate-class_method" title="generate (class method)">+ (Object) <strong>generate</strong>(folder) </a>
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
</span>
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
<span class="summary_desc"><div class='inline'>
|
172
|
-
<p>Command to generate the folder skeleton.</p>
|
173
|
-
</div></span>
|
174
|
-
|
175
|
-
</li>
|
176
|
-
|
177
|
-
|
178
|
-
<li class="private ">
|
179
|
-
<span class="summary_signature">
|
180
|
-
|
181
|
-
<a href="#get_config-class_method" title="get_config (class method)">+ (Hash) <strong>get_config</strong>(target) </a>
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
</span>
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
<span class="note title private">private</span>
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
<span class="summary_desc"><div class='inline'>
|
196
|
-
<p>Get YAML Config settings for Server.start && HTTPauth.</p>
|
197
|
-
</div></span>
|
198
|
-
|
199
|
-
</li>
|
200
|
-
|
201
|
-
|
202
|
-
<li class="public ">
|
203
|
-
<span class="summary_signature">
|
204
|
-
|
205
|
-
<a href="#method_missing-class_method" title="method_missing (class method)">+ (Object) <strong>method_missing</strong>(name, *args) </a>
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
</span>
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
<span class="summary_desc"><div class='inline'>
|
220
|
-
<p>Handle unavailable methods.</p>
|
221
|
-
</div></span>
|
222
|
-
|
223
|
-
</li>
|
224
|
-
|
225
|
-
|
226
|
-
<li class="public ">
|
227
|
-
<span class="summary_signature">
|
228
|
-
|
229
|
-
<a href="#run-class_method" title="run (class method)">+ (Object) <strong>run</strong>(target) </a>
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
</span>
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
<span class="summary_desc"><div class='inline'>
|
244
|
-
<p>Method to run the rack Application.</p>
|
245
|
-
</div></span>
|
246
|
-
|
247
|
-
</li>
|
248
|
-
|
249
|
-
|
250
|
-
<li class="private ">
|
251
|
-
<span class="summary_signature">
|
252
|
-
|
253
|
-
<a href="#setup-class_method" title="setup (class method)">+ (Object) <strong>setup</strong>(name, path, essential) </a>
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
</span>
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
<span class="note title private">private</span>
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
<span class="summary_desc"><div class='inline'>
|
268
|
-
<p>Helper method for generate to set up all essential files.</p>
|
269
|
-
</div></span>
|
270
|
-
|
271
|
-
</li>
|
272
|
-
|
273
|
-
|
274
|
-
<li class="public ">
|
275
|
-
<span class="summary_signature">
|
276
|
-
|
277
|
-
<a href="#version-class_method" title="version (class method)">+ (String) <strong>version</strong> </a>
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
</span>
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
<span class="summary_desc"><div class='inline'>
|
292
|
-
<p>Display Version.</p>
|
293
|
-
</div></span>
|
294
|
-
|
295
|
-
</li>
|
296
|
-
|
297
|
-
|
298
|
-
</ul>
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
<div id="class_method_details" class="method_details_list">
|
304
|
-
<h2>Class Method Details</h2>
|
305
|
-
|
306
|
-
|
307
|
-
<div class="method_details first">
|
308
|
-
<h3 class="signature first" id="build_rack_app-class_method">
|
309
|
-
|
310
|
-
+ (<tt>Rack::Builder</tt>) <strong>build_rack_app</strong>(target, config) <span class="extras">(private)</span>
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
</h3><div class="docstring">
|
317
|
-
<div class="discussion">
|
318
|
-
|
319
|
-
<p>Build rack app via Rack::Builder</p>
|
320
|
-
|
321
|
-
|
322
|
-
</div>
|
323
|
-
</div>
|
324
|
-
<div class="tags">
|
325
|
-
<p class="tag_title">Parameters:</p>
|
326
|
-
<ul class="param">
|
327
|
-
|
328
|
-
<li>
|
329
|
-
|
330
|
-
<span class='name'>target</span>
|
331
|
-
|
332
|
-
|
333
|
-
<span class='type'>(<tt>String</tt>)</span>
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
—
|
338
|
-
<div class='inline'><dl class="rdoc-list label-list"><dt>The Targetfolder where all relevant files are located
|
339
|
-
<dd></dd></dl>
|
340
|
-
</div>
|
341
|
-
|
342
|
-
</li>
|
343
|
-
|
344
|
-
<li>
|
345
|
-
|
346
|
-
<span class='name'>config</span>
|
347
|
-
|
348
|
-
|
349
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
—
|
354
|
-
<div class='inline'><dl class="rdoc-list label-list"><dt>Config via get_config -> parses in config.yml
|
355
|
-
<dd></dd></dl>
|
356
|
-
</div>
|
357
|
-
|
358
|
-
</li>
|
359
|
-
|
360
|
-
</ul>
|
361
|
-
|
362
|
-
<p class="tag_title">Returns:</p>
|
363
|
-
<ul class="return">
|
364
|
-
|
365
|
-
<li>
|
366
|
-
|
367
|
-
|
368
|
-
<span class='type'>(<tt>Rack::Builder</tt>)</span>
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
—
|
373
|
-
<div class='inline'>
|
374
|
-
<p>Rack Application</p>
|
375
|
-
</div>
|
376
|
-
|
377
|
-
</li>
|
378
|
-
|
379
|
-
</ul>
|
380
|
-
|
381
|
-
</div><table class="source_code">
|
382
|
-
<tr>
|
383
|
-
<td>
|
384
|
-
<pre class="lines">
|
385
|
-
|
386
|
-
|
387
|
-
93
|
388
|
-
94
|
389
|
-
95
|
390
|
-
96
|
391
|
-
97
|
392
|
-
98
|
393
|
-
99
|
394
|
-
100
|
395
|
-
101
|
396
|
-
102
|
397
|
-
103
|
398
|
-
104
|
399
|
-
105
|
400
|
-
106
|
401
|
-
107
|
402
|
-
108
|
403
|
-
109
|
404
|
-
110
|
405
|
-
111
|
406
|
-
112
|
407
|
-
113</pre>
|
408
|
-
</td>
|
409
|
-
<td>
|
410
|
-
<pre class="code"><span class="info file"># File 'lib/rack/blogengine/command_line_interface.rb', line 93</span>
|
411
|
-
|
412
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_build_rack_app'>build_rack_app</span><span class='lparen'>(</span><span class='id identifier rubyid_target'>target</span><span class='comma'>,</span> <span class='id identifier rubyid_config'>config</span><span class='rparen'>)</span>
|
413
|
-
<span class='const'>Rack</span><span class='op'>::</span><span class='const'>Builder</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span>
|
414
|
-
<span class='id identifier rubyid_map'>map</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/assets</span><span class='tstring_end'>'</span></span> <span class='kw'>do</span>
|
415
|
-
<span class='id identifier rubyid_run'>run</span> <span class='const'>Rack</span><span class='op'>::</span><span class='const'>Directory</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_target'>target</span><span class='embexpr_end'>}</span><span class='tstring_content'>/assets</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
416
|
-
<span class='kw'>end</span>
|
417
|
-
|
418
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Usage</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>yes</span><span class='tstring_end'>'</span></span>
|
419
|
-
<span class='id identifier rubyid_use'>use</span> <span class='const'>Rack</span><span class='op'>::</span><span class='const'>Auth</span><span class='op'>::</span><span class='const'>Basic</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Protected Area</span><span class='tstring_end'>'</span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_username'>username</span><span class='comma'>,</span> <span class='id identifier rubyid_password'>password</span><span class='op'>|</span>
|
420
|
-
<span class='id identifier rubyid_username'>username</span> <span class='op'>==</span> <span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Username</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>&&</span> <span class='id identifier rubyid_password'>password</span> <span class='op'>==</span> <span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Password</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
421
|
-
<span class='kw'>end</span>
|
422
|
-
<span class='kw'>end</span>
|
423
|
-
|
424
|
-
<span class='comment'># Parse in all Documents in cli.run(target)
|
425
|
-
</span> <span class='comment'># -> $documents are parsed in only once and then cached via a global variable
|
426
|
-
</span> <span class='comment'># Todo Cache without global variable?
|
427
|
-
</span> <span class='comment'># Global Variable replaced with module instance variable
|
428
|
-
</span> <span class='const'>Rack</span><span class='op'>::</span><span class='const'>Blogengine</span><span class='period'>.</span><span class='id identifier rubyid_documents'>documents</span> <span class='op'>=</span> <span class='const'>DocumentParser</span><span class='period'>.</span><span class='id identifier rubyid_parse_in_documents'>parse_in_documents</span><span class='lparen'>(</span><span class='id identifier rubyid_target'>target</span><span class='rparen'>)</span>
|
429
|
-
|
430
|
-
<span class='id identifier rubyid_run'>run</span> <span class='const'>Application</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
431
|
-
<span class='kw'>end</span>
|
432
|
-
<span class='kw'>end</span></pre>
|
433
|
-
</td>
|
434
|
-
</tr>
|
435
|
-
</table>
|
436
|
-
</div>
|
437
|
-
|
438
|
-
<div class="method_details ">
|
439
|
-
<h3 class="signature " id="generate-class_method">
|
440
|
-
|
441
|
-
+ (<tt>Object</tt>) <strong>generate</strong>(folder)
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
</h3><div class="docstring">
|
448
|
-
<div class="discussion">
|
449
|
-
|
450
|
-
<p>Command to generate the folder skeleton</p>
|
451
|
-
|
452
|
-
|
453
|
-
</div>
|
454
|
-
</div>
|
455
|
-
<div class="tags">
|
456
|
-
<p class="tag_title">Parameters:</p>
|
457
|
-
<ul class="param">
|
458
|
-
|
459
|
-
<li>
|
460
|
-
|
461
|
-
<span class='name'>folder</span>
|
462
|
-
|
463
|
-
|
464
|
-
<span class='type'>(<tt>String</tt>)</span>
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
</li>
|
469
|
-
|
470
|
-
</ul>
|
471
|
-
|
472
|
-
|
473
|
-
</div><table class="source_code">
|
474
|
-
<tr>
|
475
|
-
<td>
|
476
|
-
<pre class="lines">
|
477
|
-
|
478
|
-
|
479
|
-
44
|
480
|
-
45
|
481
|
-
46
|
482
|
-
47
|
483
|
-
48
|
484
|
-
49
|
485
|
-
50
|
486
|
-
51
|
487
|
-
52
|
488
|
-
53
|
489
|
-
54
|
490
|
-
55
|
491
|
-
56
|
492
|
-
57
|
493
|
-
58
|
494
|
-
59
|
495
|
-
60
|
496
|
-
61
|
497
|
-
62
|
498
|
-
63
|
499
|
-
64
|
500
|
-
65
|
501
|
-
66
|
502
|
-
67
|
503
|
-
68
|
504
|
-
69
|
505
|
-
70
|
506
|
-
71
|
507
|
-
72
|
508
|
-
73
|
509
|
-
74
|
510
|
-
75
|
511
|
-
76
|
512
|
-
77
|
513
|
-
78
|
514
|
-
79</pre>
|
515
|
-
</td>
|
516
|
-
<td>
|
517
|
-
<pre class="code"><span class="info file"># File 'lib/rack/blogengine/command_line_interface.rb', line 44</span>
|
518
|
-
|
519
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_generate'>generate</span><span class='lparen'>(</span><span class='id identifier rubyid_folder'>folder</span><span class='rparen'>)</span>
|
520
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\tGenerating folder skeleton\n</span><span class='tstring_end'>"</span></span>
|
521
|
-
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>mkdir </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_folder'>folder</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
522
|
-
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>mkdir </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_folder'>folder</span><span class='embexpr_end'>}</span><span class='tstring_content'>/assets</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
523
|
-
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>mkdir </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_folder'>folder</span><span class='embexpr_end'>}</span><span class='tstring_content'>/assets/layout</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
524
|
-
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>mkdir </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_folder'>folder</span><span class='embexpr_end'>}</span><span class='tstring_content'>/assets/js</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
525
|
-
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>mkdir </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_folder'>folder</span><span class='embexpr_end'>}</span><span class='tstring_content'>/assets/style</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
526
|
-
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>mkdir </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_folder'>folder</span><span class='embexpr_end'>}</span><span class='tstring_content'>/assets/images</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
527
|
-
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>mkdir </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_folder'>folder</span><span class='embexpr_end'>}</span><span class='tstring_content'>/operator</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
528
|
-
|
529
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n\tSetting up essential Files\n</span><span class='tstring_end'>"</span></span>
|
530
|
-
|
531
|
-
<span class='comment'># SET UP operator.rb
|
532
|
-
</span> <span class='id identifier rubyid_setup'>setup</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>operator.rb</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_folder'>folder</span><span class='embexpr_end'>}</span><span class='tstring_content'>/operator</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
533
|
-
|
534
|
-
<span class='comment'># SET UP config.yml
|
535
|
-
</span> <span class='id identifier rubyid_setup'>setup</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>config.yml</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_folder'>folder</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
536
|
-
|
537
|
-
<span class='comment'># SET UP index.content
|
538
|
-
</span> <span class='id identifier rubyid_setup'>setup</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>index.content</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_folder'>folder</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
539
|
-
|
540
|
-
<span class='comment'># SET UP layout.html
|
541
|
-
</span> <span class='id identifier rubyid_setup'>setup</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>layout.html</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_folder'>folder</span><span class='embexpr_end'>}</span><span class='tstring_content'>/assets/layout</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
542
|
-
|
543
|
-
<span class='comment'># SET UP style.css
|
544
|
-
</span> <span class='id identifier rubyid_setup'>setup</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>style.css</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_folder'>folder</span><span class='embexpr_end'>}</span><span class='tstring_content'>/assets/style</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
545
|
-
|
546
|
-
<span class='comment'># SET UP script.js
|
547
|
-
</span> <span class='id identifier rubyid_setup'>setup</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>script.js</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_folder'>folder</span><span class='embexpr_end'>}</span><span class='tstring_content'>/assets/js</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
548
|
-
|
549
|
-
<span class='comment'># SET UP Gemfile
|
550
|
-
</span> <span class='id identifier rubyid_setup'>setup</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Gemfile</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_folder'>folder</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
551
|
-
|
552
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n\tSetup finished! Have Fun\n</span><span class='tstring_end'>"</span></span>
|
553
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\tTo test it type rack-blogengine run </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_folder'>folder</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
554
|
-
<span class='kw'>end</span></pre>
|
555
|
-
</td>
|
556
|
-
</tr>
|
557
|
-
</table>
|
558
|
-
</div>
|
559
|
-
|
560
|
-
<div class="method_details ">
|
561
|
-
<h3 class="signature " id="get_config-class_method">
|
562
|
-
|
563
|
-
+ (<tt>Hash</tt>) <strong>get_config</strong>(target) <span class="extras">(private)</span>
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
</h3><div class="docstring">
|
570
|
-
<div class="discussion">
|
571
|
-
|
572
|
-
<p>Get YAML Config settings for Server.start && HTTPauth</p>
|
573
|
-
|
574
|
-
|
575
|
-
</div>
|
576
|
-
</div>
|
577
|
-
<div class="tags">
|
578
|
-
<p class="tag_title">Parameters:</p>
|
579
|
-
<ul class="param">
|
580
|
-
|
581
|
-
<li>
|
582
|
-
|
583
|
-
<span class='name'>target</span>
|
584
|
-
|
585
|
-
|
586
|
-
<span class='type'>(<tt>String</tt>)</span>
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
</li>
|
591
|
-
|
592
|
-
</ul>
|
593
|
-
|
594
|
-
<p class="tag_title">Returns:</p>
|
595
|
-
<ul class="return">
|
596
|
-
|
597
|
-
<li>
|
598
|
-
|
599
|
-
|
600
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
—
|
605
|
-
<div class='inline'>
|
606
|
-
<p>Config</p>
|
607
|
-
</div>
|
608
|
-
|
609
|
-
</li>
|
610
|
-
|
611
|
-
</ul>
|
612
|
-
|
613
|
-
</div><table class="source_code">
|
614
|
-
<tr>
|
615
|
-
<td>
|
616
|
-
<pre class="lines">
|
617
|
-
|
618
|
-
|
619
|
-
132
|
620
|
-
133
|
621
|
-
134
|
622
|
-
135
|
623
|
-
136
|
624
|
-
137
|
625
|
-
138
|
626
|
-
139
|
627
|
-
140
|
628
|
-
141
|
629
|
-
142
|
630
|
-
143
|
631
|
-
144
|
632
|
-
145
|
633
|
-
146
|
634
|
-
147
|
635
|
-
148
|
636
|
-
149
|
637
|
-
150</pre>
|
638
|
-
</td>
|
639
|
-
<td>
|
640
|
-
<pre class="code"><span class="info file"># File 'lib/rack/blogengine/command_line_interface.rb', line 132</span>
|
641
|
-
|
642
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_get_config'>get_config</span><span class='lparen'>(</span><span class='id identifier rubyid_target'>target</span><span class='rparen'>)</span>
|
643
|
-
<span class='id identifier rubyid_config_yaml'>config_yaml</span> <span class='op'>=</span> <span class='const'>YAML</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_target'>target</span><span class='embexpr_end'>}</span><span class='tstring_content'>/config.yml</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
644
|
-
|
645
|
-
<span class='id identifier rubyid_port'>port</span> <span class='op'>=</span> <span class='id identifier rubyid_config_yaml'>config_yaml</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Port</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
646
|
-
<span class='id identifier rubyid_server'>server</span> <span class='op'>=</span> <span class='id identifier rubyid_config_yaml'>config_yaml</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Server</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
647
|
-
<span class='id identifier rubyid_username'>username</span> <span class='op'>=</span> <span class='id identifier rubyid_config_yaml'>config_yaml</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>HTTPauth</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>username</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span>
|
648
|
-
<span class='id identifier rubyid_password'>password</span> <span class='op'>=</span> <span class='id identifier rubyid_config_yaml'>config_yaml</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>HTTPauth</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>password</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span>
|
649
|
-
<span class='id identifier rubyid_usage'>usage</span> <span class='op'>=</span> <span class='id identifier rubyid_config_yaml'>config_yaml</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>HTTPauth</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>usage</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
650
|
-
<span class='id identifier rubyid_pygments_style'>pygments_style</span> <span class='op'>=</span> <span class='id identifier rubyid_config_yaml'>config_yaml</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Pygments</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>style</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
651
|
-
<span class='id identifier rubyid_pygments_seperator'>pygments_seperator</span> <span class='op'>=</span> <span class='id identifier rubyid_config_yaml'>config_yaml</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Pygments</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>seperator</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
652
|
-
|
653
|
-
<span class='const'>Rack</span><span class='op'>::</span><span class='const'>Blogengine</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Port</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_port'>port</span><span class='comma'>,</span>
|
654
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Server</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_server'>server</span><span class='comma'>,</span>
|
655
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Username</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_username'>username</span><span class='comma'>,</span>
|
656
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Password</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_password'>password</span><span class='comma'>,</span>
|
657
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Usage</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_usage'>usage</span><span class='comma'>,</span>
|
658
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>pygments_style</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_pygments_style'>pygments_style</span><span class='comma'>,</span>
|
659
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>pygments_seperator</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='id identifier rubyid_pygments_seperator'>pygments_seperator</span> <span class='rbrace'>}</span>
|
660
|
-
<span class='kw'>end</span></pre>
|
661
|
-
</td>
|
662
|
-
</tr>
|
663
|
-
</table>
|
664
|
-
</div>
|
665
|
-
|
666
|
-
<div class="method_details ">
|
667
|
-
<h3 class="signature " id="method_missing-class_method">
|
668
|
-
|
669
|
-
+ (<tt>Object</tt>) <strong>method_missing</strong>(name, *args)
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
</h3><div class="docstring">
|
676
|
-
<div class="discussion">
|
677
|
-
|
678
|
-
<p>Handle unavailable methods</p>
|
679
|
-
|
680
|
-
|
681
|
-
</div>
|
682
|
-
</div>
|
683
|
-
<div class="tags">
|
684
|
-
<p class="tag_title">Parameters:</p>
|
685
|
-
<ul class="param">
|
686
|
-
|
687
|
-
<li>
|
688
|
-
|
689
|
-
<span class='name'>name</span>
|
690
|
-
|
691
|
-
|
692
|
-
<span class='type'>(<tt>String</tt>)</span>
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
—
|
697
|
-
<div class='inline'><dl class="rdoc-list label-list"><dt>called Methodname
|
698
|
-
<dd></dd></dl>
|
699
|
-
</div>
|
700
|
-
|
701
|
-
</li>
|
702
|
-
|
703
|
-
<li>
|
704
|
-
|
705
|
-
<span class='name'>*args</span>
|
706
|
-
|
707
|
-
|
708
|
-
<span class='type'>(<tt>Array</tt>)</span>
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
—
|
713
|
-
<div class='inline'><dl class="rdoc-list label-list"><dt>Available args
|
714
|
-
<dd></dd></dl>
|
715
|
-
</div>
|
716
|
-
|
717
|
-
</li>
|
718
|
-
|
719
|
-
</ul>
|
720
|
-
|
721
|
-
|
722
|
-
</div><table class="source_code">
|
723
|
-
<tr>
|
724
|
-
<td>
|
725
|
-
<pre class="lines">
|
726
|
-
|
727
|
-
|
728
|
-
16
|
729
|
-
17
|
730
|
-
18
|
731
|
-
19
|
732
|
-
20
|
733
|
-
21
|
734
|
-
22
|
735
|
-
23</pre>
|
736
|
-
</td>
|
737
|
-
<td>
|
738
|
-
<pre class="code"><span class="info file"># File 'lib/rack/blogengine/command_line_interface.rb', line 16</span>
|
739
|
-
|
740
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
741
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Command </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'> not available</span><span class='tstring_end'>"</span></span>
|
742
|
-
<span class='id identifier rubyid_print'>print</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Available Commands are: \n\n</span><span class='tstring_end'>"</span></span>
|
743
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_methods'>methods</span><span class='lparen'>(</span><span class='kw'>false</span><span class='rparen'>)</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_method'>method</span><span class='op'>|</span>
|
744
|
-
<span class='id identifier rubyid_print'>print</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\t </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_method'>method</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_method'>method</span> <span class='op'>==</span> <span class='symbol'>:method_missing</span> <span class='comment'># || method == :setup || method == :getConfig
|
745
|
-
</span> <span class='kw'>end</span>
|
746
|
-
<span class='id identifier rubyid_print'>print</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
747
|
-
<span class='kw'>end</span></pre>
|
748
|
-
</td>
|
749
|
-
</tr>
|
750
|
-
</table>
|
751
|
-
</div>
|
752
|
-
|
753
|
-
<div class="method_details ">
|
754
|
-
<h3 class="signature " id="run-class_method">
|
755
|
-
|
756
|
-
+ (<tt>Object</tt>) <strong>run</strong>(target)
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
</h3><div class="docstring">
|
763
|
-
<div class="discussion">
|
764
|
-
|
765
|
-
<p>Method to run the rack Application</p>
|
766
|
-
|
767
|
-
|
768
|
-
</div>
|
769
|
-
</div>
|
770
|
-
<div class="tags">
|
771
|
-
<p class="tag_title">Parameters:</p>
|
772
|
-
<ul class="param">
|
773
|
-
|
774
|
-
<li>
|
775
|
-
|
776
|
-
<span class='name'>target</span>
|
777
|
-
|
778
|
-
|
779
|
-
<span class='type'>(<tt>String</tt>)</span>
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
</li>
|
784
|
-
|
785
|
-
</ul>
|
786
|
-
|
787
|
-
|
788
|
-
</div><table class="source_code">
|
789
|
-
<tr>
|
790
|
-
<td>
|
791
|
-
<pre class="lines">
|
792
|
-
|
793
|
-
|
794
|
-
27
|
795
|
-
28
|
796
|
-
29
|
797
|
-
30
|
798
|
-
31
|
799
|
-
32
|
800
|
-
33
|
801
|
-
34
|
802
|
-
35
|
803
|
-
36
|
804
|
-
37
|
805
|
-
38
|
806
|
-
39
|
807
|
-
40</pre>
|
808
|
-
</td>
|
809
|
-
<td>
|
810
|
-
<pre class="code"><span class="info file"># File 'lib/rack/blogengine/command_line_interface.rb', line 27</span>
|
811
|
-
|
812
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='id identifier rubyid_target'>target</span><span class='rparen'>)</span>
|
813
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
814
|
-
<span class='id identifier rubyid_print'>print</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Specify a targetfolder!</span><span class='tstring_end'>'</span></span>
|
815
|
-
<span class='kw'>else</span>
|
816
|
-
<span class='kw'>if</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_target'>target</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
817
|
-
<span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='id identifier rubyid_get_config'>get_config</span><span class='lparen'>(</span><span class='id identifier rubyid_target'>target</span><span class='rparen'>)</span>
|
818
|
-
<span class='id identifier rubyid_app'>app</span> <span class='op'>=</span> <span class='id identifier rubyid_build_rack_app'>build_rack_app</span><span class='lparen'>(</span><span class='id identifier rubyid_target'>target</span><span class='comma'>,</span> <span class='id identifier rubyid_config'>config</span><span class='rparen'>)</span>
|
819
|
-
|
820
|
-
<span class='const'>Rack</span><span class='op'>::</span><span class='const'>Server</span><span class='period'>.</span><span class='id identifier rubyid_start'>start</span><span class='lparen'>(</span><span class='label'>app:</span> <span class='id identifier rubyid_app'>app</span><span class='comma'>,</span> <span class='label'>Port:</span> <span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Port</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>server:</span> <span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Server</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
821
|
-
<span class='kw'>else</span>
|
822
|
-
<span class='id identifier rubyid_print'>print</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_target'>target</span><span class='embexpr_end'>}</span><span class='tstring_content'> is not a folder!</span><span class='tstring_end'>"</span></span>
|
823
|
-
<span class='kw'>end</span>
|
824
|
-
<span class='kw'>end</span>
|
825
|
-
<span class='kw'>end</span></pre>
|
826
|
-
</td>
|
827
|
-
</tr>
|
828
|
-
</table>
|
829
|
-
</div>
|
830
|
-
|
831
|
-
<div class="method_details ">
|
832
|
-
<h3 class="signature " id="setup-class_method">
|
833
|
-
|
834
|
-
+ (<tt>Object</tt>) <strong>setup</strong>(name, path, essential) <span class="extras">(private)</span>
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
</h3><div class="docstring">
|
841
|
-
<div class="discussion">
|
842
|
-
|
843
|
-
<p>Helper method for generate to set up all essential files</p>
|
844
|
-
|
845
|
-
|
846
|
-
</div>
|
847
|
-
</div>
|
848
|
-
<div class="tags">
|
849
|
-
<p class="tag_title">Parameters:</p>
|
850
|
-
<ul class="param">
|
851
|
-
|
852
|
-
<li>
|
853
|
-
|
854
|
-
<span class='name'>name</span>
|
855
|
-
|
856
|
-
|
857
|
-
<span class='type'>(<tt>String</tt>)</span>
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
</li>
|
862
|
-
|
863
|
-
<li>
|
864
|
-
|
865
|
-
<span class='name'>path</span>
|
866
|
-
|
867
|
-
|
868
|
-
<span class='type'>(<tt>String</tt>)</span>
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
</li>
|
873
|
-
|
874
|
-
<li>
|
875
|
-
|
876
|
-
<span class='name'>essential</span>
|
877
|
-
|
878
|
-
|
879
|
-
<span class='type'>(<tt>boolean</tt>)</span>
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
</li>
|
884
|
-
|
885
|
-
</ul>
|
886
|
-
|
887
|
-
|
888
|
-
</div><table class="source_code">
|
889
|
-
<tr>
|
890
|
-
<td>
|
891
|
-
<pre class="lines">
|
892
|
-
|
893
|
-
|
894
|
-
119
|
895
|
-
120
|
896
|
-
121
|
897
|
-
122
|
898
|
-
123
|
899
|
-
124
|
900
|
-
125
|
901
|
-
126
|
902
|
-
127</pre>
|
903
|
-
</td>
|
904
|
-
<td>
|
905
|
-
<pre class="code"><span class="info file"># File 'lib/rack/blogengine/command_line_interface.rb', line 119</span>
|
906
|
-
|
907
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_setup'>setup</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_essential'>essential</span><span class='rparen'>)</span>
|
908
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\tSet up </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
909
|
-
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>touch </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
910
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_essential'>essential</span>
|
911
|
-
<span class='id identifier rubyid_assetspath'>assetspath</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='const'>Rack</span><span class='op'>::</span><span class='const'>Blogengine</span><span class='period'>.</span><span class='id identifier rubyid_root'>root</span><span class='embexpr_end'>}</span><span class='tstring_content'>/assets/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
912
|
-
<span class='id identifier rubyid_content'>content</span> <span class='op'>=</span> <span class='const'>IO</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_assetspath'>assetspath</span><span class='rparen'>)</span>
|
913
|
-
<span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></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='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_file'>file</span><span class='op'>|</span> <span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_content'>content</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
914
|
-
<span class='kw'>end</span>
|
915
|
-
<span class='kw'>end</span></pre>
|
916
|
-
</td>
|
917
|
-
</tr>
|
918
|
-
</table>
|
919
|
-
</div>
|
920
|
-
|
921
|
-
<div class="method_details ">
|
922
|
-
<h3 class="signature " id="version-class_method">
|
923
|
-
|
924
|
-
+ (<tt>String</tt>) <strong>version</strong>
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
</h3><div class="docstring">
|
931
|
-
<div class="discussion">
|
932
|
-
|
933
|
-
<p>Display Version</p>
|
934
|
-
|
935
|
-
|
936
|
-
</div>
|
937
|
-
</div>
|
938
|
-
<div class="tags">
|
939
|
-
|
940
|
-
<p class="tag_title">Returns:</p>
|
941
|
-
<ul class="return">
|
942
|
-
|
943
|
-
<li>
|
944
|
-
|
945
|
-
|
946
|
-
<span class='type'>(<tt>String</tt>)</span>
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
—
|
951
|
-
<div class='inline'>
|
952
|
-
<p>VERSION</p>
|
953
|
-
</div>
|
954
|
-
|
955
|
-
</li>
|
956
|
-
|
957
|
-
</ul>
|
958
|
-
|
959
|
-
</div><table class="source_code">
|
960
|
-
<tr>
|
961
|
-
<td>
|
962
|
-
<pre class="lines">
|
963
|
-
|
964
|
-
|
965
|
-
83
|
966
|
-
84
|
967
|
-
85</pre>
|
968
|
-
</td>
|
969
|
-
<td>
|
970
|
-
<pre class="code"><span class="info file"># File 'lib/rack/blogengine/command_line_interface.rb', line 83</span>
|
971
|
-
|
972
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_version'>version</span>
|
973
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n\tVERSION: </span><span class='embexpr_beg'>#{</span><span class='const'>Rack</span><span class='op'>::</span><span class='const'>Blogengine</span><span class='op'>::</span><span class='const'>VERSION</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
974
|
-
<span class='kw'>end</span></pre>
|
975
|
-
</td>
|
976
|
-
</tr>
|
977
|
-
</table>
|
978
|
-
</div>
|
979
|
-
|
980
|
-
</div>
|
981
|
-
|
982
|
-
</div>
|
983
|
-
|
984
|
-
<div id="footer">
|
985
|
-
Generated on Mon Apr 21 22:58:51 2014 by
|
986
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
987
|
-
0.8.7.4 (ruby-2.1.1).
|
988
|
-
</div>
|
989
|
-
|
990
|
-
</body>
|
991
|
-
</html>
|