sprout 1.1.17.pre → 1.1.18.pre

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sprout might be problematic. Click here for more details.

Files changed (111) hide show
  1. data/VERSION +1 -1
  2. data/doc/Dir.html +313 -0
  3. data/doc/Rake/Task.html +206 -0
  4. data/doc/Sprout.html +778 -0
  5. data/doc/Sprout/ArchiveUnpacker.html +1313 -0
  6. data/doc/Sprout/CommandLine.html +521 -0
  7. data/doc/Sprout/Concern.html +382 -0
  8. data/doc/Sprout/Errors.html +120 -0
  9. data/doc/Sprout/Errors/ArchiveUnpackerError.html +139 -0
  10. data/doc/Sprout/Errors/DestinationExistsError.html +143 -0
  11. data/doc/Sprout/Errors/DuplicateMemberError.html +142 -0
  12. data/doc/Sprout/Errors/ExecutableError.html +139 -0
  13. data/doc/Sprout/Errors/ExecutableRegistrationError.html +142 -0
  14. data/doc/Sprout/Errors/ExecutionError.html +135 -0
  15. data/doc/Sprout/Errors/GeneratorError.html +139 -0
  16. data/doc/Sprout/Errors/InvalidArgumentError.html +142 -0
  17. data/doc/Sprout/Errors/LoadError.html +135 -0
  18. data/doc/Sprout/Errors/MissingArgumentError.html +142 -0
  19. data/doc/Sprout/Errors/MissingExecutableError.html +142 -0
  20. data/doc/Sprout/Errors/MissingGeneratorError.html +142 -0
  21. data/doc/Sprout/Errors/MissingTemplateError.html +142 -0
  22. data/doc/Sprout/Errors/ProcessRunnerError.html +135 -0
  23. data/doc/Sprout/Errors/RemoteFileLoaderError.html +128 -0
  24. data/doc/Sprout/Errors/SproutError.html +132 -0
  25. data/doc/Sprout/Errors/UnknownArchiveType.html +136 -0
  26. data/doc/Sprout/Errors/UsageError.html +135 -0
  27. data/doc/Sprout/Errors/ValidationError.html +135 -0
  28. data/doc/Sprout/Errors/VersionRequirementNotMetError.html +135 -0
  29. data/doc/Sprout/Executable.html +183 -0
  30. data/doc/Sprout/Executable/Base.html +2986 -0
  31. data/doc/Sprout/Executable/Boolean.html +577 -0
  32. data/doc/Sprout/Executable/CollectionParam.html +521 -0
  33. data/doc/Sprout/Executable/FileParam.html +517 -0
  34. data/doc/Sprout/Executable/Files.html +311 -0
  35. data/doc/Sprout/Executable/Number.html +164 -0
  36. data/doc/Sprout/Executable/Param.html +3011 -0
  37. data/doc/Sprout/Executable/ParameterFactory.html +262 -0
  38. data/doc/Sprout/Executable/Path.html +247 -0
  39. data/doc/Sprout/Executable/Paths.html +268 -0
  40. data/doc/Sprout/Executable/Session.html +1587 -0
  41. data/doc/Sprout/Executable/StringParam.html +237 -0
  42. data/doc/Sprout/Executable/Strings.html +186 -0
  43. data/doc/Sprout/Executable/Url.html +180 -0
  44. data/doc/Sprout/Executable/Urls.html +185 -0
  45. data/doc/Sprout/FileTarget.html +1170 -0
  46. data/doc/Sprout/Generator.html +800 -0
  47. data/doc/Sprout/Generator/Base.html +1834 -0
  48. data/doc/Sprout/Generator/Command.html +716 -0
  49. data/doc/Sprout/Generator/DirectoryManifest.html +503 -0
  50. data/doc/Sprout/Generator/FileManifest.html +667 -0
  51. data/doc/Sprout/Generator/Manifest.html +403 -0
  52. data/doc/Sprout/Generator/TemplateManifest.html +213 -0
  53. data/doc/Sprout/GeneratorGenerator.html +990 -0
  54. data/doc/Sprout/Library.html +1259 -0
  55. data/doc/Sprout/LibraryGenerator.html +326 -0
  56. data/doc/Sprout/OutputBuffer.html +461 -0
  57. data/doc/Sprout/Platform.html +758 -0
  58. data/doc/Sprout/ProcessRunner.html +1801 -0
  59. data/doc/Sprout/ProgressBar.html +384 -0
  60. data/doc/Sprout/ProgressBarImpl.html +2151 -0
  61. data/doc/Sprout/ProgressBarManager.html +443 -0
  62. data/doc/Sprout/ProgressBarOutputStream.html +429 -0
  63. data/doc/Sprout/RDocParser.html +228 -0
  64. data/doc/Sprout/RemoteFileLoader.html +191 -0
  65. data/doc/Sprout/RemoteFileTarget.html +710 -0
  66. data/doc/Sprout/ReversedProgressBar.html +200 -0
  67. data/doc/Sprout/RubyFeature.html +176 -0
  68. data/doc/Sprout/RubyFeature/ClassMethods.html +1099 -0
  69. data/doc/Sprout/RubyGenerator.html +712 -0
  70. data/doc/Sprout/Specification.html +838 -0
  71. data/doc/Sprout/System.html +212 -0
  72. data/doc/Sprout/System/BaseSystem.html +1732 -0
  73. data/doc/Sprout/System/JavaSystem.html +137 -0
  74. data/doc/Sprout/System/OSXSystem.html +345 -0
  75. data/doc/Sprout/System/ThreadMock.html +201 -0
  76. data/doc/Sprout/System/UnixSystem.html +610 -0
  77. data/doc/Sprout/System/VistaSystem.html +263 -0
  78. data/doc/Sprout/System/WinNixSystem.html +340 -0
  79. data/doc/Sprout/System/WinSystem.html +590 -0
  80. data/doc/Sprout/TestHelper.html +2280 -0
  81. data/doc/Sprout/ToolGenerator.html +995 -0
  82. data/doc/Sprout/VERSION.html +135 -0
  83. data/doc/String.html +313 -0
  84. data/doc/_index.html +829 -0
  85. data/doc/class_list.html +47 -0
  86. data/doc/css/common.css +1 -0
  87. data/doc/css/full_list.css +55 -0
  88. data/doc/css/style.css +322 -0
  89. data/doc/file.README.html +109 -0
  90. data/doc/file_list.html +49 -0
  91. data/doc/frames.html +13 -0
  92. data/doc/index.html +109 -0
  93. data/doc/js/app.js +205 -0
  94. data/doc/js/full_list.js +173 -0
  95. data/doc/js/jquery.js +16 -0
  96. data/doc/method_list.html +3622 -0
  97. data/doc/top-level-namespace.html +220 -0
  98. data/lib/sprout/generators/generator/generator_generator.rb +3 -3
  99. data/lib/sprout/generators/generator/templates/{generator_class.rb → generator_class.erb} +0 -0
  100. data/lib/sprout/generators/generator/templates/{generator_test.rb → generator_test.erb} +0 -0
  101. data/lib/sprout/generators/generator/templates/{generator_test_helper.rb → generator_test_helper.erb} +0 -0
  102. data/lib/sprout/generators/library/library_generator.rb +1 -1
  103. data/lib/sprout/generators/library/templates/{library.rb → library.erb} +0 -0
  104. data/lib/sprout/generators/ruby/ruby_generator.rb +4 -5
  105. data/lib/sprout/generators/ruby/templates/{ruby_base.rb → ruby_base.erb} +0 -0
  106. data/lib/sprout/generators/ruby/templates/{ruby_input.rb → ruby_input.erb} +0 -0
  107. data/lib/sprout/generators/ruby/templates/{ruby_test_case.rb → ruby_test_case.erb} +0 -0
  108. data/lib/sprout/generators/ruby/templates/{ruby_test_helper.rb → ruby_test_helper.erb} +0 -0
  109. data/lib/sprout/generators/tool/templates/{tool.rb → tool.erb} +0 -2
  110. data/lib/sprout/generators/tool/tool_generator.rb +1 -1
  111. metadata +128 -32
@@ -0,0 +1,1801 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Class: Sprout::ProcessRunner
8
+
9
+ &mdash; Sprouts v.1.0.34.pre
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ relpath = '..';
19
+ if (relpath != '') relpath += '/';
20
+ </script>
21
+
22
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
25
+
26
+
27
+ </head>
28
+ <body>
29
+ <script type="text/javascript" charset="utf-8">
30
+ if (window.top.frames.main) document.body.className = 'frames';
31
+ </script>
32
+
33
+ <div id="header">
34
+ <div id="menu">
35
+
36
+ <a href="../_index.html">Index (P)</a> &raquo;
37
+ <span class='title'><span class='object_link'><a href="../Sprout.html" title="Sprout (module)">Sprout</a></span></span>
38
+ &raquo;
39
+ <span class="title">ProcessRunner</span>
40
+
41
+
42
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
+ </div>
44
+
45
+ <div id="search">
46
+
47
+ <a id="class_list_link" href="#">Class List</a>
48
+
49
+ <a id="method_list_link" href="#">Method List</a>
50
+
51
+ <a id="file_list_link" href="#">File List</a>
52
+
53
+ </div>
54
+ <div class="clear"></div>
55
+ </div>
56
+
57
+ <iframe id="search_frame"></iframe>
58
+
59
+ <div id="content"><h1>Class: Sprout::ProcessRunner
60
+
61
+
62
+
63
+ </h1>
64
+
65
+ <dl class="box">
66
+
67
+ <dt class="r1">Inherits:</dt>
68
+ <dd class="r1">
69
+ <span class="inheritName">Object</span>
70
+
71
+ <ul class="fullTree">
72
+ <li>Object</li>
73
+
74
+ <li class="next">Sprout::ProcessRunner</li>
75
+
76
+ </ul>
77
+ <a href="#" class="inheritanceTree">show all</a>
78
+
79
+ </dd>
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+ <dt class="r2 last">Defined in:</dt>
90
+ <dd class="r2 last">lib/sprout/process_runner.rb</dd>
91
+
92
+ </dl>
93
+ <div class="clear"></div>
94
+
95
+ <h2>Overview</h2><div class="docstring">
96
+ <div class="discussion">
97
+ <p>
98
+ The ProcessRunner is a cross-platform wrapper for executing external
99
+ executable processes.
100
+ </p>
101
+ <p>
102
+ This class is typically accesses via the concrete Sprout::System classes in
103
+ order to avoid ugly branching logic in the application layer.
104
+ </p>
105
+ <p>
106
+ An example of this kind of usage might be:
107
+ </p>
108
+ <pre class="code ruby"><code>
109
+ <span class='const'>Sprout</span><span class='period'>.</span><span class='id identifier rubyid_current_system'>current_system</span><span class='period'>.</span><span class='id identifier rubyid_execute'>execute</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>./some.exe</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>--foo=bar --baz=buz</span><span class='tstring_end'>'</span></span>
110
+ </code></pre>
111
+ <p>
112
+ To use this class directly, you need to know if you&#8217;re on a unix-like
113
+ system or a dos platform as these two deal with processes very differently.
114
+ </p>
115
+ <p>
116
+ Assuming you know you&#8217;re on a unix-like system, you could execute the
117
+ previous example with:
118
+ </p>
119
+ <pre class="code ruby"><code>
120
+ <span class='id identifier rubyid_runner'>runner</span> <span class='op'>=</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>ProcessRunner</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
121
+ <span class='id identifier rubyid_runner'>runner</span><span class='period'>.</span><span class='id identifier rubyid_execute_open4'>execute_open4</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>./some.exe --foo-bar --baz=buz</span><span class='tstring_end'>'</span></span>
122
+ <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_runner'>runner</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span></code></pre>
123
+
124
+
125
+ </div>
126
+ </div>
127
+ <div class="tags">
128
+
129
+
130
+ </div>
131
+
132
+
133
+
134
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
135
+ <ul class="summary">
136
+
137
+ <li class="public ">
138
+ <span class="summary_signature">
139
+
140
+ <a href="#e-instance_method" title="#e (instance method)">- (IO) <strong>e</strong> </a>
141
+
142
+
143
+
144
+ </span>
145
+
146
+
147
+ <span class="note title readonly">readonly</span>
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+ <span class="summary_desc"><div class='inline'><p>
157
+ Error output.
158
+ </p>
159
+ </div></span>
160
+
161
+ </li>
162
+
163
+
164
+ <li class="public ">
165
+ <span class="summary_signature">
166
+
167
+ <a href="#pid-instance_method" title="#pid (instance method)">- (Object) <strong>pid</strong> </a>
168
+
169
+
170
+
171
+ </span>
172
+
173
+
174
+ <span class="note title readonly">readonly</span>
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+ <span class="summary_desc"><div class='inline'><p>
184
+ Returns the value of attribute pid.
185
+ </p>
186
+ </div></span>
187
+
188
+ </li>
189
+
190
+
191
+ <li class="public ">
192
+ <span class="summary_signature">
193
+
194
+ <a href="#r-instance_method" title="#r (instance method)">- (IO) <strong>r</strong> </a>
195
+
196
+
197
+
198
+ </span>
199
+
200
+
201
+ <span class="note title readonly">readonly</span>
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+ <span class="summary_desc"><div class='inline'><p>
211
+ Read only.
212
+ </p>
213
+ </div></span>
214
+
215
+ </li>
216
+
217
+
218
+ <li class="public ">
219
+ <span class="summary_signature">
220
+
221
+ <a href="#ruby_version-instance_method" title="#ruby_version (instance method)">- (Object) <strong>ruby_version</strong> </a>
222
+
223
+
224
+
225
+ </span>
226
+
227
+
228
+ <span class="note title readonly">readonly</span>
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+ <span class="summary_desc"><div class='inline'><p>
238
+ Returns the value of attribute ruby_version.
239
+ </p>
240
+ </div></span>
241
+
242
+ </li>
243
+
244
+
245
+ <li class="public ">
246
+ <span class="summary_signature">
247
+
248
+ <a href="#w-instance_method" title="#w (instance method)">- (IO) <strong>w</strong> </a>
249
+
250
+
251
+
252
+ </span>
253
+
254
+
255
+ <span class="note title readonly">readonly</span>
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+ <span class="summary_desc"><div class='inline'><p>
265
+ Write only.
266
+ </p>
267
+ </div></span>
268
+
269
+ </li>
270
+
271
+
272
+ </ul>
273
+
274
+
275
+
276
+
277
+
278
+ <h2>
279
+ Instance Method Summary
280
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
281
+ </h2>
282
+
283
+ <ul class="summary">
284
+
285
+ <li class="public ">
286
+ <span class="summary_signature">
287
+
288
+ <a href="#alive%3F-instance_method" title="#alive? (instance method)">- (Boolean) <strong>alive?</strong> </a>
289
+
290
+
291
+
292
+ </span>
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+ <span class="summary_desc"><div class='inline'><p>
302
+ Whether the process is still running.
303
+ </p>
304
+ </div></span>
305
+
306
+ </li>
307
+
308
+
309
+ <li class="public ">
310
+ <span class="summary_signature">
311
+
312
+ <a href="#close-instance_method" title="#close (instance method)">- (Object) <strong>close</strong> </a>
313
+
314
+
315
+
316
+ </span>
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+ <span class="summary_desc"><div class='inline'><p>
326
+ Close the process.
327
+ </p>
328
+ </div></span>
329
+
330
+ </li>
331
+
332
+
333
+ <li class="public ">
334
+ <span class="summary_signature">
335
+
336
+ <a href="#close_write-instance_method" title="#close_write (instance method)">- (Object) <strong>close_write</strong> </a>
337
+
338
+
339
+
340
+ </span>
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+ <span class="summary_desc"><div class='inline'><p>
350
+ Close the write stream - usually terminates the process.
351
+ </p>
352
+ </div></span>
353
+
354
+ </li>
355
+
356
+
357
+ <li class="public ">
358
+ <span class="summary_signature">
359
+
360
+ <a href="#execute_open4-instance_method" title="#execute_open4 (instance method)">- (Object) <strong>execute_open4</strong>(*command) </a>
361
+
362
+
363
+
364
+ </span>
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+ <span class="summary_desc"><div class='inline'><p>
374
+ Execute the provided command using the open4.popen4 library.
375
+ </p>
376
+ </div></span>
377
+
378
+ </li>
379
+
380
+
381
+ <li class="public ">
382
+ <span class="summary_signature">
383
+
384
+ <a href="#execute_win32-instance_method" title="#execute_win32 (instance method)">- (Object) <strong>execute_win32</strong>(*command) </a>
385
+
386
+
387
+
388
+ </span>
389
+
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+ <span class="summary_desc"><div class='inline'><p>
398
+ Execute the provided command using the win32-open3 library.
399
+ </p>
400
+ </div></span>
401
+
402
+ </li>
403
+
404
+
405
+ <li class="public ">
406
+ <span class="summary_signature">
407
+
408
+ <a href="#flush-instance_method" title="#flush (instance method)">- (Object) <strong>flush</strong> </a>
409
+
410
+
411
+
412
+ </span>
413
+
414
+
415
+
416
+
417
+
418
+
419
+
420
+
421
+ <span class="summary_desc"><div class='inline'><p>
422
+ Flush the write IO to the process.
423
+ </p>
424
+ </div></span>
425
+
426
+ </li>
427
+
428
+
429
+ <li class="public ">
430
+ <span class="summary_signature">
431
+
432
+ <a href="#getc-instance_method" title="#getc (instance method)">- (Object) <strong>getc</strong> </a>
433
+
434
+
435
+
436
+ </span>
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+ <span class="summary_desc"><div class='inline'><p>
446
+ Get user input on the read stream from the process.
447
+ </p>
448
+ </div></span>
449
+
450
+ </li>
451
+
452
+
453
+ <li class="public ">
454
+ <span class="summary_signature">
455
+
456
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (ProcessRunner) <strong>initialize</strong> </a>
457
+
458
+
459
+
460
+ </span>
461
+
462
+ <span class="note title constructor">constructor</span>
463
+
464
+
465
+
466
+
467
+
468
+
469
+
470
+
471
+ <span class="summary_desc"><div class='inline'><p>
472
+ A new instance of ProcessRunner.
473
+ </p>
474
+ </div></span>
475
+
476
+ </li>
477
+
478
+
479
+ <li class="public ">
480
+ <span class="summary_signature">
481
+
482
+ <a href="#kill-instance_method" title="#kill (instance method)">- (Object) <strong>kill</strong> </a>
483
+
484
+
485
+
486
+ </span>
487
+
488
+
489
+
490
+
491
+
492
+
493
+
494
+
495
+ <span class="summary_desc"><div class='inline'><p>
496
+ Kill the process.
497
+ </p>
498
+ </div></span>
499
+
500
+ </li>
501
+
502
+
503
+ <li class="public ">
504
+ <span class="summary_signature">
505
+
506
+ <a href="#print-instance_method" title="#print (instance method)">- (Object) <strong>print</strong>(msg) </a>
507
+
508
+
509
+
510
+ </span>
511
+
512
+
513
+
514
+
515
+
516
+
517
+
518
+
519
+ <span class="summary_desc"><div class='inline'><p>
520
+ Print some characters to process without an end of line character.
521
+ </p>
522
+ </div></span>
523
+
524
+ </li>
525
+
526
+
527
+ <li class="public ">
528
+ <span class="summary_signature">
529
+
530
+ <a href="#puts-instance_method" title="#puts (instance method)">- (Object) <strong>puts</strong>(msg) </a>
531
+
532
+
533
+
534
+ </span>
535
+
536
+
537
+
538
+
539
+
540
+
541
+
542
+
543
+ <span class="summary_desc"><div class='inline'><p>
544
+ Print characters to the process followed by an end of line.
545
+ </p>
546
+ </div></span>
547
+
548
+ </li>
549
+
550
+
551
+ <li class="public ">
552
+ <span class="summary_signature">
553
+
554
+ <a href="#read-instance_method" title="#read (instance method)">- (Object) <strong>read</strong> </a>
555
+
556
+
557
+
558
+ </span>
559
+
560
+
561
+
562
+
563
+
564
+
565
+
566
+
567
+ <span class="summary_desc"><div class='inline'><p>
568
+ Wait for the process to end and return the entire standard output.
569
+ </p>
570
+ </div></span>
571
+
572
+ </li>
573
+
574
+
575
+ <li class="public ">
576
+ <span class="summary_signature">
577
+
578
+ <a href="#read_err-instance_method" title="#read_err (instance method)">- (Object) <strong>read_err</strong> </a>
579
+
580
+
581
+
582
+ </span>
583
+
584
+
585
+
586
+
587
+
588
+
589
+
590
+
591
+ <span class="summary_desc"><div class='inline'><p>
592
+ Wait for the process to end and return the entire standard error.
593
+ </p>
594
+ </div></span>
595
+
596
+ </li>
597
+
598
+
599
+ <li class="public ">
600
+ <span class="summary_signature">
601
+
602
+ <a href="#readlines-instance_method" title="#readlines (instance method)">- (String) <strong>readlines</strong>(count) </a>
603
+
604
+
605
+
606
+ </span>
607
+
608
+
609
+
610
+
611
+
612
+
613
+
614
+
615
+ <span class="summary_desc"><div class='inline'><p>
616
+ Read <tt>count</tt> lines from the process standard out.
617
+ </p>
618
+ </div></span>
619
+
620
+ </li>
621
+
622
+
623
+ <li class="public ">
624
+ <span class="summary_signature">
625
+
626
+ <a href="#readpartial-instance_method" title="#readpartial (instance method)">- (String) <strong>readpartial</strong>(count) </a>
627
+
628
+
629
+
630
+ </span>
631
+
632
+
633
+
634
+
635
+
636
+
637
+
638
+
639
+ <span class="summary_desc"><div class='inline'><p>
640
+ Read <tt>count</tt> characters from the process standard out.
641
+ </p>
642
+ </div></span>
643
+
644
+ </li>
645
+
646
+
647
+ <li class="public ">
648
+ <span class="summary_signature">
649
+
650
+ <a href="#readpartial_err-instance_method" title="#readpartial_err (instance method)">- (Object) <strong>readpartial_err</strong>(count) </a>
651
+
652
+
653
+
654
+ </span>
655
+
656
+
657
+
658
+
659
+
660
+
661
+
662
+
663
+ <span class="summary_desc"><div class='inline'></div></span>
664
+
665
+ </li>
666
+
667
+
668
+ <li class="public ">
669
+ <span class="summary_signature">
670
+
671
+ <a href="#update_status-instance_method" title="#update_status (instance method)">- (Object) <strong>update_status</strong>(sig = 0) </a>
672
+
673
+
674
+
675
+ </span>
676
+
677
+
678
+
679
+
680
+
681
+
682
+
683
+
684
+ <span class="summary_desc"><div class='inline'><p>
685
+ Send an update signal to the process.
686
+ </p>
687
+ </div></span>
688
+
689
+ </li>
690
+
691
+
692
+ </ul>
693
+
694
+
695
+ <div id="constructor_details" class="method_details_list">
696
+ <h2>Constructor Details</h2>
697
+
698
+ <div class="method_details first">
699
+ <p class="signature first" id="initialize-instance_method">
700
+
701
+ - (<tt><span class='object_link'><a href="" title="Sprout::ProcessRunner (class)">ProcessRunner</a></span></tt>) <strong>initialize</strong>
702
+
703
+
704
+
705
+ </p><div class="docstring">
706
+ <div class="discussion">
707
+ <p>
708
+ A new instance of ProcessRunner
709
+ </p>
710
+
711
+
712
+ </div>
713
+ </div>
714
+ <div class="tags">
715
+
716
+
717
+ </div><table class="source_code">
718
+ <tr>
719
+ <td>
720
+ <pre class="lines">
721
+
722
+
723
+ 43
724
+ 44
725
+ 45
726
+ 46</pre>
727
+ </td>
728
+ <td>
729
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 43</span>
730
+
731
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
732
+ <span class='kw'>super</span>
733
+ <span class='ivar'>@ruby_version</span> <span class='op'>=</span> <span class='const'>RUBY_VERSION</span>
734
+ <span class='kw'>end</span></pre>
735
+ </td>
736
+ </tr>
737
+ </table>
738
+ </div>
739
+
740
+ </div>
741
+
742
+ <div id="instance_attr_details" class="attr_details">
743
+ <h2>Instance Attribute Details</h2>
744
+
745
+
746
+ <span id=""></span>
747
+ <span id="e-instance_method"></span>
748
+ <div class="method_details first">
749
+ <p class="signature first" id="e-instance_method">
750
+
751
+ - (<tt>IO</tt>) <strong>e</strong> <span class="extras">(readonly)</span>
752
+
753
+
754
+
755
+ </p><div class="docstring">
756
+ <div class="discussion">
757
+ <p>
758
+ Error output
759
+ </p>
760
+
761
+
762
+ </div>
763
+ </div>
764
+ <div class="tags">
765
+
766
+ <h3>Returns:</h3>
767
+ <ul class="return">
768
+
769
+ <li>
770
+
771
+
772
+ <span class='type'>(<tt>IO</tt>)</span>
773
+
774
+
775
+
776
+ &mdash;
777
+ <div class='inline'><p>
778
+ Error output
779
+ </p>
780
+ </div>
781
+
782
+ </li>
783
+
784
+ </ul>
785
+
786
+ </div><table class="source_code">
787
+ <tr>
788
+ <td>
789
+ <pre class="lines">
790
+
791
+
792
+ 41
793
+ 42
794
+ 43</pre>
795
+ </td>
796
+ <td>
797
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 41</span>
798
+
799
+ <span class='kw'>def</span> <span class='id identifier rubyid_e'>e</span>
800
+ <span class='ivar'>@e</span>
801
+ <span class='kw'>end</span></pre>
802
+ </td>
803
+ </tr>
804
+ </table>
805
+ </div>
806
+
807
+
808
+ <span id=""></span>
809
+ <span id="pid-instance_method"></span>
810
+ <div class="method_details ">
811
+ <p class="signature " id="pid-instance_method">
812
+
813
+ - (<tt>Object</tt>) <strong>pid</strong> <span class="extras">(readonly)</span>
814
+
815
+
816
+
817
+ </p><div class="docstring">
818
+ <div class="discussion">
819
+ <p>
820
+ Returns the value of attribute pid
821
+ </p>
822
+
823
+
824
+ </div>
825
+ </div>
826
+ <div class="tags">
827
+
828
+
829
+ </div><table class="source_code">
830
+ <tr>
831
+ <td>
832
+ <pre class="lines">
833
+
834
+
835
+ 28
836
+ 29
837
+ 30</pre>
838
+ </td>
839
+ <td>
840
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 28</span>
841
+
842
+ <span class='kw'>def</span> <span class='id identifier rubyid_pid'>pid</span>
843
+ <span class='ivar'>@pid</span>
844
+ <span class='kw'>end</span></pre>
845
+ </td>
846
+ </tr>
847
+ </table>
848
+ </div>
849
+
850
+
851
+ <span id=""></span>
852
+ <span id="r-instance_method"></span>
853
+ <div class="method_details ">
854
+ <p class="signature " id="r-instance_method">
855
+
856
+ - (<tt>IO</tt>) <strong>r</strong> <span class="extras">(readonly)</span>
857
+
858
+
859
+
860
+ </p><div class="docstring">
861
+ <div class="discussion">
862
+ <p>
863
+ Read only
864
+ </p>
865
+
866
+
867
+ </div>
868
+ </div>
869
+ <div class="tags">
870
+
871
+ <h3>Returns:</h3>
872
+ <ul class="return">
873
+
874
+ <li>
875
+
876
+
877
+ <span class='type'>(<tt>IO</tt>)</span>
878
+
879
+
880
+
881
+ &mdash;
882
+ <div class='inline'><p>
883
+ Read only
884
+ </p>
885
+ </div>
886
+
887
+ </li>
888
+
889
+ </ul>
890
+
891
+ </div><table class="source_code">
892
+ <tr>
893
+ <td>
894
+ <pre class="lines">
895
+
896
+
897
+ 33
898
+ 34
899
+ 35</pre>
900
+ </td>
901
+ <td>
902
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 33</span>
903
+
904
+ <span class='kw'>def</span> <span class='id identifier rubyid_r'>r</span>
905
+ <span class='ivar'>@r</span>
906
+ <span class='kw'>end</span></pre>
907
+ </td>
908
+ </tr>
909
+ </table>
910
+ </div>
911
+
912
+
913
+ <span id=""></span>
914
+ <span id="ruby_version-instance_method"></span>
915
+ <div class="method_details ">
916
+ <p class="signature " id="ruby_version-instance_method">
917
+
918
+ - (<tt>Object</tt>) <strong>ruby_version</strong> <span class="extras">(readonly)</span>
919
+
920
+
921
+
922
+ </p><div class="docstring">
923
+ <div class="discussion">
924
+ <p>
925
+ Returns the value of attribute ruby_version
926
+ </p>
927
+
928
+
929
+ </div>
930
+ </div>
931
+ <div class="tags">
932
+
933
+
934
+ </div><table class="source_code">
935
+ <tr>
936
+ <td>
937
+ <pre class="lines">
938
+
939
+
940
+ 29
941
+ 30
942
+ 31</pre>
943
+ </td>
944
+ <td>
945
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 29</span>
946
+
947
+ <span class='kw'>def</span> <span class='id identifier rubyid_ruby_version'>ruby_version</span>
948
+ <span class='ivar'>@ruby_version</span>
949
+ <span class='kw'>end</span></pre>
950
+ </td>
951
+ </tr>
952
+ </table>
953
+ </div>
954
+
955
+
956
+ <span id=""></span>
957
+ <span id="w-instance_method"></span>
958
+ <div class="method_details ">
959
+ <p class="signature " id="w-instance_method">
960
+
961
+ - (<tt>IO</tt>) <strong>w</strong> <span class="extras">(readonly)</span>
962
+
963
+
964
+
965
+ </p><div class="docstring">
966
+ <div class="discussion">
967
+ <p>
968
+ Write only
969
+ </p>
970
+
971
+
972
+ </div>
973
+ </div>
974
+ <div class="tags">
975
+
976
+ <h3>Returns:</h3>
977
+ <ul class="return">
978
+
979
+ <li>
980
+
981
+
982
+ <span class='type'>(<tt>IO</tt>)</span>
983
+
984
+
985
+
986
+ &mdash;
987
+ <div class='inline'><p>
988
+ Write only
989
+ </p>
990
+ </div>
991
+
992
+ </li>
993
+
994
+ </ul>
995
+
996
+ </div><table class="source_code">
997
+ <tr>
998
+ <td>
999
+ <pre class="lines">
1000
+
1001
+
1002
+ 37
1003
+ 38
1004
+ 39</pre>
1005
+ </td>
1006
+ <td>
1007
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 37</span>
1008
+
1009
+ <span class='kw'>def</span> <span class='id identifier rubyid_w'>w</span>
1010
+ <span class='ivar'>@w</span>
1011
+ <span class='kw'>end</span></pre>
1012
+ </td>
1013
+ </tr>
1014
+ </table>
1015
+ </div>
1016
+
1017
+ </div>
1018
+
1019
+
1020
+ <div id="instance_method_details" class="method_details_list">
1021
+ <h2>Instance Method Details</h2>
1022
+
1023
+
1024
+ <div class="method_details first">
1025
+ <p class="signature first" id="alive?-instance_method">
1026
+
1027
+ - (<tt>Boolean</tt>) <strong>alive?</strong>
1028
+
1029
+
1030
+
1031
+ </p><div class="docstring">
1032
+ <div class="discussion">
1033
+ <p>
1034
+ Whether the process is still running.
1035
+ </p>
1036
+
1037
+
1038
+ </div>
1039
+ </div>
1040
+ <div class="tags">
1041
+
1042
+ <h3>Returns:</h3>
1043
+ <ul class="return">
1044
+
1045
+ <li>
1046
+
1047
+
1048
+ <span class='type'>(<tt>Boolean</tt>)</span>
1049
+
1050
+
1051
+
1052
+ &mdash;
1053
+ <div class='inline'><p>
1054
+ whether the process is still running.
1055
+ </p>
1056
+ </div>
1057
+
1058
+ </li>
1059
+
1060
+ </ul>
1061
+
1062
+ </div><table class="source_code">
1063
+ <tr>
1064
+ <td>
1065
+ <pre class="lines">
1066
+
1067
+
1068
+ 73
1069
+ 74
1070
+ 75</pre>
1071
+ </td>
1072
+ <td>
1073
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 73</span>
1074
+
1075
+ <span class='kw'>def</span> <span class='id identifier rubyid_alive?'>alive?</span>
1076
+ <span class='ivar'>@alive</span> <span class='op'>=</span> <span class='id identifier rubyid_update_status'>update_status</span>
1077
+ <span class='kw'>end</span></pre>
1078
+ </td>
1079
+ </tr>
1080
+ </table>
1081
+ </div>
1082
+
1083
+ <div class="method_details ">
1084
+ <p class="signature " id="close-instance_method">
1085
+
1086
+ - (<tt>Object</tt>) <strong>close</strong>
1087
+
1088
+
1089
+
1090
+ </p><div class="docstring">
1091
+ <div class="discussion">
1092
+ <p>
1093
+ Close the process
1094
+ </p>
1095
+
1096
+
1097
+ </div>
1098
+ </div>
1099
+ <div class="tags">
1100
+
1101
+
1102
+ </div><table class="source_code">
1103
+ <tr>
1104
+ <td>
1105
+ <pre class="lines">
1106
+
1107
+
1108
+ 85
1109
+ 86
1110
+ 87</pre>
1111
+ </td>
1112
+ <td>
1113
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 85</span>
1114
+
1115
+ <span class='kw'>def</span> <span class='id identifier rubyid_close'>close</span>
1116
+ <span class='id identifier rubyid_w'>w</span><span class='period'>.</span><span class='id identifier rubyid_close_write'>close_write</span>
1117
+ <span class='kw'>end</span></pre>
1118
+ </td>
1119
+ </tr>
1120
+ </table>
1121
+ </div>
1122
+
1123
+ <div class="method_details ">
1124
+ <p class="signature " id="close_write-instance_method">
1125
+
1126
+ - (<tt>Object</tt>) <strong>close_write</strong>
1127
+
1128
+
1129
+
1130
+ </p><div class="docstring">
1131
+ <div class="discussion">
1132
+ <p>
1133
+ Close the write stream - usually terminates the process.
1134
+ </p>
1135
+
1136
+
1137
+ </div>
1138
+ </div>
1139
+ <div class="tags">
1140
+
1141
+
1142
+ </div><table class="source_code">
1143
+ <tr>
1144
+ <td>
1145
+ <pre class="lines">
1146
+
1147
+
1148
+ 147
1149
+ 148
1150
+ 149</pre>
1151
+ </td>
1152
+ <td>
1153
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 147</span>
1154
+
1155
+ <span class='kw'>def</span> <span class='id identifier rubyid_close_write'>close_write</span>
1156
+ <span class='ivar'>@w</span><span class='period'>.</span><span class='id identifier rubyid_close_write'>close_write</span>
1157
+ <span class='kw'>end</span></pre>
1158
+ </td>
1159
+ </tr>
1160
+ </table>
1161
+ </div>
1162
+
1163
+ <div class="method_details ">
1164
+ <p class="signature " id="execute_open4-instance_method">
1165
+
1166
+ - (<tt>Object</tt>) <strong>execute_open4</strong>(*command)
1167
+
1168
+
1169
+
1170
+ </p><div class="docstring">
1171
+ <div class="discussion">
1172
+ <p>
1173
+ Execute the provided command using the open4.popen4 library. This is
1174
+ generally only used by Cygwin and *nix variants (including OS X).
1175
+ </p>
1176
+
1177
+
1178
+ </div>
1179
+ </div>
1180
+ <div class="tags">
1181
+
1182
+
1183
+ </div><table class="source_code">
1184
+ <tr>
1185
+ <td>
1186
+ <pre class="lines">
1187
+
1188
+
1189
+ 52
1190
+ 53
1191
+ 54
1192
+ 55
1193
+ 56
1194
+ 57
1195
+ 58
1196
+ 59</pre>
1197
+ </td>
1198
+ <td>
1199
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 52</span>
1200
+
1201
+ <span class='kw'>def</span> <span class='id identifier rubyid_execute_open4'>execute_open4</span> <span class='op'>*</span><span class='id identifier rubyid_command'>command</span>
1202
+ <span class='id identifier rubyid_execute_with_block'>execute_with_block</span> <span class='op'>*</span><span class='id identifier rubyid_command'>command</span> <span class='kw'>do</span>
1203
+ <span class='comment'># Not sure about the join - with the 1.0 push, we're
1204
+ </span> <span class='comment'># sending in 2 args - the exe path, and options as a string.
1205
+ </span> <span class='comment'># This was new and was causing problems...
1206
+ </span> <span class='ivar'>@pid</span><span class='comma'>,</span> <span class='ivar'>@w</span><span class='comma'>,</span> <span class='ivar'>@r</span><span class='comma'>,</span> <span class='ivar'>@e</span> <span class='op'>=</span> <span class='id identifier rubyid_open4_popen4_block'>open4_popen4_block</span> <span class='op'>*</span><span class='id identifier rubyid_command'>command</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
1207
+ <span class='kw'>end</span>
1208
+ <span class='kw'>end</span></pre>
1209
+ </td>
1210
+ </tr>
1211
+ </table>
1212
+ </div>
1213
+
1214
+ <div class="method_details ">
1215
+ <p class="signature " id="execute_win32-instance_method">
1216
+
1217
+ - (<tt>Object</tt>) <strong>execute_win32</strong>(*command)
1218
+
1219
+
1220
+
1221
+ </p><div class="docstring">
1222
+ <div class="discussion">
1223
+ <p>
1224
+ Execute the provided command using the win32-open3 library. This should
1225
+ only be used on Windows systems (even 64 bit).
1226
+ </p>
1227
+
1228
+
1229
+ </div>
1230
+ </div>
1231
+ <div class="tags">
1232
+
1233
+
1234
+ </div><table class="source_code">
1235
+ <tr>
1236
+ <td>
1237
+ <pre class="lines">
1238
+
1239
+
1240
+ 65
1241
+ 66
1242
+ 67
1243
+ 68
1244
+ 69</pre>
1245
+ </td>
1246
+ <td>
1247
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 65</span>
1248
+
1249
+ <span class='kw'>def</span> <span class='id identifier rubyid_execute_win32'>execute_win32</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span>
1250
+ <span class='id identifier rubyid_execute_with_block'>execute_with_block</span> <span class='op'>*</span><span class='id identifier rubyid_command'>command</span> <span class='kw'>do</span>
1251
+ <span class='ivar'>@pid</span><span class='comma'>,</span> <span class='ivar'>@w</span><span class='comma'>,</span> <span class='ivar'>@r</span><span class='comma'>,</span> <span class='ivar'>@e</span> <span class='op'>=</span> <span class='id identifier rubyid_io_popen_block'>io_popen_block</span> <span class='op'>*</span><span class='id identifier rubyid_command'>command</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
1252
+ <span class='kw'>end</span>
1253
+ <span class='kw'>end</span></pre>
1254
+ </td>
1255
+ </tr>
1256
+ </table>
1257
+ </div>
1258
+
1259
+ <div class="method_details ">
1260
+ <p class="signature " id="flush-instance_method">
1261
+
1262
+ - (<tt>Object</tt>) <strong>flush</strong>
1263
+
1264
+
1265
+
1266
+ </p><div class="docstring">
1267
+ <div class="discussion">
1268
+ <p>
1269
+ Flush the write IO to the process.
1270
+ </p>
1271
+
1272
+
1273
+ </div>
1274
+ </div>
1275
+ <div class="tags">
1276
+
1277
+
1278
+ </div><table class="source_code">
1279
+ <tr>
1280
+ <td>
1281
+ <pre class="lines">
1282
+
1283
+
1284
+ 123
1285
+ 124
1286
+ 125</pre>
1287
+ </td>
1288
+ <td>
1289
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 123</span>
1290
+
1291
+ <span class='kw'>def</span> <span class='id identifier rubyid_flush'>flush</span>
1292
+ <span class='ivar'>@w</span><span class='period'>.</span><span class='id identifier rubyid_flush'>flush</span>
1293
+ <span class='kw'>end</span></pre>
1294
+ </td>
1295
+ </tr>
1296
+ </table>
1297
+ </div>
1298
+
1299
+ <div class="method_details ">
1300
+ <p class="signature " id="getc-instance_method">
1301
+
1302
+ - (<tt>Object</tt>) <strong>getc</strong>
1303
+
1304
+
1305
+
1306
+ </p><div class="docstring">
1307
+ <div class="discussion">
1308
+ <p>
1309
+ Get user input on the read stream from the process.
1310
+ </p>
1311
+
1312
+
1313
+ </div>
1314
+ </div>
1315
+ <div class="tags">
1316
+
1317
+
1318
+ </div><table class="source_code">
1319
+ <tr>
1320
+ <td>
1321
+ <pre class="lines">
1322
+
1323
+
1324
+ 129
1325
+ 130
1326
+ 131</pre>
1327
+ </td>
1328
+ <td>
1329
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 129</span>
1330
+
1331
+ <span class='kw'>def</span> <span class='id identifier rubyid_getc'>getc</span>
1332
+ <span class='ivar'>@r</span><span class='period'>.</span><span class='id identifier rubyid_getc'>getc</span>
1333
+ <span class='kw'>end</span></pre>
1334
+ </td>
1335
+ </tr>
1336
+ </table>
1337
+ </div>
1338
+
1339
+ <div class="method_details ">
1340
+ <p class="signature " id="kill-instance_method">
1341
+
1342
+ - (<tt>Object</tt>) <strong>kill</strong>
1343
+
1344
+
1345
+
1346
+ </p><div class="docstring">
1347
+ <div class="discussion">
1348
+ <p>
1349
+ Kill the process.
1350
+ </p>
1351
+
1352
+
1353
+ </div>
1354
+ </div>
1355
+ <div class="tags">
1356
+
1357
+
1358
+ </div><table class="source_code">
1359
+ <tr>
1360
+ <td>
1361
+ <pre class="lines">
1362
+
1363
+
1364
+ 79
1365
+ 80
1366
+ 81</pre>
1367
+ </td>
1368
+ <td>
1369
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 79</span>
1370
+
1371
+ <span class='kw'>def</span> <span class='id identifier rubyid_kill'>kill</span>
1372
+ <span class='id identifier rubyid_update_status'>update_status</span> <span class='int'>9</span>
1373
+ <span class='kw'>end</span></pre>
1374
+ </td>
1375
+ </tr>
1376
+ </table>
1377
+ </div>
1378
+
1379
+ <div class="method_details ">
1380
+ <p class="signature " id="print-instance_method">
1381
+
1382
+ - (<tt>Object</tt>) <strong>print</strong>(msg)
1383
+
1384
+
1385
+
1386
+ </p><div class="docstring">
1387
+ <div class="discussion">
1388
+ <p>
1389
+ Print some characters to process without an end of line character.
1390
+ </p>
1391
+
1392
+
1393
+ </div>
1394
+ </div>
1395
+ <div class="tags">
1396
+
1397
+
1398
+ </div><table class="source_code">
1399
+ <tr>
1400
+ <td>
1401
+ <pre class="lines">
1402
+
1403
+
1404
+ 135
1405
+ 136
1406
+ 137</pre>
1407
+ </td>
1408
+ <td>
1409
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 135</span>
1410
+
1411
+ <span class='kw'>def</span> <span class='id identifier rubyid_print'>print</span> <span class='id identifier rubyid_msg'>msg</span>
1412
+ <span class='ivar'>@w</span><span class='period'>.</span><span class='id identifier rubyid_print'>print</span> <span class='id identifier rubyid_msg'>msg</span>
1413
+ <span class='kw'>end</span></pre>
1414
+ </td>
1415
+ </tr>
1416
+ </table>
1417
+ </div>
1418
+
1419
+ <div class="method_details ">
1420
+ <p class="signature " id="puts-instance_method">
1421
+
1422
+ - (<tt>Object</tt>) <strong>puts</strong>(msg)
1423
+
1424
+
1425
+
1426
+ </p><div class="docstring">
1427
+ <div class="discussion">
1428
+ <p>
1429
+ Print characters to the process followed by an end of line.
1430
+ </p>
1431
+
1432
+
1433
+ </div>
1434
+ </div>
1435
+ <div class="tags">
1436
+
1437
+
1438
+ </div><table class="source_code">
1439
+ <tr>
1440
+ <td>
1441
+ <pre class="lines">
1442
+
1443
+
1444
+ 141
1445
+ 142
1446
+ 143</pre>
1447
+ </td>
1448
+ <td>
1449
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 141</span>
1450
+
1451
+ <span class='kw'>def</span> <span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span>
1452
+ <span class='ivar'>@w</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span>
1453
+ <span class='kw'>end</span></pre>
1454
+ </td>
1455
+ </tr>
1456
+ </table>
1457
+ </div>
1458
+
1459
+ <div class="method_details ">
1460
+ <p class="signature " id="read-instance_method">
1461
+
1462
+ - (<tt>Object</tt>) <strong>read</strong>
1463
+
1464
+
1465
+
1466
+ </p><div class="docstring">
1467
+ <div class="discussion">
1468
+ <p>
1469
+ Wait for the process to end and return the entire standard output.
1470
+ </p>
1471
+
1472
+
1473
+ </div>
1474
+ </div>
1475
+ <div class="tags">
1476
+
1477
+
1478
+ </div><table class="source_code">
1479
+ <tr>
1480
+ <td>
1481
+ <pre class="lines">
1482
+
1483
+
1484
+ 153
1485
+ 154
1486
+ 155</pre>
1487
+ </td>
1488
+ <td>
1489
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 153</span>
1490
+
1491
+ <span class='kw'>def</span> <span class='id identifier rubyid_read'>read</span>
1492
+ <span class='kw'>return</span> <span class='ivar'>@r</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span>
1493
+ <span class='kw'>end</span></pre>
1494
+ </td>
1495
+ </tr>
1496
+ </table>
1497
+ </div>
1498
+
1499
+ <div class="method_details ">
1500
+ <p class="signature " id="read_err-instance_method">
1501
+
1502
+ - (<tt>Object</tt>) <strong>read_err</strong>
1503
+
1504
+
1505
+
1506
+ </p><div class="docstring">
1507
+ <div class="discussion">
1508
+ <p>
1509
+ Wait for the process to end and return the entire standard error.
1510
+ </p>
1511
+
1512
+
1513
+ </div>
1514
+ </div>
1515
+ <div class="tags">
1516
+
1517
+
1518
+ </div><table class="source_code">
1519
+ <tr>
1520
+ <td>
1521
+ <pre class="lines">
1522
+
1523
+
1524
+ 159
1525
+ 160
1526
+ 161</pre>
1527
+ </td>
1528
+ <td>
1529
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 159</span>
1530
+
1531
+ <span class='kw'>def</span> <span class='id identifier rubyid_read_err'>read_err</span>
1532
+ <span class='kw'>return</span> <span class='ivar'>@e</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span>
1533
+ <span class='kw'>end</span></pre>
1534
+ </td>
1535
+ </tr>
1536
+ </table>
1537
+ </div>
1538
+
1539
+ <div class="method_details ">
1540
+ <p class="signature " id="readlines-instance_method">
1541
+
1542
+ - (<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>) <strong>readlines</strong>(count)
1543
+
1544
+
1545
+
1546
+ </p><div class="docstring">
1547
+ <div class="discussion">
1548
+ <p>
1549
+ Read <tt>count</tt> lines from the process standard out.
1550
+ </p>
1551
+
1552
+
1553
+ </div>
1554
+ </div>
1555
+ <div class="tags">
1556
+ <h3>Parameters:</h3>
1557
+ <ul class="param">
1558
+
1559
+ <li>
1560
+
1561
+ <span class='name'>count</span>
1562
+
1563
+
1564
+ <span class='type'>(<tt>Integer</tt>)</span>
1565
+
1566
+
1567
+
1568
+ &mdash;
1569
+ <div class='inline'><p>
1570
+ Number of lines to read.
1571
+ </p>
1572
+ </div>
1573
+
1574
+ </li>
1575
+
1576
+ </ul>
1577
+
1578
+ <h3>Returns:</h3>
1579
+ <ul class="return">
1580
+
1581
+ <li>
1582
+
1583
+
1584
+ <span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
1585
+
1586
+
1587
+
1588
+ </li>
1589
+
1590
+ </ul>
1591
+
1592
+ </div><table class="source_code">
1593
+ <tr>
1594
+ <td>
1595
+ <pre class="lines">
1596
+
1597
+
1598
+ 117
1599
+ 118
1600
+ 119</pre>
1601
+ </td>
1602
+ <td>
1603
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 117</span>
1604
+
1605
+ <span class='kw'>def</span> <span class='id identifier rubyid_readlines'>readlines</span> <span class='id identifier rubyid_count'>count</span>
1606
+ <span class='ivar'>@r</span><span class='period'>.</span><span class='id identifier rubyid_readlines'>readlines</span> <span class='id identifier rubyid_count'>count</span>
1607
+ <span class='kw'>end</span></pre>
1608
+ </td>
1609
+ </tr>
1610
+ </table>
1611
+ </div>
1612
+
1613
+ <div class="method_details ">
1614
+ <p class="signature " id="readpartial-instance_method">
1615
+
1616
+ - (<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>) <strong>readpartial</strong>(count)
1617
+
1618
+
1619
+
1620
+ </p><div class="docstring">
1621
+ <div class="discussion">
1622
+ <p>
1623
+ Read <tt>count</tt> characters from the process standard out.
1624
+ </p>
1625
+
1626
+
1627
+ </div>
1628
+ </div>
1629
+ <div class="tags">
1630
+ <h3>Parameters:</h3>
1631
+ <ul class="param">
1632
+
1633
+ <li>
1634
+
1635
+ <span class='name'>count</span>
1636
+
1637
+
1638
+ <span class='type'>(<tt>Integer</tt>)</span>
1639
+
1640
+
1641
+
1642
+ &mdash;
1643
+ <div class='inline'><p>
1644
+ Number of characters to read.
1645
+ </p>
1646
+ </div>
1647
+
1648
+ </li>
1649
+
1650
+ </ul>
1651
+
1652
+ <h3>Returns:</h3>
1653
+ <ul class="return">
1654
+
1655
+ <li>
1656
+
1657
+
1658
+ <span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
1659
+
1660
+
1661
+
1662
+ </li>
1663
+
1664
+ </ul>
1665
+
1666
+ </div><table class="source_code">
1667
+ <tr>
1668
+ <td>
1669
+ <pre class="lines">
1670
+
1671
+
1672
+ 108
1673
+ 109
1674
+ 110</pre>
1675
+ </td>
1676
+ <td>
1677
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 108</span>
1678
+
1679
+ <span class='kw'>def</span> <span class='id identifier rubyid_readpartial'>readpartial</span> <span class='id identifier rubyid_count'>count</span>
1680
+ <span class='ivar'>@r</span><span class='period'>.</span><span class='id identifier rubyid_readpartial'>readpartial</span> <span class='id identifier rubyid_count'>count</span>
1681
+ <span class='kw'>end</span></pre>
1682
+ </td>
1683
+ </tr>
1684
+ </table>
1685
+ </div>
1686
+
1687
+ <div class="method_details ">
1688
+ <p class="signature " id="readpartial_err-instance_method">
1689
+
1690
+ - (<tt>Object</tt>) <strong>readpartial_err</strong>(count)
1691
+
1692
+
1693
+
1694
+ </p><table class="source_code">
1695
+ <tr>
1696
+ <td>
1697
+ <pre class="lines">
1698
+
1699
+
1700
+ 163
1701
+ 164
1702
+ 165</pre>
1703
+ </td>
1704
+ <td>
1705
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 163</span>
1706
+
1707
+ <span class='kw'>def</span> <span class='id identifier rubyid_readpartial_err'>readpartial_err</span> <span class='id identifier rubyid_count'>count</span>
1708
+ <span class='kw'>return</span> <span class='ivar'>@e</span><span class='period'>.</span><span class='id identifier rubyid_readpartial'>readpartial</span> <span class='id identifier rubyid_count'>count</span>
1709
+ <span class='kw'>end</span></pre>
1710
+ </td>
1711
+ </tr>
1712
+ </table>
1713
+ </div>
1714
+
1715
+ <div class="method_details ">
1716
+ <p class="signature " id="update_status-instance_method">
1717
+
1718
+ - (<tt>Object</tt>) <strong>update_status</strong>(sig = 0)
1719
+
1720
+
1721
+
1722
+ </p><div class="docstring">
1723
+ <div class="discussion">
1724
+ <p>
1725
+ Send an update signal to the process.
1726
+ </p>
1727
+
1728
+
1729
+ </div>
1730
+ </div>
1731
+ <div class="tags">
1732
+ <h3>Parameters:</h3>
1733
+ <ul class="param">
1734
+
1735
+ <li>
1736
+
1737
+ <span class='name'>sig</span>
1738
+
1739
+
1740
+ <span class='type'>(<tt>Integer</tt>)</span>
1741
+
1742
+
1743
+ <em class="default">(defaults to: <tt>0</tt>)</em>
1744
+
1745
+
1746
+ &mdash;
1747
+ <div class='inline'><p>
1748
+ The signal to send, default 0 (or no action requested)
1749
+ </p>
1750
+ </div>
1751
+
1752
+ </li>
1753
+
1754
+ </ul>
1755
+
1756
+
1757
+ </div><table class="source_code">
1758
+ <tr>
1759
+ <td>
1760
+ <pre class="lines">
1761
+
1762
+
1763
+ 93
1764
+ 94
1765
+ 95
1766
+ 96
1767
+ 97
1768
+ 98
1769
+ 99
1770
+ 100
1771
+ 101</pre>
1772
+ </td>
1773
+ <td>
1774
+ <pre class="code"><span class="info file"># File 'lib/sprout/process_runner.rb', line 93</span>
1775
+
1776
+ <span class='kw'>def</span> <span class='id identifier rubyid_update_status'>update_status</span> <span class='id identifier rubyid_sig'>sig</span><span class='op'>=</span><span class='int'>0</span>
1777
+ <span class='id identifier rubyid_pid_int'>pid_int</span> <span class='op'>=</span> <span class='const'>Integer</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span> <span class='ivar'>@pid</span> <span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1778
+ <span class='kw'>begin</span>
1779
+ <span class='const'>Process</span><span class='op'>::</span><span class='id identifier rubyid_kill'>kill</span> <span class='id identifier rubyid_sig'>sig</span><span class='comma'>,</span> <span class='id identifier rubyid_pid_int'>pid_int</span>
1780
+ <span class='kw'>true</span>
1781
+ <span class='kw'>rescue</span> <span class='const'>Errno</span><span class='op'>::</span><span class='const'>ESRCH</span>
1782
+ <span class='kw'>false</span>
1783
+ <span class='kw'>end</span>
1784
+ <span class='kw'>end</span></pre>
1785
+ </td>
1786
+ </tr>
1787
+ </table>
1788
+ </div>
1789
+
1790
+ </div>
1791
+
1792
+ </div>
1793
+
1794
+ <div id="footer">
1795
+ Generated on Sun Mar 11 14:30:33 2012 by
1796
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1797
+ 0.7.5 (ruby-1.9.2).
1798
+ </div>
1799
+
1800
+ </body>
1801
+ </html>