bovem 3.0.5 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +4 -3
  3. data/.rubocop.yml +82 -0
  4. data/.travis-gemfile +4 -5
  5. data/.travis.yml +8 -6
  6. data/CHANGELOG.md +12 -0
  7. data/Gemfile +9 -8
  8. data/README.md +1 -1
  9. data/Rakefile +22 -6
  10. data/bovem.gemspec +5 -5
  11. data/doc/Bovem.html +10 -10
  12. data/doc/Bovem/Application.html +670 -318
  13. data/doc/Bovem/Command.html +1447 -1125
  14. data/doc/Bovem/CommandMethods.html +4 -4
  15. data/doc/Bovem/CommandMethods/Children.html +173 -179
  16. data/doc/Bovem/CommandMethods/Help.html +9 -9
  17. data/doc/Bovem/Configuration.html +239 -24
  18. data/doc/Bovem/Console.html +267 -128
  19. data/doc/Bovem/ConsoleMethods.html +4 -4
  20. data/doc/Bovem/ConsoleMethods/Interactions.html +57 -70
  21. data/doc/Bovem/ConsoleMethods/Interactions/ClassMethods.html +9 -9
  22. data/doc/Bovem/ConsoleMethods/Logging.html +258 -298
  23. data/doc/Bovem/ConsoleMethods/Logging/ClassMethods.html +8 -8
  24. data/doc/Bovem/ConsoleMethods/Output.html +96 -118
  25. data/doc/Bovem/ConsoleMethods/StyleHandling.html +8 -8
  26. data/doc/Bovem/ConsoleMethods/StyleHandling/ClassMethods.html +26 -39
  27. data/doc/Bovem/Errors.html +4 -4
  28. data/doc/Bovem/Errors/Error.html +4 -4
  29. data/doc/Bovem/Errors/InvalidConfiguration.html +4 -4
  30. data/doc/Bovem/Errors/InvalidLogger.html +4 -4
  31. data/doc/Bovem/I18n.html +175 -0
  32. data/doc/Bovem/Logger.html +95 -83
  33. data/doc/Bovem/Option.html +669 -862
  34. data/doc/Bovem/Parser.html +10 -10
  35. data/doc/Bovem/ParserMethods.html +4 -4
  36. data/doc/Bovem/ParserMethods/General.html +4 -4
  37. data/doc/Bovem/ParserMethods/General/ClassMethods.html +26 -38
  38. data/doc/Bovem/Shell.html +169 -48
  39. data/doc/Bovem/ShellMethods.html +4 -4
  40. data/doc/Bovem/ShellMethods/Directories.html +46 -62
  41. data/doc/Bovem/ShellMethods/Execute.html +51 -99
  42. data/doc/Bovem/ShellMethods/General.html +4 -445
  43. data/doc/Bovem/ShellMethods/Read.html +56 -61
  44. data/doc/Bovem/ShellMethods/Write.html +22 -242
  45. data/doc/Bovem/Version.html +6 -6
  46. data/doc/_index.html +18 -18
  47. data/doc/class_list.html +6 -2
  48. data/doc/css/style.css +1 -0
  49. data/doc/file.README.html +5 -5
  50. data/doc/file_list.html +5 -1
  51. data/doc/frames.html +1 -1
  52. data/doc/index.html +5 -5
  53. data/doc/js/full_list.js +4 -1
  54. data/doc/method_list.html +161 -157
  55. data/doc/top-level-namespace.html +4 -4
  56. data/lib/bovem.rb +3 -4
  57. data/lib/bovem/application.rb +47 -39
  58. data/lib/bovem/command.rb +175 -193
  59. data/lib/bovem/configuration.rb +28 -29
  60. data/lib/bovem/console.rb +244 -171
  61. data/lib/bovem/errors.rb +1 -1
  62. data/lib/bovem/i18n.rb +18 -0
  63. data/lib/bovem/logger.rb +26 -26
  64. data/lib/bovem/option.rb +49 -58
  65. data/lib/bovem/parser.rb +174 -222
  66. data/lib/bovem/shell.rb +272 -320
  67. data/lib/bovem/version.rb +2 -2
  68. data/locales/en.yml +39 -38
  69. data/locales/it.yml +39 -38
  70. data/spec/bovem/application_spec.rb +6 -5
  71. data/spec/bovem/command_spec.rb +23 -23
  72. data/spec/bovem/console_spec.rb +101 -102
  73. data/spec/bovem/i18n_spec.rb +21 -0
  74. data/spec/bovem/logger_spec.rb +4 -4
  75. data/spec/bovem/option_spec.rb +43 -43
  76. data/spec/bovem/parser_spec.rb +13 -13
  77. data/spec/bovem/shell_spec.rb +106 -115
  78. data/spec/spec_helper.rb +19 -6
  79. metadata +14 -13
  80. data/doc/Bovem/Localizer.html +0 -376
  81. data/lib/bovem/localizer.rb +0 -27
  82. data/spec/coverage_helper.rb +0 -20
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Bovem::ShellMethods
8
8
 
9
- &mdash; Documentation by YARD 0.8.7.3
9
+ &mdash; Documentation by YARD 0.8.7.6
10
10
 
11
11
  </title>
12
12
 
@@ -17,7 +17,7 @@
17
17
  <script type="text/javascript" charset="utf-8">
18
18
  hasFrames = window.top.frames.main ? true : false;
19
19
  relpath = '../';
20
- framesUrl = "../frames.html#!" + escape(window.location.href);
20
+ framesUrl = "../frames.html#!Bovem/ShellMethods.html";
21
21
  </script>
22
22
 
23
23
 
@@ -116,9 +116,9 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Sat Mar 8 10:27:42 2014 by
119
+ Generated on Tue Mar 29 20:43:16 2016 by
120
120
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
- 0.8.7.3 (ruby-2.1.0).
121
+ 0.8.7.6 (ruby-2.3.0).
122
122
  </div>
123
123
 
124
124
  </body>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Bovem::ShellMethods::Directories
8
8
 
9
- &mdash; Documentation by YARD 0.8.7.3
9
+ &mdash; Documentation by YARD 0.8.7.6
10
10
 
11
11
  </title>
12
12
 
@@ -17,7 +17,7 @@
17
17
  <script type="text/javascript" charset="utf-8">
18
18
  hasFrames = window.top.frames.main ? true : false;
19
19
  relpath = '../../';
20
- framesUrl = "../../frames.html#!" + escape(window.location.href);
20
+ framesUrl = "../../frames.html#!Bovem/ShellMethods/Directories.html";
21
21
  </script>
22
22
 
23
23
 
@@ -116,7 +116,7 @@
116
116
  <li class="public ">
117
117
  <span class="summary_signature">
118
118
 
119
- <a href="#create_directories-instance_method" title="#create_directories (instance method)">- (Boolean) <strong>create_directories</strong>(directories, mode = 0755, run = true, show_errors = false, fatal = true) </a>
119
+ <a href="#create_directories-instance_method" title="#create_directories (instance method)">- (Boolean) <strong>create_directories</strong>(*directories, mode: 0755, run: true, show_errors: false, fatal_errors: true) </a>
120
120
 
121
121
 
122
122
 
@@ -139,7 +139,7 @@
139
139
  <li class="public ">
140
140
  <span class="summary_signature">
141
141
 
142
- <a href="#within_directory-instance_method" title="#within_directory (instance method)">- (Boolean) <strong>within_directory</strong>(directory, restore = true, show_messages = false) </a>
142
+ <a href="#within_directory-instance_method" title="#within_directory (instance method)">- (Boolean) <strong>within_directory</strong>(directory, restore: true, show_messages: false) </a>
143
143
 
144
144
 
145
145
 
@@ -171,7 +171,7 @@
171
171
  <div class="method_details first">
172
172
  <h3 class="signature first" id="create_directories-instance_method">
173
173
 
174
- - (<tt>Boolean</tt>) <strong>create_directories</strong>(directories, mode = 0755, run = true, show_errors = false, fatal = true)
174
+ - (<tt>Boolean</tt>) <strong>create_directories</strong>(*directories, mode: 0755, run: true, show_errors: false, fatal_errors: true)
175
175
 
176
176
 
177
177
 
@@ -211,8 +211,6 @@
211
211
  <span class='type'>(<tt>Fixnum</tt>)</span>
212
212
 
213
213
 
214
- <em class="default">(defaults to: <tt>0755</tt>)</em>
215
-
216
214
 
217
215
  &mdash;
218
216
  <div class='inline'><p>Initial permissions for the new directories.</p>
@@ -228,8 +226,6 @@
228
226
  <span class='type'>(<tt>Boolean</tt>)</span>
229
227
 
230
228
 
231
- <em class="default">(defaults to: <tt>true</tt>)</em>
232
-
233
229
 
234
230
  &mdash;
235
231
  <div class='inline'><p>If <code>false</code>, it will just print a list of directories that would be created.</p>
@@ -245,8 +241,6 @@
245
241
  <span class='type'>(<tt>Boolean</tt>)</span>
246
242
 
247
243
 
248
- <em class="default">(defaults to: <tt>false</tt>)</em>
249
-
250
244
 
251
245
  &mdash;
252
246
  <div class='inline'><p>If show errors.</p>
@@ -256,14 +250,12 @@
256
250
 
257
251
  <li>
258
252
 
259
- <span class='name'>fatal</span>
253
+ <span class='name'>fatal_errors</span>
260
254
 
261
255
 
262
256
  <span class='type'>(<tt>Boolean</tt>)</span>
263
257
 
264
258
 
265
- <em class="default">(defaults to: <tt>true</tt>)</em>
266
-
267
259
 
268
260
  &mdash;
269
261
  <div class='inline'><p>If quit in case of fatal errors.</p>
@@ -297,39 +289,39 @@
297
289
  <pre class="lines">
298
290
 
299
291
 
300
- 454
301
- 455
302
- 456
303
- 457
304
- 458
305
- 459
306
- 460
307
- 461
308
- 462
309
- 463
310
- 464
311
- 465
312
- 466
313
- 467
314
- 468
315
- 469
316
- 470</pre>
292
+ 424
293
+ 425
294
+ 426
295
+ 427
296
+ 428
297
+ 429
298
+ 430
299
+ 431
300
+ 432
301
+ 433
302
+ 434
303
+ 435
304
+ 436
305
+ 437
306
+ 438
307
+ 439
308
+ 440</pre>
317
309
  </td>
318
310
  <td>
319
- <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 454</span>
311
+ <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 424</span>
320
312
 
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>
313
+ <span class='kw'>def</span> <span class='id identifier rubyid_create_directories'>create_directories</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_directories'>directories</span><span class='comma'>,</span> <span class='label'>mode:</span> <span class='int'>0755</span><span class='comma'>,</span> <span class='label'>run:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>show_errors:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>fatal_errors:</span> <span class='kw'>true</span><span class='rparen'>)</span>
322
314
  <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>true</span>
323
315
 
324
316
  <span class='comment'># Adjust directory
325
- </span> <span class='id identifier rubyid_directories'>directories</span> <span class='op'>=</span> <span class='id identifier rubyid_directories'>directories</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_d'>d</span><span class='op'>|</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_d'>d</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
317
+ </span> <span class='id identifier rubyid_directories'>directories</span> <span class='op'>=</span> <span class='id identifier rubyid_directories'>directories</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='lparen'>(</span><span class='label'>no_duplicates:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>compact:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>flatten:</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_d'>d</span><span class='op'>|</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_d'>d</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
326
318
 
327
- <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_run'>run</span> <span class='kw'>then</span> <span class='comment'># Just print
319
+ <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_run'>run</span> <span class='comment'># Just print
328
320
  </span> <span class='id identifier rubyid_dry_run_directory_creation'>dry_run_directory_creation</span><span class='lparen'>(</span><span class='id identifier rubyid_directories'>directories</span><span class='rparen'>)</span>
329
321
  <span class='kw'>else</span>
330
322
  <span class='id identifier rubyid_directories'>directories</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_directory'>directory</span><span class='op'>|</span>
331
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_rv'>rv</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_try_create_directory'>try_create_directory</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span> <span class='id identifier rubyid_mode'>mode</span><span class='comma'>,</span> <span class='id identifier rubyid_fatal'>fatal</span><span class='comma'>,</span> <span class='id identifier rubyid_directories'>directories</span><span class='comma'>,</span> <span class='id identifier rubyid_show_errors'>show_errors</span><span class='rparen'>)</span>
332
- <span class='kw'>break</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_rv'>rv</span>
323
+ <span class='id identifier rubyid_rv'>rv</span> <span class='op'>&amp;&amp;=</span> <span class='id identifier rubyid_try_create_directory'>try_create_directory</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span> <span class='id identifier rubyid_mode'>mode</span><span class='comma'>,</span> <span class='id identifier rubyid_fatal_errors'>fatal_errors</span><span class='comma'>,</span> <span class='id identifier rubyid_directories'>directories</span><span class='comma'>,</span> <span class='id identifier rubyid_show_errors'>show_errors</span><span class='rparen'>)</span>
324
+ <span class='kw'>break</span> <span class='kw'>unless</span> <span class='id identifier rubyid_rv'>rv</span>
333
325
  <span class='kw'>end</span>
334
326
  <span class='kw'>end</span>
335
327
 
@@ -343,7 +335,7 @@
343
335
  <div class="method_details ">
344
336
  <h3 class="signature " id="within_directory-instance_method">
345
337
 
346
- - (<tt>Boolean</tt>) <strong>within_directory</strong>(directory, restore = true, show_messages = false)
338
+ - (<tt>Boolean</tt>) <strong>within_directory</strong>(directory, restore: true, show_messages: false)
347
339
 
348
340
 
349
341
 
@@ -383,8 +375,6 @@
383
375
  <span class='type'>(<tt>Boolean</tt>)</span>
384
376
 
385
377
 
386
- <em class="default">(defaults to: <tt>true</tt>)</em>
387
-
388
378
 
389
379
  &mdash;
390
380
  <div class='inline'><p>If to restore the original working directory.</p>
@@ -400,8 +390,6 @@
400
390
  <span class='type'>(<tt>Boolean</tt>)</span>
401
391
 
402
392
 
403
- <em class="default">(defaults to: <tt>false</tt>)</em>
404
-
405
393
 
406
394
  &mdash;
407
395
  <div class='inline'><p>Show informative messages about working directory changes.</p>
@@ -435,31 +423,27 @@
435
423
  <pre class="lines">
436
424
 
437
425
 
438
- 433
439
- 434
440
- 435
441
- 436
442
- 437
443
- 438
444
- 439
445
- 440
446
- 441
447
- 442
448
- 443
449
- 444</pre>
426
+ 405
427
+ 406
428
+ 407
429
+ 408
430
+ 409
431
+ 410
432
+ 411
433
+ 412
434
+ 413
435
+ 414</pre>
450
436
  </td>
451
437
  <td>
452
- <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 433</span>
453
-
454
- <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>
455
- <span class='id identifier rubyid_locale'>locale</span> <span class='op'>=</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_shell'>shell</span>
438
+ <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 405</span>
456
439
 
440
+ <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='label'>restore:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>show_messages:</span> <span class='kw'>false</span><span class='rparen'>)</span>
457
441
  <span class='id identifier rubyid_directory'>directory</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='rparen'>)</span>
458
442
  <span class='id identifier rubyid_original'>original</span> <span class='op'>=</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_pwd'>pwd</span>
459
443
 
460
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_enter_directory'>enter_directory</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span> <span class='id identifier rubyid_show_messages'>show_messages</span><span class='comma'>,</span> <span class='id identifier rubyid_locale'>locale</span><span class='period'>.</span><span class='id identifier rubyid_move_in'>move_in</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='rparen'>)</span><span class='rparen'>)</span>
444
+ <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_enter_directory'>enter_directory</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span> <span class='id identifier rubyid_show_messages'>show_messages</span><span class='comma'>,</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_move_in'>move_in</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='rparen'>)</span><span class='rparen'>)</span>
461
445
  <span class='kw'>yield</span> <span class='kw'>if</span> <span class='id identifier rubyid_rv'>rv</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
462
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_enter_directory'>enter_directory</span><span class='lparen'>(</span><span class='id identifier rubyid_original'>original</span><span class='comma'>,</span> <span class='id identifier rubyid_show_messages'>show_messages</span><span class='comma'>,</span> <span class='id identifier rubyid_locale'>locale</span><span class='period'>.</span><span class='id identifier rubyid_move_out'>move_out</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_rv'>rv</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_restore'>restore</span>
446
+ <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_enter_directory'>enter_directory</span><span class='lparen'>(</span><span class='id identifier rubyid_original'>original</span><span class='comma'>,</span> <span class='id identifier rubyid_show_messages'>show_messages</span><span class='comma'>,</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_move_out'>move_out</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_rv'>rv</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_restore'>restore</span>
463
447
 
464
448
  <span class='id identifier rubyid_rv'>rv</span>
465
449
  <span class='kw'>end</span></pre>
@@ -473,9 +457,9 @@
473
457
  </div>
474
458
 
475
459
  <div id="footer">
476
- Generated on Sat Mar 8 10:27:42 2014 by
460
+ Generated on Tue Mar 29 20:43:16 2016 by
477
461
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
478
- 0.8.7.3 (ruby-2.1.0).
462
+ 0.8.7.6 (ruby-2.3.0).
479
463
  </div>
480
464
 
481
465
  </body>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Bovem::ShellMethods::Execute
8
8
 
9
- &mdash; Documentation by YARD 0.8.7.3
9
+ &mdash; Documentation by YARD 0.8.7.6
10
10
 
11
11
  </title>
12
12
 
@@ -17,7 +17,7 @@
17
17
  <script type="text/javascript" charset="utf-8">
18
18
  hasFrames = window.top.frames.main ? true : false;
19
19
  relpath = '../../';
20
- framesUrl = "../../frames.html#!" + escape(window.location.href);
20
+ framesUrl = "../../frames.html#!Bovem/ShellMethods/Execute.html";
21
21
  </script>
22
22
 
23
23
 
@@ -116,7 +116,7 @@
116
116
  <li class="public ">
117
117
  <span class="summary_signature">
118
118
 
119
- <a href="#delete-instance_method" title="#delete (instance method)">- (Boolean) <strong>delete</strong>(files, run = true, show_errors = false, fatal = true) </a>
119
+ <a href="#delete-instance_method" title="#delete (instance method)">- (Boolean) <strong>delete</strong>(*files, run: true, show_errors: false, fatal_errors: true) </a>
120
120
 
121
121
 
122
122
 
@@ -139,7 +139,7 @@
139
139
  <li class="public ">
140
140
  <span class="summary_signature">
141
141
 
142
- <a href="#run-instance_method" title="#run (instance method)">- (Hash) <strong>run</strong>(command, message = nil, run = true, show_exit = true, show_output = false, show_command = false, fatal = true) </a>
142
+ <a href="#run-instance_method" title="#run (instance method)">- (Hash) <strong>run</strong>(command, message = nil, run: true, show_exit: true, show_output: false, show_command: false, fatal_errors: true) </a>
143
143
 
144
144
 
145
145
 
@@ -171,7 +171,7 @@
171
171
  <div class="method_details first">
172
172
  <h3 class="signature first" id="delete-instance_method">
173
173
 
174
- - (<tt>Boolean</tt>) <strong>delete</strong>(files, run = true, show_errors = false, fatal = true)
174
+ - (<tt>Boolean</tt>) <strong>delete</strong>(*files, run: true, show_errors: false, fatal_errors: true)
175
175
 
176
176
 
177
177
 
@@ -211,8 +211,6 @@
211
211
  <span class='type'>(<tt>Boolean</tt>)</span>
212
212
 
213
213
 
214
- <em class="default">(defaults to: <tt>true</tt>)</em>
215
-
216
214
 
217
215
  &mdash;
218
216
  <div class='inline'><p>If <code>false</code>, it will just print a list of message that would be deleted.</p>
@@ -228,8 +226,6 @@
228
226
  <span class='type'>(<tt>Boolean</tt>)</span>
229
227
 
230
228
 
231
- <em class="default">(defaults to: <tt>false</tt>)</em>
232
-
233
229
 
234
230
  &mdash;
235
231
  <div class='inline'><p>If show errors.</p>
@@ -239,14 +235,12 @@
239
235
 
240
236
  <li>
241
237
 
242
- <span class='name'>fatal</span>
238
+ <span class='name'>fatal_errors</span>
243
239
 
244
240
 
245
241
  <span class='type'>(<tt>Boolean</tt>)</span>
246
242
 
247
243
 
248
- <em class="default">(defaults to: <tt>true</tt>)</em>
249
-
250
244
 
251
245
  &mdash;
252
246
  <div class='inline'><p>If quit in case of fatal errors.</p>
@@ -280,56 +274,30 @@
280
274
  <pre class="lines">
281
275
 
282
276
 
283
- 377
284
- 378
285
- 379
286
- 380
287
- 381
288
- 382
289
- 383
290
- 384
291
- 385
292
- 386
293
- 387
294
- 388
295
- 389
296
- 390
297
- 391
298
- 392
299
- 393
300
- 394
301
- 395
302
- 396
303
- 397
304
- 398
305
- 399
306
- 400
307
- 401</pre>
277
+ 330
278
+ 331
279
+ 332
280
+ 333
281
+ 334
282
+ 335
283
+ 336
284
+ 337
285
+ 338
286
+ 339
287
+ 340
288
+ 341</pre>
308
289
  </td>
309
290
  <td>
310
- <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 377</span>
291
+ <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 330</span>
311
292
 
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>
293
+ <span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_files'>files</span><span class='comma'>,</span> <span class='label'>run:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>show_errors:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>fatal_errors:</span> <span class='kw'>true</span><span class='rparen'>)</span>
313
294
  <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>true</span>
314
- <span class='id identifier rubyid_locale'>locale</span> <span class='op'>=</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_shell'>shell</span>
315
- <span class='id identifier rubyid_files'>files</span> <span class='op'>=</span> <span class='id identifier rubyid_files'>files</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
316
-
317
- <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_run'>run</span> <span class='kw'>then</span>
318
- <span class='ivar'>@console</span><span class='period'>.</span><span class='id identifier rubyid_warn'>warn</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='period'>.</span><span class='id identifier rubyid_remove_dry'>remove_dry</span><span class='rparen'>)</span>
319
- <span class='ivar'>@console</span><span class='period'>.</span><span class='id identifier rubyid_with_indentation'>with_indentation</span><span class='lparen'>(</span><span class='int'>11</span><span class='rparen'>)</span> <span class='kw'>do</span>
320
- <span class='id identifier rubyid_files'>files</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_file'>file</span><span class='op'>|</span> <span class='ivar'>@console</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span> <span class='kw'>end</span>
321
- <span class='kw'>end</span>
295
+ <span class='id identifier rubyid_files'>files</span> <span class='op'>=</span> <span class='id identifier rubyid_files'>files</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='lparen'>(</span><span class='label'>no_duplicates:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>compact:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>flatten:</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
296
+
297
+ <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_run'>run</span>
298
+ <span class='id identifier rubyid_show_dry_delete'>show_dry_delete</span><span class='lparen'>(</span><span class='id identifier rubyid_files'>files</span><span class='rparen'>)</span>
322
299
  <span class='kw'>else</span>
323
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_catch'>catch</span><span class='lparen'>(</span><span class='symbol'>:rv</span><span class='rparen'>)</span> <span class='kw'>do</span>
324
- <span class='kw'>begin</span>
325
- <span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_rm_r'>rm_r</span><span class='lparen'>(</span><span class='id identifier rubyid_files'>files</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='label'>noop:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>verbose:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>secure:</span> <span class='kw'>true</span><span class='rbrace'>}</span><span class='rparen'>)</span>
326
- <span class='id identifier rubyid_throw'>throw</span><span class='lparen'>(</span><span class='symbol'>:rv</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span>
327
- <span class='kw'>rescue</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
328
- <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='symbol'>:remove_unwritable</span><span class='comma'>,</span> <span class='symbol'>:remove_not_found</span><span class='comma'>,</span> <span class='symbol'>:remove_error</span><span class='comma'>,</span> <span class='id identifier rubyid_files'>files</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>
329
- <span class='kw'>end</span>
330
-
331
- <span class='kw'>false</span>
332
- <span class='kw'>end</span>
300
+ <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_perform_delete'>perform_delete</span><span class='lparen'>(</span><span class='id identifier rubyid_files'>files</span><span class='comma'>,</span> <span class='id identifier rubyid_show_errors'>show_errors</span><span class='comma'>,</span> <span class='id identifier rubyid_fatal_errors'>fatal_errors</span><span class='rparen'>)</span>
333
301
  <span class='kw'>end</span>
334
302
 
335
303
  <span class='id identifier rubyid_rv'>rv</span>
@@ -342,7 +310,7 @@
342
310
  <div class="method_details ">
343
311
  <h3 class="signature " id="run-instance_method">
344
312
 
345
- - (<tt>Hash</tt>) <strong>run</strong>(command, message = nil, run = true, show_exit = true, show_output = false, show_command = false, fatal = true)
313
+ - (<tt>Hash</tt>) <strong>run</strong>(command, message = nil, run: true, show_exit: true, show_output: false, show_command: false, fatal_errors: true)
346
314
 
347
315
 
348
316
 
@@ -399,8 +367,6 @@
399
367
  <span class='type'>(<tt>Boolean</tt>)</span>
400
368
 
401
369
 
402
- <em class="default">(defaults to: <tt>true</tt>)</em>
403
-
404
370
 
405
371
  &mdash;
406
372
  <div class='inline'><p>If <code>false</code>, it will just print a message with the full command that will be run.</p>
@@ -416,8 +382,6 @@
416
382
  <span class='type'>(<tt>Boolean</tt>)</span>
417
383
 
418
384
 
419
- <em class="default">(defaults to: <tt>true</tt>)</em>
420
-
421
385
 
422
386
  &mdash;
423
387
  <div class='inline'><p>If show the exit status.</p>
@@ -433,8 +397,6 @@
433
397
  <span class='type'>(<tt>Boolean</tt>)</span>
434
398
 
435
399
 
436
- <em class="default">(defaults to: <tt>false</tt>)</em>
437
-
438
400
 
439
401
  &mdash;
440
402
  <div class='inline'><p>If show command output.</p>
@@ -450,8 +412,6 @@
450
412
  <span class='type'>(<tt>Boolean</tt>)</span>
451
413
 
452
414
 
453
- <em class="default">(defaults to: <tt>false</tt>)</em>
454
-
455
415
 
456
416
  &mdash;
457
417
  <div class='inline'><p>If show the command that will be run.</p>
@@ -461,14 +421,12 @@
461
421
 
462
422
  <li>
463
423
 
464
- <span class='name'>fatal</span>
424
+ <span class='name'>fatal_errors</span>
465
425
 
466
426
 
467
427
  <span class='type'>(<tt>Boolean</tt>)</span>
468
428
 
469
429
 
470
- <em class="default">(defaults to: <tt>true</tt>)</em>
471
-
472
430
 
473
431
  &mdash;
474
432
  <div class='inline'><p>If quit in case of fatal errors.</p>
@@ -502,48 +460,42 @@
502
460
  <pre class="lines">
503
461
 
504
462
 
505
- 349
506
- 350
507
- 351
508
- 352
509
- 353
510
- 354
511
- 355
512
- 356
513
- 357
514
- 358
515
- 359
516
- 360
517
- 361
518
- 362
519
- 363
520
- 364
521
- 365
522
- 366
523
- 367
524
- 368</pre>
463
+ 305
464
+ 306
465
+ 307
466
+ 308
467
+ 309
468
+ 310
469
+ 311
470
+ 312
471
+ 313
472
+ 314
473
+ 315
474
+ 316
475
+ 317
476
+ 318
477
+ 319
478
+ 320
479
+ 321</pre>
525
480
  </td>
526
481
  <td>
527
- <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 349</span>
482
+ <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 305</span>
528
483
 
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>
484
+ <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='label'>run:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>show_exit:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>show_output:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>show_command:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>fatal_errors:</span> <span class='kw'>true</span><span class='rparen'>)</span>
530
485
  <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'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rbrace'>}</span>
531
486
  <span class='id identifier rubyid_command'>command</span> <span class='op'>=</span> <span class='id identifier rubyid_command'>command</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span>
532
- <span class='id identifier rubyid_locale'>locale</span> <span class='op'>=</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_shell'>shell</span>
533
487
 
534
488
  <span class='comment'># Show the command
535
489
  </span> <span class='ivar'>@console</span><span class='period'>.</span><span class='id identifier rubyid_begin'>begin</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_message'>message</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
536
490
 
537
- <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_run'>run</span> <span class='kw'>then</span> <span class='comment'># Print a message
538
- </span> <span class='ivar'>@console</span><span class='period'>.</span><span class='id identifier rubyid_warn'>warn</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='period'>.</span><span class='id identifier rubyid_run_dry'>run_dry</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span><span class='rparen'>)</span>
539
- <span class='ivar'>@console</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span><span class='lparen'>(</span><span class='symbol'>:ok</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_show_exit'>show_exit</span>
491
+ <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_run'>run</span> <span class='comment'># Print a message
492
+ </span> <span class='id identifier rubyid_show_dry_run'>show_dry_run</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='comma'>,</span> <span class='id identifier rubyid_show_exit'>show_exit</span><span class='rparen'>)</span>
540
493
  <span class='kw'>else</span> <span class='comment'># Run
541
494
  </span> <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_command'>execute_command</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='comma'>,</span> <span class='id identifier rubyid_show_command'>show_command</span><span class='comma'>,</span> <span class='id identifier rubyid_show_output'>show_output</span><span class='rparen'>)</span>
542
495
  <span class='kw'>end</span>
543
496
 
544
497
  <span class='comment'># Return
545
- </span> <span class='ivar'>@console</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span><span class='lparen'>(</span><span class='id identifier rubyid_rv'>rv</span><span class='lbracket'>[</span><span class='symbol'>:status</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='int'>0</span> <span class='op'>?</span> <span class='symbol'>:ok</span> <span class='op'>:</span> <span class='symbol'>:fail</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_show_exit'>show_exit</span>
546
- <span class='id identifier rubyid_exit'>exit</span><span class='lparen'>(</span><span class='id identifier rubyid_rv'>rv</span><span class='lbracket'>[</span><span class='symbol'>:status</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_fatal'>fatal</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_rv'>rv</span><span class='lbracket'>[</span><span class='symbol'>:status</span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='int'>0</span>
498
+ </span> <span class='id identifier rubyid_handle_command_exit'>handle_command_exit</span><span class='lparen'>(</span><span class='id identifier rubyid_rv'>rv</span><span class='comma'>,</span> <span class='id identifier rubyid_show_exit'>show_exit</span><span class='comma'>,</span> <span class='id identifier rubyid_fatal_errors'>fatal_errors</span><span class='rparen'>)</span>
547
499
  <span class='id identifier rubyid_rv'>rv</span>
548
500
  <span class='kw'>end</span></pre>
549
501
  </td>
@@ -556,9 +508,9 @@
556
508
  </div>
557
509
 
558
510
  <div id="footer">
559
- Generated on Sat Mar 8 10:27:42 2014 by
511
+ Generated on Tue Mar 29 20:43:16 2016 by
560
512
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
561
- 0.8.7.3 (ruby-2.1.0).
513
+ 0.8.7.6 (ruby-2.3.0).
562
514
  </div>
563
515
 
564
516
  </body>