action_command 0.1.5 → 0.1.6
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/doc/ActionCommand/Executable.html +1 -1
- data/doc/ActionCommand/InputOutput.html +1 -1
- data/doc/ActionCommand/Result.html +168 -160
- data/doc/ActionCommand.html +76 -62
- data/doc/_index.html +1 -1
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/method_list.html +50 -50
- data/doc/top-level-namespace.html +1 -1
- data/lib/action_command/result.rb +37 -8
- data/lib/action_command/version.rb +1 -1
- data/lib/action_command.rb +10 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fd80f802e6403243dd4a639dd1c9f83e2a18fe33
|
|
4
|
+
data.tar.gz: 0c93fdd9f2278c8bbe61f4280f99ffa15c2d3a42
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0bef17a87d62a7d9c6c95818b36103c201b4131103e7383d1abf3e588d926844c535f0272caf1bf39786f3b8009d877b8c6ba82434c677d619363a35be47ac4e
|
|
7
|
+
data.tar.gz: 9d8c313d0fb088a8090c7f7c27c482a106083fcef6f1fefb3f4e4aedb60932f9bd4e4737ee3a35aacd0cb344065cea09f51f1db080a2971f6a037ba04371dbed
|
data/Gemfile.lock
CHANGED
|
@@ -1124,7 +1124,7 @@ ActionCommand#execute_test.</p>
|
|
|
1124
1124
|
</div>
|
|
1125
1125
|
|
|
1126
1126
|
<div id="footer">
|
|
1127
|
-
Generated on
|
|
1127
|
+
Generated on Wed May 25 10:31:53 2016 by
|
|
1128
1128
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1129
1129
|
0.8.7.6 (ruby-2.2.3).
|
|
1130
1130
|
</div>
|
|
@@ -1401,7 +1401,7 @@ description.</p>
|
|
|
1401
1401
|
</div>
|
|
1402
1402
|
|
|
1403
1403
|
<div id="footer">
|
|
1404
|
-
Generated on
|
|
1404
|
+
Generated on Wed May 25 10:31:53 2016 by
|
|
1405
1405
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1406
1406
|
0.8.7.6 (ruby-2.2.3).
|
|
1407
1407
|
</div>
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
<li class="public ">
|
|
240
240
|
<span class="summary_signature">
|
|
241
241
|
|
|
242
|
-
<a href="#
|
|
242
|
+
<a href="#configure_logger-instance_method" title="#configure_logger (instance method)">- (Object) <strong>configure_logger</strong>(logger, format) </a>
|
|
243
243
|
|
|
244
244
|
|
|
245
245
|
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
|
|
255
255
|
|
|
256
256
|
<span class="summary_desc"><div class='inline'>
|
|
257
|
-
<p>
|
|
257
|
+
<p>set the logger for this result.</p>
|
|
258
258
|
</div></span>
|
|
259
259
|
|
|
260
260
|
</li>
|
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
<li class="public ">
|
|
264
264
|
<span class="summary_signature">
|
|
265
265
|
|
|
266
|
-
<a href="#
|
|
266
|
+
<a href="#current-instance_method" title="#current (instance method)">- (Object) <strong>current</strong> </a>
|
|
267
267
|
|
|
268
268
|
|
|
269
269
|
|
|
@@ -278,7 +278,7 @@
|
|
|
278
278
|
|
|
279
279
|
|
|
280
280
|
<span class="summary_desc"><div class='inline'>
|
|
281
|
-
<p>
|
|
281
|
+
<p>returns the current hash of values we are operating on.</p>
|
|
282
282
|
</div></span>
|
|
283
283
|
|
|
284
284
|
</li>
|
|
@@ -287,7 +287,7 @@
|
|
|
287
287
|
<li class="public ">
|
|
288
288
|
<span class="summary_signature">
|
|
289
289
|
|
|
290
|
-
<a href="#
|
|
290
|
+
<a href="#debug-instance_method" title="#debug (instance method)">- (Object) <strong>debug</strong>(msg = nil) { ... }</a>
|
|
291
291
|
|
|
292
292
|
|
|
293
293
|
|
|
@@ -302,7 +302,7 @@
|
|
|
302
302
|
|
|
303
303
|
|
|
304
304
|
<span class="summary_desc"><div class='inline'>
|
|
305
|
-
<p>display an
|
|
305
|
+
<p>display an debugging message to the logger, if there is one.</p>
|
|
306
306
|
</div></span>
|
|
307
307
|
|
|
308
308
|
</li>
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
<li class="public ">
|
|
312
312
|
<span class="summary_signature">
|
|
313
313
|
|
|
314
|
-
<a href="#
|
|
314
|
+
<a href="#error-instance_method" title="#error (instance method)">- (Object) <strong>error</strong>(msg) </a>
|
|
315
315
|
|
|
316
316
|
|
|
317
317
|
|
|
@@ -326,7 +326,7 @@
|
|
|
326
326
|
|
|
327
327
|
|
|
328
328
|
<span class="summary_desc"><div class='inline'>
|
|
329
|
-
<p>
|
|
329
|
+
<p>display an error message to the logger, if there is one.</p>
|
|
330
330
|
</div></span>
|
|
331
331
|
|
|
332
332
|
</li>
|
|
@@ -335,7 +335,7 @@
|
|
|
335
335
|
<li class="public ">
|
|
336
336
|
<span class="summary_signature">
|
|
337
337
|
|
|
338
|
-
<a href="#
|
|
338
|
+
<a href="#failed-instance_method" title="#failed (instance method)">- (Object) <strong>failed</strong>(msg) </a>
|
|
339
339
|
|
|
340
340
|
|
|
341
341
|
|
|
@@ -359,7 +359,7 @@
|
|
|
359
359
|
<li class="public ">
|
|
360
360
|
<span class="summary_signature">
|
|
361
361
|
|
|
362
|
-
<a href="#
|
|
362
|
+
<a href="#failed_with_code-instance_method" title="#failed_with_code (instance method)">- (Object) <strong>failed_with_code</strong>(msg, result_code) </a>
|
|
363
363
|
|
|
364
364
|
|
|
365
365
|
|
|
@@ -374,7 +374,7 @@
|
|
|
374
374
|
|
|
375
375
|
|
|
376
376
|
<span class="summary_desc"><div class='inline'>
|
|
377
|
-
<p>
|
|
377
|
+
<p>Call this if your command implementation fails.</p>
|
|
378
378
|
</div></span>
|
|
379
379
|
|
|
380
380
|
</li>
|
|
@@ -383,15 +383,13 @@
|
|
|
383
383
|
<li class="public ">
|
|
384
384
|
<span class="summary_signature">
|
|
385
385
|
|
|
386
|
-
<a href="#
|
|
386
|
+
<a href="#info-instance_method" title="#info (instance method)">- (Object) <strong>info</strong>(msg = nil) { ... }</a>
|
|
387
387
|
|
|
388
388
|
|
|
389
389
|
|
|
390
390
|
</span>
|
|
391
391
|
|
|
392
392
|
|
|
393
|
-
<span class="note title constructor">constructor</span>
|
|
394
|
-
|
|
395
393
|
|
|
396
394
|
|
|
397
395
|
|
|
@@ -400,7 +398,7 @@
|
|
|
400
398
|
|
|
401
399
|
|
|
402
400
|
<span class="summary_desc"><div class='inline'>
|
|
403
|
-
<p>
|
|
401
|
+
<p>display an informational message to the logger, if there is one.</p>
|
|
404
402
|
</div></span>
|
|
405
403
|
|
|
406
404
|
</li>
|
|
@@ -409,13 +407,15 @@
|
|
|
409
407
|
<li class="public ">
|
|
410
408
|
<span class="summary_signature">
|
|
411
409
|
|
|
412
|
-
<a href="#
|
|
410
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Result) <strong>initialize</strong> </a>
|
|
413
411
|
|
|
414
412
|
|
|
415
413
|
|
|
416
414
|
</span>
|
|
417
415
|
|
|
418
416
|
|
|
417
|
+
<span class="note title constructor">constructor</span>
|
|
418
|
+
|
|
419
419
|
|
|
420
420
|
|
|
421
421
|
|
|
@@ -424,7 +424,7 @@
|
|
|
424
424
|
|
|
425
425
|
|
|
426
426
|
<span class="summary_desc"><div class='inline'>
|
|
427
|
-
<p>
|
|
427
|
+
<p>By default, a command is ok?.</p>
|
|
428
428
|
</div></span>
|
|
429
429
|
|
|
430
430
|
</li>
|
|
@@ -433,7 +433,7 @@
|
|
|
433
433
|
<li class="public ">
|
|
434
434
|
<span class="summary_signature">
|
|
435
435
|
|
|
436
|
-
<a href="#
|
|
436
|
+
<a href="#key%3F-instance_method" title="#key? (instance method)">- (Boolean) <strong>key?</strong>(key) </a>
|
|
437
437
|
|
|
438
438
|
|
|
439
439
|
|
|
@@ -448,7 +448,7 @@
|
|
|
448
448
|
|
|
449
449
|
|
|
450
450
|
<span class="summary_desc"><div class='inline'>
|
|
451
|
-
<p>
|
|
451
|
+
<p>determine if a key exists in the result.</p>
|
|
452
452
|
</div></span>
|
|
453
453
|
|
|
454
454
|
</li>
|
|
@@ -457,7 +457,7 @@
|
|
|
457
457
|
<li class="public ">
|
|
458
458
|
<span class="summary_signature">
|
|
459
459
|
|
|
460
|
-
<a href="#
|
|
460
|
+
<a href="#log_input-instance_method" title="#log_input (instance method)">- (Object) <strong>log_input</strong>(params) </a>
|
|
461
461
|
|
|
462
462
|
|
|
463
463
|
|
|
@@ -472,7 +472,7 @@
|
|
|
472
472
|
|
|
473
473
|
|
|
474
474
|
<span class="summary_desc"><div class='inline'>
|
|
475
|
-
<p>Used internally to log the
|
|
475
|
+
<p>Used internally to log the input parameters to a command.</p>
|
|
476
476
|
</div></span>
|
|
477
477
|
|
|
478
478
|
</li>
|
|
@@ -481,7 +481,7 @@
|
|
|
481
481
|
<li class="public ">
|
|
482
482
|
<span class="summary_signature">
|
|
483
483
|
|
|
484
|
-
<a href="#
|
|
484
|
+
<a href="#log_output-instance_method" title="#log_output (instance method)">- (Object) <strong>log_output</strong> </a>
|
|
485
485
|
|
|
486
486
|
|
|
487
487
|
|
|
@@ -496,7 +496,7 @@
|
|
|
496
496
|
|
|
497
497
|
|
|
498
498
|
<span class="summary_desc"><div class='inline'>
|
|
499
|
-
<p>
|
|
499
|
+
<p>Used internally to log the output parameters for a command.</p>
|
|
500
500
|
</div></span>
|
|
501
501
|
|
|
502
502
|
</li>
|
|
@@ -750,12 +750,12 @@
|
|
|
750
750
|
<pre class="lines">
|
|
751
751
|
|
|
752
752
|
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
753
|
+
83
|
|
754
|
+
84
|
|
755
|
+
85</pre>
|
|
756
756
|
</td>
|
|
757
757
|
<td>
|
|
758
|
-
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line
|
|
758
|
+
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 83</span>
|
|
759
759
|
|
|
760
760
|
<span class='kw'>def</span> <span class='id identifier rubyid_last_error'>last_error</span>
|
|
761
761
|
<span class='ivar'>@last_error</span>
|
|
@@ -811,12 +811,12 @@
|
|
|
811
811
|
<pre class="lines">
|
|
812
812
|
|
|
813
813
|
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
814
|
+
80
|
|
815
|
+
81
|
|
816
|
+
82</pre>
|
|
817
817
|
</td>
|
|
818
818
|
<td>
|
|
819
|
-
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line
|
|
819
|
+
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 80</span>
|
|
820
820
|
|
|
821
821
|
<span class='kw'>def</span> <span class='id identifier rubyid_result_code'>result_code</span>
|
|
822
822
|
<span class='ivar'>@result_code</span>
|
|
@@ -859,12 +859,12 @@
|
|
|
859
859
|
<pre class="lines">
|
|
860
860
|
|
|
861
861
|
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
862
|
+
126
|
|
863
|
+
127
|
|
864
|
+
128</pre>
|
|
865
865
|
</td>
|
|
866
866
|
<td>
|
|
867
|
-
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line
|
|
867
|
+
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 126</span>
|
|
868
868
|
|
|
869
869
|
<span class='kw'>def</span> <span class='op'>[]</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
|
870
870
|
<span class='kw'>return</span> <span class='id identifier rubyid_current'>current</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span>
|
|
@@ -900,12 +900,12 @@
|
|
|
900
900
|
<pre class="lines">
|
|
901
901
|
|
|
902
902
|
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
903
|
+
111
|
|
904
|
+
112
|
|
905
|
+
113</pre>
|
|
906
906
|
</td>
|
|
907
907
|
<td>
|
|
908
|
-
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line
|
|
908
|
+
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 111</span>
|
|
909
909
|
|
|
910
910
|
<span class='kw'>def</span> <span class='op'>[]=</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_val'>val</span><span class='rparen'>)</span>
|
|
911
911
|
<span class='id identifier rubyid_current'>current</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_val'>val</span>
|
|
@@ -913,6 +913,55 @@
|
|
|
913
913
|
</td>
|
|
914
914
|
</tr>
|
|
915
915
|
</table>
|
|
916
|
+
</div>
|
|
917
|
+
|
|
918
|
+
<div class="method_details ">
|
|
919
|
+
<h3 class="signature " id="configure_logger-instance_method">
|
|
920
|
+
|
|
921
|
+
- (<tt>Object</tt>) <strong>configure_logger</strong>(logger, format)
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
</h3><div class="docstring">
|
|
928
|
+
<div class="discussion">
|
|
929
|
+
|
|
930
|
+
<p>set the logger for this result</p>
|
|
931
|
+
|
|
932
|
+
|
|
933
|
+
</div>
|
|
934
|
+
</div>
|
|
935
|
+
<div class="tags">
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
</div><table class="source_code">
|
|
939
|
+
<tr>
|
|
940
|
+
<td>
|
|
941
|
+
<pre class="lines">
|
|
942
|
+
|
|
943
|
+
|
|
944
|
+
16
|
|
945
|
+
17
|
|
946
|
+
18
|
|
947
|
+
19
|
|
948
|
+
20
|
|
949
|
+
21
|
|
950
|
+
22</pre>
|
|
951
|
+
</td>
|
|
952
|
+
<td>
|
|
953
|
+
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 16</span>
|
|
954
|
+
|
|
955
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_configure_logger'>configure_logger</span><span class='lparen'>(</span><span class='id identifier rubyid_logger'>logger</span><span class='comma'>,</span> <span class='id identifier rubyid_format'>format</span><span class='rparen'>)</span>
|
|
956
|
+
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_logger'>logger</span>
|
|
957
|
+
<span class='ivar'>@sequence</span> <span class='op'>=</span> <span class='const'>SecureRandom</span><span class='period'>.</span><span class='id identifier rubyid_hex'>hex</span>
|
|
958
|
+
<span class='ivar'>@stack</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
|
959
|
+
<span class='ivar'>@logger</span> <span class='op'>=</span> <span class='id identifier rubyid_logger'>logger</span>
|
|
960
|
+
<span class='ivar'>@log_format</span> <span class='op'>=</span> <span class='id identifier rubyid_format'>format</span>
|
|
961
|
+
<span class='kw'>end</span></pre>
|
|
962
|
+
</td>
|
|
963
|
+
</tr>
|
|
964
|
+
</table>
|
|
916
965
|
</div>
|
|
917
966
|
|
|
918
967
|
<div class="method_details ">
|
|
@@ -941,12 +990,12 @@
|
|
|
941
990
|
<pre class="lines">
|
|
942
991
|
|
|
943
992
|
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
993
|
+
106
|
|
994
|
+
107
|
|
995
|
+
108</pre>
|
|
947
996
|
</td>
|
|
948
997
|
<td>
|
|
949
|
-
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line
|
|
998
|
+
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 106</span>
|
|
950
999
|
|
|
951
1000
|
<span class='kw'>def</span> <span class='id identifier rubyid_current'>current</span>
|
|
952
1001
|
<span class='kw'>return</span> <span class='ivar'>@values</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span>
|
|
@@ -1000,20 +1049,20 @@
|
|
|
1000
1049
|
<pre class="lines">
|
|
1001
1050
|
|
|
1002
1051
|
|
|
1003
|
-
30
|
|
1004
1052
|
31
|
|
1005
1053
|
32
|
|
1006
1054
|
33
|
|
1007
1055
|
34
|
|
1008
|
-
35
|
|
1056
|
+
35
|
|
1057
|
+
36</pre>
|
|
1009
1058
|
</td>
|
|
1010
1059
|
<td>
|
|
1011
|
-
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line
|
|
1060
|
+
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 31</span>
|
|
1012
1061
|
|
|
1013
1062
|
<span class='kw'>def</span> <span class='id identifier rubyid_debug'>debug</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
|
1014
1063
|
<span class='kw'>if</span> <span class='ivar'>@logger</span>
|
|
1015
|
-
<span class='id identifier
|
|
1016
|
-
<span class='ivar'>@logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='id identifier
|
|
1064
|
+
<span class='id identifier rubyid_msg'>msg</span> <span class='op'>=</span> <span class='id identifier rubyid_build_log'>build_log</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span> <span class='op'>||</span> <span class='kw'>yield</span><span class='comma'>,</span> <span class='const'>ActionCommand</span><span class='op'>::</span><span class='const'>LOG_KIND_DEBUG</span><span class='rparen'>)</span>
|
|
1065
|
+
<span class='ivar'>@logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='id identifier rubyid_format_log'>format_log</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
1017
1066
|
<span class='kw'>end</span>
|
|
1018
1067
|
<span class='kw'>end</span></pre>
|
|
1019
1068
|
</td>
|
|
@@ -1047,15 +1096,21 @@
|
|
|
1047
1096
|
<pre class="lines">
|
|
1048
1097
|
|
|
1049
1098
|
|
|
1050
|
-
47
|
|
1051
1099
|
48
|
|
1052
|
-
49
|
|
1100
|
+
49
|
|
1101
|
+
50
|
|
1102
|
+
51
|
|
1103
|
+
52
|
|
1104
|
+
53</pre>
|
|
1053
1105
|
</td>
|
|
1054
1106
|
<td>
|
|
1055
|
-
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line
|
|
1107
|
+
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 48</span>
|
|
1056
1108
|
|
|
1057
1109
|
<span class='kw'>def</span> <span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span>
|
|
1058
|
-
<span class='
|
|
1110
|
+
<span class='kw'>if</span> <span class='ivar'>@logger</span>
|
|
1111
|
+
<span class='id identifier rubyid_msg'>msg</span> <span class='op'>=</span> <span class='id identifier rubyid_build_log'>build_log</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='comma'>,</span> <span class='const'>ActionCommand</span><span class='op'>::</span><span class='const'>LOG_KIND_ERROR</span><span class='rparen'>)</span>
|
|
1112
|
+
<span class='ivar'>@logger</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='id identifier rubyid_format_log'>format_log</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
1113
|
+
<span class='kw'>end</span>
|
|
1059
1114
|
<span class='kw'>end</span></pre>
|
|
1060
1115
|
</td>
|
|
1061
1116
|
</tr>
|
|
@@ -1109,14 +1164,14 @@ result.</p>
|
|
|
1109
1164
|
<pre class="lines">
|
|
1110
1165
|
|
|
1111
1166
|
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1167
|
+
58
|
|
1168
|
+
59
|
|
1169
|
+
60
|
|
1170
|
+
61
|
|
1171
|
+
62</pre>
|
|
1117
1172
|
</td>
|
|
1118
1173
|
<td>
|
|
1119
|
-
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line
|
|
1174
|
+
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 58</span>
|
|
1120
1175
|
|
|
1121
1176
|
<span class='kw'>def</span> <span class='id identifier rubyid_failed'>failed</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span>
|
|
1122
1177
|
<span class='ivar'>@result_code</span> <span class='op'>=</span> <span class='const'>RESULT_CODE_FAILED</span>
|
|
@@ -1186,14 +1241,14 @@ result.</p>
|
|
|
1186
1241
|
<pre class="lines">
|
|
1187
1242
|
|
|
1188
1243
|
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1244
|
+
68
|
|
1245
|
+
69
|
|
1246
|
+
70
|
|
1247
|
+
71
|
|
1248
|
+
72</pre>
|
|
1194
1249
|
</td>
|
|
1195
1250
|
<td>
|
|
1196
|
-
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line
|
|
1251
|
+
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 68</span>
|
|
1197
1252
|
|
|
1198
1253
|
<span class='kw'>def</span> <span class='id identifier rubyid_failed_with_code'>failed_with_code</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='comma'>,</span> <span class='id identifier rubyid_result_code'>result_code</span><span class='rparen'>)</span>
|
|
1199
1254
|
<span class='ivar'>@result_code</span> <span class='op'>=</span> <span class='id identifier rubyid_result_code'>result_code</span>
|
|
@@ -1249,20 +1304,20 @@ result.</p>
|
|
|
1249
1304
|
<pre class="lines">
|
|
1250
1305
|
|
|
1251
1306
|
|
|
1252
|
-
39
|
|
1253
1307
|
40
|
|
1254
1308
|
41
|
|
1255
1309
|
42
|
|
1256
1310
|
43
|
|
1257
|
-
44
|
|
1311
|
+
44
|
|
1312
|
+
45</pre>
|
|
1258
1313
|
</td>
|
|
1259
1314
|
<td>
|
|
1260
|
-
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line
|
|
1315
|
+
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 40</span>
|
|
1261
1316
|
|
|
1262
1317
|
<span class='kw'>def</span> <span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
|
1263
1318
|
<span class='kw'>if</span> <span class='ivar'>@logger</span>
|
|
1264
|
-
<span class='id identifier
|
|
1265
|
-
<span class='ivar'>@logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='id identifier
|
|
1319
|
+
<span class='id identifier rubyid_msg'>msg</span> <span class='op'>=</span> <span class='id identifier rubyid_build_log'>build_log</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span> <span class='op'>||</span> <span class='kw'>yield</span><span class='comma'>,</span> <span class='const'>ActionCommand</span><span class='op'>::</span><span class='const'>LOG_KIND_INFO</span><span class='rparen'>)</span>
|
|
1320
|
+
<span class='ivar'>@logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='id identifier rubyid_format_log'>format_log</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
1266
1321
|
<span class='kw'>end</span>
|
|
1267
1322
|
<span class='kw'>end</span></pre>
|
|
1268
1323
|
</td>
|
|
@@ -1309,12 +1364,12 @@ result.</p>
|
|
|
1309
1364
|
<pre class="lines">
|
|
1310
1365
|
|
|
1311
1366
|
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1367
|
+
121
|
|
1368
|
+
122
|
|
1369
|
+
123</pre>
|
|
1315
1370
|
</td>
|
|
1316
1371
|
<td>
|
|
1317
|
-
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line
|
|
1372
|
+
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 121</span>
|
|
1318
1373
|
|
|
1319
1374
|
<span class='kw'>def</span> <span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
|
1320
1375
|
<span class='kw'>return</span> <span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
|
@@ -1350,14 +1405,14 @@ result.</p>
|
|
|
1350
1405
|
<pre class="lines">
|
|
1351
1406
|
|
|
1352
1407
|
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1408
|
+
131
|
|
1409
|
+
132
|
|
1410
|
+
133
|
|
1411
|
+
134
|
|
1412
|
+
135</pre>
|
|
1358
1413
|
</td>
|
|
1359
1414
|
<td>
|
|
1360
|
-
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line
|
|
1415
|
+
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 131</span>
|
|
1361
1416
|
|
|
1362
1417
|
<span class='kw'>def</span> <span class='id identifier rubyid_log_input'>log_input</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
|
|
1363
1418
|
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='ivar'>@logger</span>
|
|
@@ -1395,16 +1450,16 @@ result.</p>
|
|
|
1395
1450
|
<pre class="lines">
|
|
1396
1451
|
|
|
1397
1452
|
|
|
1398
|
-
134
|
|
1399
|
-
135
|
|
1400
|
-
136
|
|
1401
|
-
137
|
|
1402
1453
|
138
|
|
1403
1454
|
139
|
|
1404
|
-
140
|
|
1455
|
+
140
|
|
1456
|
+
141
|
|
1457
|
+
142
|
|
1458
|
+
143
|
|
1459
|
+
144</pre>
|
|
1405
1460
|
</td>
|
|
1406
1461
|
<td>
|
|
1407
|
-
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line
|
|
1462
|
+
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 138</span>
|
|
1408
1463
|
|
|
1409
1464
|
<span class='kw'>def</span> <span class='id identifier rubyid_log_output'>log_output</span>
|
|
1410
1465
|
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='ivar'>@logger</span>
|
|
@@ -1416,53 +1471,6 @@ result.</p>
|
|
|
1416
1471
|
</td>
|
|
1417
1472
|
</tr>
|
|
1418
1473
|
</table>
|
|
1419
|
-
</div>
|
|
1420
|
-
|
|
1421
|
-
<div class="method_details ">
|
|
1422
|
-
<h3 class="signature " id="logger=-instance_method">
|
|
1423
|
-
|
|
1424
|
-
- (<tt>Object</tt>) <strong>logger=</strong>(logger)
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
</h3><div class="docstring">
|
|
1431
|
-
<div class="discussion">
|
|
1432
|
-
|
|
1433
|
-
<p>set the logger for this result</p>
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
</div>
|
|
1437
|
-
</div>
|
|
1438
|
-
<div class="tags">
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
</div><table class="source_code">
|
|
1442
|
-
<tr>
|
|
1443
|
-
<td>
|
|
1444
|
-
<pre class="lines">
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
16
|
|
1448
|
-
17
|
|
1449
|
-
18
|
|
1450
|
-
19
|
|
1451
|
-
20
|
|
1452
|
-
21</pre>
|
|
1453
|
-
</td>
|
|
1454
|
-
<td>
|
|
1455
|
-
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 16</span>
|
|
1456
|
-
|
|
1457
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_logger='>logger=</span><span class='lparen'>(</span><span class='id identifier rubyid_logger'>logger</span><span class='rparen'>)</span>
|
|
1458
|
-
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_logger'>logger</span>
|
|
1459
|
-
<span class='ivar'>@sequence</span> <span class='op'>=</span> <span class='const'>SecureRandom</span><span class='period'>.</span><span class='id identifier rubyid_hex'>hex</span>
|
|
1460
|
-
<span class='ivar'>@stack</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
|
1461
|
-
<span class='ivar'>@logger</span> <span class='op'>=</span> <span class='id identifier rubyid_logger'>logger</span>
|
|
1462
|
-
<span class='kw'>end</span></pre>
|
|
1463
|
-
</td>
|
|
1464
|
-
</tr>
|
|
1465
|
-
</table>
|
|
1466
1474
|
</div>
|
|
1467
1475
|
|
|
1468
1476
|
<div class="method_details ">
|
|
@@ -1509,12 +1517,12 @@ result.</p>
|
|
|
1509
1517
|
<pre class="lines">
|
|
1510
1518
|
|
|
1511
1519
|
|
|
1512
|
-
24
|
|
1513
1520
|
25
|
|
1514
|
-
26
|
|
1521
|
+
26
|
|
1522
|
+
27</pre>
|
|
1515
1523
|
</td>
|
|
1516
1524
|
<td>
|
|
1517
|
-
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line
|
|
1525
|
+
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 25</span>
|
|
1518
1526
|
|
|
1519
1527
|
<span class='kw'>def</span> <span class='id identifier rubyid_logging?'>logging?</span>
|
|
1520
1528
|
<span class='kw'>return</span> <span class='op'>!</span><span class='ivar'>@logger</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
|
@@ -1568,12 +1576,12 @@ result.</p>
|
|
|
1568
1576
|
<pre class="lines">
|
|
1569
1577
|
|
|
1570
1578
|
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1579
|
+
75
|
|
1580
|
+
76
|
|
1581
|
+
77</pre>
|
|
1574
1582
|
</td>
|
|
1575
1583
|
<td>
|
|
1576
|
-
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line
|
|
1584
|
+
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 75</span>
|
|
1577
1585
|
|
|
1578
1586
|
<span class='kw'>def</span> <span class='id identifier rubyid_ok?'>ok?</span>
|
|
1579
1587
|
<span class='kw'>return</span> <span class='ivar'>@result_code</span> <span class='op'>==</span> <span class='const'>RESULT_CODE_OK</span>
|
|
@@ -1609,14 +1617,14 @@ result.</p>
|
|
|
1609
1617
|
<pre class="lines">
|
|
1610
1618
|
|
|
1611
1619
|
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1620
|
+
99
|
|
1621
|
+
100
|
|
1622
|
+
101
|
|
1623
|
+
102
|
|
1624
|
+
103</pre>
|
|
1617
1625
|
</td>
|
|
1618
1626
|
<td>
|
|
1619
|
-
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line
|
|
1627
|
+
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 99</span>
|
|
1620
1628
|
|
|
1621
1629
|
<span class='kw'>def</span> <span class='id identifier rubyid_pop'>pop</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
|
1622
1630
|
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_key'>key</span>
|
|
@@ -1654,20 +1662,20 @@ result.</p>
|
|
|
1654
1662
|
<pre class="lines">
|
|
1655
1663
|
|
|
1656
1664
|
|
|
1657
|
-
82
|
|
1658
|
-
83
|
|
1659
|
-
84
|
|
1660
|
-
85
|
|
1661
1665
|
86
|
|
1662
1666
|
87
|
|
1663
1667
|
88
|
|
1664
1668
|
89
|
|
1665
1669
|
90
|
|
1666
1670
|
91
|
|
1667
|
-
92
|
|
1671
|
+
92
|
|
1672
|
+
93
|
|
1673
|
+
94
|
|
1674
|
+
95
|
|
1675
|
+
96</pre>
|
|
1668
1676
|
</td>
|
|
1669
1677
|
<td>
|
|
1670
|
-
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line
|
|
1678
|
+
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 86</span>
|
|
1671
1679
|
|
|
1672
1680
|
<span class='kw'>def</span> <span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_cmd'>cmd</span><span class='rparen'>)</span>
|
|
1673
1681
|
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_key'>key</span>
|
|
@@ -1711,12 +1719,12 @@ result.</p>
|
|
|
1711
1719
|
<pre class="lines">
|
|
1712
1720
|
|
|
1713
1721
|
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1722
|
+
147
|
|
1723
|
+
148
|
|
1724
|
+
149</pre>
|
|
1717
1725
|
</td>
|
|
1718
1726
|
<td>
|
|
1719
|
-
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line
|
|
1727
|
+
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 147</span>
|
|
1720
1728
|
|
|
1721
1729
|
<span class='kw'>def</span> <span class='id identifier rubyid_root_command'>root_command</span><span class='lparen'>(</span><span class='id identifier rubyid_cls'>cls</span><span class='rparen'>)</span>
|
|
1722
1730
|
<span class='ivar'>@stack</span> <span class='op'><<</span> <span class='lbrace'>{</span> <span class='label'>key:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>cmd:</span> <span class='id identifier rubyid_cls'>cls</span> <span class='rbrace'>}</span> <span class='kw'>if</span> <span class='ivar'>@logger</span>
|
|
@@ -1752,12 +1760,12 @@ result.</p>
|
|
|
1752
1760
|
<pre class="lines">
|
|
1753
1761
|
|
|
1754
1762
|
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1763
|
+
116
|
|
1764
|
+
117
|
|
1765
|
+
118</pre>
|
|
1758
1766
|
</td>
|
|
1759
1767
|
<td>
|
|
1760
|
-
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line
|
|
1768
|
+
<pre class="code"><span class="info file"># File 'lib/action_command/result.rb', line 116</span>
|
|
1761
1769
|
|
|
1762
1770
|
<span class='kw'>def</span> <span class='id identifier rubyid_sequence'>sequence</span>
|
|
1763
1771
|
<span class='kw'>return</span> <span class='ivar'>@sequence</span>
|
|
@@ -1772,7 +1780,7 @@ result.</p>
|
|
|
1772
1780
|
</div>
|
|
1773
1781
|
|
|
1774
1782
|
<div id="footer">
|
|
1775
|
-
Generated on
|
|
1783
|
+
Generated on Wed May 25 10:31:52 2016 by
|
|
1776
1784
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1777
1785
|
0.8.7.6 (ruby-2.2.3).
|
|
1778
1786
|
</div>
|