bovem 2.0.3 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis-gemfile +13 -0
- data/.travis.yml +4 -2
- data/Gemfile +13 -1
- data/bovem.gemspec +2 -10
- data/doc/Bovem.html +3 -3
- data/doc/Bovem/Configuration.html +14 -12
- data/doc/Bovem/Console.html +155 -301
- data/doc/Bovem/ConsoleMethods.html +3 -3
- data/doc/Bovem/ConsoleMethods/Interactions.html +36 -44
- data/doc/Bovem/ConsoleMethods/Interactions/ClassMethods.html +7 -7
- data/doc/Bovem/ConsoleMethods/Logging.html +62 -62
- data/doc/Bovem/ConsoleMethods/Logging/ClassMethods.html +7 -7
- data/doc/Bovem/ConsoleMethods/Output.html +59 -141
- data/doc/Bovem/ConsoleMethods/StyleHandling.html +3 -3
- data/doc/Bovem/ConsoleMethods/StyleHandling/ClassMethods.html +4 -4
- data/doc/Bovem/Errors.html +3 -3
- data/doc/Bovem/Errors/InvalidConfiguration.html +3 -3
- data/doc/Bovem/Errors/InvalidLogger.html +3 -3
- data/doc/Bovem/Logger.html +3 -3
- data/doc/Bovem/Shell.html +22 -22
- data/doc/Bovem/ShellMethods.html +3 -3
- data/doc/Bovem/ShellMethods/Directories.html +21 -21
- data/doc/Bovem/ShellMethods/Execute.html +21 -21
- data/doc/Bovem/ShellMethods/General.html +130 -20
- data/doc/Bovem/ShellMethods/Read.html +21 -21
- data/doc/Bovem/ShellMethods/Write.html +20 -20
- data/doc/Bovem/Version.html +5 -5
- data/doc/_index.html +4 -4
- data/doc/file.README.html +3 -3
- data/doc/frames.html +1 -1
- data/doc/index.html +3 -3
- data/doc/method_list.html +43 -51
- data/doc/top-level-namespace.html +3 -3
- data/lib/bovem.rb +1 -1
- data/lib/bovem/configuration.rb +12 -4
- data/lib/bovem/console.rb +25 -46
- data/lib/bovem/shell.rb +12 -5
- data/lib/bovem/version.rb +2 -2
- data/spec/bovem/configuration_spec.rb +3 -3
- data/spec/bovem/console_spec.rb +12 -30
- data/spec/bovem/shell_spec.rb +17 -2
- metadata +6 -118
data/doc/Bovem/Shell.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Bovem::Shell
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.4
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -273,7 +273,7 @@
|
|
273
273
|
|
274
274
|
|
275
275
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="ShellMethods/General.html" title="Bovem::ShellMethods::General (module)">Bovem::ShellMethods::General</a></span></h3>
|
276
|
-
<p class="inherited"><span class='object_link'><a href="ShellMethods/General.html#handle_failure-instance_method" title="Bovem::ShellMethods::General#handle_failure (method)">#handle_failure</a></span>, <span class='object_link'><a href="ShellMethods/General.html#show_general_failure-instance_method" title="Bovem::ShellMethods::General#show_general_failure (method)">#show_general_failure</a></span></p>
|
276
|
+
<p class="inherited"><span class='object_link'><a href="ShellMethods/General.html#handle_failure-instance_method" title="Bovem::ShellMethods::General#handle_failure (method)">#handle_failure</a></span>, <span class='object_link'><a href="ShellMethods/General.html#setup_error_handling-instance_method" title="Bovem::ShellMethods::General#setup_error_handling (method)">#setup_error_handling</a></span>, <span class='object_link'><a href="ShellMethods/General.html#show_general_failure-instance_method" title="Bovem::ShellMethods::General#show_general_failure (method)">#show_general_failure</a></span></p>
|
277
277
|
|
278
278
|
<div id="constructor_details" class="method_details_list">
|
279
279
|
<h2>Constructor Details</h2>
|
@@ -303,13 +303,13 @@
|
|
303
303
|
<pre class="lines">
|
304
304
|
|
305
305
|
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
306
|
+
567
|
307
|
+
568
|
308
|
+
569
|
309
|
+
570</pre>
|
310
310
|
</td>
|
311
311
|
<td>
|
312
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line
|
312
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 567</span>
|
313
313
|
|
314
314
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
315
315
|
<span class='ivar'>@console</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Console</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
|
@@ -369,13 +369,6 @@
|
|
369
369
|
<pre class="lines">
|
370
370
|
|
371
371
|
|
372
|
-
542
|
373
|
-
543
|
374
|
-
544
|
375
|
-
545
|
376
|
-
546
|
377
|
-
547
|
378
|
-
548
|
379
372
|
549
|
380
373
|
550
|
381
374
|
551
|
@@ -391,10 +384,17 @@
|
|
391
384
|
561
|
392
385
|
562
|
393
386
|
563
|
394
|
-
564
|
387
|
+
564
|
388
|
+
565
|
389
|
+
566
|
390
|
+
567
|
391
|
+
568
|
392
|
+
569
|
393
|
+
570
|
394
|
+
571</pre>
|
395
395
|
</td>
|
396
396
|
<td>
|
397
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line
|
397
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 549</span>
|
398
398
|
|
399
399
|
<span class='kw'>class</span> <span class='const'>Shell</span>
|
400
400
|
<span class='id identifier rubyid_include'>include</span> <span class='const'>Lazier</span><span class='op'>::</span><span class='const'>I18n</span>
|
@@ -473,12 +473,12 @@
|
|
473
473
|
<pre class="lines">
|
474
474
|
|
475
475
|
|
476
|
-
|
477
|
-
|
478
|
-
|
476
|
+
562
|
477
|
+
563
|
478
|
+
564</pre>
|
479
479
|
</td>
|
480
480
|
<td>
|
481
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line
|
481
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 562</span>
|
482
482
|
|
483
483
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
|
484
484
|
<span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Shell</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
@@ -493,9 +493,9 @@
|
|
493
493
|
</div>
|
494
494
|
|
495
495
|
<div id="footer">
|
496
|
-
Generated on
|
496
|
+
Generated on Tue Feb 5 13:31:47 2013 by
|
497
497
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
498
|
-
0.8.
|
498
|
+
0.8.4 (ruby-1.9.3).
|
499
499
|
</div>
|
500
500
|
|
501
501
|
</body>
|
data/doc/Bovem/ShellMethods.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Bovem::ShellMethods
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.4
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -116,9 +116,9 @@
|
|
116
116
|
</div>
|
117
117
|
|
118
118
|
<div id="footer">
|
119
|
-
Generated on
|
119
|
+
Generated on Tue Feb 5 13:31:46 2013 by
|
120
120
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
121
|
-
0.8.
|
121
|
+
0.8.4 (ruby-1.9.3).
|
122
122
|
</div>
|
123
123
|
|
124
124
|
</body>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Bovem::ShellMethods::Directories
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.4
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -297,13 +297,6 @@
|
|
297
297
|
<pre class="lines">
|
298
298
|
|
299
299
|
|
300
|
-
446
|
301
|
-
447
|
302
|
-
448
|
303
|
-
449
|
304
|
-
450
|
305
|
-
451
|
306
|
-
452
|
307
300
|
453
|
308
301
|
454
|
309
302
|
455
|
@@ -313,10 +306,17 @@
|
|
313
306
|
459
|
314
307
|
460
|
315
308
|
461
|
316
|
-
462
|
309
|
+
462
|
310
|
+
463
|
311
|
+
464
|
312
|
+
465
|
313
|
+
466
|
314
|
+
467
|
315
|
+
468
|
316
|
+
469</pre>
|
317
317
|
</td>
|
318
318
|
<td>
|
319
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line
|
319
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 453</span>
|
320
320
|
|
321
321
|
<span class='kw'>def</span> <span class='id identifier rubyid_create_directories'>create_directories</span><span class='lparen'>(</span><span class='id identifier rubyid_directories'>directories</span><span class='comma'>,</span> <span class='id identifier rubyid_mode'>mode</span> <span class='op'>=</span> <span class='int'>0755</span><span class='comma'>,</span> <span class='id identifier rubyid_run'>run</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_show_errors'>show_errors</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_fatal'>fatal</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
322
322
|
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>true</span>
|
@@ -435,22 +435,22 @@
|
|
435
435
|
<pre class="lines">
|
436
436
|
|
437
437
|
|
438
|
-
424
|
439
|
-
425
|
440
|
-
426
|
441
|
-
427
|
442
|
-
428
|
443
|
-
429
|
444
|
-
430
|
445
438
|
431
|
446
439
|
432
|
447
440
|
433
|
448
441
|
434
|
449
442
|
435
|
450
|
-
436
|
443
|
+
436
|
444
|
+
437
|
445
|
+
438
|
446
|
+
439
|
447
|
+
440
|
448
|
+
441
|
449
|
+
442
|
450
|
+
443</pre>
|
451
451
|
</td>
|
452
452
|
<td>
|
453
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line
|
453
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 431</span>
|
454
454
|
|
455
455
|
<span class='kw'>def</span> <span class='id identifier rubyid_within_directory'>within_directory</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span> <span class='id identifier rubyid_restore'>restore</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_show_messages'>show_messages</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
456
456
|
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>false</span>
|
@@ -475,9 +475,9 @@
|
|
475
475
|
</div>
|
476
476
|
|
477
477
|
<div id="footer">
|
478
|
-
Generated on
|
478
|
+
Generated on Tue Feb 5 13:31:46 2013 by
|
479
479
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
480
|
-
0.8.
|
480
|
+
0.8.4 (ruby-1.9.3).
|
481
481
|
</div>
|
482
482
|
|
483
483
|
</body>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Bovem::ShellMethods::Execute
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.4
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -280,13 +280,6 @@
|
|
280
280
|
<pre class="lines">
|
281
281
|
|
282
282
|
|
283
|
-
368
|
284
|
-
369
|
285
|
-
370
|
286
|
-
371
|
287
|
-
372
|
288
|
-
373
|
289
|
-
374
|
290
283
|
375
|
291
284
|
376
|
292
285
|
377
|
@@ -304,10 +297,17 @@
|
|
304
297
|
389
|
305
298
|
390
|
306
299
|
391
|
307
|
-
392
|
300
|
+
392
|
301
|
+
393
|
302
|
+
394
|
303
|
+
395
|
304
|
+
396
|
305
|
+
397
|
306
|
+
398
|
307
|
+
399</pre>
|
308
308
|
</td>
|
309
309
|
<td>
|
310
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line
|
310
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 375</span>
|
311
311
|
|
312
312
|
<span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_files'>files</span><span class='comma'>,</span> <span class='id identifier rubyid_run'>run</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_show_errors'>show_errors</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_fatal'>fatal</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
313
313
|
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>true</span>
|
@@ -502,13 +502,6 @@
|
|
502
502
|
<pre class="lines">
|
503
503
|
|
504
504
|
|
505
|
-
340
|
506
|
-
341
|
507
|
-
342
|
508
|
-
343
|
509
|
-
344
|
510
|
-
345
|
511
|
-
346
|
512
505
|
347
|
513
506
|
348
|
514
507
|
349
|
@@ -521,10 +514,17 @@
|
|
521
514
|
356
|
522
515
|
357
|
523
516
|
358
|
524
|
-
359
|
517
|
+
359
|
518
|
+
360
|
519
|
+
361
|
520
|
+
362
|
521
|
+
363
|
522
|
+
364
|
523
|
+
365
|
524
|
+
366</pre>
|
525
525
|
</td>
|
526
526
|
<td>
|
527
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line
|
527
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 347</span>
|
528
528
|
|
529
529
|
<span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_run'>run</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_show_exit'>show_exit</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_show_output'>show_output</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_show_command'>show_command</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_fatal'>fatal</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
530
530
|
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>status:</span> <span class='int'>0</span><span class='comma'>,</span> <span class='label'>output:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rbrace'>}</span>
|
@@ -556,9 +556,9 @@
|
|
556
556
|
</div>
|
557
557
|
|
558
558
|
<div id="footer">
|
559
|
-
Generated on
|
559
|
+
Generated on Tue Feb 5 13:31:46 2013 by
|
560
560
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
561
|
-
0.8.
|
561
|
+
0.8.4 (ruby-1.9.3).
|
562
562
|
</div>
|
563
563
|
|
564
564
|
</body>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Bovem::ShellMethods::General
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.4
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -133,6 +133,29 @@
|
|
133
133
|
<span class="summary_desc"><div class='inline'><p>Handles general failure of a file/directory method.</p>
|
134
134
|
</div></span>
|
135
135
|
|
136
|
+
</li>
|
137
|
+
|
138
|
+
|
139
|
+
<li class="public ">
|
140
|
+
<span class="summary_signature">
|
141
|
+
|
142
|
+
<a href="#setup_error_handling-instance_method" title="#setup_error_handling (instance method)">- (Array) <strong>setup_error_handling</strong>(entries, fatal) </a>
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
</span>
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
<span class="summary_desc"><div class='inline'><p>Setups error handling.</p>
|
157
|
+
</div></span>
|
158
|
+
|
136
159
|
</li>
|
137
160
|
|
138
161
|
|
@@ -310,27 +333,114 @@
|
|
310
333
|
26
|
311
334
|
27
|
312
335
|
28
|
313
|
-
29
|
314
|
-
30
|
315
|
-
31</pre>
|
336
|
+
29</pre>
|
316
337
|
</td>
|
317
338
|
<td>
|
318
339
|
<pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 21</span>
|
319
340
|
|
320
341
|
<span class='kw'>def</span> <span class='id identifier rubyid_handle_failure'>handle_failure</span><span class='lparen'>(</span><span class='id identifier rubyid_e'>e</span><span class='comma'>,</span> <span class='id identifier rubyid_access_error'>access_error</span><span class='comma'>,</span> <span class='id identifier rubyid_not_found_error'>not_found_error</span><span class='comma'>,</span> <span class='id identifier rubyid_general_error'>general_error</span><span class='comma'>,</span> <span class='id identifier rubyid_entries'>entries</span><span class='comma'>,</span> <span class='id identifier rubyid_fatal'>fatal</span><span class='comma'>,</span> <span class='id identifier rubyid_show_errors'>show_errors</span><span class='rparen'>)</span>
|
321
|
-
<span class='id identifier rubyid_error_type'>error_type</span> <span class='
|
322
|
-
<span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>.+ - (.+)</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\1</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
323
|
-
<span class='id identifier rubyid_locale'>locale</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_shell'>shell</span>
|
342
|
+
<span class='id identifier rubyid_error_type'>error_type</span><span class='comma'>,</span> <span class='id identifier rubyid_locale'>locale</span><span class='comma'>,</span> <span class='id identifier rubyid_final_entries'>final_entries</span> <span class='op'>=</span> <span class='id identifier rubyid_setup_error_handling'>setup_error_handling</span><span class='lparen'>(</span><span class='id identifier rubyid_entries'>entries</span><span class='comma'>,</span> <span class='id identifier rubyid_fatal'>fatal</span><span class='rparen'>)</span>
|
324
343
|
|
325
344
|
<span class='kw'>case</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
326
|
-
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Errno::EACCES</span><span class='tstring_end'>"</span></span> <span class='kw'>then</span> <span class='ivar'>@console</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_error_type'>error_type</span><span class='comma'>,</span> <span class='id identifier rubyid_locale'>locale</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_access_error'>access_error</span><span class='comma'>,</span> <span class='id identifier
|
327
|
-
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Errno::ENOENT</span><span class='tstring_end'>"</span></span> <span class='kw'>then</span> <span class='ivar'>@console</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_error_type'>error_type</span><span class='comma'>,</span> <span class='id identifier rubyid_locale'>locale</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_not_found_error'>not_found_error</span><span class='comma'>,</span> <span class='id identifier
|
345
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Errno::EACCES</span><span class='tstring_end'>"</span></span> <span class='kw'>then</span> <span class='ivar'>@console</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_error_type'>error_type</span><span class='comma'>,</span> <span class='id identifier rubyid_locale'>locale</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_access_error'>access_error</span><span class='comma'>,</span> <span class='id identifier rubyid_final_entries'>final_entries</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
346
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Errno::ENOENT</span><span class='tstring_end'>"</span></span> <span class='kw'>then</span> <span class='ivar'>@console</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_error_type'>error_type</span><span class='comma'>,</span> <span class='id identifier rubyid_locale'>locale</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_not_found_error'>not_found_error</span><span class='comma'>,</span> <span class='id identifier rubyid_final_entries'>final_entries</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
328
347
|
<span class='kw'>else</span> <span class='id identifier rubyid_show_general_failure'>show_general_failure</span><span class='lparen'>(</span><span class='id identifier rubyid_e'>e</span><span class='comma'>,</span> <span class='id identifier rubyid_general_error'>general_error</span><span class='comma'>,</span> <span class='id identifier rubyid_entries'>entries</span><span class='comma'>,</span> <span class='id identifier rubyid_fatal'>fatal</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_show_errors'>show_errors</span>
|
329
348
|
<span class='kw'>end</span>
|
330
349
|
<span class='kw'>end</span></pre>
|
331
350
|
</td>
|
332
351
|
</tr>
|
333
352
|
</table>
|
353
|
+
</div>
|
354
|
+
|
355
|
+
<div class="method_details ">
|
356
|
+
<h3 class="signature " id="setup_error_handling-instance_method">
|
357
|
+
|
358
|
+
- (<tt>Array</tt>) <strong>setup_error_handling</strong>(entries, fatal)
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
</h3><div class="docstring">
|
365
|
+
<div class="discussion">
|
366
|
+
<p>Setups error handling.</p>
|
367
|
+
|
368
|
+
|
369
|
+
</div>
|
370
|
+
</div>
|
371
|
+
<div class="tags">
|
372
|
+
<p class="tag_title">Parameters:</p>
|
373
|
+
<ul class="param">
|
374
|
+
|
375
|
+
<li>
|
376
|
+
|
377
|
+
<span class='name'>entries</span>
|
378
|
+
|
379
|
+
|
380
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
—
|
385
|
+
<div class='inline'><p>The list of entries which failed.</p>
|
386
|
+
</div>
|
387
|
+
|
388
|
+
</li>
|
389
|
+
|
390
|
+
<li>
|
391
|
+
|
392
|
+
<span class='name'>fatal</span>
|
393
|
+
|
394
|
+
|
395
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
—
|
400
|
+
<div class='inline'><p>If quit in case of fatal errors.</p>
|
401
|
+
</div>
|
402
|
+
|
403
|
+
</li>
|
404
|
+
|
405
|
+
</ul>
|
406
|
+
|
407
|
+
<p class="tag_title">Returns:</p>
|
408
|
+
<ul class="return">
|
409
|
+
|
410
|
+
<li>
|
411
|
+
|
412
|
+
|
413
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
—
|
418
|
+
<div class='inline'><p>Variables for error handling</p>
|
419
|
+
</div>
|
420
|
+
|
421
|
+
</li>
|
422
|
+
|
423
|
+
</ul>
|
424
|
+
|
425
|
+
</div><table class="source_code">
|
426
|
+
<tr>
|
427
|
+
<td>
|
428
|
+
<pre class="lines">
|
429
|
+
|
430
|
+
|
431
|
+
36
|
432
|
+
37
|
433
|
+
38</pre>
|
434
|
+
</td>
|
435
|
+
<td>
|
436
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 36</span>
|
437
|
+
|
438
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_setup_error_handling'>setup_error_handling</span><span class='lparen'>(</span><span class='id identifier rubyid_entries'>entries</span><span class='comma'>,</span> <span class='id identifier rubyid_fatal'>fatal</span><span class='rparen'>)</span>
|
439
|
+
<span class='lbracket'>[</span><span class='id identifier rubyid_fatal'>fatal</span> <span class='op'>?</span> <span class='symbol'>:fatal</span> <span class='op'>:</span> <span class='symbol'>:error</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_shell'>shell</span><span class='comma'>,</span> <span class='id identifier rubyid_entries'>entries</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>==</span> <span class='int'>1</span> <span class='op'>?</span> <span class='id identifier rubyid_entries'>entries</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>:</span> <span class='id identifier rubyid_entries'>entries</span><span class='rbracket'>]</span>
|
440
|
+
<span class='kw'>end</span></pre>
|
441
|
+
</td>
|
442
|
+
</tr>
|
443
|
+
</table>
|
334
444
|
</div>
|
335
445
|
|
336
446
|
<div class="method_details ">
|
@@ -407,19 +517,19 @@
|
|
407
517
|
<pre class="lines">
|
408
518
|
|
409
519
|
|
410
|
-
38
|
411
|
-
39
|
412
|
-
40
|
413
|
-
41
|
414
|
-
42
|
415
|
-
43
|
416
|
-
44
|
417
520
|
45
|
418
521
|
46
|
419
|
-
47
|
522
|
+
47
|
523
|
+
48
|
524
|
+
49
|
525
|
+
50
|
526
|
+
51
|
527
|
+
52
|
528
|
+
53
|
529
|
+
54</pre>
|
420
530
|
</td>
|
421
531
|
<td>
|
422
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line
|
532
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 45</span>
|
423
533
|
|
424
534
|
<span class='kw'>def</span> <span class='id identifier rubyid_show_general_failure'>show_general_failure</span><span class='lparen'>(</span><span class='id identifier rubyid_e'>e</span><span class='comma'>,</span> <span class='id identifier rubyid_general_error'>general_error</span><span class='comma'>,</span> <span class='id identifier rubyid_entries'>entries</span><span class='comma'>,</span> <span class='id identifier rubyid_fatal'>fatal</span><span class='rparen'>)</span>
|
425
535
|
<span class='id identifier rubyid_locale'>locale</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_shell'>shell</span>
|
@@ -441,9 +551,9 @@
|
|
441
551
|
</div>
|
442
552
|
|
443
553
|
<div id="footer">
|
444
|
-
Generated on
|
554
|
+
Generated on Tue Feb 5 13:31:46 2013 by
|
445
555
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
446
|
-
0.8.
|
556
|
+
0.8.4 (ruby-1.9.3).
|
447
557
|
</div>
|
448
558
|
|
449
559
|
</body>
|