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,201 @@
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::ThreadMock
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 (T)</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">ThreadMock</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::ThreadMock
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::ThreadMock</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
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+ <h2>
104
+ Instance Method Summary
105
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
106
+ </h2>
107
+
108
+ <ul class="summary">
109
+
110
+ <li class="public ">
111
+ <span class="summary_signature">
112
+
113
+ <a href="#alive%3F-instance_method" title="#alive? (instance method)">- (Boolean) <strong>alive?</strong> </a>
114
+
115
+
116
+
117
+ </span>
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+ <span class="summary_desc"><div class='inline'></div></span>
127
+
128
+ </li>
129
+
130
+
131
+ </ul>
132
+
133
+
134
+
135
+
136
+ <div id="instance_method_details" class="method_details_list">
137
+ <h2>Instance Method Details</h2>
138
+
139
+
140
+ <div class="method_details first">
141
+ <p class="signature first" id="alive?-instance_method">
142
+
143
+ - (<tt>Boolean</tt>) <strong>alive?</strong>
144
+
145
+
146
+
147
+ </p><div class="docstring">
148
+ <div class="discussion">
149
+
150
+
151
+ </div>
152
+ </div>
153
+ <div class="tags">
154
+
155
+ <h3>Returns:</h3>
156
+ <ul class="return">
157
+
158
+ <li>
159
+
160
+
161
+ <span class='type'>(<tt>Boolean</tt>)</span>
162
+
163
+
164
+
165
+ </li>
166
+
167
+ </ul>
168
+
169
+ </div><table class="source_code">
170
+ <tr>
171
+ <td>
172
+ <pre class="lines">
173
+
174
+
175
+ 264
176
+ 265
177
+ 266</pre>
178
+ </td>
179
+ <td>
180
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/base_system.rb', line 264</span>
181
+
182
+ <span class='kw'>def</span> <span class='id identifier rubyid_alive?'>alive?</span>
183
+ <span class='kw'>return</span> <span class='kw'>false</span>
184
+ <span class='kw'>end</span></pre>
185
+ </td>
186
+ </tr>
187
+ </table>
188
+ </div>
189
+
190
+ </div>
191
+
192
+ </div>
193
+
194
+ <div id="footer">
195
+ Generated on Sun Mar 11 14:30:34 2012 by
196
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
197
+ 0.7.5 (ruby-1.9.2).
198
+ </div>
199
+
200
+ </body>
201
+ </html>
@@ -0,0 +1,610 @@
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::UnixSystem
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 (U)</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">UnixSystem</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::UnixSystem
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"><span class='object_link'><a href="BaseSystem.html" title="Sprout::System::BaseSystem (class)">BaseSystem</a></span></span>
70
+
71
+ <ul class="fullTree">
72
+ <li>Object</li>
73
+
74
+ <li class="next"><span class='object_link'><a href="BaseSystem.html" title="Sprout::System::BaseSystem (class)">BaseSystem</a></span></li>
75
+
76
+ <li class="next">Sprout::System::UnixSystem</li>
77
+
78
+ </ul>
79
+ <a href="#" class="inheritanceTree">show all</a>
80
+
81
+ </dd>
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+ <dt class="r2 last">Defined in:</dt>
92
+ <dd class="r2 last">lib/sprout/system/unix_system.rb</dd>
93
+
94
+ </dl>
95
+ <div class="clear"></div>
96
+
97
+ <div id="subclasses">
98
+ <h2>Direct Known Subclasses</h2>
99
+ <p class="children"><span class='object_link'><a href="OSXSystem.html" title="Sprout::System::OSXSystem (class)">OSXSystem</a></span></p>
100
+ </div>
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+ <h2>
110
+ Instance Method Summary
111
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
112
+ </h2>
113
+
114
+ <ul class="summary">
115
+
116
+ <li class="public ">
117
+ <span class="summary_signature">
118
+
119
+ <a href="#attempt_to_repair_executable-instance_method" title="#attempt_to_repair_executable (instance method)">- (Object) <strong>attempt_to_repair_executable</strong>(path) </a>
120
+
121
+
122
+
123
+ </span>
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+ <span class="summary_desc"><div class='inline'><p>
133
+ Repair Windows Line endings found in non-windows executables (Flex SDK is
134
+ regularly published with broken CRLFs).
135
+ </p>
136
+ </div></span>
137
+
138
+ </li>
139
+
140
+
141
+ <li class="public ">
142
+ <span class="summary_signature">
143
+
144
+ <a href="#can_execute%3F-instance_method" title="#can_execute? (instance method)">- (Boolean) <strong>can_execute?</strong>(platform) </a>
145
+
146
+
147
+
148
+ </span>
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+ <span class="summary_desc"><div class='inline'></div></span>
158
+
159
+ </li>
160
+
161
+
162
+ <li class="public ">
163
+ <span class="summary_signature">
164
+
165
+ <a href="#clean_path-instance_method" title="#clean_path (instance method)">- (Object) <strong>clean_path</strong>(path) </a>
166
+
167
+
168
+
169
+ </span>
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+ <span class="summary_desc"><div class='inline'></div></span>
179
+
180
+ </li>
181
+
182
+
183
+ <li class="public ">
184
+ <span class="summary_signature">
185
+
186
+ <a href="#execute-instance_method" title="#execute (instance method)">- (Object) <strong>execute</strong>(tool, options = '') </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="#format_application_name-instance_method" title="#format_application_name (instance method)">- (Object) <strong>format_application_name</strong>(name) </a>
208
+
209
+
210
+
211
+ </span>
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+ <span class="summary_desc"><div class='inline'><p>
221
+ Ensure Application <tt>name</tt> String begins with a dot (.), and does not
222
+ include spaces.
223
+ </p>
224
+ </div></span>
225
+
226
+ </li>
227
+
228
+
229
+ <li class="public ">
230
+ <span class="summary_signature">
231
+
232
+ <a href="#repair_executable-instance_method" title="#repair_executable (instance method)">- (Object) <strong>repair_executable</strong>(path) </a>
233
+
234
+
235
+
236
+ </span>
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+ <span class="summary_desc"><div class='inline'></div></span>
246
+
247
+ </li>
248
+
249
+
250
+ <li class="public ">
251
+ <span class="summary_signature">
252
+
253
+ <a href="#should_repair_executable-instance_method" title="#should_repair_executable (instance method)">- (Object) <strong>should_repair_executable</strong>(path) </a>
254
+
255
+
256
+
257
+ </span>
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+ <span class="summary_desc"><div class='inline'><p>
267
+ Determine if we should call <tt>repair_executable</tt> for the file at the
268
+ provided <tt>path</tt> String.
269
+ </p>
270
+ </div></span>
271
+
272
+ </li>
273
+
274
+
275
+ </ul>
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+
284
+
285
+
286
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="BaseSystem.html" title="Sprout::System::BaseSystem (class)">BaseSystem</a></span></h3>
287
+ <p class="inherited"><span class='object_link'><a href="BaseSystem.html#alt_separator%3F-instance_method" title="Sprout::System::BaseSystem#alt_separator? (method)">#alt_separator?</a></span>, <span class='object_link'><a href="BaseSystem.html#application_home-instance_method" title="Sprout::System::BaseSystem#application_home (method)">#application_home</a></span>, <span class='object_link'><a href="BaseSystem.html#env_home-instance_method" title="Sprout::System::BaseSystem#env_home (method)">#env_home</a></span>, <span class='object_link'><a href="BaseSystem.html#env_homedrive-instance_method" title="Sprout::System::BaseSystem#env_homedrive (method)">#env_homedrive</a></span>, <span class='object_link'><a href="BaseSystem.html#env_homedrive_and_homepath-instance_method" title="Sprout::System::BaseSystem#env_homedrive_and_homepath (method)">#env_homedrive_and_homepath</a></span>, <span class='object_link'><a href="BaseSystem.html#env_homepath-instance_method" title="Sprout::System::BaseSystem#env_homepath (method)">#env_homepath</a></span>, <span class='object_link'><a href="BaseSystem.html#env_userprofile-instance_method" title="Sprout::System::BaseSystem#env_userprofile (method)">#env_userprofile</a></span>, <span class='object_link'><a href="BaseSystem.html#execute_silent-instance_method" title="Sprout::System::BaseSystem#execute_silent (method)">#execute_silent</a></span>, <span class='object_link'><a href="BaseSystem.html#execute_thread-instance_method" title="Sprout::System::BaseSystem#execute_thread (method)">#execute_thread</a></span>, <span class='object_link'><a href="BaseSystem.html#find_home-instance_method" title="Sprout::System::BaseSystem#find_home (method)">#find_home</a></span>, <span class='object_link'><a href="BaseSystem.html#get_and_execute_process_runner-instance_method" title="Sprout::System::BaseSystem#get_and_execute_process_runner (method)">#get_and_execute_process_runner</a></span>, <span class='object_link'><a href="BaseSystem.html#get_process_runner-instance_method" title="Sprout::System::BaseSystem#get_process_runner (method)">#get_process_runner</a></span>, <span class='object_link'><a href="BaseSystem.html#home-instance_method" title="Sprout::System::BaseSystem#home (method)">#home</a></span>, <span class='object_link'><a href="BaseSystem.html#home%3D-instance_method" title="Sprout::System::BaseSystem#home= (method)">#home=</a></span>, <span class='object_link'><a href="BaseSystem.html#library-instance_method" title="Sprout::System::BaseSystem#library (method)">#library</a></span>, <span class='object_link'><a href="BaseSystem.html#read_from-instance_method" title="Sprout::System::BaseSystem#read_from (method)">#read_from</a></span>, <span class='object_link'><a href="BaseSystem.html#tilde_home-instance_method" title="Sprout::System::BaseSystem#tilde_home (method)">#tilde_home</a></span>, <span class='object_link'><a href="BaseSystem.html#worst_case_home-instance_method" title="Sprout::System::BaseSystem#worst_case_home (method)">#worst_case_home</a></span></p>
288
+
289
+
290
+ <div id="instance_method_details" class="method_details_list">
291
+ <h2>Instance Method Details</h2>
292
+
293
+
294
+ <div class="method_details first">
295
+ <p class="signature first" id="attempt_to_repair_executable-instance_method">
296
+
297
+ - (<tt>Object</tt>) <strong>attempt_to_repair_executable</strong>(path)
298
+
299
+
300
+
301
+ </p><div class="docstring">
302
+ <div class="discussion">
303
+ <p>
304
+ Repair Windows Line endings found in non-windows executables (Flex SDK is
305
+ regularly published with broken CRLFs)
306
+ </p>
307
+ <p>
308
+ <tt>path</tt> String path to the executable file.
309
+ </p>
310
+
311
+
312
+ </div>
313
+ </div>
314
+ <div class="tags">
315
+
316
+
317
+ </div><table class="source_code">
318
+ <tr>
319
+ <td>
320
+ <pre class="lines">
321
+
322
+
323
+ 46
324
+ 47
325
+ 48</pre>
326
+ </td>
327
+ <td>
328
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/unix_system.rb', line 46</span>
329
+
330
+ <span class='kw'>def</span> <span class='id identifier rubyid_attempt_to_repair_executable'>attempt_to_repair_executable</span> <span class='id identifier rubyid_path'>path</span>
331
+ <span class='id identifier rubyid_repair_executable'>repair_executable</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_should_repair_executable'>should_repair_executable</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
332
+ <span class='kw'>end</span></pre>
333
+ </td>
334
+ </tr>
335
+ </table>
336
+ </div>
337
+
338
+ <div class="method_details ">
339
+ <p class="signature " id="can_execute?-instance_method">
340
+
341
+ - (<tt>Boolean</tt>) <strong>can_execute?</strong>(platform)
342
+
343
+
344
+
345
+ </p><div class="docstring">
346
+ <div class="discussion">
347
+
348
+
349
+ </div>
350
+ </div>
351
+ <div class="tags">
352
+
353
+ <h3>Returns:</h3>
354
+ <ul class="return">
355
+
356
+ <li>
357
+
358
+
359
+ <span class='type'>(<tt>Boolean</tt>)</span>
360
+
361
+
362
+
363
+ </li>
364
+
365
+ </ul>
366
+
367
+ </div><table class="source_code">
368
+ <tr>
369
+ <td>
370
+ <pre class="lines">
371
+
372
+
373
+ 34
374
+ 35
375
+ 36</pre>
376
+ </td>
377
+ <td>
378
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/unix_system.rb', line 34</span>
379
+
380
+ <span class='kw'>def</span> <span class='id identifier rubyid_can_execute?'>can_execute?</span> <span class='id identifier rubyid_platform'>platform</span>
381
+ <span class='lbracket'>[</span><span class='symbol'>:unix</span><span class='comma'>,</span> <span class='symbol'>:linux</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_platform'>platform</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='kw'>super</span>
382
+ <span class='kw'>end</span></pre>
383
+ </td>
384
+ </tr>
385
+ </table>
386
+ </div>
387
+
388
+ <div class="method_details ">
389
+ <p class="signature " id="clean_path-instance_method">
390
+
391
+ - (<tt>Object</tt>) <strong>clean_path</strong>(path)
392
+
393
+
394
+
395
+ </p><table class="source_code">
396
+ <tr>
397
+ <td>
398
+ <pre class="lines">
399
+
400
+
401
+ 6
402
+ 7
403
+ 8
404
+ 9
405
+ 10
406
+ 11
407
+ 12
408
+ 13
409
+ 14
410
+ 15
411
+ 16</pre>
412
+ </td>
413
+ <td>
414
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/unix_system.rb', line 6</span>
415
+
416
+ <span class='kw'>def</span> <span class='id identifier rubyid_clean_path'>clean_path</span> <span class='id identifier rubyid_path'>path</span>
417
+ <span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
418
+ <span class='kw'>if</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>../</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
419
+ <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span> <span class='id identifier rubyid_path'>path</span>
420
+ <span class='kw'>end</span>
421
+
422
+ <span class='kw'>if</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</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><span class='rparen'>)</span>
423
+ <span class='kw'>return</span> <span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</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><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>
424
+ <span class='kw'>end</span>
425
+ <span class='kw'>return</span> <span class='id identifier rubyid_path'>path</span>
426
+ <span class='kw'>end</span></pre>
427
+ </td>
428
+ </tr>
429
+ </table>
430
+ </div>
431
+
432
+ <div class="method_details ">
433
+ <p class="signature " id="execute-instance_method">
434
+
435
+ - (<tt>Object</tt>) <strong>execute</strong>(tool, options = '')
436
+
437
+
438
+
439
+ </p><table class="source_code">
440
+ <tr>
441
+ <td>
442
+ <pre class="lines">
443
+
444
+
445
+ 18
446
+ 19
447
+ 20
448
+ 21</pre>
449
+ </td>
450
+ <td>
451
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/unix_system.rb', line 18</span>
452
+
453
+ <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>
454
+ <span class='id identifier rubyid_attempt_to_repair_executable'>attempt_to_repair_executable</span> <span class='id identifier rubyid_tool'>tool</span>
455
+ <span class='kw'>super</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>
456
+ <span class='kw'>end</span></pre>
457
+ </td>
458
+ </tr>
459
+ </table>
460
+ </div>
461
+
462
+ <div class="method_details ">
463
+ <p class="signature " id="format_application_name-instance_method">
464
+
465
+ - (<tt>Object</tt>) <strong>format_application_name</strong>(name)
466
+
467
+
468
+
469
+ </p><div class="docstring">
470
+ <div class="discussion">
471
+ <p>
472
+ Ensure Application <tt>name</tt> String begins with a dot (.), and does not
473
+ include spaces.
474
+ </p>
475
+
476
+
477
+ </div>
478
+ </div>
479
+ <div class="tags">
480
+
481
+
482
+ </div><table class="source_code">
483
+ <tr>
484
+ <td>
485
+ <pre class="lines">
486
+
487
+
488
+ 27
489
+ 28
490
+ 29
491
+ 30
492
+ 31
493
+ 32</pre>
494
+ </td>
495
+ <td>
496
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/unix_system.rb', line 27</span>
497
+
498
+ <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>
499
+ <span class='kw'>if</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</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> <span class='op'>!=</span> <span class='int'>0</span><span class='rparen'>)</span>
500
+ <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.</span><span class='tstring_end'>'</span></span> <span class='op'>+</span> <span class='id identifier rubyid_name'>name</span>
501
+ <span class='kw'>end</span>
502
+ <span class='kw'>return</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</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><span class='period'>.</span><span class='id identifier rubyid_join'>join</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><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span>
503
+ <span class='kw'>end</span></pre>
504
+ </td>
505
+ </tr>
506
+ </table>
507
+ </div>
508
+
509
+ <div class="method_details ">
510
+ <p class="signature " id="repair_executable-instance_method">
511
+
512
+ - (<tt>Object</tt>) <strong>repair_executable</strong>(path)
513
+
514
+
515
+
516
+ </p><table class="source_code">
517
+ <tr>
518
+ <td>
519
+ <pre class="lines">
520
+
521
+
522
+ 50
523
+ 51
524
+ 52
525
+ 53
526
+ 54
527
+ 55
528
+ 56
529
+ 57
530
+ 58
531
+ 59</pre>
532
+ </td>
533
+ <td>
534
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/unix_system.rb', line 50</span>
535
+
536
+ <span class='kw'>def</span> <span class='id identifier rubyid_repair_executable'>repair_executable</span> <span class='id identifier rubyid_path'>path</span>
537
+ <span class='id identifier rubyid_content'>content</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
538
+ <span class='kw'>if</span><span class='lparen'>(</span><span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\r\n</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
539
+ <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='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>[WARNING] Sprouts is about to replace invalid Windows line endings on an executable at: (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='rbrace'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>&quot;</span></span>
540
+ <span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_gsub!'>gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\r\n</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
541
+ <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>w+</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span>
542
+ <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='id identifier rubyid_content'>content</span>
543
+ <span class='kw'>end</span>
544
+ <span class='kw'>end</span>
545
+ <span class='kw'>end</span></pre>
546
+ </td>
547
+ </tr>
548
+ </table>
549
+ </div>
550
+
551
+ <div class="method_details ">
552
+ <p class="signature " id="should_repair_executable-instance_method">
553
+
554
+ - (<tt>Object</tt>) <strong>should_repair_executable</strong>(path)
555
+
556
+
557
+
558
+ </p><div class="docstring">
559
+ <div class="discussion">
560
+ <p>
561
+ Determine if we should call <tt>repair_executable</tt> for the file at the
562
+ provided <tt>path</tt> String.
563
+ </p>
564
+ <p>
565
+ Will this corrupt binaries? Yes&#8230; Yes. it. will.
566
+ </p>
567
+ <p>
568
+ This also fails on UTF-8 files since Ruby&#8217;s regex appears to choke on
569
+ UTF-8??
570
+ </p>
571
+
572
+
573
+ </div>
574
+ </div>
575
+ <div class="tags">
576
+
577
+
578
+ </div><table class="source_code">
579
+ <tr>
580
+ <td>
581
+ <pre class="lines">
582
+
583
+
584
+ 69
585
+ 70
586
+ 71</pre>
587
+ </td>
588
+ <td>
589
+ <pre class="code"><span class="info file"># File 'lib/sprout/system/unix_system.rb', line 69</span>
590
+
591
+ <span class='kw'>def</span> <span class='id identifier rubyid_should_repair_executable'>should_repair_executable</span> <span class='id identifier rubyid_path'>path</span>
592
+ <span class='kw'>return</span> <span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_directory?'>directory?</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^\#\!\/bin\/sh</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
593
+ <span class='kw'>end</span></pre>
594
+ </td>
595
+ </tr>
596
+ </table>
597
+ </div>
598
+
599
+ </div>
600
+
601
+ </div>
602
+
603
+ <div id="footer">
604
+ Generated on Sun Mar 11 14:30:34 2012 by
605
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
606
+ 0.7.5 (ruby-1.9.2).
607
+ </div>
608
+
609
+ </body>
610
+ </html>