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,212 @@
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
+ Module: Sprout::System
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 (S)</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">System</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>Module: Sprout::System
60
+
61
+
62
+
63
+ </h1>
64
+
65
+ <dl class="box">
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+ <dt class="r1 last">Defined in:</dt>
75
+ <dd class="r1 last">lib/sprout/system.rb<span class="defines">,<br />
76
+ lib/sprout/system/win_system.rb,<br /> lib/sprout/system/osx_system.rb,<br /> lib/sprout/system/unix_system.rb,<br /> lib/sprout/system/base_system.rb,<br /> lib/sprout/system/java_system.rb,<br /> lib/sprout/system/vista_system.rb,<br /> lib/sprout/system/win_nix_system.rb</span>
77
+ </dd>
78
+
79
+ </dl>
80
+ <div class="clear"></div>
81
+
82
+ <h2>Defined Under Namespace</h2>
83
+ <p class="children">
84
+
85
+
86
+
87
+
88
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="System/BaseSystem.html" title="Sprout::System::BaseSystem (class)">BaseSystem</a></span>, <span class='object_link'><a href="System/JavaSystem.html" title="Sprout::System::JavaSystem (class)">JavaSystem</a></span>, <span class='object_link'><a href="System/OSXSystem.html" title="Sprout::System::OSXSystem (class)">OSXSystem</a></span>, <span class='object_link'><a href="System/ThreadMock.html" title="Sprout::System::ThreadMock (class)">ThreadMock</a></span>, <span class='object_link'><a href="System/UnixSystem.html" title="Sprout::System::UnixSystem (class)">UnixSystem</a></span>, <span class='object_link'><a href="System/VistaSystem.html" title="Sprout::System::VistaSystem (class)">VistaSystem</a></span>, <span class='object_link'><a href="System/WinNixSystem.html" title="Sprout::System::WinNixSystem (class)">WinNixSystem</a></span>, <span class='object_link'><a href="System/WinSystem.html" title="Sprout::System::WinSystem (class)">WinSystem</a></span>
89
+
90
+
91
+ </p>
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <h2>
101
+ Class Method Summary
102
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
103
+ </h2>
104
+
105
+ <ul class="summary">
106
+
107
+ <li class="public ">
108
+ <span class="summary_signature">
109
+
110
+ <a href="#create-class_method" title="create (class method)">+ (Object) <strong>create</strong> </a>
111
+
112
+
113
+
114
+ </span>
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <span class="summary_desc"><div class='inline'><p>
124
+ This is the factory that one should generally be used to create new,
125
+ concrete System objects.
126
+ </p>
127
+ </div></span>
128
+
129
+ </li>
130
+
131
+
132
+ </ul>
133
+
134
+
135
+
136
+
137
+ <div id="class_method_details" class="method_details_list">
138
+ <h2>Class Method Details</h2>
139
+
140
+
141
+ <div class="method_details first">
142
+ <p class="signature first" id="create-class_method">
143
+
144
+ + (<tt>Object</tt>) <strong>create</strong>
145
+
146
+
147
+
148
+ </p><div class="docstring">
149
+ <div class="discussion">
150
+ <p>
151
+ This is the factory that one should generally be used to create new,
152
+ concrete System objects.
153
+ </p>
154
+ <p>
155
+ A typical example follows:
156
+ </p>
157
+ <pre class="code ruby"><code>
158
+ <span class='id identifier rubyid_system'>system</span> <span class='op'>=</span> <span class='const'>System</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span>
159
+ <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_chdir'>chdir</span> <span class='id identifier rubyid_system'>system</span><span class='period'>.</span><span class='id identifier rubyid_home'>home</span>
160
+ <span class='id identifier rubyid_system'>system</span><span class='period'>.</span><span class='id identifier rubyid_execute'>execute</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>pwd</span><span class='tstring_end'>&quot;</span></span> <span class='comment'># /home/yourusername</span></code></pre>
161
+
162
+
163
+ </div>
164
+ </div>
165
+ <div class="tags">
166
+
167
+
168
+ </div><table class="source_code">
169
+ <tr>
170
+ <td>
171
+ <pre class="lines">
172
+
173
+
174
+ 23
175
+ 24
176
+ 25
177
+ 26
178
+ 27
179
+ 28
180
+ 29
181
+ 30
182
+ 31</pre>
183
+ </td>
184
+ <td>
185
+ <pre class="code"><span class="info file"># File 'lib/sprout/system.rb', line 23</span>
186
+
187
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span>
188
+ <span class='id identifier rubyid_p'>p</span> <span class='op'>=</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Platform</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
189
+ <span class='kw'>return</span> <span class='const'>VistaSystem</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>if</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_vista?'>vista?</span>
190
+ <span class='kw'>return</span> <span class='const'>WinNixSystem</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>if</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_windows_nix?'>windows_nix?</span>
191
+ <span class='kw'>return</span> <span class='const'>WinSystem</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>if</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_windows?'>windows?</span>
192
+ <span class='kw'>return</span> <span class='const'>JavaSystem</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>if</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_java?'>java?</span>
193
+ <span class='kw'>return</span> <span class='const'>OSXSystem</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>if</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_mac?'>mac?</span>
194
+ <span class='kw'>return</span> <span class='const'>UnixSystem</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
195
+ <span class='kw'>end</span></pre>
196
+ </td>
197
+ </tr>
198
+ </table>
199
+ </div>
200
+
201
+ </div>
202
+
203
+ </div>
204
+
205
+ <div id="footer">
206
+ Generated on Sun Mar 11 14:30:32 2012 by
207
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
208
+ 0.7.5 (ruby-1.9.2).
209
+ </div>
210
+
211
+ </body>
212
+ </html>
@@ -0,0 +1,1732 @@
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::System::BaseSystem
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 (B)</a> &raquo;
37
+ <span class='title'><span class='object_link'><a href="../../Sprout.html" title="Sprout (module)">Sprout</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../System.html" title="Sprout::System (module)">System</a></span></span>
38
+ &raquo;
39
+ <span class="title">BaseSystem</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::System::BaseSystem
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::System::BaseSystem</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/system/base_system.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 abstract base class for all supported system/platform types. In
99
+ general, users are created by calling the <tt>create</tt> factory method on
100
+ the <tt>System</tt> module.
101
+ </p>
102
+ <pre class="code ruby"><code>
103
+
104
+ <span class='const'>System</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span>
105
+ </code></pre>
106
+ <p>
107
+ Assuming you call the create method, you should wind up with a concrete
108
+ system that matches your system, and these concrete users will generally be
109
+ derived from this base class.
110
+ </p>
111
+
112
+
113
+ </div>
114
+ </div>
115
+ <div class="tags">
116
+
117
+
118
+ </div><div id="subclasses">
119
+ <h2>Direct Known Subclasses</h2>
120
+ <p class="children"><span class='object_link'><a href="JavaSystem.html" title="Sprout::System::JavaSystem (class)">JavaSystem</a></span>, <span class='object_link'><a href="UnixSystem.html" title="Sprout::System::UnixSystem (class)">UnixSystem</a></span>, <span class='object_link'><a href="WinSystem.html" title="Sprout::System::WinSystem (class)">WinSystem</a></span></p>
121
+ </div>
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+ <h2>
131
+ Instance Method Summary
132
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
133
+ </h2>
134
+
135
+ <ul class="summary">
136
+
137
+ <li class="protected ">
138
+ <span class="summary_signature">
139
+
140
+ <a href="#alt_separator%3F-instance_method" title="#alt_separator? (instance method)">- (Boolean) <strong>alt_separator?</strong> </a>
141
+
142
+
143
+
144
+ </span>
145
+
146
+
147
+ <span class="note title protected">protected</span>
148
+
149
+
150
+
151
+
152
+
153
+ <span class="summary_desc"><div class='inline'></div></span>
154
+
155
+ </li>
156
+
157
+
158
+ <li class="public ">
159
+ <span class="summary_signature">
160
+
161
+ <a href="#application_home-instance_method" title="#application_home (instance method)">- (Object) <strong>application_home</strong>(name) </a>
162
+
163
+
164
+
165
+ </span>
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+ <span class="summary_desc"><div class='inline'><p>
175
+ Different operating systems will store Application data different default
176
+ locations.
177
+ </p>
178
+ </div></span>
179
+
180
+ </li>
181
+
182
+
183
+ <li class="public ">
184
+ <span class="summary_signature">
185
+
186
+ <a href="#can_execute%3F-instance_method" title="#can_execute? (instance method)">- (Boolean) <strong>can_execute?</strong>(platform) </a>
187
+
188
+
189
+
190
+ </span>
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+ <span class="summary_desc"><div class='inline'></div></span>
200
+
201
+ </li>
202
+
203
+
204
+ <li class="public ">
205
+ <span class="summary_signature">
206
+
207
+ <a href="#clean_path-instance_method" title="#clean_path (instance method)">- (Object) <strong>clean_path</strong>(path) </a>
208
+
209
+
210
+
211
+ </span>
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+ <span class="summary_desc"><div class='inline'><p>
221
+ Clean the provided <tt>path</tt> String for the current operating system.
222
+ </p>
223
+ </div></span>
224
+
225
+ </li>
226
+
227
+
228
+ <li class="protected ">
229
+ <span class="summary_signature">
230
+
231
+ <a href="#env_home-instance_method" title="#env_home (instance method)">- (Object) <strong>env_home</strong> </a>
232
+
233
+
234
+
235
+ </span>
236
+
237
+
238
+ <span class="note title protected">protected</span>
239
+
240
+
241
+
242
+
243
+
244
+ <span class="summary_desc"><div class='inline'></div></span>
245
+
246
+ </li>
247
+
248
+
249
+ <li class="protected ">
250
+ <span class="summary_signature">
251
+
252
+ <a href="#env_homedrive-instance_method" title="#env_homedrive (instance method)">- (Object) <strong>env_homedrive</strong> </a>
253
+
254
+
255
+
256
+ </span>
257
+
258
+
259
+ <span class="note title protected">protected</span>
260
+
261
+
262
+
263
+
264
+
265
+ <span class="summary_desc"><div class='inline'></div></span>
266
+
267
+ </li>
268
+
269
+
270
+ <li class="protected ">
271
+ <span class="summary_signature">
272
+
273
+ <a href="#env_homedrive_and_homepath-instance_method" title="#env_homedrive_and_homepath (instance method)">- (Object) <strong>env_homedrive_and_homepath</strong> </a>
274
+
275
+
276
+
277
+ </span>
278
+
279
+
280
+ <span class="note title protected">protected</span>
281
+
282
+
283
+
284
+
285
+
286
+ <span class="summary_desc"><div class='inline'></div></span>
287
+
288
+ </li>
289
+
290
+
291
+ <li class="protected ">
292
+ <span class="summary_signature">
293
+
294
+ <a href="#env_homepath-instance_method" title="#env_homepath (instance method)">- (Object) <strong>env_homepath</strong> </a>
295
+
296
+
297
+
298
+ </span>
299
+
300
+
301
+ <span class="note title protected">protected</span>
302
+
303
+
304
+
305
+
306
+
307
+ <span class="summary_desc"><div class='inline'></div></span>
308
+
309
+ </li>
310
+
311
+
312
+ <li class="protected ">
313
+ <span class="summary_signature">
314
+
315
+ <a href="#env_userprofile-instance_method" title="#env_userprofile (instance method)">- (Object) <strong>env_userprofile</strong> </a>
316
+
317
+
318
+
319
+ </span>
320
+
321
+
322
+ <span class="note title protected">protected</span>
323
+
324
+
325
+
326
+
327
+
328
+ <span class="summary_desc"><div class='inline'></div></span>
329
+
330
+ </li>
331
+
332
+
333
+ <li class="public ">
334
+ <span class="summary_signature">
335
+
336
+ <a href="#execute-instance_method" title="#execute (instance method)">- (Object) <strong>execute</strong>(tool, options = '') </a>
337
+
338
+
339
+
340
+ </span>
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+ <span class="summary_desc"><div class='inline'><p>
350
+ Creates a new process, executes the command and returns whatever the
351
+ process wrote to stdout, or stderr.
352
+ </p>
353
+ </div></span>
354
+
355
+ </li>
356
+
357
+
358
+ <li class="public ">
359
+ <span class="summary_signature">
360
+
361
+ <a href="#execute_silent-instance_method" title="#execute_silent (instance method)">- (Object) <strong>execute_silent</strong>(tool, options = '') </a>
362
+
363
+
364
+
365
+ </span>
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+ <span class="summary_desc"><div class='inline'><p>
375
+ Creates and returns the process without attempting to read or write to the
376
+ stream.
377
+ </p>
378
+ </div></span>
379
+
380
+ </li>
381
+
382
+
383
+ <li class="public ">
384
+ <span class="summary_signature">
385
+
386
+ <a href="#execute_thread-instance_method" title="#execute_thread (instance method)">- (Sprout::ProcessRunner) <strong>execute_thread</strong>(tool, options = '', prompt = nil) {|String| ... }</a>
387
+
388
+
389
+
390
+ </span>
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+
399
+ <span class="summary_desc"><div class='inline'><p>
400
+ Execute a new process in a separate thread and yield whatever output is
401
+ written to its stderr and stdout.
402
+ </p>
403
+ </div></span>
404
+
405
+ </li>
406
+
407
+
408
+ <li class="protected ">
409
+ <span class="summary_signature">
410
+
411
+ <a href="#find_home-instance_method" title="#find_home (instance method)">- (Object) <strong>find_home</strong> </a>
412
+
413
+
414
+
415
+ </span>
416
+
417
+
418
+ <span class="note title protected">protected</span>
419
+
420
+
421
+
422
+
423
+
424
+ <span class="summary_desc"><div class='inline'></div></span>
425
+
426
+ </li>
427
+
428
+
429
+ <li class="public ">
430
+ <span class="summary_signature">
431
+
432
+ <a href="#format_application_name-instance_method" title="#format_application_name (instance method)">- (Object) <strong>format_application_name</strong>(name) </a>
433
+
434
+
435
+
436
+ </span>
437
+
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+ <span class="summary_desc"><div class='inline'><p>
446
+ Template method that should be overridden by subclasses.
447
+ </p>
448
+ </div></span>
449
+
450
+ </li>
451
+
452
+
453
+ <li class="protected ">
454
+ <span class="summary_signature">
455
+
456
+ <a href="#get_and_execute_process_runner-instance_method" title="#get_and_execute_process_runner (instance method)">- (Object) <strong>get_and_execute_process_runner</strong>(tool, options = nil) </a>
457
+
458
+
459
+
460
+ </span>
461
+
462
+
463
+ <span class="note title protected">protected</span>
464
+
465
+
466
+
467
+
468
+
469
+ <span class="summary_desc"><div class='inline'><p>
470
+ Get a process runner and execute the provided <tt>executable</tt>, with the
471
+ provided <tt>options</tt>.
472
+ </p>
473
+ </div></span>
474
+
475
+ </li>
476
+
477
+
478
+ <li class="public ">
479
+ <span class="summary_signature">
480
+
481
+ <a href="#get_process_runner-instance_method" title="#get_process_runner (instance method)">- (Object) <strong>get_process_runner</strong> </a>
482
+
483
+
484
+
485
+ </span>
486
+
487
+
488
+
489
+
490
+
491
+
492
+
493
+
494
+ <span class="summary_desc"><div class='inline'><p>
495
+ Instantiate and return a new Sprout::ProcessRunner so that we can execute
496
+ it.
497
+ </p>
498
+ </div></span>
499
+
500
+ </li>
501
+
502
+
503
+ <li class="public ">
504
+ <span class="summary_signature">
505
+
506
+ <a href="#home-instance_method" title="#home (instance method)">- (Object) <strong>home</strong> </a>
507
+
508
+
509
+
510
+ </span>
511
+
512
+
513
+
514
+
515
+
516
+
517
+
518
+
519
+ <span class="summary_desc"><div class='inline'><p>
520
+ Get the home path for a system on a particular operating system.
521
+ </p>
522
+ </div></span>
523
+
524
+ </li>
525
+
526
+
527
+ <li class="public ">
528
+ <span class="summary_signature">
529
+
530
+ <a href="#home%3D-instance_method" title="#home= (instance method)">- (Object) <strong>home=</strong>(home) </a>
531
+
532
+
533
+
534
+ </span>
535
+
536
+
537
+
538
+
539
+
540
+
541
+
542
+
543
+ <span class="summary_desc"><div class='inline'><p>
544
+ Set the home path for a system on a particular operating system.
545
+ </p>
546
+ </div></span>
547
+
548
+ </li>
549
+
550
+
551
+ <li class="public ">
552
+ <span class="summary_signature">
553
+
554
+ <a href="#library-instance_method" title="#library (instance method)">- (Object) <strong>library</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
+ Some operating systems (like OS X and Windows) have a specific location
569
+ where applications are expected to store files for a particular system.
570
+ </p>
571
+ </div></span>
572
+
573
+ </li>
574
+
575
+
576
+ <li class="public ">
577
+ <span class="summary_signature">
578
+
579
+ <a href="#read_from-instance_method" title="#read_from (instance method)">- (Object) <strong>read_from</strong>(pipe, prompt, &amp;block) </a>
580
+
581
+
582
+
583
+ </span>
584
+
585
+
586
+
587
+
588
+
589
+
590
+
591
+
592
+ <span class="summary_desc"><div class='inline'></div></span>
593
+
594
+ </li>
595
+
596
+
597
+ <li class="protected ">
598
+ <span class="summary_signature">
599
+
600
+ <a href="#tilde_home-instance_method" title="#tilde_home (instance method)">- (Object) <strong>tilde_home</strong> </a>
601
+
602
+
603
+
604
+ </span>
605
+
606
+
607
+ <span class="note title protected">protected</span>
608
+
609
+
610
+
611
+
612
+
613
+ <span class="summary_desc"><div class='inline'></div></span>
614
+
615
+ </li>
616
+
617
+
618
+ <li class="protected ">
619
+ <span class="summary_signature">
620
+
621
+ <a href="#worst_case_home-instance_method" title="#worst_case_home (instance method)">- (Object) <strong>worst_case_home</strong> </a>
622
+
623
+
624
+
625
+ </span>
626
+
627
+
628
+ <span class="note title protected">protected</span>
629
+
630
+
631
+
632
+
633
+
634
+ <span class="summary_desc"><div class='inline'></div></span>
635
+
636
+ </li>
637
+
638
+
639
+ </ul>
640
+
641
+
642
+
643
+
644
+ <div id="instance_method_details" class="method_details_list">
645
+ <h2>Instance Method Details</h2>
646
+
647
+
648
+ <div class="method_details first">
649
+ <p class="signature first" id="alt_separator?-instance_method">
650
+
651
+ - (<tt>Boolean</tt>) <strong>alt_separator?</strong> <span class="extras">(protected)</span>
652
+
653
+
654
+
655
+ </p><div class="docstring">
656
+ <div class="discussion">
657
+
658
+
659
+ </div>
660
+ </div>
661
+ <div class="tags">
662
+
663
+ <h3>Returns:</h3>
664
+ <ul class="return">
665
+
666
+ <li>
667
+
668
+
669
+ <span class='type'>(<tt>Boolean</tt>)</span>
670
+
671
+
672
+
673
+ </li>
674
+
675
+ </ul>
676
+
677
+ </div><table class="source_code">
678
+ <tr>
679
+ <td>
680
+ <pre class="lines">
681
+
682
+
683
+ 223
684
+ 224
685
+ 225</pre>
686
+ </td>
687
+ <td>
688
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 223</span>
689
+
690
+ <span class='kw'>def</span> <span class='id identifier rubyid_alt_separator?'>alt_separator?</span>
691
+ <span class='const'>File</span><span class='op'>::</span><span class='const'>ALT_SEPARATOR</span>
692
+ <span class='kw'>end</span></pre>
693
+ </td>
694
+ </tr>
695
+ </table>
696
+ </div>
697
+
698
+ <div class="method_details ">
699
+ <p class="signature " id="application_home-instance_method">
700
+
701
+ - (<tt>Object</tt>) <strong>application_home</strong>(name)
702
+
703
+
704
+
705
+ </p><div class="docstring">
706
+ <div class="discussion">
707
+ <p>
708
+ Different operating systems will store Application data different default
709
+ locations.
710
+ </p>
711
+ <p>
712
+ Subclasses will generally override this method and return the appropriate
713
+ location for their operating system.
714
+ </p>
715
+ <p>
716
+ <tt>name</tt> String value of the Application name for which we&#8217;d
717
+ like to store data.
718
+ </p>
719
+
720
+
721
+ </div>
722
+ </div>
723
+ <div class="tags">
724
+
725
+
726
+ </div><table class="source_code">
727
+ <tr>
728
+ <td>
729
+ <pre class="lines">
730
+
731
+
732
+ 183
733
+ 184
734
+ 185</pre>
735
+ </td>
736
+ <td>
737
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 183</span>
738
+
739
+ <span class='kw'>def</span> <span class='id identifier rubyid_application_home'>application_home</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
740
+ <span class='kw'>return</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_library'>library</span><span class='comma'>,</span> <span class='id identifier rubyid_format_application_name'>format_application_name</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='semicolon'>;</span>
741
+ <span class='kw'>end</span></pre>
742
+ </td>
743
+ </tr>
744
+ </table>
745
+ </div>
746
+
747
+ <div class="method_details ">
748
+ <p class="signature " id="can_execute?-instance_method">
749
+
750
+ - (<tt>Boolean</tt>) <strong>can_execute?</strong>(platform)
751
+
752
+
753
+
754
+ </p><div class="docstring">
755
+ <div class="discussion">
756
+
757
+
758
+ </div>
759
+ </div>
760
+ <div class="tags">
761
+
762
+ <h3>Returns:</h3>
763
+ <ul class="return">
764
+
765
+ <li>
766
+
767
+
768
+ <span class='type'>(<tt>Boolean</tt>)</span>
769
+
770
+
771
+
772
+ </li>
773
+
774
+ </ul>
775
+
776
+ </div><table class="source_code">
777
+ <tr>
778
+ <td>
779
+ <pre class="lines">
780
+
781
+
782
+ 60
783
+ 61
784
+ 62</pre>
785
+ </td>
786
+ <td>
787
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 60</span>
788
+
789
+ <span class='kw'>def</span> <span class='id identifier rubyid_can_execute?'>can_execute?</span> <span class='id identifier rubyid_platform'>platform</span>
790
+ <span class='id identifier rubyid_platform'>platform</span> <span class='op'>==</span> <span class='symbol'>:universal</span>
791
+ <span class='kw'>end</span></pre>
792
+ </td>
793
+ </tr>
794
+ </table>
795
+ </div>
796
+
797
+ <div class="method_details ">
798
+ <p class="signature " id="clean_path-instance_method">
799
+
800
+ - (<tt>Object</tt>) <strong>clean_path</strong>(path)
801
+
802
+
803
+
804
+ </p><div class="docstring">
805
+ <div class="discussion">
806
+ <p>
807
+ Clean the provided <tt>path</tt> String for the current operating system.
808
+ </p>
809
+ <p>
810
+ Each operating system behaves differently when we attempt to execute a file
811
+ with spaces in the <tt>path</tt> to the file.
812
+ </p>
813
+ <p>
814
+ Subclasses will generally override this method and clean the path
815
+ appropriately for their operating system.
816
+ </p>
817
+
818
+
819
+ </div>
820
+ </div>
821
+ <div class="tags">
822
+
823
+
824
+ </div><table class="source_code">
825
+ <tr>
826
+ <td>
827
+ <pre class="lines">
828
+
829
+
830
+ 170
831
+ 171</pre>
832
+ </td>
833
+ <td>
834
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 170</span>
835
+
836
+ <span class='kw'>def</span> <span class='id identifier rubyid_clean_path'>clean_path</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
837
+ <span class='kw'>end</span></pre>
838
+ </td>
839
+ </tr>
840
+ </table>
841
+ </div>
842
+
843
+ <div class="method_details ">
844
+ <p class="signature " id="env_home-instance_method">
845
+
846
+ - (<tt>Object</tt>) <strong>env_home</strong> <span class="extras">(protected)</span>
847
+
848
+
849
+
850
+ </p><table class="source_code">
851
+ <tr>
852
+ <td>
853
+ <pre class="lines">
854
+
855
+
856
+ 215
857
+ 216
858
+ 217</pre>
859
+ </td>
860
+ <td>
861
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 215</span>
862
+
863
+ <span class='kw'>def</span> <span class='id identifier rubyid_env_home'>env_home</span>
864
+ <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>HOME</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
865
+ <span class='kw'>end</span></pre>
866
+ </td>
867
+ </tr>
868
+ </table>
869
+ </div>
870
+
871
+ <div class="method_details ">
872
+ <p class="signature " id="env_homedrive-instance_method">
873
+
874
+ - (<tt>Object</tt>) <strong>env_homedrive</strong> <span class="extras">(protected)</span>
875
+
876
+
877
+
878
+ </p><table class="source_code">
879
+ <tr>
880
+ <td>
881
+ <pre class="lines">
882
+
883
+
884
+ 197
885
+ 198
886
+ 199</pre>
887
+ </td>
888
+ <td>
889
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 197</span>
890
+
891
+ <span class='kw'>def</span> <span class='id identifier rubyid_env_homedrive'>env_homedrive</span>
892
+ <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>HOMEDRIVE</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
893
+ <span class='kw'>end</span></pre>
894
+ </td>
895
+ </tr>
896
+ </table>
897
+ </div>
898
+
899
+ <div class="method_details ">
900
+ <p class="signature " id="env_homedrive_and_homepath-instance_method">
901
+
902
+ - (<tt>Object</tt>) <strong>env_homedrive_and_homepath</strong> <span class="extras">(protected)</span>
903
+
904
+
905
+
906
+ </p><table class="source_code">
907
+ <tr>
908
+ <td>
909
+ <pre class="lines">
910
+
911
+
912
+ 205
913
+ 206
914
+ 207
915
+ 208
916
+ 209</pre>
917
+ </td>
918
+ <td>
919
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 205</span>
920
+
921
+ <span class='kw'>def</span> <span class='id identifier rubyid_env_homedrive_and_homepath'>env_homedrive_and_homepath</span>
922
+ <span class='id identifier rubyid_drive'>drive</span> <span class='op'>=</span> <span class='id identifier rubyid_env_homedrive'>env_homedrive</span>
923
+ <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='id identifier rubyid_env_homepath'>env_homepath</span>
924
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_drive'>drive</span><span class='rbrace'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_drive'>drive</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_path'>path</span>
925
+ <span class='kw'>end</span></pre>
926
+ </td>
927
+ </tr>
928
+ </table>
929
+ </div>
930
+
931
+ <div class="method_details ">
932
+ <p class="signature " id="env_homepath-instance_method">
933
+
934
+ - (<tt>Object</tt>) <strong>env_homepath</strong> <span class="extras">(protected)</span>
935
+
936
+
937
+
938
+ </p><table class="source_code">
939
+ <tr>
940
+ <td>
941
+ <pre class="lines">
942
+
943
+
944
+ 201
945
+ 202
946
+ 203</pre>
947
+ </td>
948
+ <td>
949
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 201</span>
950
+
951
+ <span class='kw'>def</span> <span class='id identifier rubyid_env_homepath'>env_homepath</span>
952
+ <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>HOMEPATH</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
953
+ <span class='kw'>end</span></pre>
954
+ </td>
955
+ </tr>
956
+ </table>
957
+ </div>
958
+
959
+ <div class="method_details ">
960
+ <p class="signature " id="env_userprofile-instance_method">
961
+
962
+ - (<tt>Object</tt>) <strong>env_userprofile</strong> <span class="extras">(protected)</span>
963
+
964
+
965
+
966
+ </p><table class="source_code">
967
+ <tr>
968
+ <td>
969
+ <pre class="lines">
970
+
971
+
972
+ 211
973
+ 212
974
+ 213</pre>
975
+ </td>
976
+ <td>
977
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 211</span>
978
+
979
+ <span class='kw'>def</span> <span class='id identifier rubyid_env_userprofile'>env_userprofile</span>
980
+ <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>USERPROFILE</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
981
+ <span class='kw'>end</span></pre>
982
+ </td>
983
+ </tr>
984
+ </table>
985
+ </div>
986
+
987
+ <div class="method_details ">
988
+ <p class="signature " id="execute-instance_method">
989
+
990
+ - (<tt>Object</tt>) <strong>execute</strong>(tool, options = '')
991
+
992
+
993
+
994
+ </p><div class="docstring">
995
+ <div class="discussion">
996
+ <p>
997
+ Creates a new process, executes the command and returns whatever the
998
+ process wrote to stdout, or stderr.
999
+ </p>
1000
+ <p>
1001
+ Raises a <tt>Sprout::Errors::ExecutionError</tt> if the process writes to stderr
1002
+ </p>
1003
+
1004
+
1005
+ </div>
1006
+ </div>
1007
+ <div class="tags">
1008
+
1009
+
1010
+ </div><table class="source_code">
1011
+ <tr>
1012
+ <td>
1013
+ <pre class="lines">
1014
+
1015
+
1016
+ 70
1017
+ 71
1018
+ 72
1019
+ 73
1020
+ 74
1021
+ 75
1022
+ 76
1023
+ 77
1024
+ 78
1025
+ 79
1026
+ 80
1027
+ 81
1028
+ 82
1029
+ 83
1030
+ 84
1031
+ 85</pre>
1032
+ </td>
1033
+ <td>
1034
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 70</span>
1035
+
1036
+ <span class='kw'>def</span> <span class='id identifier rubyid_execute'>execute</span><span class='lparen'>(</span><span class='id identifier rubyid_tool'>tool</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
1037
+ <span class='const'>Sprout</span><span class='period'>.</span><span class='id identifier rubyid_stdout'>stdout</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_tool'>tool</span><span class='rbrace'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_options'>options</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1038
+ <span class='id identifier rubyid_runner'>runner</span> <span class='op'>=</span> <span class='id identifier rubyid_get_and_execute_process_runner'>get_and_execute_process_runner</span><span class='lparen'>(</span><span class='id identifier rubyid_tool'>tool</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
1039
+ <span class='id identifier rubyid_error'>error</span> <span class='op'>=</span> <span class='id identifier rubyid_runner'>runner</span><span class='period'>.</span><span class='id identifier rubyid_read_err'>read_err</span>
1040
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_runner'>runner</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span>
1041
+
1042
+ <span class='kw'>if</span><span class='lparen'>(</span><span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&gt;</span> <span class='int'>0</span><span class='rparen'>)</span>
1043
+ <span class='const'>Sprout</span><span class='period'>.</span><span class='id identifier rubyid_stdout'>stdout</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_result'>result</span>
1044
+ <span class='kw'>end</span>
1045
+
1046
+ <span class='kw'>if</span><span class='lparen'>(</span><span class='id identifier rubyid_error'>error</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&gt;</span> <span class='int'>0</span><span class='rparen'>)</span>
1047
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>ExecutionError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>[ERROR] </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_error'>error</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1048
+ <span class='kw'>end</span>
1049
+
1050
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>||</span> <span class='id identifier rubyid_error'>error</span>
1051
+ <span class='kw'>end</span></pre>
1052
+ </td>
1053
+ </tr>
1054
+ </table>
1055
+ </div>
1056
+
1057
+ <div class="method_details ">
1058
+ <p class="signature " id="execute_silent-instance_method">
1059
+
1060
+ - (<tt>Object</tt>) <strong>execute_silent</strong>(tool, options = '')
1061
+
1062
+
1063
+
1064
+ </p><div class="docstring">
1065
+ <div class="discussion">
1066
+ <p>
1067
+ Creates and returns the process without attempting to read or write to the
1068
+ stream. This is useful for interacting with long-lived CLI processes like
1069
+ FCSH or FDB.
1070
+ </p>
1071
+
1072
+
1073
+ </div>
1074
+ </div>
1075
+ <div class="tags">
1076
+
1077
+
1078
+ </div><table class="source_code">
1079
+ <tr>
1080
+ <td>
1081
+ <pre class="lines">
1082
+
1083
+
1084
+ 93
1085
+ 94
1086
+ 95</pre>
1087
+ </td>
1088
+ <td>
1089
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 93</span>
1090
+
1091
+ <span class='kw'>def</span> <span class='id identifier rubyid_execute_silent'>execute_silent</span><span class='lparen'>(</span><span class='id identifier rubyid_tool'>tool</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
1092
+ <span class='id identifier rubyid_get_and_execute_process_runner'>get_and_execute_process_runner</span><span class='lparen'>(</span><span class='id identifier rubyid_tool'>tool</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
1093
+ <span class='kw'>end</span></pre>
1094
+ </td>
1095
+ </tr>
1096
+ </table>
1097
+ </div>
1098
+
1099
+ <div class="method_details ">
1100
+ <p class="signature " id="execute_thread-instance_method">
1101
+
1102
+ - (<tt><span class='object_link'><a href="../ProcessRunner.html" title="Sprout::ProcessRunner (class)">Sprout::ProcessRunner</a></span></tt>) <strong>execute_thread</strong>(tool, options = '', prompt = nil) {|String| ... }
1103
+
1104
+
1105
+
1106
+ </p><div class="docstring">
1107
+ <div class="discussion">
1108
+ <p>
1109
+ Execute a new process in a separate thread and yield whatever output is
1110
+ written to its stderr and stdout.
1111
+ </p>
1112
+
1113
+
1114
+ </div>
1115
+ </div>
1116
+ <div class="tags">
1117
+ <h3>Parameters:</h3>
1118
+ <ul class="param">
1119
+
1120
+ <li>
1121
+
1122
+ <span class='name'>tool</span>
1123
+
1124
+
1125
+ <span class='type'>(<tt>File</tt>)</span>
1126
+
1127
+
1128
+
1129
+ &mdash;
1130
+ <div class='inline'><p>
1131
+ Path to the executable.
1132
+ </p>
1133
+ </div>
1134
+
1135
+ </li>
1136
+
1137
+ <li>
1138
+
1139
+ <span class='name'>options</span>
1140
+
1141
+
1142
+ <span class='type'>(<tt><span class='object_link'><a href="../../String.html" title="String (class)">String</a></span></tt>)</span>
1143
+
1144
+
1145
+ <em class="default">(defaults to: <tt>''</tt>)</em>
1146
+
1147
+
1148
+ &mdash;
1149
+ <div class='inline'><p>
1150
+ The command line options that the executable accepts.
1151
+ </p>
1152
+ </div>
1153
+
1154
+ </li>
1155
+
1156
+ <li>
1157
+
1158
+ <span class='name'>prompt</span>
1159
+
1160
+
1161
+ <span class='type'>(<tt>Regex</tt>)</span>
1162
+
1163
+
1164
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1165
+
1166
+
1167
+ &mdash;
1168
+ <div class='inline'><p>
1169
+ The prompt that will trigger the listener block to be called.
1170
+ </p>
1171
+ </div>
1172
+
1173
+ </li>
1174
+
1175
+ </ul>
1176
+
1177
+ <h3>Yields:</h3>
1178
+ <ul class="yield">
1179
+
1180
+ <li>
1181
+
1182
+
1183
+ <span class='type'>(<tt><span class='object_link'><a href="../../String.html" title="String (class)">String</a></span></tt>)</span>
1184
+
1185
+
1186
+
1187
+ &mdash;
1188
+ <div class='inline'><p>
1189
+ Message that was received from the process, called when #prompt is
1190
+ encountered.
1191
+ </p>
1192
+ </div>
1193
+
1194
+ </li>
1195
+
1196
+ </ul>
1197
+ <h3>Returns:</h3>
1198
+ <ul class="return">
1199
+
1200
+ <li>
1201
+
1202
+
1203
+ <span class='type'>(<tt><span class='object_link'><a href="../ProcessRunner.html" title="Sprout::ProcessRunner (class)">Sprout::ProcessRunner</a></span></tt>)</span>
1204
+
1205
+
1206
+
1207
+ </li>
1208
+
1209
+ </ul>
1210
+
1211
+ </div><table class="source_code">
1212
+ <tr>
1213
+ <td>
1214
+ <pre class="lines">
1215
+
1216
+
1217
+ 107
1218
+ 108
1219
+ 109
1220
+ 110
1221
+ 111
1222
+ 112
1223
+ 113
1224
+ 114
1225
+ 115
1226
+ 116
1227
+ 117
1228
+ 118
1229
+ 119
1230
+ 120
1231
+ 121
1232
+ 122
1233
+ 123
1234
+ 124
1235
+ 125
1236
+ 126
1237
+ 127
1238
+ 128
1239
+ 129</pre>
1240
+ </td>
1241
+ <td>
1242
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 107</span>
1243
+
1244
+ <span class='kw'>def</span> <span class='id identifier rubyid_execute_thread'>execute_thread</span> <span class='id identifier rubyid_tool'>tool</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_prompt'>prompt</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
1245
+ <span class='id identifier rubyid_t'>t</span> <span class='op'>=</span> <span class='const'>Thread</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span>
1246
+ <span class='const'>Thread</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_abort_on_exception'>abort_on_exception</span> <span class='op'>=</span> <span class='kw'>true</span>
1247
+ <span class='id identifier rubyid_runner'>runner</span> <span class='op'>=</span> <span class='id identifier rubyid_execute_silent'>execute_silent</span><span class='lparen'>(</span><span class='id identifier rubyid_tool'>tool</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
1248
+ <span class='const'>Thread</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>runner</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_runner'>runner</span>
1249
+ <span class='id identifier rubyid_out'>out</span> <span class='op'>=</span> <span class='id identifier rubyid_read_from'>read_from</span> <span class='id identifier rubyid_runner'>runner</span><span class='period'>.</span><span class='id identifier rubyid_r'>r</span><span class='comma'>,</span> <span class='id identifier rubyid_prompt'>prompt</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
1250
+ <span class='id identifier rubyid_err'>err</span> <span class='op'>=</span> <span class='id identifier rubyid_read_from'>read_from</span> <span class='id identifier rubyid_runner'>runner</span><span class='period'>.</span><span class='id identifier rubyid_e'>e</span><span class='comma'>,</span> <span class='id identifier rubyid_prompt'>prompt</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
1251
+ <span class='id identifier rubyid_out'>out</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_err'>err</span><span class='period'>.</span><span class='id identifier rubyid_kill'>kill</span>
1252
+ <span class='kw'>end</span>
1253
+
1254
+ <span class='comment'># Wait for the runner to be created
1255
+ </span> <span class='comment'># before returning a nil reference
1256
+ </span> <span class='comment'># that never gets populated...
1257
+ </span> <span class='kw'>while</span> <span class='id identifier rubyid_t'>t</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>runner</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>do</span>
1258
+ <span class='id identifier rubyid_sleep'>sleep</span><span class='lparen'>(</span><span class='float'>0.1</span><span class='rparen'>)</span>
1259
+ <span class='kw'>end</span>
1260
+
1261
+ <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_alive?'>alive?</span>
1262
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>UsageError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_t'>t</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>runner</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_read_err'>read_err</span><span class='rparen'>)</span>
1263
+ <span class='kw'>end</span>
1264
+
1265
+ <span class='id identifier rubyid_t'>t</span>
1266
+ <span class='kw'>end</span></pre>
1267
+ </td>
1268
+ </tr>
1269
+ </table>
1270
+ </div>
1271
+
1272
+ <div class="method_details ">
1273
+ <p class="signature " id="find_home-instance_method">
1274
+
1275
+ - (<tt>Object</tt>) <strong>find_home</strong> <span class="extras">(protected)</span>
1276
+
1277
+
1278
+
1279
+ </p><table class="source_code">
1280
+ <tr>
1281
+ <td>
1282
+ <pre class="lines">
1283
+
1284
+
1285
+ 232
1286
+ 233
1287
+ 234
1288
+ 235
1289
+ 236
1290
+ 237
1291
+ 238
1292
+ 239
1293
+ 240
1294
+ 241
1295
+ 242
1296
+ 243</pre>
1297
+ </td>
1298
+ <td>
1299
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 232</span>
1300
+
1301
+ <span class='kw'>def</span> <span class='id identifier rubyid_find_home'>find_home</span>
1302
+ <span class='lbracket'>[</span><span class='symbol'>:env_userprofile</span><span class='comma'>,</span> <span class='symbol'>:env_home</span><span class='comma'>,</span> <span class='symbol'>:env_homedrive_and_homepath</span><span class='rbracket'>]</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_key'>key</span><span class='op'>|</span>
1303
+ <span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
1304
+ <span class='kw'>return</span> <span class='id identifier rubyid_value'>value</span> <span class='kw'>unless</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1305
+ <span class='kw'>end</span>
1306
+
1307
+ <span class='kw'>begin</span>
1308
+ <span class='kw'>return</span> <span class='id identifier rubyid_tilde_home'>tilde_home</span>
1309
+ <span class='kw'>rescue</span> <span class='const'>StandardError</span>
1310
+ <span class='id identifier rubyid_worst_case_home'>worst_case_home</span>
1311
+ <span class='kw'>end</span>
1312
+ <span class='kw'>end</span></pre>
1313
+ </td>
1314
+ </tr>
1315
+ </table>
1316
+ </div>
1317
+
1318
+ <div class="method_details ">
1319
+ <p class="signature " id="format_application_name-instance_method">
1320
+
1321
+ - (<tt>Object</tt>) <strong>format_application_name</strong>(name)
1322
+
1323
+
1324
+
1325
+ </p><div class="docstring">
1326
+ <div class="discussion">
1327
+ <p>
1328
+ Template method that should be overridden by subclasses.
1329
+ </p>
1330
+
1331
+
1332
+ </div>
1333
+ </div>
1334
+ <div class="tags">
1335
+
1336
+
1337
+ </div><table class="source_code">
1338
+ <tr>
1339
+ <td>
1340
+ <pre class="lines">
1341
+
1342
+
1343
+ 191
1344
+ 192
1345
+ 193</pre>
1346
+ </td>
1347
+ <td>
1348
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 191</span>
1349
+
1350
+ <span class='kw'>def</span> <span class='id identifier rubyid_format_application_name'>format_application_name</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
1351
+ <span class='id identifier rubyid_name'>name</span>
1352
+ <span class='kw'>end</span></pre>
1353
+ </td>
1354
+ </tr>
1355
+ </table>
1356
+ </div>
1357
+
1358
+ <div class="method_details ">
1359
+ <p class="signature " id="get_and_execute_process_runner-instance_method">
1360
+
1361
+ - (<tt>Object</tt>) <strong>get_and_execute_process_runner</strong>(tool, options = nil) <span class="extras">(protected)</span>
1362
+
1363
+
1364
+
1365
+ </p><div class="docstring">
1366
+ <div class="discussion">
1367
+ <p>
1368
+ Get a process runner and execute the provided <tt>executable</tt>, with the
1369
+ provided <tt>options</tt>.
1370
+ </p>
1371
+ <p>
1372
+ <tt>executable</tt> String path to the external executable file.
1373
+ </p>
1374
+ <p>
1375
+ <tt>options</tt> String commandline options to send to the
1376
+ <tt>executable</tt>.
1377
+ </p>
1378
+
1379
+
1380
+ </div>
1381
+ </div>
1382
+ <div class="tags">
1383
+
1384
+
1385
+ </div><table class="source_code">
1386
+ <tr>
1387
+ <td>
1388
+ <pre class="lines">
1389
+
1390
+
1391
+ 255
1392
+ 256
1393
+ 257
1394
+ 258
1395
+ 259</pre>
1396
+ </td>
1397
+ <td>
1398
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 255</span>
1399
+
1400
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_and_execute_process_runner'>get_and_execute_process_runner</span> <span class='id identifier rubyid_tool'>tool</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='kw'>nil</span>
1401
+ <span class='id identifier rubyid_runner'>runner</span> <span class='op'>=</span> <span class='id identifier rubyid_get_process_runner'>get_process_runner</span>
1402
+ <span class='id identifier rubyid_runner'>runner</span><span class='period'>.</span><span class='id identifier rubyid_execute_open4'>execute_open4</span> <span class='id identifier rubyid_clean_path'>clean_path</span><span class='lparen'>(</span><span class='id identifier rubyid_tool'>tool</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
1403
+ <span class='id identifier rubyid_runner'>runner</span>
1404
+ <span class='kw'>end</span></pre>
1405
+ </td>
1406
+ </tr>
1407
+ </table>
1408
+ </div>
1409
+
1410
+ <div class="method_details ">
1411
+ <p class="signature " id="get_process_runner-instance_method">
1412
+
1413
+ - (<tt>Object</tt>) <strong>get_process_runner</strong>
1414
+
1415
+
1416
+
1417
+ </p><div class="docstring">
1418
+ <div class="discussion">
1419
+ <p>
1420
+ Instantiate and return a new Sprout::ProcessRunner so that we can execute
1421
+ it.
1422
+ </p>
1423
+
1424
+
1425
+ </div>
1426
+ </div>
1427
+ <div class="tags">
1428
+
1429
+
1430
+ </div><table class="source_code">
1431
+ <tr>
1432
+ <td>
1433
+ <pre class="lines">
1434
+
1435
+
1436
+ 56
1437
+ 57
1438
+ 58</pre>
1439
+ </td>
1440
+ <td>
1441
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 56</span>
1442
+
1443
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_process_runner'>get_process_runner</span>
1444
+ <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>
1445
+ <span class='kw'>end</span></pre>
1446
+ </td>
1447
+ </tr>
1448
+ </table>
1449
+ </div>
1450
+
1451
+ <div class="method_details ">
1452
+ <p class="signature " id="home-instance_method">
1453
+
1454
+ - (<tt>Object</tt>) <strong>home</strong>
1455
+
1456
+
1457
+
1458
+ </p><div class="docstring">
1459
+ <div class="discussion">
1460
+ <p>
1461
+ Get the home path for a system on a particular operating system.
1462
+ </p>
1463
+ <p>
1464
+ This path will be different, depending on which system owns the curren
1465
+ process, and which operating system they are on.
1466
+ </p>
1467
+
1468
+
1469
+ </div>
1470
+ </div>
1471
+ <div class="tags">
1472
+
1473
+
1474
+ </div><table class="source_code">
1475
+ <tr>
1476
+ <td>
1477
+ <pre class="lines">
1478
+
1479
+
1480
+ 22
1481
+ 23
1482
+ 24</pre>
1483
+ </td>
1484
+ <td>
1485
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 22</span>
1486
+
1487
+ <span class='kw'>def</span> <span class='id identifier rubyid_home'>home</span>
1488
+ <span class='ivar'>@home</span> <span class='op'>||=</span> <span class='id identifier rubyid_find_home'>find_home</span>
1489
+ <span class='kw'>end</span></pre>
1490
+ </td>
1491
+ </tr>
1492
+ </table>
1493
+ </div>
1494
+
1495
+ <div class="method_details ">
1496
+ <p class="signature " id="home=-instance_method">
1497
+
1498
+ - (<tt>Object</tt>) <strong>home=</strong>(home)
1499
+
1500
+
1501
+
1502
+ </p><div class="docstring">
1503
+ <div class="discussion">
1504
+ <p>
1505
+ Set the home path for a system on a particular operating system.
1506
+ </p>
1507
+ <p>
1508
+ If you request the home path before setting it, we will attempt to
1509
+ determine the home path of the current system for the current operating
1510
+ system.
1511
+ </p>
1512
+ <p>
1513
+ This is just a simple way to override the default behavior.
1514
+ </p>
1515
+
1516
+
1517
+ </div>
1518
+ </div>
1519
+ <div class="tags">
1520
+
1521
+
1522
+ </div><table class="source_code">
1523
+ <tr>
1524
+ <td>
1525
+ <pre class="lines">
1526
+
1527
+
1528
+ 35
1529
+ 36
1530
+ 37</pre>
1531
+ </td>
1532
+ <td>
1533
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 35</span>
1534
+
1535
+ <span class='kw'>def</span> <span class='id identifier rubyid_home='>home=</span><span class='lparen'>(</span><span class='id identifier rubyid_home'>home</span><span class='rparen'>)</span>
1536
+ <span class='ivar'>@home</span> <span class='op'>=</span> <span class='id identifier rubyid_home'>home</span>
1537
+ <span class='kw'>end</span></pre>
1538
+ </td>
1539
+ </tr>
1540
+ </table>
1541
+ </div>
1542
+
1543
+ <div class="method_details ">
1544
+ <p class="signature " id="library-instance_method">
1545
+
1546
+ - (<tt>Object</tt>) <strong>library</strong>
1547
+
1548
+
1549
+
1550
+ </p><div class="docstring">
1551
+ <div class="discussion">
1552
+ <p>
1553
+ Some operating systems (like OS X and Windows) have a specific location
1554
+ where applications are expected to store files for a particular system.
1555
+ This location is generally a subdirectory of <tt>home</tt>.
1556
+ </p>
1557
+ <p>
1558
+ The value of this location will usually be overridden in concrete System
1559
+ classes.
1560
+ </p>
1561
+
1562
+
1563
+ </div>
1564
+ </div>
1565
+ <div class="tags">
1566
+
1567
+
1568
+ </div><table class="source_code">
1569
+ <tr>
1570
+ <td>
1571
+ <pre class="lines">
1572
+
1573
+
1574
+ 48
1575
+ 49
1576
+ 50</pre>
1577
+ </td>
1578
+ <td>
1579
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 48</span>
1580
+
1581
+ <span class='kw'>def</span> <span class='id identifier rubyid_library'>library</span>
1582
+ <span class='kw'>return</span> <span class='id identifier rubyid_home'>home</span>
1583
+ <span class='kw'>end</span></pre>
1584
+ </td>
1585
+ </tr>
1586
+ </table>
1587
+ </div>
1588
+
1589
+ <div class="method_details ">
1590
+ <p class="signature " id="read_from-instance_method">
1591
+
1592
+ - (<tt>Object</tt>) <strong>read_from</strong>(pipe, prompt, &amp;block)
1593
+
1594
+
1595
+
1596
+ </p><table class="source_code">
1597
+ <tr>
1598
+ <td>
1599
+ <pre class="lines">
1600
+
1601
+
1602
+ 131
1603
+ 132
1604
+ 133
1605
+ 134
1606
+ 135
1607
+ 136
1608
+ 137
1609
+ 138
1610
+ 139
1611
+ 140
1612
+ 141
1613
+ 142
1614
+ 143
1615
+ 144
1616
+ 145
1617
+ 146
1618
+ 147
1619
+ 148
1620
+ 149
1621
+ 150
1622
+ 151
1623
+ 152
1624
+ 153
1625
+ 154
1626
+ 155
1627
+ 156</pre>
1628
+ </td>
1629
+ <td>
1630
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 131</span>
1631
+
1632
+ <span class='kw'>def</span> <span class='id identifier rubyid_read_from'>read_from</span> <span class='id identifier rubyid_pipe'>pipe</span><span class='comma'>,</span> <span class='id identifier rubyid_prompt'>prompt</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
1633
+ <span class='const'>Thread</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span>
1634
+ <span class='const'>Thread</span><span class='period'>.</span><span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_abort_on_exception'>abort_on_exception</span> <span class='op'>=</span> <span class='kw'>true</span>
1635
+ <span class='id identifier rubyid_lines'>lines</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
1636
+ <span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
1637
+ <span class='id identifier rubyid_pipe'>pipe</span><span class='period'>.</span><span class='id identifier rubyid_sync'>sync</span> <span class='op'>=</span> <span class='kw'>true</span>
1638
+ <span class='id identifier rubyid_pipe'>pipe</span><span class='period'>.</span><span class='id identifier rubyid_each_char'>each_char</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_char'>char</span><span class='op'>|</span>
1639
+ <span class='kw'>break</span> <span class='kw'>if</span> <span class='id identifier rubyid_pipe'>pipe</span><span class='period'>.</span><span class='id identifier rubyid_closed?'>closed?</span>
1640
+ <span class='id identifier rubyid_line'>line</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_char'>char</span>
1641
+
1642
+ <span class='kw'>if</span> <span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span> <span class='id identifier rubyid_prompt'>prompt</span>
1643
+ <span class='kw'>yield</span> <span class='id identifier rubyid_line'>line</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1644
+ <span class='id identifier rubyid_lines'>lines</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_line'>line</span>
1645
+ <span class='id identifier rubyid_lines'>lines</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
1646
+ <span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
1647
+ <span class='kw'>next</span>
1648
+ <span class='kw'>end</span>
1649
+
1650
+ <span class='kw'>if</span> <span class='id identifier rubyid_char'>char</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span>
1651
+ <span class='id identifier rubyid_lines'>lines</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_line'>line</span>
1652
+ <span class='kw'>yield</span> <span class='id identifier rubyid_line'>line</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1653
+ <span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
1654
+ <span class='kw'>end</span>
1655
+ <span class='kw'>end</span>
1656
+ <span class='kw'>end</span>
1657
+ <span class='kw'>end</span></pre>
1658
+ </td>
1659
+ </tr>
1660
+ </table>
1661
+ </div>
1662
+
1663
+ <div class="method_details ">
1664
+ <p class="signature " id="tilde_home-instance_method">
1665
+
1666
+ - (<tt>Object</tt>) <strong>tilde_home</strong> <span class="extras">(protected)</span>
1667
+
1668
+
1669
+
1670
+ </p><table class="source_code">
1671
+ <tr>
1672
+ <td>
1673
+ <pre class="lines">
1674
+
1675
+
1676
+ 219
1677
+ 220
1678
+ 221</pre>
1679
+ </td>
1680
+ <td>
1681
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 219</span>
1682
+
1683
+ <span class='kw'>def</span> <span class='id identifier rubyid_tilde_home'>tilde_home</span>
1684
+ <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='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>~</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1685
+ <span class='kw'>end</span></pre>
1686
+ </td>
1687
+ </tr>
1688
+ </table>
1689
+ </div>
1690
+
1691
+ <div class="method_details ">
1692
+ <p class="signature " id="worst_case_home-instance_method">
1693
+
1694
+ - (<tt>Object</tt>) <strong>worst_case_home</strong> <span class="extras">(protected)</span>
1695
+
1696
+
1697
+
1698
+ </p><table class="source_code">
1699
+ <tr>
1700
+ <td>
1701
+ <pre class="lines">
1702
+
1703
+
1704
+ 227
1705
+ 228
1706
+ 229
1707
+ 230</pre>
1708
+ </td>
1709
+ <td>
1710
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 227</span>
1711
+
1712
+ <span class='kw'>def</span> <span class='id identifier rubyid_worst_case_home'>worst_case_home</span>
1713
+ <span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>C:\\</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_alt_separator?'>alt_separator?</span>
1714
+ <span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/</span><span class='tstring_end'>&quot;</span></span>
1715
+ <span class='kw'>end</span></pre>
1716
+ </td>
1717
+ </tr>
1718
+ </table>
1719
+ </div>
1720
+
1721
+ </div>
1722
+
1723
+ </div>
1724
+
1725
+ <div id="footer">
1726
+ Generated on Sun Mar 11 14:30:34 2012 by
1727
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1728
+ 0.7.5 (ruby-1.9.2).
1729
+ </div>
1730
+
1731
+ </body>
1732
+ </html>