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::Read
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/Read.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="#check-instance_method" title="#check (instance method)">- (Object) <strong>check</strong>(path, tests) </a>
119
+ <a href="#check-instance_method" title="#check (instance method)">- (Object) <strong>check</strong>(path, *tests) </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="#find-instance_method" title="#find (instance method)">- (Object) <strong>find</strong>(directories, patterns = [], by_extension = false, case_sensitive = false, &amp;block) </a>
142
+ <a href="#find-instance_method" title="#find (instance method)">- (Object) <strong>find</strong>(directories, patterns: [], extension_only: false, case_sensitive: false, &amp;block) </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="check-instance_method">
173
173
 
174
- - (<tt>Object</tt>) <strong>check</strong>(path, tests)
174
+ - (<tt>Object</tt>) <strong>check</strong>(path, *tests)
175
175
 
176
176
 
177
177
 
@@ -181,7 +181,8 @@
181
181
  <div class="discussion">
182
182
  <p>Tests a path against a list of test.</p>
183
183
 
184
- <p>Valid tests are every method available in http://www.ruby-doc.org/core-1.9.3/FileTest.html (plus <code>read</code>, <code>write</code>, <code>execute</code>, <code>exec</code>, <code>dir</code>). Trailing question mark can be omitted.</p>
184
+ <p>Valid tests are every method available in http://www.ruby-doc.org/core-2.3.0/FileTest.html (plus <code>read</code>, <code>write</code>, <code>execute</code>, <code>exec</code>, <code>dir</code>).
185
+ Trailing question mark can be omitted. Unrecognized tests will make the check fail.</p>
185
186
 
186
187
 
187
188
  </div>
@@ -229,49 +230,51 @@
229
230
  <pre class="lines">
230
231
 
231
232
 
233
+ 51
234
+ 52
235
+ 53
236
+ 54
237
+ 55
238
+ 56
239
+ 57
240
+ 58
241
+ 59
242
+ 60
243
+ 61
244
+ 62
245
+ 63
246
+ 64
232
247
  65
233
248
  66
234
249
  67
235
250
  68
236
251
  69
237
252
  70
238
- 71
239
- 72
240
- 73
241
- 74
242
- 75
243
- 76
244
- 77
245
- 78
246
- 79
247
- 80
248
- 81
249
- 82
250
- 83
251
- 84</pre>
253
+ 71</pre>
252
254
  </td>
253
255
  <td>
254
- <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 65</span>
256
+ <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 51</span>
255
257
 
256
- <span class='kw'>def</span> <span class='id identifier rubyid_check'>check</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_tests'>tests</span><span class='rparen'>)</span>
258
+ <span class='kw'>def</span> <span class='id identifier rubyid_check'>check</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_tests'>tests</span><span class='rparen'>)</span>
257
259
  <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span>
258
260
 
259
- <span class='id identifier rubyid_tests'>tests</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='period'>.</span><span class='id identifier rubyid_all?'>all?</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_test'>test</span><span class='op'>|</span>
261
+ <span class='id identifier rubyid_tests'>tests</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='period'>.</span><span class='id identifier rubyid_all?'>all?</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_test'>test</span><span class='op'>|</span>
260
262
  <span class='comment'># Adjust test name
261
263
  </span> <span class='id identifier rubyid_test'>test</span> <span class='op'>=</span> <span class='id identifier rubyid_test'>test</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span>
262
264
 
263
- <span class='id identifier rubyid_test'>test</span> <span class='op'>=</span> <span class='kw'>case</span> <span class='id identifier rubyid_test'>test</span>
265
+ <span class='id identifier rubyid_test'>test</span> <span class='op'>=</span>
266
+ <span class='kw'>case</span> <span class='id identifier rubyid_test'>test</span>
264
267
  <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>read</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>then</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>readable</span><span class='tstring_end'>&quot;</span></span>
265
268
  <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>write</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>then</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>writable</span><span class='tstring_end'>&quot;</span></span>
266
269
  <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>execute</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>exec</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>then</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>executable</span><span class='tstring_end'>&quot;</span></span>
267
270
  <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>dir</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>then</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>directory</span><span class='tstring_end'>&quot;</span></span>
268
271
  <span class='kw'>else</span> <span class='id identifier rubyid_test'>test</span>
269
- <span class='kw'>end</span>
272
+ <span class='kw'>end</span>
270
273
 
271
274
  <span class='comment'># Execute test
272
275
  </span> <span class='id identifier rubyid_test'>test</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>?</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_test'>test</span> <span class='op'>!~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\?$</span><span class='regexp_end'>/</span></span>
273
276
  <span class='const'>FileTest</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='id identifier rubyid_test'>test</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='const'>FileTest</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_test'>test</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='kw'>nil</span>
274
- <span class='rbrace'>}</span>
277
+ <span class='kw'>end</span>
275
278
  <span class='kw'>end</span></pre>
276
279
  </td>
277
280
  </tr>
@@ -281,7 +284,7 @@
281
284
  <div class="method_details ">
282
285
  <h3 class="signature " id="find-instance_method">
283
286
 
284
- - (<tt>Object</tt>) <strong>find</strong>(directories, patterns = [], by_extension = false, case_sensitive = false, &amp;block)
287
+ - (<tt>Object</tt>) <strong>find</strong>(directories, patterns: [], extension_only: false, case_sensitive: false, &amp;block)
285
288
 
286
289
 
287
290
 
@@ -291,7 +294,7 @@
291
294
  <div class="discussion">
292
295
  <p>Find a list of files in directories matching given regexps or patterns.</p>
293
296
 
294
- <p>You can also pass a block to perform matching. The block will receive a single argument and the path will be considered matched if the blocks not evaluates to <code>nil</code> or <code>false</code>.</p>
297
+ <p>You can also pass a block to perform matching. The block will receive a single argument and the path will be considered if return value is not falsey.</p>
295
298
 
296
299
  <p>Inside the block, you can call <code>Find.prune</code> to stop searching in the current directory.</p>
297
300
 
@@ -325,8 +328,6 @@
325
328
  <span class='type'>(<tt>Array</tt>)</span>
326
329
 
327
330
 
328
- <em class="default">(defaults to: <tt>[]</tt>)</em>
329
-
330
331
 
331
332
  &mdash;
332
333
  <div class='inline'><p>A list of regexps or patterns to match files. If empty, every file is returned. Ignored if a block is provided.</p>
@@ -336,14 +337,12 @@
336
337
 
337
338
  <li>
338
339
 
339
- <span class='name'>by_extension</span>
340
+ <span class='name'>extension_only</span>
340
341
 
341
342
 
342
343
  <span class='type'>(<tt>Boolean</tt>)</span>
343
344
 
344
345
 
345
- <em class="default">(defaults to: <tt>false</tt>)</em>
346
-
347
346
 
348
347
  &mdash;
349
348
  <div class='inline'><p>If to only search in extensions. Ignored if a block is provided.</p>
@@ -359,8 +358,6 @@
359
358
  <span class='type'>(<tt>Boolean</tt>)</span>
360
359
 
361
360
 
362
- <em class="default">(defaults to: <tt>false</tt>)</em>
363
-
364
361
 
365
362
  &mdash;
366
363
  <div class='inline'><p>If the search is case sensitive. Only meaningful for string patterns.</p>
@@ -392,41 +389,39 @@
392
389
  <pre class="lines">
393
390
 
394
391
 
392
+ 84
393
+ 85
394
+ 86
395
+ 87
396
+ 88
397
+ 89
398
+ 90
399
+ 91
400
+ 92
401
+ 93
402
+ 94
403
+ 95
404
+ 96
395
405
  97
396
406
  98
397
407
  99
398
- 100
399
- 101
400
- 102
401
- 103
402
- 104
403
- 105
404
- 106
405
- 107
406
- 108
407
- 109
408
- 110
409
- 111
410
- 112
411
- 113
412
- 114</pre>
408
+ 100</pre>
413
409
  </td>
414
410
  <td>
415
- <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 97</span>
411
+ <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 84</span>
416
412
 
417
- <span class='kw'>def</span> <span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='id identifier rubyid_directories'>directories</span><span class='comma'>,</span> <span class='id identifier rubyid_patterns'>patterns</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_by_extension'>by_extension</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_case_sensitive'>case_sensitive</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
413
+ <span class='kw'>def</span> <span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='id identifier rubyid_directories'>directories</span><span class='comma'>,</span> <span class='label'>patterns:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>extension_only:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>case_sensitive:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
418
414
  <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
419
415
 
420
- <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>
421
- <span class='id identifier rubyid_patterns'>patterns</span> <span class='op'>=</span> <span class='id identifier rubyid_normalize_patterns'>normalize_patterns</span><span class='lparen'>(</span><span class='id identifier rubyid_patterns'>patterns</span><span class='comma'>,</span> <span class='id identifier rubyid_by_extension'>by_extension</span><span class='comma'>,</span> <span class='id identifier rubyid_case_sensitive'>case_sensitive</span><span class='rparen'>)</span>
416
+ <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>
417
+ <span class='id identifier rubyid_patterns'>patterns</span> <span class='op'>=</span> <span class='id identifier rubyid_normalize_patterns'>normalize_patterns</span><span class='lparen'>(</span><span class='id identifier rubyid_patterns'>patterns</span><span class='comma'>,</span> <span class='id identifier rubyid_extension_only'>extension_only</span><span class='comma'>,</span> <span class='id identifier rubyid_case_sensitive'>case_sensitive</span><span class='rparen'>)</span>
422
418
 
423
419
  <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>
424
- <span class='kw'>if</span> <span class='id identifier rubyid_check'>check</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='symbol'>:directory</span><span class='comma'>,</span> <span class='symbol'>:readable</span><span class='comma'>,</span> <span class='symbol'>:executable</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>then</span>
425
- <span class='const'>Find</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_entry'>entry</span><span class='op'>|</span>
426
- <span class='id identifier rubyid_found'>found</span> <span class='op'>=</span> <span class='id identifier rubyid_patterns'>patterns</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span> <span class='op'>?</span> <span class='kw'>true</span> <span class='op'>:</span> <span class='id identifier rubyid_match_pattern'>match_pattern</span><span class='lparen'>(</span><span class='id identifier rubyid_entry'>entry</span><span class='comma'>,</span> <span class='id identifier rubyid_patterns'>patterns</span><span class='comma'>,</span> <span class='id identifier rubyid_by_extension'>by_extension</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
420
+ <span class='kw'>next</span> <span class='kw'>unless</span> <span class='id identifier rubyid_check'>check</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='symbol'>:directory</span><span class='comma'>,</span> <span class='symbol'>:readable</span><span class='comma'>,</span> <span class='symbol'>:executable</span><span class='rbracket'>]</span><span class='rparen'>)</span>
421
+ <span class='const'>Find</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='id identifier rubyid_directory'>directory</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_entry'>entry</span><span class='op'>|</span>
422
+ <span class='id identifier rubyid_found'>found</span> <span class='op'>=</span> <span class='id identifier rubyid_patterns'>patterns</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span> <span class='op'>?</span> <span class='kw'>true</span> <span class='op'>:</span> <span class='id identifier rubyid_match_pattern'>match_pattern</span><span class='lparen'>(</span><span class='id identifier rubyid_entry'>entry</span><span class='comma'>,</span> <span class='id identifier rubyid_patterns'>patterns</span><span class='comma'>,</span> <span class='id identifier rubyid_extension_only'>extension_only</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
427
423
 
428
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_entry'>entry</span> <span class='kw'>if</span> <span class='id identifier rubyid_found'>found</span>
429
- <span class='kw'>end</span>
424
+ <span class='id identifier rubyid_rv'>rv</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_entry'>entry</span> <span class='kw'>if</span> <span class='id identifier rubyid_found'>found</span>
430
425
  <span class='kw'>end</span>
431
426
  <span class='kw'>end</span>
432
427
 
@@ -442,9 +437,9 @@
442
437
  </div>
443
438
 
444
439
  <div id="footer">
445
- Generated on Sat Mar 8 10:27:42 2014 by
440
+ Generated on Tue Mar 29 20:43:16 2016 by
446
441
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
447
- 0.8.7.3 (ruby-2.1.0).
442
+ 0.8.7.6 (ruby-2.3.0).
448
443
  </div>
449
444
 
450
445
  </body>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Bovem::ShellMethods::Write
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/Write.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="#copy-instance_method" title="#copy (instance method)">- (Boolean) <strong>copy</strong>(src, dst, run = true, show_errors = false, fatal = true) </a>
119
+ <a href="#copy-instance_method" title="#copy (instance method)">- (Boolean) <strong>copy</strong>(src, dst, run: true, show_errors: false, fatal_errors: true) </a>
120
120
 
121
121
 
122
122
 
@@ -139,30 +139,7 @@
139
139
  <li class="public ">
140
140
  <span class="summary_signature">
141
141
 
142
- <a href="#copy_or_move-instance_method" title="#copy_or_move (instance method)">- (Boolean) <strong>copy_or_move</strong>(src, dst, operation, run = true, show_errors = true, fatal = true) </a>
143
-
144
-
145
-
146
- </span>
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
- <span class="summary_desc"><div class='inline'><p>Copies or moves a set of files or directory to another location.</p>
157
- </div></span>
158
-
159
- </li>
160
-
161
-
162
- <li class="public ">
163
- <span class="summary_signature">
164
-
165
- <a href="#move-instance_method" title="#move (instance method)">- (Boolean) <strong>move</strong>(src, dst, run = true, show_errors = false, fatal = true) </a>
142
+ <a href="#move-instance_method" title="#move (instance method)">- (Boolean) <strong>move</strong>(src, dst, run: true, show_errors: false, fatal_errors: true) </a>
166
143
 
167
144
 
168
145
 
@@ -194,7 +171,7 @@
194
171
  <div class="method_details first">
195
172
  <h3 class="signature first" id="copy-instance_method">
196
173
 
197
- - (<tt>Boolean</tt>) <strong>copy</strong>(src, dst, run = true, show_errors = false, fatal = true)
174
+ - (<tt>Boolean</tt>) <strong>copy</strong>(src, dst, run: true, show_errors: false, fatal_errors: true)
198
175
 
199
176
 
200
177
 
@@ -249,8 +226,6 @@
249
226
  <span class='type'>(<tt>Boolean</tt>)</span>
250
227
 
251
228
 
252
- <em class="default">(defaults to: <tt>true</tt>)</em>
253
-
254
229
 
255
230
  &mdash;
256
231
  <div class='inline'><p>If <code>false</code>, it will just print a list of message that would be copied or moved.</p>
@@ -266,8 +241,6 @@
266
241
  <span class='type'>(<tt>Boolean</tt>)</span>
267
242
 
268
243
 
269
- <em class="default">(defaults to: <tt>false</tt>)</em>
270
-
271
244
 
272
245
  &mdash;
273
246
  <div class='inline'><p>If show errors.</p>
@@ -277,14 +250,12 @@
277
250
 
278
251
  <li>
279
252
 
280
- <span class='name'>fatal</span>
253
+ <span class='name'>fatal_errors</span>
281
254
 
282
255
 
283
256
  <span class='type'>(<tt>Boolean</tt>)</span>
284
257
 
285
258
 
286
- <em class="default">(defaults to: <tt>true</tt>)</em>
287
-
288
259
 
289
260
  &mdash;
290
261
  <div class='inline'><p>If quit in case of fatal errors.</p>
@@ -318,200 +289,15 @@
318
289
  <pre class="lines">
319
290
 
320
291
 
321
- 163
322
- 164
323
- 165</pre>
292
+ 142
293
+ 143
294
+ 144</pre>
324
295
  </td>
325
296
  <td>
326
- <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 163</span>
327
-
328
- <span class='kw'>def</span> <span class='id identifier rubyid_copy'>copy</span><span class='lparen'>(</span><span class='id identifier rubyid_src'>src</span><span class='comma'>,</span> <span class='id identifier rubyid_dst'>dst</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>
329
- <span class='id identifier rubyid_copy_or_move'>copy_or_move</span><span class='lparen'>(</span><span class='id identifier rubyid_src'>src</span><span class='comma'>,</span> <span class='id identifier rubyid_dst'>dst</span><span class='comma'>,</span> <span class='symbol'>:copy</span><span class='comma'>,</span> <span class='id identifier rubyid_run'>run</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'>fatal</span><span class='rparen'>)</span>
330
- <span class='kw'>end</span></pre>
331
- </td>
332
- </tr>
333
- </table>
334
- </div>
335
-
336
- <div class="method_details ">
337
- <h3 class="signature " id="copy_or_move-instance_method">
338
-
339
- - (<tt>Boolean</tt>) <strong>copy_or_move</strong>(src, dst, operation, run = true, show_errors = true, fatal = true)
340
-
341
-
342
-
343
-
344
-
345
- </h3><div class="docstring">
346
- <div class="discussion">
347
- <p>Copies or moves a set of files or directory to another location.</p>
348
-
349
-
350
- </div>
351
- </div>
352
- <div class="tags">
353
- <p class="tag_title">Parameters:</p>
354
- <ul class="param">
355
-
356
- <li>
357
-
358
- <span class='name'>src</span>
359
-
360
-
361
- <span class='type'>(<tt>String|Array</tt>)</span>
362
-
363
-
364
-
365
- &mdash;
366
- <div class='inline'><p>The entries to copy or move. If is an Array, <code>dst</code> is assumed to be a directory.</p>
367
- </div>
368
-
369
- </li>
370
-
371
- <li>
372
-
373
- <span class='name'>dst</span>
374
-
375
-
376
- <span class='type'>(<tt>String</tt>)</span>
377
-
378
-
379
-
380
- &mdash;
381
- <div class='inline'><p>The destination. <strong>Any existing entries will be overwritten.</strong> Any required directory will be created.</p>
382
- </div>
383
-
384
- </li>
385
-
386
- <li>
387
-
388
- <span class='name'>operation</span>
389
-
390
-
391
- <span class='type'>(<tt>Symbol</tt>)</span>
392
-
393
-
394
-
395
- &mdash;
396
- <div class='inline'><p>The operation to perform. Valid values are <code>:copy</code> or <code>:move</code>.</p>
397
- </div>
398
-
399
- </li>
400
-
401
- <li>
402
-
403
- <span class='name'>run</span>
404
-
405
-
406
- <span class='type'>(<tt>Boolean</tt>)</span>
407
-
408
-
409
- <em class="default">(defaults to: <tt>true</tt>)</em>
410
-
411
-
412
- &mdash;
413
- <div class='inline'><p>If <code>false</code>, it will just print a list of message that would be copied or moved.</p>
414
- </div>
415
-
416
- </li>
417
-
418
- <li>
419
-
420
- <span class='name'>show_errors</span>
421
-
422
-
423
- <span class='type'>(<tt>Boolean</tt>)</span>
424
-
425
-
426
- <em class="default">(defaults to: <tt>true</tt>)</em>
427
-
428
-
429
- &mdash;
430
- <div class='inline'><p>If show errors.</p>
431
- </div>
432
-
433
- </li>
434
-
435
- <li>
436
-
437
- <span class='name'>fatal</span>
438
-
439
-
440
- <span class='type'>(<tt>Boolean</tt>)</span>
441
-
442
-
443
- <em class="default">(defaults to: <tt>true</tt>)</em>
444
-
445
-
446
- &mdash;
447
- <div class='inline'><p>If quit in case of fatal errors.</p>
448
- </div>
449
-
450
- </li>
451
-
452
- </ul>
453
-
454
- <p class="tag_title">Returns:</p>
455
- <ul class="return">
456
-
457
- <li>
458
-
459
-
460
- <span class='type'>(<tt>Boolean</tt>)</span>
461
-
462
-
463
-
464
- &mdash;
465
- <div class='inline'><p><code>true</code> if operation succeeded, <code>false</code> otherwise.</p>
466
- </div>
467
-
468
- </li>
469
-
470
- </ul>
471
-
472
- </div><table class="source_code">
473
- <tr>
474
- <td>
475
- <pre class="lines">
476
-
297
+ <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 142</span>
477
298
 
478
- 188
479
- 189
480
- 190
481
- 191
482
- 192
483
- 193
484
- 194
485
- 195
486
- 196
487
- 197
488
- 198
489
- 199
490
- 200
491
- 201
492
- 202
493
- 203
494
- 204</pre>
495
- </td>
496
- <td>
497
- <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 188</span>
498
-
499
- <span class='kw'>def</span> <span class='id identifier rubyid_copy_or_move'>copy_or_move</span><span class='lparen'>(</span><span class='id identifier rubyid_src'>src</span><span class='comma'>,</span> <span class='id identifier rubyid_dst'>dst</span><span class='comma'>,</span> <span class='id identifier rubyid_operation'>operation</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'>true</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>
500
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>true</span>
501
- <span class='id identifier rubyid_operation'>operation</span><span class='comma'>,</span> <span class='id identifier rubyid_operation_s'>operation_s</span><span class='comma'>,</span> <span class='id identifier rubyid_single'>single</span><span class='comma'>,</span> <span class='id identifier rubyid_src'>src</span><span class='comma'>,</span> <span class='id identifier rubyid_dst'>dst</span> <span class='op'>=</span> <span class='id identifier rubyid_sanitize_copy_or_move'>sanitize_copy_or_move</span><span class='lparen'>(</span><span class='id identifier rubyid_operation'>operation</span><span class='comma'>,</span> <span class='id identifier rubyid_src'>src</span><span class='comma'>,</span> <span class='id identifier rubyid_dst'>dst</span><span class='rparen'>)</span>
502
-
503
- <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_run'>run</span> <span class='kw'>then</span>
504
- <span class='id identifier rubyid_dry_run_copy_or_move'>dry_run_copy_or_move</span><span class='lparen'>(</span><span class='id identifier rubyid_single'>single</span><span class='comma'>,</span> <span class='id identifier rubyid_operation_s'>operation_s</span><span class='comma'>,</span> <span class='id identifier rubyid_src'>src</span><span class='comma'>,</span> <span class='id identifier rubyid_dst'>dst</span><span class='rparen'>)</span>
505
- <span class='kw'>else</span>
506
- <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>
507
- <span class='id identifier rubyid_dst_dir'>dst_dir</span> <span class='op'>=</span> <span class='id identifier rubyid_prepare_destination'>prepare_destination</span><span class='lparen'>(</span><span class='id identifier rubyid_single'>single</span><span class='comma'>,</span> <span class='id identifier rubyid_src'>src</span><span class='comma'>,</span> <span class='id identifier rubyid_dst'>dst</span><span class='comma'>,</span> <span class='id identifier rubyid_operation_s'>operation_s</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'>fatal</span><span class='rparen'>)</span>
508
- <span class='id identifier rubyid_check_sources'>check_sources</span><span class='lparen'>(</span><span class='id identifier rubyid_src'>src</span><span class='comma'>,</span> <span class='id identifier rubyid_operation_s'>operation_s</span><span class='comma'>,</span> <span class='id identifier rubyid_fatal'>fatal</span><span class='rparen'>)</span>
509
- <span class='id identifier rubyid_execute_copy_or_move'>execute_copy_or_move</span><span class='lparen'>(</span><span class='id identifier rubyid_src'>src</span><span class='comma'>,</span> <span class='id identifier rubyid_dst'>dst</span><span class='comma'>,</span> <span class='id identifier rubyid_dst_dir'>dst_dir</span><span class='comma'>,</span> <span class='id identifier rubyid_single'>single</span><span class='comma'>,</span> <span class='id identifier rubyid_operation'>operation</span><span class='comma'>,</span> <span class='id identifier rubyid_operation_s'>operation_s</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'>fatal</span><span class='rparen'>)</span>
510
- <span class='kw'>true</span>
511
- <span class='kw'>end</span>
512
- <span class='kw'>end</span>
513
-
514
- <span class='id identifier rubyid_rv'>rv</span>
299
+ <span class='kw'>def</span> <span class='id identifier rubyid_copy'>copy</span><span class='lparen'>(</span><span class='id identifier rubyid_src'>src</span><span class='comma'>,</span> <span class='id identifier rubyid_dst'>dst</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>
300
+ <span class='id identifier rubyid_copy_or_move'>copy_or_move</span><span class='lparen'>(</span><span class='id identifier rubyid_src'>src</span><span class='comma'>,</span> <span class='id identifier rubyid_dst'>dst</span><span class='comma'>,</span> <span class='label'>operation:</span> <span class='symbol'>:copy</span><span class='comma'>,</span> <span class='label'>run:</span> <span class='id identifier rubyid_run'>run</span><span class='comma'>,</span> <span class='label'>show_errors:</span> <span class='id identifier rubyid_show_errors'>show_errors</span><span class='comma'>,</span> <span class='label'>fatal_errors:</span> <span class='id identifier rubyid_fatal_errors'>fatal_errors</span><span class='rparen'>)</span>
515
301
  <span class='kw'>end</span></pre>
516
302
  </td>
517
303
  </tr>
@@ -521,7 +307,7 @@
521
307
  <div class="method_details ">
522
308
  <h3 class="signature " id="move-instance_method">
523
309
 
524
- - (<tt>Boolean</tt>) <strong>move</strong>(src, dst, run = true, show_errors = false, fatal = true)
310
+ - (<tt>Boolean</tt>) <strong>move</strong>(src, dst, run: true, show_errors: false, fatal_errors: true)
525
311
 
526
312
 
527
313
 
@@ -576,8 +362,6 @@
576
362
  <span class='type'>(<tt>Boolean</tt>)</span>
577
363
 
578
364
 
579
- <em class="default">(defaults to: <tt>true</tt>)</em>
580
-
581
365
 
582
366
  &mdash;
583
367
  <div class='inline'><p>If <code>false</code>, it will just print a list of message that would be deleted.</p>
@@ -593,8 +377,6 @@
593
377
  <span class='type'>(<tt>Boolean</tt>)</span>
594
378
 
595
379
 
596
- <em class="default">(defaults to: <tt>false</tt>)</em>
597
-
598
380
 
599
381
  &mdash;
600
382
  <div class='inline'><p>If show errors.</p>
@@ -604,14 +386,12 @@
604
386
 
605
387
  <li>
606
388
 
607
- <span class='name'>fatal</span>
389
+ <span class='name'>fatal_errors</span>
608
390
 
609
391
 
610
392
  <span class='type'>(<tt>Boolean</tt>)</span>
611
393
 
612
394
 
613
- <em class="default">(defaults to: <tt>true</tt>)</em>
614
-
615
395
 
616
396
  &mdash;
617
397
  <div class='inline'><p>If quit in case of fatal errors.</p>
@@ -645,15 +425,15 @@
645
425
  <pre class="lines">
646
426
 
647
427
 
648
- 175
649
- 176
650
- 177</pre>
428
+ 154
429
+ 155
430
+ 156</pre>
651
431
  </td>
652
432
  <td>
653
- <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 175</span>
433
+ <pre class="code"><span class="info file"># File 'lib/bovem/shell.rb', line 154</span>
654
434
 
655
- <span class='kw'>def</span> <span class='id identifier rubyid_move'>move</span><span class='lparen'>(</span><span class='id identifier rubyid_src'>src</span><span class='comma'>,</span> <span class='id identifier rubyid_dst'>dst</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>
656
- <span class='id identifier rubyid_copy_or_move'>copy_or_move</span><span class='lparen'>(</span><span class='id identifier rubyid_src'>src</span><span class='comma'>,</span> <span class='id identifier rubyid_dst'>dst</span><span class='comma'>,</span> <span class='symbol'>:move</span><span class='comma'>,</span> <span class='id identifier rubyid_run'>run</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'>fatal</span><span class='rparen'>)</span>
435
+ <span class='kw'>def</span> <span class='id identifier rubyid_move'>move</span><span class='lparen'>(</span><span class='id identifier rubyid_src'>src</span><span class='comma'>,</span> <span class='id identifier rubyid_dst'>dst</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>
436
+ <span class='id identifier rubyid_copy_or_move'>copy_or_move</span><span class='lparen'>(</span><span class='id identifier rubyid_src'>src</span><span class='comma'>,</span> <span class='id identifier rubyid_dst'>dst</span><span class='comma'>,</span> <span class='label'>operation:</span> <span class='symbol'>:move</span><span class='comma'>,</span> <span class='label'>run:</span> <span class='id identifier rubyid_run'>run</span><span class='comma'>,</span> <span class='label'>show_errors:</span> <span class='id identifier rubyid_show_errors'>show_errors</span><span class='comma'>,</span> <span class='label'>fatal_errors:</span> <span class='id identifier rubyid_fatal_errors'>fatal_errors</span><span class='rparen'>)</span>
657
437
  <span class='kw'>end</span></pre>
658
438
  </td>
659
439
  </tr>
@@ -665,9 +445,9 @@
665
445
  </div>
666
446
 
667
447
  <div id="footer">
668
- Generated on Sat Mar 8 10:27:42 2014 by
448
+ Generated on Tue Mar 29 20:43:16 2016 by
669
449
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
670
- 0.8.7.3 (ruby-2.1.0).
450
+ 0.8.7.6 (ruby-2.3.0).
671
451
  </div>
672
452
 
673
453
  </body>