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.
- data/VERSION +1 -1
- data/doc/Dir.html +313 -0
- data/doc/Rake/Task.html +206 -0
- data/doc/Sprout.html +778 -0
- data/doc/Sprout/ArchiveUnpacker.html +1313 -0
- data/doc/Sprout/CommandLine.html +521 -0
- data/doc/Sprout/Concern.html +382 -0
- data/doc/Sprout/Errors.html +120 -0
- data/doc/Sprout/Errors/ArchiveUnpackerError.html +139 -0
- data/doc/Sprout/Errors/DestinationExistsError.html +143 -0
- data/doc/Sprout/Errors/DuplicateMemberError.html +142 -0
- data/doc/Sprout/Errors/ExecutableError.html +139 -0
- data/doc/Sprout/Errors/ExecutableRegistrationError.html +142 -0
- data/doc/Sprout/Errors/ExecutionError.html +135 -0
- data/doc/Sprout/Errors/GeneratorError.html +139 -0
- data/doc/Sprout/Errors/InvalidArgumentError.html +142 -0
- data/doc/Sprout/Errors/LoadError.html +135 -0
- data/doc/Sprout/Errors/MissingArgumentError.html +142 -0
- data/doc/Sprout/Errors/MissingExecutableError.html +142 -0
- data/doc/Sprout/Errors/MissingGeneratorError.html +142 -0
- data/doc/Sprout/Errors/MissingTemplateError.html +142 -0
- data/doc/Sprout/Errors/ProcessRunnerError.html +135 -0
- data/doc/Sprout/Errors/RemoteFileLoaderError.html +128 -0
- data/doc/Sprout/Errors/SproutError.html +132 -0
- data/doc/Sprout/Errors/UnknownArchiveType.html +136 -0
- data/doc/Sprout/Errors/UsageError.html +135 -0
- data/doc/Sprout/Errors/ValidationError.html +135 -0
- data/doc/Sprout/Errors/VersionRequirementNotMetError.html +135 -0
- data/doc/Sprout/Executable.html +183 -0
- data/doc/Sprout/Executable/Base.html +2986 -0
- data/doc/Sprout/Executable/Boolean.html +577 -0
- data/doc/Sprout/Executable/CollectionParam.html +521 -0
- data/doc/Sprout/Executable/FileParam.html +517 -0
- data/doc/Sprout/Executable/Files.html +311 -0
- data/doc/Sprout/Executable/Number.html +164 -0
- data/doc/Sprout/Executable/Param.html +3011 -0
- data/doc/Sprout/Executable/ParameterFactory.html +262 -0
- data/doc/Sprout/Executable/Path.html +247 -0
- data/doc/Sprout/Executable/Paths.html +268 -0
- data/doc/Sprout/Executable/Session.html +1587 -0
- data/doc/Sprout/Executable/StringParam.html +237 -0
- data/doc/Sprout/Executable/Strings.html +186 -0
- data/doc/Sprout/Executable/Url.html +180 -0
- data/doc/Sprout/Executable/Urls.html +185 -0
- data/doc/Sprout/FileTarget.html +1170 -0
- data/doc/Sprout/Generator.html +800 -0
- data/doc/Sprout/Generator/Base.html +1834 -0
- data/doc/Sprout/Generator/Command.html +716 -0
- data/doc/Sprout/Generator/DirectoryManifest.html +503 -0
- data/doc/Sprout/Generator/FileManifest.html +667 -0
- data/doc/Sprout/Generator/Manifest.html +403 -0
- data/doc/Sprout/Generator/TemplateManifest.html +213 -0
- data/doc/Sprout/GeneratorGenerator.html +990 -0
- data/doc/Sprout/Library.html +1259 -0
- data/doc/Sprout/LibraryGenerator.html +326 -0
- data/doc/Sprout/OutputBuffer.html +461 -0
- data/doc/Sprout/Platform.html +758 -0
- data/doc/Sprout/ProcessRunner.html +1801 -0
- data/doc/Sprout/ProgressBar.html +384 -0
- data/doc/Sprout/ProgressBarImpl.html +2151 -0
- data/doc/Sprout/ProgressBarManager.html +443 -0
- data/doc/Sprout/ProgressBarOutputStream.html +429 -0
- data/doc/Sprout/RDocParser.html +228 -0
- data/doc/Sprout/RemoteFileLoader.html +191 -0
- data/doc/Sprout/RemoteFileTarget.html +710 -0
- data/doc/Sprout/ReversedProgressBar.html +200 -0
- data/doc/Sprout/RubyFeature.html +176 -0
- data/doc/Sprout/RubyFeature/ClassMethods.html +1099 -0
- data/doc/Sprout/RubyGenerator.html +712 -0
- data/doc/Sprout/Specification.html +838 -0
- data/doc/Sprout/System.html +212 -0
- data/doc/Sprout/System/BaseSystem.html +1732 -0
- data/doc/Sprout/System/JavaSystem.html +137 -0
- data/doc/Sprout/System/OSXSystem.html +345 -0
- data/doc/Sprout/System/ThreadMock.html +201 -0
- data/doc/Sprout/System/UnixSystem.html +610 -0
- data/doc/Sprout/System/VistaSystem.html +263 -0
- data/doc/Sprout/System/WinNixSystem.html +340 -0
- data/doc/Sprout/System/WinSystem.html +590 -0
- data/doc/Sprout/TestHelper.html +2280 -0
- data/doc/Sprout/ToolGenerator.html +995 -0
- data/doc/Sprout/VERSION.html +135 -0
- data/doc/String.html +313 -0
- data/doc/_index.html +829 -0
- data/doc/class_list.html +47 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +55 -0
- data/doc/css/style.css +322 -0
- data/doc/file.README.html +109 -0
- data/doc/file_list.html +49 -0
- data/doc/frames.html +13 -0
- data/doc/index.html +109 -0
- data/doc/js/app.js +205 -0
- data/doc/js/full_list.js +173 -0
- data/doc/js/jquery.js +16 -0
- data/doc/method_list.html +3622 -0
- data/doc/top-level-namespace.html +220 -0
- data/lib/sprout/generators/generator/generator_generator.rb +3 -3
- data/lib/sprout/generators/generator/templates/{generator_class.rb → generator_class.erb} +0 -0
- data/lib/sprout/generators/generator/templates/{generator_test.rb → generator_test.erb} +0 -0
- data/lib/sprout/generators/generator/templates/{generator_test_helper.rb → generator_test_helper.erb} +0 -0
- data/lib/sprout/generators/library/library_generator.rb +1 -1
- data/lib/sprout/generators/library/templates/{library.rb → library.erb} +0 -0
- data/lib/sprout/generators/ruby/ruby_generator.rb +4 -5
- data/lib/sprout/generators/ruby/templates/{ruby_base.rb → ruby_base.erb} +0 -0
- data/lib/sprout/generators/ruby/templates/{ruby_input.rb → ruby_input.erb} +0 -0
- data/lib/sprout/generators/ruby/templates/{ruby_test_case.rb → ruby_test_case.erb} +0 -0
- data/lib/sprout/generators/ruby/templates/{ruby_test_helper.rb → ruby_test_helper.erb} +0 -0
- data/lib/sprout/generators/tool/templates/{tool.rb → tool.erb} +0 -2
- data/lib/sprout/generators/tool/tool_generator.rb +1 -1
- metadata +128 -32
@@ -0,0 +1,183 @@
|
|
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::Executable
|
8
|
+
|
9
|
+
— 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 (E)</a> »
|
37
|
+
<span class='title'><span class='object_link'><a href="../Sprout.html" title="Sprout (module)">Sprout</a></span></span>
|
38
|
+
»
|
39
|
+
<span class="title">Executable</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::Executable
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
</h1>
|
64
|
+
|
65
|
+
<dl class="box">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
<dt class="r1">Includes:</dt>
|
72
|
+
<dd class="r1"><span class='object_link'><a href="RubyFeature.html" title="Sprout::RubyFeature (module)">RubyFeature</a></span></dd>
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
<dt class="r2">Included in:</dt>
|
78
|
+
<dd class="r2"><span class='object_link'><a href="Executable/Base.html" title="Sprout::Executable::Base (class)">Base</a></span></dd>
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
<dt class="r1 last">Defined in:</dt>
|
83
|
+
<dd class="r1 last">lib/sprout/executable.rb<span class="defines">,<br />
|
84
|
+
lib/sprout/executable/url.rb,<br /> lib/sprout/executable/urls.rb,<br /> lib/sprout/executable/path.rb,<br /> lib/sprout/executable/base.rb,<br /> lib/sprout/executable/files.rb,<br /> lib/sprout/executable/param.rb,<br /> lib/sprout/executable/paths.rb,<br /> lib/sprout/executable/number.rb,<br /> lib/sprout/executable/boolean.rb,<br /> lib/sprout/executable/strings.rb,<br /> lib/sprout/executable/session.rb,<br /> lib/sprout/executable/file_param.rb,<br /> lib/sprout/executable/string_param.rb,<br /> lib/sprout/executable/collection_param.rb,<br /> lib/sprout/executable/parameter_factory.rb</span>
|
85
|
+
</dd>
|
86
|
+
|
87
|
+
</dl>
|
88
|
+
<div class="clear"></div>
|
89
|
+
|
90
|
+
<h2>Overview</h2><div class="docstring">
|
91
|
+
<div class="discussion">
|
92
|
+
<p>
|
93
|
+
The Sprout::Executable module exposes a Domain Specific Language for
|
94
|
+
describing Command Line Interface (CLI) applications.
|
95
|
+
</p>
|
96
|
+
<p>
|
97
|
+
This module can be included by any class, and depending on how that class
|
98
|
+
is used, one can either parse command line arguments into meaningful,
|
99
|
+
structured data, or delegate ruby code and configuration to an existing,
|
100
|
+
external command line process.
|
101
|
+
</p>
|
102
|
+
<p>
|
103
|
+
Following is an example of how one could define an executable Ruby
|
104
|
+
application using this module:
|
105
|
+
</p>
|
106
|
+
<p>
|
107
|
+
:include: ../../test/fixtures/examples/echo_inputs.rb
|
108
|
+
</p>
|
109
|
+
|
110
|
+
|
111
|
+
</div>
|
112
|
+
</div>
|
113
|
+
<div class="tags">
|
114
|
+
|
115
|
+
|
116
|
+
</div><h2>Defined Under Namespace</h2>
|
117
|
+
<p class="children">
|
118
|
+
|
119
|
+
|
120
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Executable/CollectionParam.html" title="Sprout::Executable::CollectionParam (module)">CollectionParam</a></span>
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Executable/Base.html" title="Sprout::Executable::Base (class)">Base</a></span>, <span class='object_link'><a href="Executable/Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span>, <span class='object_link'><a href="Executable/FileParam.html" title="Sprout::Executable::FileParam (class)">FileParam</a></span>, <span class='object_link'><a href="Executable/Files.html" title="Sprout::Executable::Files (class)">Files</a></span>, <span class='object_link'><a href="Executable/Number.html" title="Sprout::Executable::Number (class)">Number</a></span>, <span class='object_link'><a href="Executable/Param.html" title="Sprout::Executable::Param (class)">Param</a></span>, <span class='object_link'><a href="Executable/ParameterFactory.html" title="Sprout::Executable::ParameterFactory (class)">ParameterFactory</a></span>, <span class='object_link'><a href="Executable/Path.html" title="Sprout::Executable::Path (class)">Path</a></span>, <span class='object_link'><a href="Executable/Paths.html" title="Sprout::Executable::Paths (class)">Paths</a></span>, <span class='object_link'><a href="Executable/Session.html" title="Sprout::Executable::Session (class)">Session</a></span>, <span class='object_link'><a href="Executable/StringParam.html" title="Sprout::Executable::StringParam (class)">StringParam</a></span>, <span class='object_link'><a href="Executable/Strings.html" title="Sprout::Executable::Strings (class)">Strings</a></span>, <span class='object_link'><a href="Executable/Url.html" title="Sprout::Executable::Url (class)">Url</a></span>, <span class='object_link'><a href="Executable/Urls.html" title="Sprout::Executable::Urls (class)">Urls</a></span>
|
125
|
+
|
126
|
+
|
127
|
+
</p>
|
128
|
+
|
129
|
+
<h2>Constant Summary</h2>
|
130
|
+
|
131
|
+
<dl class="constants">
|
132
|
+
|
133
|
+
<dt id="DEFAULT_FILE_EXPRESSION-constant" class="">DEFAULT_FILE_EXPRESSION =
|
134
|
+
|
135
|
+
</dt>
|
136
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/**/**/*</span><span class='tstring_end'>'</span></span></pre></dd>
|
137
|
+
|
138
|
+
<dt id="DEFAULT_PREFIX-constant" class="">DEFAULT_PREFIX =
|
139
|
+
|
140
|
+
</dt>
|
141
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>--</span><span class='tstring_end'>'</span></span></pre></dd>
|
142
|
+
|
143
|
+
<dt id="DEFAULT_SHORT_PREFIX-constant" class="">DEFAULT_SHORT_PREFIX =
|
144
|
+
|
145
|
+
</dt>
|
146
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>-</span><span class='tstring_end'>'</span></span></pre></dd>
|
147
|
+
|
148
|
+
</dl>
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
<h2>Method Summary</h2>
|
169
|
+
|
170
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="Concern.html" title="Sprout::Concern (module)">Concern</a></span></h3>
|
171
|
+
<p class="inherited"><span class='object_link'><a href="Concern.html#append_features-instance_method" title="Sprout::Concern#append_features (method)">#append_features</a></span>, <span class='object_link'><a href="Concern.html#extended-class_method" title="Sprout::Concern.extended (method)">extended</a></span>, <span class='object_link'><a href="Concern.html#included-instance_method" title="Sprout::Concern#included (method)">#included</a></span></p>
|
172
|
+
|
173
|
+
|
174
|
+
</div>
|
175
|
+
|
176
|
+
<div id="footer">
|
177
|
+
Generated on Sun Mar 11 14:30:32 2012 by
|
178
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
179
|
+
0.7.5 (ruby-1.9.2).
|
180
|
+
</div>
|
181
|
+
|
182
|
+
</body>
|
183
|
+
</html>
|
@@ -0,0 +1,2986 @@
|
|
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::Executable::Base
|
8
|
+
|
9
|
+
— 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> »
|
37
|
+
<span class='title'><span class='object_link'><a href="../../Sprout.html" title="Sprout (module)">Sprout</a></span></span> » <span class='title'><span class='object_link'><a href="../Executable.html" title="Sprout::Executable (module)">Executable</a></span></span>
|
38
|
+
»
|
39
|
+
<span class="title">Base</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::Executable::Base
|
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::Executable::Base</li>
|
75
|
+
|
76
|
+
</ul>
|
77
|
+
<a href="#" class="inheritanceTree">show all</a>
|
78
|
+
|
79
|
+
</dd>
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
<dt class="r2">Includes:</dt>
|
87
|
+
<dd class="r2"><span class='object_link'><a href="../Executable.html" title="Sprout::Executable (module)">Sprout::Executable</a></span></dd>
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
<dt class="r1 last">Defined in:</dt>
|
94
|
+
<dd class="r1 last">lib/sprout/executable/base.rb</dd>
|
95
|
+
|
96
|
+
</dl>
|
97
|
+
<div class="clear"></div>
|
98
|
+
|
99
|
+
<div id="subclasses">
|
100
|
+
<h2>Direct Known Subclasses</h2>
|
101
|
+
<p class="children"><span class='object_link'><a href="../CommandLine.html" title="Sprout::CommandLine (class)">CommandLine</a></span>, <span class='object_link'><a href="Session.html" title="Sprout::Executable::Session (class)">Session</a></span>, <span class='object_link'><a href="../Generator/Base.html" title="Sprout::Generator::Base (class)">Generator::Base</a></span></p>
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<h2>Constant Summary</h2>
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
<h2>Constant Summary</h2>
|
110
|
+
|
111
|
+
<h3 class="inherited">Constants included
|
112
|
+
from <span class='object_link'><a href="../Executable.html" title="Sprout::Executable (module)">Sprout::Executable</a></span></h3>
|
113
|
+
<p class="inherited"><span class='object_link'><a href="../Executable.html#DEFAULT_FILE_EXPRESSION-constant" title="Sprout::Executable::DEFAULT_FILE_EXPRESSION (constant)">DEFAULT_FILE_EXPRESSION</a></span>, <span class='object_link'><a href="../Executable.html#DEFAULT_PREFIX-constant" title="Sprout::Executable::DEFAULT_PREFIX (constant)">DEFAULT_PREFIX</a></span>, <span class='object_link'><a href="../Executable.html#DEFAULT_SHORT_PREFIX-constant" title="Sprout::Executable::DEFAULT_SHORT_PREFIX (constant)">DEFAULT_SHORT_PREFIX</a></span></p>
|
114
|
+
|
115
|
+
|
116
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
117
|
+
<ul class="summary">
|
118
|
+
|
119
|
+
<li class="public ">
|
120
|
+
<span class="summary_signature">
|
121
|
+
|
122
|
+
<a href="#abort_on_failure-instance_method" title="#abort_on_failure (instance method)">- (Object) <strong>abort_on_failure</strong> </a>
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
</span>
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
<span class="summary_desc"><div class='inline'><p>
|
139
|
+
Configure the executable instance to output failure messages to stderr and
|
140
|
+
abort with non-zero response.
|
141
|
+
</p>
|
142
|
+
</div></span>
|
143
|
+
|
144
|
+
</li>
|
145
|
+
|
146
|
+
|
147
|
+
<li class="public ">
|
148
|
+
<span class="summary_signature">
|
149
|
+
|
150
|
+
<a href="#default_prefix-instance_method" title="#default_prefix (instance method)">- (Object) <strong>default_prefix</strong> </a>
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
</span>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
<span class="summary_desc"><div class='inline'><p>
|
167
|
+
The default command line prefix that should be used in front of parameter
|
168
|
+
names.
|
169
|
+
</p>
|
170
|
+
</div></span>
|
171
|
+
|
172
|
+
</li>
|
173
|
+
|
174
|
+
|
175
|
+
<li class="public ">
|
176
|
+
<span class="summary_signature">
|
177
|
+
|
178
|
+
<a href="#default_short_prefix-instance_method" title="#default_short_prefix (instance method)">- (Object) <strong>default_short_prefix</strong> </a>
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
</span>
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
<span class="summary_desc"><div class='inline'><p>
|
195
|
+
The default command line prefix for short name parameters.
|
196
|
+
</p>
|
197
|
+
</div></span>
|
198
|
+
|
199
|
+
</li>
|
200
|
+
|
201
|
+
|
202
|
+
<li class="public ">
|
203
|
+
<span class="summary_signature">
|
204
|
+
|
205
|
+
<a href="#executable-instance_method" title="#executable (instance method)">- (Object) <strong>executable</strong> </a>
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
</span>
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
<span class="summary_desc"><div class='inline'><p>
|
222
|
+
The default Sprout executable that we will use for this executable.
|
223
|
+
</p>
|
224
|
+
</div></span>
|
225
|
+
|
226
|
+
</li>
|
227
|
+
|
228
|
+
|
229
|
+
<li class="public ">
|
230
|
+
<span class="summary_signature">
|
231
|
+
|
232
|
+
<a href="#param_hash-instance_method" title="#param_hash (instance method)">- (Object) <strong>param_hash</strong> </a>
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
</span>
|
237
|
+
|
238
|
+
|
239
|
+
<span class="note title readonly">readonly</span>
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
<span class="summary_desc"><div class='inline'><p>
|
249
|
+
Returns the value of attribute param_hash.
|
250
|
+
</p>
|
251
|
+
</div></span>
|
252
|
+
|
253
|
+
</li>
|
254
|
+
|
255
|
+
|
256
|
+
<li class="public ">
|
257
|
+
<span class="summary_signature">
|
258
|
+
|
259
|
+
<a href="#params-instance_method" title="#params (instance method)">- (Object) <strong>params</strong> </a>
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
</span>
|
264
|
+
|
265
|
+
|
266
|
+
<span class="note title readonly">readonly</span>
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
<span class="summary_desc"><div class='inline'><p>
|
276
|
+
Returns the value of attribute params.
|
277
|
+
</p>
|
278
|
+
</div></span>
|
279
|
+
|
280
|
+
</li>
|
281
|
+
|
282
|
+
|
283
|
+
<li class="public ">
|
284
|
+
<span class="summary_signature">
|
285
|
+
|
286
|
+
<a href="#pkg_name-instance_method" title="#pkg_name (instance method)">- (Object) <strong>pkg_name</strong> </a>
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
</span>
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
<span class="summary_desc"><div class='inline'><p>
|
303
|
+
The default RubyGem that we will use when requesting our executable.
|
304
|
+
</p>
|
305
|
+
</div></span>
|
306
|
+
|
307
|
+
</li>
|
308
|
+
|
309
|
+
|
310
|
+
<li class="public ">
|
311
|
+
<span class="summary_signature">
|
312
|
+
|
313
|
+
<a href="#pkg_version-instance_method" title="#pkg_version (instance method)">- (Object) <strong>pkg_version</strong> </a>
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
</span>
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
<span class="summary_desc"><div class='inline'><p>
|
330
|
+
The default RubyGem version that we will use when requesting our
|
331
|
+
executable.
|
332
|
+
</p>
|
333
|
+
</div></span>
|
334
|
+
|
335
|
+
</li>
|
336
|
+
|
337
|
+
|
338
|
+
<li class="public ">
|
339
|
+
<span class="summary_signature">
|
340
|
+
|
341
|
+
<a href="#prerequisites-instance_method" title="#prerequisites (instance method)">- (Object) <strong>prerequisites</strong> </a>
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
</span>
|
346
|
+
|
347
|
+
|
348
|
+
<span class="note title readonly">readonly</span>
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
<span class="summary_desc"><div class='inline'><p>
|
358
|
+
Returns the value of attribute prerequisites.
|
359
|
+
</p>
|
360
|
+
</div></span>
|
361
|
+
|
362
|
+
</li>
|
363
|
+
|
364
|
+
|
365
|
+
<li class="public ">
|
366
|
+
<span class="summary_signature">
|
367
|
+
|
368
|
+
<a href="#rake_task_name-instance_method" title="#rake_task_name (instance method)">- (Object) <strong>rake_task_name</strong> </a>
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
</span>
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
<span class="summary_desc"><div class='inline'><p>
|
385
|
+
If the executable is configured as a Rake::Task, it will extract the
|
386
|
+
Rake::Task[:name] property and apply it to this field.
|
387
|
+
</p>
|
388
|
+
</div></span>
|
389
|
+
|
390
|
+
</li>
|
391
|
+
|
392
|
+
|
393
|
+
</ul>
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
<h2>
|
400
|
+
Class Method Summary
|
401
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
402
|
+
</h2>
|
403
|
+
|
404
|
+
<ul class="summary">
|
405
|
+
|
406
|
+
<li class="public ">
|
407
|
+
<span class="summary_signature">
|
408
|
+
|
409
|
+
<a href="#add_param-class_method" title="add_param (class method)">+ (Object) <strong>add_param</strong>(name, type, options = nil) </a>
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
</span>
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
|
422
|
+
<span class="summary_desc"><div class='inline'><p>
|
423
|
+
<tt>add_param</tt> is the workhorse of the Task.
|
424
|
+
</p>
|
425
|
+
</div></span>
|
426
|
+
|
427
|
+
</li>
|
428
|
+
|
429
|
+
|
430
|
+
<li class="public ">
|
431
|
+
<span class="summary_signature">
|
432
|
+
|
433
|
+
<a href="#add_param_alias-class_method" title="add_param_alias (class method)">+ (Object) <strong>add_param_alias</strong>(new_name, old_name) </a>
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
</span>
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
447
|
+
|
448
|
+
</li>
|
449
|
+
|
450
|
+
|
451
|
+
<li class="public ">
|
452
|
+
<span class="summary_signature">
|
453
|
+
|
454
|
+
<a href="#set-class_method" title="set (class method)">+ (Object) <strong>set</strong>(key, value) </a>
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
</span>
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
468
|
+
|
469
|
+
</li>
|
470
|
+
|
471
|
+
|
472
|
+
<li class="public ">
|
473
|
+
<span class="summary_signature">
|
474
|
+
|
475
|
+
<a href="#static_default_value_collection-class_method" title="static_default_value_collection (class method)">+ (Object) <strong>static_default_value_collection</strong> </a>
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
</span>
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
|
486
|
+
|
487
|
+
|
488
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
489
|
+
|
490
|
+
</li>
|
491
|
+
|
492
|
+
|
493
|
+
<li class="public ">
|
494
|
+
<span class="summary_signature">
|
495
|
+
|
496
|
+
<a href="#static_parameter_collection-class_method" title="static_parameter_collection (class method)">+ (Object) <strong>static_parameter_collection</strong> </a>
|
497
|
+
|
498
|
+
|
499
|
+
|
500
|
+
</span>
|
501
|
+
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
510
|
+
|
511
|
+
</li>
|
512
|
+
|
513
|
+
|
514
|
+
</ul>
|
515
|
+
|
516
|
+
<h2>
|
517
|
+
Instance Method Summary
|
518
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
519
|
+
</h2>
|
520
|
+
|
521
|
+
<ul class="summary">
|
522
|
+
|
523
|
+
<li class="public ">
|
524
|
+
<span class="summary_signature">
|
525
|
+
|
526
|
+
<a href="#binary_path-instance_method" title="#binary_path (instance method)">- (File) <strong>binary_path</strong> </a>
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
</span>
|
531
|
+
|
532
|
+
|
533
|
+
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
|
538
|
+
|
539
|
+
<span class="summary_desc"><div class='inline'><p>
|
540
|
+
Path to the executable binary that should be executed.
|
541
|
+
</p>
|
542
|
+
</div></span>
|
543
|
+
|
544
|
+
</li>
|
545
|
+
|
546
|
+
|
547
|
+
<li class="public ">
|
548
|
+
<span class="summary_signature">
|
549
|
+
|
550
|
+
<a href="#binary_path%3D-instance_method" title="#binary_path= (instance method)">- (File) <strong>binary_path=</strong>(path) </a>
|
551
|
+
|
552
|
+
|
553
|
+
|
554
|
+
</span>
|
555
|
+
|
556
|
+
|
557
|
+
|
558
|
+
|
559
|
+
|
560
|
+
|
561
|
+
|
562
|
+
|
563
|
+
<span class="summary_desc"><div class='inline'><p>
|
564
|
+
Replace the binary that will be executed with a path to one of your
|
565
|
+
choosing.
|
566
|
+
</p>
|
567
|
+
</div></span>
|
568
|
+
|
569
|
+
</li>
|
570
|
+
|
571
|
+
|
572
|
+
<li class="protected ">
|
573
|
+
<span class="summary_signature">
|
574
|
+
|
575
|
+
<a href="#create_outer_task-instance_method" title="#create_outer_task (instance method)">- (Object) <strong>create_outer_task</strong>(*args) </a>
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
</span>
|
580
|
+
|
581
|
+
|
582
|
+
<span class="note title protected">protected</span>
|
583
|
+
|
584
|
+
|
585
|
+
|
586
|
+
|
587
|
+
|
588
|
+
<span class="summary_desc"><div class='inline'><p>
|
589
|
+
Create the outer rake task.
|
590
|
+
</p>
|
591
|
+
</div></span>
|
592
|
+
|
593
|
+
</li>
|
594
|
+
|
595
|
+
|
596
|
+
<li class="public ">
|
597
|
+
<span class="summary_signature">
|
598
|
+
|
599
|
+
<a href="#default_file_expression-instance_method" title="#default_file_expression (instance method)">- (Object) <strong>default_file_expression</strong> </a>
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
</span>
|
604
|
+
|
605
|
+
|
606
|
+
|
607
|
+
|
608
|
+
|
609
|
+
|
610
|
+
|
611
|
+
|
612
|
+
<span class="summary_desc"><div class='inline'><p>
|
613
|
+
Called by Parameters like :path and :paths.
|
614
|
+
</p>
|
615
|
+
</div></span>
|
616
|
+
|
617
|
+
</li>
|
618
|
+
|
619
|
+
|
620
|
+
<li class="public ">
|
621
|
+
<span class="summary_signature">
|
622
|
+
|
623
|
+
<a href="#execute-instance_method" title="#execute (instance method)">- (Object) <strong>execute</strong> </a>
|
624
|
+
|
625
|
+
|
626
|
+
|
627
|
+
</span>
|
628
|
+
|
629
|
+
|
630
|
+
|
631
|
+
|
632
|
+
|
633
|
+
|
634
|
+
|
635
|
+
|
636
|
+
<span class="summary_desc"><div class='inline'><p>
|
637
|
+
Execute the feature after calling parse with command line arguments.
|
638
|
+
</p>
|
639
|
+
</div></span>
|
640
|
+
|
641
|
+
</li>
|
642
|
+
|
643
|
+
|
644
|
+
<li class="protected ">
|
645
|
+
<span class="summary_signature">
|
646
|
+
|
647
|
+
<a href="#execute_delegate-instance_method" title="#execute_delegate (instance method)">- (Object) <strong>execute_delegate</strong> </a>
|
648
|
+
|
649
|
+
|
650
|
+
|
651
|
+
</span>
|
652
|
+
|
653
|
+
|
654
|
+
<span class="note title protected">protected</span>
|
655
|
+
|
656
|
+
|
657
|
+
|
658
|
+
|
659
|
+
|
660
|
+
<span class="summary_desc"><div class='inline'><p>
|
661
|
+
Call the provided executable delegate.
|
662
|
+
</p>
|
663
|
+
</div></span>
|
664
|
+
|
665
|
+
</li>
|
666
|
+
|
667
|
+
|
668
|
+
<li class="public ">
|
669
|
+
<span class="summary_signature">
|
670
|
+
|
671
|
+
<a href="#from_hash-instance_method" title="#from_hash (instance method)">- (Object) <strong>from_hash</strong>(hash) </a>
|
672
|
+
|
673
|
+
|
674
|
+
|
675
|
+
</span>
|
676
|
+
|
677
|
+
|
678
|
+
|
679
|
+
|
680
|
+
|
681
|
+
|
682
|
+
|
683
|
+
|
684
|
+
<span class="summary_desc"><div class='inline'><p>
|
685
|
+
This will ignore unknown parameters, because our very first use case, is
|
686
|
+
when generators call other generators and generator A might have different
|
687
|
+
parameters than generator B.
|
688
|
+
</p>
|
689
|
+
</div></span>
|
690
|
+
|
691
|
+
</li>
|
692
|
+
|
693
|
+
|
694
|
+
<li class="public ">
|
695
|
+
<span class="summary_signature">
|
696
|
+
|
697
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Base) <strong>initialize</strong> </a>
|
698
|
+
|
699
|
+
|
700
|
+
|
701
|
+
</span>
|
702
|
+
|
703
|
+
<span class="note title constructor">constructor</span>
|
704
|
+
|
705
|
+
|
706
|
+
|
707
|
+
|
708
|
+
|
709
|
+
|
710
|
+
|
711
|
+
|
712
|
+
<span class="summary_desc"><div class='inline'><p>
|
713
|
+
A new instance of Base.
|
714
|
+
</p>
|
715
|
+
</div></span>
|
716
|
+
|
717
|
+
</li>
|
718
|
+
|
719
|
+
|
720
|
+
<li class="protected ">
|
721
|
+
<span class="summary_signature">
|
722
|
+
|
723
|
+
<a href="#initialize_defaults-instance_method" title="#initialize_defaults (instance method)">- (Object) <strong>initialize_defaults</strong> </a>
|
724
|
+
|
725
|
+
|
726
|
+
|
727
|
+
</span>
|
728
|
+
|
729
|
+
|
730
|
+
<span class="note title protected">protected</span>
|
731
|
+
|
732
|
+
|
733
|
+
|
734
|
+
|
735
|
+
|
736
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
737
|
+
|
738
|
+
</li>
|
739
|
+
|
740
|
+
|
741
|
+
<li class="protected ">
|
742
|
+
<span class="summary_signature">
|
743
|
+
|
744
|
+
<a href="#library_added-instance_method" title="#library_added (instance method)">- (Object) <strong>library_added</strong>(path_or_paths) </a>
|
745
|
+
|
746
|
+
|
747
|
+
|
748
|
+
</span>
|
749
|
+
|
750
|
+
|
751
|
+
<span class="note title protected">protected</span>
|
752
|
+
|
753
|
+
|
754
|
+
|
755
|
+
|
756
|
+
|
757
|
+
<span class="summary_desc"><div class='inline'><p>
|
758
|
+
This method will generally be overridden by subclasses and they can do
|
759
|
+
whatever customization is necessary for a particular library type.
|
760
|
+
</p>
|
761
|
+
</div></span>
|
762
|
+
|
763
|
+
</li>
|
764
|
+
|
765
|
+
|
766
|
+
<li class="public ">
|
767
|
+
<span class="summary_signature">
|
768
|
+
|
769
|
+
<a href="#parse%21-instance_method" title="#parse! (instance method)">- (Object) <strong>parse!</strong>(commandline_options) </a>
|
770
|
+
|
771
|
+
|
772
|
+
|
773
|
+
</span>
|
774
|
+
|
775
|
+
|
776
|
+
|
777
|
+
|
778
|
+
|
779
|
+
|
780
|
+
|
781
|
+
|
782
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
783
|
+
|
784
|
+
</li>
|
785
|
+
|
786
|
+
|
787
|
+
<li class="protected ">
|
788
|
+
<span class="summary_signature">
|
789
|
+
|
790
|
+
<a href="#parse_extra_options%21-instance_method" title="#parse_extra_options! (instance method)">- (Object) <strong>parse_extra_options!</strong>(options) </a>
|
791
|
+
|
792
|
+
|
793
|
+
|
794
|
+
</span>
|
795
|
+
|
796
|
+
|
797
|
+
<span class="note title protected">protected</span>
|
798
|
+
|
799
|
+
|
800
|
+
|
801
|
+
|
802
|
+
|
803
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
804
|
+
|
805
|
+
</li>
|
806
|
+
|
807
|
+
|
808
|
+
<li class="protected ">
|
809
|
+
<span class="summary_signature">
|
810
|
+
|
811
|
+
<a href="#parse_rake_task_arg-instance_method" title="#parse_rake_task_arg (instance method)">- (Object) <strong>parse_rake_task_arg</strong>(arg) </a>
|
812
|
+
|
813
|
+
|
814
|
+
|
815
|
+
</span>
|
816
|
+
|
817
|
+
|
818
|
+
<span class="note title protected">protected</span>
|
819
|
+
|
820
|
+
|
821
|
+
|
822
|
+
|
823
|
+
|
824
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
825
|
+
|
826
|
+
</li>
|
827
|
+
|
828
|
+
|
829
|
+
<li class="protected ">
|
830
|
+
<span class="summary_signature">
|
831
|
+
|
832
|
+
<a href="#prepare-instance_method" title="#prepare (instance method)">- (Object) <strong>prepare</strong> </a>
|
833
|
+
|
834
|
+
|
835
|
+
|
836
|
+
</span>
|
837
|
+
|
838
|
+
|
839
|
+
<span class="note title protected">protected</span>
|
840
|
+
|
841
|
+
|
842
|
+
|
843
|
+
|
844
|
+
|
845
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
846
|
+
|
847
|
+
</li>
|
848
|
+
|
849
|
+
|
850
|
+
<li class="public ">
|
851
|
+
<span class="summary_signature">
|
852
|
+
|
853
|
+
<a href="#stderr-instance_method" title="#stderr (instance method)">- (Object) <strong>stderr</strong> </a>
|
854
|
+
|
855
|
+
|
856
|
+
|
857
|
+
</span>
|
858
|
+
|
859
|
+
|
860
|
+
|
861
|
+
|
862
|
+
|
863
|
+
|
864
|
+
|
865
|
+
|
866
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
867
|
+
|
868
|
+
</li>
|
869
|
+
|
870
|
+
|
871
|
+
<li class="public ">
|
872
|
+
<span class="summary_signature">
|
873
|
+
|
874
|
+
<a href="#stderr%3D-instance_method" title="#stderr= (instance method)">- (Object) <strong>stderr=</strong>(io) </a>
|
875
|
+
|
876
|
+
|
877
|
+
|
878
|
+
</span>
|
879
|
+
|
880
|
+
|
881
|
+
|
882
|
+
|
883
|
+
|
884
|
+
|
885
|
+
|
886
|
+
|
887
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
888
|
+
|
889
|
+
</li>
|
890
|
+
|
891
|
+
|
892
|
+
<li class="public ">
|
893
|
+
<span class="summary_signature">
|
894
|
+
|
895
|
+
<a href="#stdout-instance_method" title="#stdout (instance method)">- (Object) <strong>stdout</strong> </a>
|
896
|
+
|
897
|
+
|
898
|
+
|
899
|
+
</span>
|
900
|
+
|
901
|
+
|
902
|
+
|
903
|
+
|
904
|
+
|
905
|
+
|
906
|
+
|
907
|
+
|
908
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
909
|
+
|
910
|
+
</li>
|
911
|
+
|
912
|
+
|
913
|
+
<li class="public ">
|
914
|
+
<span class="summary_signature">
|
915
|
+
|
916
|
+
<a href="#stdout%3D-instance_method" title="#stdout= (instance method)">- (Object) <strong>stdout=</strong>(io) </a>
|
917
|
+
|
918
|
+
|
919
|
+
|
920
|
+
</span>
|
921
|
+
|
922
|
+
|
923
|
+
|
924
|
+
|
925
|
+
|
926
|
+
|
927
|
+
|
928
|
+
|
929
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
930
|
+
|
931
|
+
</li>
|
932
|
+
|
933
|
+
|
934
|
+
<li class="protected ">
|
935
|
+
<span class="summary_signature">
|
936
|
+
|
937
|
+
<a href="#system_execute-instance_method" title="#system_execute (instance method)">- (Object) <strong>system_execute</strong>(binary, params) </a>
|
938
|
+
|
939
|
+
|
940
|
+
|
941
|
+
</span>
|
942
|
+
|
943
|
+
|
944
|
+
<span class="note title protected">protected</span>
|
945
|
+
|
946
|
+
|
947
|
+
|
948
|
+
|
949
|
+
|
950
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
951
|
+
|
952
|
+
</li>
|
953
|
+
|
954
|
+
|
955
|
+
<li class="public ">
|
956
|
+
<span class="summary_signature">
|
957
|
+
|
958
|
+
<a href="#to_hash-instance_method" title="#to_hash (instance method)">- (Object) <strong>to_hash</strong> </a>
|
959
|
+
|
960
|
+
|
961
|
+
|
962
|
+
</span>
|
963
|
+
|
964
|
+
|
965
|
+
|
966
|
+
|
967
|
+
|
968
|
+
|
969
|
+
|
970
|
+
|
971
|
+
<span class="summary_desc"><div class='inline'><p>
|
972
|
+
This will create a hash of ONLY values that are created using
|
973
|
+
<tt>add_param</tt>, properties that are created with attr_accessor must be
|
974
|
+
handled manually, or patches are welcome!.
|
975
|
+
</p>
|
976
|
+
</div></span>
|
977
|
+
|
978
|
+
</li>
|
979
|
+
|
980
|
+
|
981
|
+
<li class="public ">
|
982
|
+
<span class="summary_signature">
|
983
|
+
|
984
|
+
<a href="#to_help-instance_method" title="#to_help (instance method)">- (Object) <strong>to_help</strong> </a>
|
985
|
+
|
986
|
+
|
987
|
+
|
988
|
+
</span>
|
989
|
+
|
990
|
+
|
991
|
+
|
992
|
+
|
993
|
+
|
994
|
+
|
995
|
+
|
996
|
+
|
997
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
998
|
+
|
999
|
+
</li>
|
1000
|
+
|
1001
|
+
|
1002
|
+
<li class="public ">
|
1003
|
+
<span class="summary_signature">
|
1004
|
+
|
1005
|
+
<a href="#to_rake-instance_method" title="#to_rake (instance method)">- (Object) <strong>to_rake</strong>(*args) {|_self| ... }</a>
|
1006
|
+
|
1007
|
+
|
1008
|
+
|
1009
|
+
</span>
|
1010
|
+
|
1011
|
+
|
1012
|
+
|
1013
|
+
|
1014
|
+
|
1015
|
+
|
1016
|
+
|
1017
|
+
|
1018
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
1019
|
+
|
1020
|
+
</li>
|
1021
|
+
|
1022
|
+
|
1023
|
+
<li class="public ">
|
1024
|
+
<span class="summary_signature">
|
1025
|
+
|
1026
|
+
<a href="#to_shell-instance_method" title="#to_shell (instance method)">- (Object) <strong>to_shell</strong> </a>
|
1027
|
+
|
1028
|
+
|
1029
|
+
|
1030
|
+
</span>
|
1031
|
+
|
1032
|
+
|
1033
|
+
|
1034
|
+
|
1035
|
+
|
1036
|
+
|
1037
|
+
|
1038
|
+
|
1039
|
+
<span class="summary_desc"><div class='inline'><p>
|
1040
|
+
Create a string that represents this configured executable for shell
|
1041
|
+
execution.
|
1042
|
+
</p>
|
1043
|
+
</div></span>
|
1044
|
+
|
1045
|
+
</li>
|
1046
|
+
|
1047
|
+
|
1048
|
+
<li class="protected ">
|
1049
|
+
<span class="summary_signature">
|
1050
|
+
|
1051
|
+
<a href="#update_rake_task_name_from_args-instance_method" title="#update_rake_task_name_from_args (instance method)">- (Object) <strong>update_rake_task_name_from_args</strong>(*args) </a>
|
1052
|
+
|
1053
|
+
|
1054
|
+
|
1055
|
+
</span>
|
1056
|
+
|
1057
|
+
|
1058
|
+
<span class="note title protected">protected</span>
|
1059
|
+
|
1060
|
+
|
1061
|
+
|
1062
|
+
|
1063
|
+
|
1064
|
+
<span class="summary_desc"><div class='inline'><p>
|
1065
|
+
This method will add the current task to the Rake CLEAN collection.
|
1066
|
+
</p>
|
1067
|
+
</div></span>
|
1068
|
+
|
1069
|
+
</li>
|
1070
|
+
|
1071
|
+
|
1072
|
+
</ul>
|
1073
|
+
|
1074
|
+
|
1075
|
+
|
1076
|
+
|
1077
|
+
|
1078
|
+
|
1079
|
+
|
1080
|
+
|
1081
|
+
|
1082
|
+
|
1083
|
+
|
1084
|
+
|
1085
|
+
|
1086
|
+
|
1087
|
+
|
1088
|
+
|
1089
|
+
|
1090
|
+
|
1091
|
+
|
1092
|
+
|
1093
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="../Concern.html" title="Sprout::Concern (module)">Concern</a></span></h3>
|
1094
|
+
<p class="inherited"><span class='object_link'><a href="../Concern.html#append_features-instance_method" title="Sprout::Concern#append_features (method)">#append_features</a></span>, <span class='object_link'><a href="../Concern.html#extended-class_method" title="Sprout::Concern.extended (method)">extended</a></span>, <span class='object_link'><a href="../Concern.html#included-instance_method" title="Sprout::Concern#included (method)">#included</a></span></p>
|
1095
|
+
<div id="constructor_details" class="method_details_list">
|
1096
|
+
<h2>Constructor Details</h2>
|
1097
|
+
|
1098
|
+
<div class="method_details first">
|
1099
|
+
<p class="signature first" id="initialize-instance_method">
|
1100
|
+
|
1101
|
+
- (<tt><span class='object_link'><a href="" title="Sprout::Executable::Base (class)">Base</a></span></tt>) <strong>initialize</strong>
|
1102
|
+
|
1103
|
+
|
1104
|
+
|
1105
|
+
</p><div class="docstring">
|
1106
|
+
<div class="discussion">
|
1107
|
+
<p>
|
1108
|
+
A new instance of Base
|
1109
|
+
</p>
|
1110
|
+
|
1111
|
+
|
1112
|
+
</div>
|
1113
|
+
</div>
|
1114
|
+
<div class="tags">
|
1115
|
+
|
1116
|
+
|
1117
|
+
</div><table class="source_code">
|
1118
|
+
<tr>
|
1119
|
+
<td>
|
1120
|
+
<pre class="lines">
|
1121
|
+
|
1122
|
+
|
1123
|
+
220
|
1124
|
+
221
|
1125
|
+
222
|
1126
|
+
223
|
1127
|
+
224
|
1128
|
+
225
|
1129
|
+
226
|
1130
|
+
227
|
1131
|
+
228
|
1132
|
+
229
|
1133
|
+
230
|
1134
|
+
231
|
1135
|
+
232
|
1136
|
+
233
|
1137
|
+
234</pre>
|
1138
|
+
</td>
|
1139
|
+
<td>
|
1140
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 220</span>
|
1141
|
+
|
1142
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
1143
|
+
<span class='kw'>super</span>
|
1144
|
+
<span class='ivar'>@abort_on_failure</span> <span class='op'>=</span> <span class='kw'>true</span>
|
1145
|
+
<span class='ivar'>@appended_args</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
1146
|
+
<span class='ivar'>@prepared</span> <span class='op'>=</span> <span class='kw'>false</span>
|
1147
|
+
<span class='ivar'>@prepended_args</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
1148
|
+
<span class='ivar'>@param_hash</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
1149
|
+
<span class='ivar'>@params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
1150
|
+
<span class='ivar'>@prerequisites</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
1151
|
+
<span class='ivar'>@option_parser</span> <span class='op'>=</span> <span class='const'>OptionParser</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
1152
|
+
<span class='ivar'>@default_prefix</span> <span class='op'>=</span> <span class='const'>DEFAULT_PREFIX</span>
|
1153
|
+
<span class='ivar'>@default_short_prefix</span> <span class='op'>=</span> <span class='const'>DEFAULT_SHORT_PREFIX</span>
|
1154
|
+
<span class='id identifier rubyid_initialize_defaults'>initialize_defaults</span>
|
1155
|
+
<span class='id identifier rubyid_initialize_parameters'>initialize_parameters</span>
|
1156
|
+
<span class='kw'>end</span></pre>
|
1157
|
+
</td>
|
1158
|
+
</tr>
|
1159
|
+
</table>
|
1160
|
+
</div>
|
1161
|
+
|
1162
|
+
</div>
|
1163
|
+
|
1164
|
+
<div id="instance_attr_details" class="attr_details">
|
1165
|
+
<h2>Instance Attribute Details</h2>
|
1166
|
+
|
1167
|
+
|
1168
|
+
<span id="abort_on_failure=-instance_method"></span>
|
1169
|
+
<span id="abort_on_failure-instance_method"></span>
|
1170
|
+
<div class="method_details first">
|
1171
|
+
<p class="signature first" id="abort_on_failure-instance_method">
|
1172
|
+
|
1173
|
+
- (<tt>Object</tt>) <strong>abort_on_failure</strong>
|
1174
|
+
|
1175
|
+
|
1176
|
+
|
1177
|
+
</p><div class="docstring">
|
1178
|
+
<div class="discussion">
|
1179
|
+
<p>
|
1180
|
+
Configure the executable instance to output failure messages to stderr and
|
1181
|
+
abort with non-zero response.
|
1182
|
+
</p>
|
1183
|
+
|
1184
|
+
|
1185
|
+
</div>
|
1186
|
+
</div>
|
1187
|
+
<div class="tags">
|
1188
|
+
|
1189
|
+
|
1190
|
+
</div><table class="source_code">
|
1191
|
+
<tr>
|
1192
|
+
<td>
|
1193
|
+
<pre class="lines">
|
1194
|
+
|
1195
|
+
|
1196
|
+
206
|
1197
|
+
207
|
1198
|
+
208</pre>
|
1199
|
+
</td>
|
1200
|
+
<td>
|
1201
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 206</span>
|
1202
|
+
|
1203
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_abort_on_failure'>abort_on_failure</span>
|
1204
|
+
<span class='ivar'>@abort_on_failure</span>
|
1205
|
+
<span class='kw'>end</span></pre>
|
1206
|
+
</td>
|
1207
|
+
</tr>
|
1208
|
+
</table>
|
1209
|
+
</div>
|
1210
|
+
|
1211
|
+
|
1212
|
+
<span id="default_prefix=-instance_method"></span>
|
1213
|
+
<span id="default_prefix-instance_method"></span>
|
1214
|
+
<div class="method_details ">
|
1215
|
+
<p class="signature " id="default_prefix-instance_method">
|
1216
|
+
|
1217
|
+
- (<tt>Object</tt>) <strong>default_prefix</strong>
|
1218
|
+
|
1219
|
+
|
1220
|
+
|
1221
|
+
</p><div class="docstring">
|
1222
|
+
<div class="discussion">
|
1223
|
+
<p>
|
1224
|
+
The default command line prefix that should be used in front of parameter
|
1225
|
+
names.
|
1226
|
+
</p>
|
1227
|
+
<p>
|
1228
|
+
The default value for this parameter is ’--’, but some
|
1229
|
+
command line applications (like MXMLC) prefer ’-’.
|
1230
|
+
</p>
|
1231
|
+
|
1232
|
+
|
1233
|
+
</div>
|
1234
|
+
</div>
|
1235
|
+
<div class="tags">
|
1236
|
+
|
1237
|
+
|
1238
|
+
</div><table class="source_code">
|
1239
|
+
<tr>
|
1240
|
+
<td>
|
1241
|
+
<pre class="lines">
|
1242
|
+
|
1243
|
+
|
1244
|
+
175
|
1245
|
+
176
|
1246
|
+
177</pre>
|
1247
|
+
</td>
|
1248
|
+
<td>
|
1249
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 175</span>
|
1250
|
+
|
1251
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_default_prefix'>default_prefix</span>
|
1252
|
+
<span class='ivar'>@default_prefix</span>
|
1253
|
+
<span class='kw'>end</span></pre>
|
1254
|
+
</td>
|
1255
|
+
</tr>
|
1256
|
+
</table>
|
1257
|
+
</div>
|
1258
|
+
|
1259
|
+
|
1260
|
+
<span id="default_short_prefix=-instance_method"></span>
|
1261
|
+
<span id="default_short_prefix-instance_method"></span>
|
1262
|
+
<div class="method_details ">
|
1263
|
+
<p class="signature " id="default_short_prefix-instance_method">
|
1264
|
+
|
1265
|
+
- (<tt>Object</tt>) <strong>default_short_prefix</strong>
|
1266
|
+
|
1267
|
+
|
1268
|
+
|
1269
|
+
</p><div class="docstring">
|
1270
|
+
<div class="discussion">
|
1271
|
+
<p>
|
1272
|
+
The default command line prefix for short name parameters.
|
1273
|
+
</p>
|
1274
|
+
<p>
|
1275
|
+
This value defaults to ’-’, but can be changed to whatever a
|
1276
|
+
particular tool prefers.
|
1277
|
+
</p>
|
1278
|
+
|
1279
|
+
|
1280
|
+
</div>
|
1281
|
+
</div>
|
1282
|
+
<div class="tags">
|
1283
|
+
|
1284
|
+
|
1285
|
+
</div><table class="source_code">
|
1286
|
+
<tr>
|
1287
|
+
<td>
|
1288
|
+
<pre class="lines">
|
1289
|
+
|
1290
|
+
|
1291
|
+
183
|
1292
|
+
184
|
1293
|
+
185</pre>
|
1294
|
+
</td>
|
1295
|
+
<td>
|
1296
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 183</span>
|
1297
|
+
|
1298
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_default_short_prefix'>default_short_prefix</span>
|
1299
|
+
<span class='ivar'>@default_short_prefix</span>
|
1300
|
+
<span class='kw'>end</span></pre>
|
1301
|
+
</td>
|
1302
|
+
</tr>
|
1303
|
+
</table>
|
1304
|
+
</div>
|
1305
|
+
|
1306
|
+
|
1307
|
+
<span id="executable=-instance_method"></span>
|
1308
|
+
<span id="executable-instance_method"></span>
|
1309
|
+
<div class="method_details ">
|
1310
|
+
<p class="signature " id="executable-instance_method">
|
1311
|
+
|
1312
|
+
- (<tt>Object</tt>) <strong>executable</strong>
|
1313
|
+
|
1314
|
+
|
1315
|
+
|
1316
|
+
</p><div class="docstring">
|
1317
|
+
<div class="discussion">
|
1318
|
+
<p>
|
1319
|
+
The default Sprout executable that we will use for this executable.
|
1320
|
+
</p>
|
1321
|
+
<p>
|
1322
|
+
Classes that include the Task can set the default value for this property
|
1323
|
+
at the class level with:
|
1324
|
+
</p>
|
1325
|
+
<pre class="code ruby"><code>
|
1326
|
+
<span class='id identifier rubyid_set'>set</span> <span class='symbol'>:executable</span><span class='comma'>,</span> <span class='symbol'>:mxmlc</span>
|
1327
|
+
</code></pre>
|
1328
|
+
<p>
|
1329
|
+
But that value can be overriden on each instance like:
|
1330
|
+
</p>
|
1331
|
+
<pre class="code ruby"><code>
|
1332
|
+
<span class='id identifier rubyid_executable'>executable</span> <span class='op'>=</span> <span class='const'>SomeToolTask</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
1333
|
+
<span class='id identifier rubyid_too'>too</span><span class='period'>.</span><span class='id identifier rubyid_executable'>executable</span> <span class='symbol'>:compc</span>
|
1334
|
+
</code></pre>
|
1335
|
+
<p>
|
1336
|
+
This parameter is required - either from the including class or instance
|
1337
|
+
configuration.
|
1338
|
+
</p>
|
1339
|
+
|
1340
|
+
|
1341
|
+
</div>
|
1342
|
+
</div>
|
1343
|
+
<div class="tags">
|
1344
|
+
|
1345
|
+
|
1346
|
+
</div><table class="source_code">
|
1347
|
+
<tr>
|
1348
|
+
<td>
|
1349
|
+
<pre class="lines">
|
1350
|
+
|
1351
|
+
|
1352
|
+
201
|
1353
|
+
202
|
1354
|
+
203</pre>
|
1355
|
+
</td>
|
1356
|
+
<td>
|
1357
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 201</span>
|
1358
|
+
|
1359
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_executable'>executable</span>
|
1360
|
+
<span class='ivar'>@executable</span>
|
1361
|
+
<span class='kw'>end</span></pre>
|
1362
|
+
</td>
|
1363
|
+
</tr>
|
1364
|
+
</table>
|
1365
|
+
</div>
|
1366
|
+
|
1367
|
+
|
1368
|
+
<span id=""></span>
|
1369
|
+
<span id="param_hash-instance_method"></span>
|
1370
|
+
<div class="method_details ">
|
1371
|
+
<p class="signature " id="param_hash-instance_method">
|
1372
|
+
|
1373
|
+
- (<tt>Object</tt>) <strong>param_hash</strong> <span class="extras">(readonly)</span>
|
1374
|
+
|
1375
|
+
|
1376
|
+
|
1377
|
+
</p><div class="docstring">
|
1378
|
+
<div class="discussion">
|
1379
|
+
<p>
|
1380
|
+
Returns the value of attribute param_hash
|
1381
|
+
</p>
|
1382
|
+
|
1383
|
+
|
1384
|
+
</div>
|
1385
|
+
</div>
|
1386
|
+
<div class="tags">
|
1387
|
+
|
1388
|
+
|
1389
|
+
</div><table class="source_code">
|
1390
|
+
<tr>
|
1391
|
+
<td>
|
1392
|
+
<pre class="lines">
|
1393
|
+
|
1394
|
+
|
1395
|
+
216
|
1396
|
+
217
|
1397
|
+
218</pre>
|
1398
|
+
</td>
|
1399
|
+
<td>
|
1400
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 216</span>
|
1401
|
+
|
1402
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_param_hash'>param_hash</span>
|
1403
|
+
<span class='ivar'>@param_hash</span>
|
1404
|
+
<span class='kw'>end</span></pre>
|
1405
|
+
</td>
|
1406
|
+
</tr>
|
1407
|
+
</table>
|
1408
|
+
</div>
|
1409
|
+
|
1410
|
+
|
1411
|
+
<span id=""></span>
|
1412
|
+
<span id="params-instance_method"></span>
|
1413
|
+
<div class="method_details ">
|
1414
|
+
<p class="signature " id="params-instance_method">
|
1415
|
+
|
1416
|
+
- (<tt>Object</tt>) <strong>params</strong> <span class="extras">(readonly)</span>
|
1417
|
+
|
1418
|
+
|
1419
|
+
|
1420
|
+
</p><div class="docstring">
|
1421
|
+
<div class="discussion">
|
1422
|
+
<p>
|
1423
|
+
Returns the value of attribute params
|
1424
|
+
</p>
|
1425
|
+
|
1426
|
+
|
1427
|
+
</div>
|
1428
|
+
</div>
|
1429
|
+
<div class="tags">
|
1430
|
+
|
1431
|
+
|
1432
|
+
</div><table class="source_code">
|
1433
|
+
<tr>
|
1434
|
+
<td>
|
1435
|
+
<pre class="lines">
|
1436
|
+
|
1437
|
+
|
1438
|
+
217
|
1439
|
+
218
|
1440
|
+
219</pre>
|
1441
|
+
</td>
|
1442
|
+
<td>
|
1443
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 217</span>
|
1444
|
+
|
1445
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_params'>params</span>
|
1446
|
+
<span class='ivar'>@params</span>
|
1447
|
+
<span class='kw'>end</span></pre>
|
1448
|
+
</td>
|
1449
|
+
</tr>
|
1450
|
+
</table>
|
1451
|
+
</div>
|
1452
|
+
|
1453
|
+
|
1454
|
+
<span id="pkg_name=-instance_method"></span>
|
1455
|
+
<span id="pkg_name-instance_method"></span>
|
1456
|
+
<div class="method_details ">
|
1457
|
+
<p class="signature " id="pkg_name-instance_method">
|
1458
|
+
|
1459
|
+
- (<tt>Object</tt>) <strong>pkg_name</strong>
|
1460
|
+
|
1461
|
+
|
1462
|
+
|
1463
|
+
</p><div class="docstring">
|
1464
|
+
<div class="discussion">
|
1465
|
+
<p>
|
1466
|
+
The default RubyGem that we will use when requesting our executable.
|
1467
|
+
</p>
|
1468
|
+
<p>
|
1469
|
+
Classes that include the Executable can set the default value for this
|
1470
|
+
property at the class level with:
|
1471
|
+
</p>
|
1472
|
+
<pre class="code ruby"><code>
|
1473
|
+
<span class='id identifier rubyid_set'>set</span> <span class='symbol'>:pkg_name</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>sprout-sometoolname</span><span class='tstring_end'>'</span></span>
|
1474
|
+
</code></pre>
|
1475
|
+
<p>
|
1476
|
+
But that value can be overridden on each instance like:
|
1477
|
+
</p>
|
1478
|
+
<pre class="code ruby"><code>
|
1479
|
+
<span class='id identifier rubyid_executable'>executable</span> <span class='op'>=</span> <span class='const'>SomeToolTask</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
1480
|
+
<span class='id identifier rubyid_executable'>executable</span><span class='period'>.</span><span class='id identifier rubyid_pkg_name'>pkg_name</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>sprout-othertoolname</span><span class='tstring_end'>'</span></span>
|
1481
|
+
</code></pre>
|
1482
|
+
<p>
|
1483
|
+
This parameter is required - either from the including class or instance
|
1484
|
+
configuration.
|
1485
|
+
</p>
|
1486
|
+
|
1487
|
+
|
1488
|
+
</div>
|
1489
|
+
</div>
|
1490
|
+
<div class="tags">
|
1491
|
+
|
1492
|
+
|
1493
|
+
</div><table class="source_code">
|
1494
|
+
<tr>
|
1495
|
+
<td>
|
1496
|
+
<pre class="lines">
|
1497
|
+
|
1498
|
+
|
1499
|
+
147
|
1500
|
+
148
|
1501
|
+
149</pre>
|
1502
|
+
</td>
|
1503
|
+
<td>
|
1504
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 147</span>
|
1505
|
+
|
1506
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_pkg_name'>pkg_name</span>
|
1507
|
+
<span class='ivar'>@pkg_name</span>
|
1508
|
+
<span class='kw'>end</span></pre>
|
1509
|
+
</td>
|
1510
|
+
</tr>
|
1511
|
+
</table>
|
1512
|
+
</div>
|
1513
|
+
|
1514
|
+
|
1515
|
+
<span id="pkg_version=-instance_method"></span>
|
1516
|
+
<span id="pkg_version-instance_method"></span>
|
1517
|
+
<div class="method_details ">
|
1518
|
+
<p class="signature " id="pkg_version-instance_method">
|
1519
|
+
|
1520
|
+
- (<tt>Object</tt>) <strong>pkg_version</strong>
|
1521
|
+
|
1522
|
+
|
1523
|
+
|
1524
|
+
</p><div class="docstring">
|
1525
|
+
<div class="discussion">
|
1526
|
+
<p>
|
1527
|
+
The default RubyGem version that we will use when requesting our
|
1528
|
+
executable.
|
1529
|
+
</p>
|
1530
|
+
<p>
|
1531
|
+
Classes that include the Task can set the default value for this property
|
1532
|
+
at the class level with:
|
1533
|
+
</p>
|
1534
|
+
<pre class="code ruby"><code>
|
1535
|
+
<span class='id identifier rubyid_set'>set</span> <span class='symbol'>:pkg_version</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>>= 1.0.3</span><span class='tstring_end'>'</span></span>
|
1536
|
+
</code></pre>
|
1537
|
+
<p>
|
1538
|
+
But that value can be overriden on each instance like:
|
1539
|
+
</p>
|
1540
|
+
<pre class="code ruby"><code>
|
1541
|
+
<span class='id identifier rubyid_executable'>executable</span> <span class='op'>=</span> <span class='const'>SomeToolTask</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
1542
|
+
<span class='id identifier rubyid_too'>too</span><span class='period'>.</span><span class='id identifier rubyid_pkg_version'>pkg_version</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>>= 2.0.0</span><span class='tstring_end'>'</span></span>
|
1543
|
+
</code></pre>
|
1544
|
+
<p>
|
1545
|
+
This parameter is required - either from the including class or instance
|
1546
|
+
configuration.
|
1547
|
+
</p>
|
1548
|
+
|
1549
|
+
|
1550
|
+
</div>
|
1551
|
+
</div>
|
1552
|
+
<div class="tags">
|
1553
|
+
|
1554
|
+
|
1555
|
+
</div><table class="source_code">
|
1556
|
+
<tr>
|
1557
|
+
<td>
|
1558
|
+
<pre class="lines">
|
1559
|
+
|
1560
|
+
|
1561
|
+
165
|
1562
|
+
166
|
1563
|
+
167</pre>
|
1564
|
+
</td>
|
1565
|
+
<td>
|
1566
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 165</span>
|
1567
|
+
|
1568
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_pkg_version'>pkg_version</span>
|
1569
|
+
<span class='ivar'>@pkg_version</span>
|
1570
|
+
<span class='kw'>end</span></pre>
|
1571
|
+
</td>
|
1572
|
+
</tr>
|
1573
|
+
</table>
|
1574
|
+
</div>
|
1575
|
+
|
1576
|
+
|
1577
|
+
<span id=""></span>
|
1578
|
+
<span id="prerequisites-instance_method"></span>
|
1579
|
+
<div class="method_details ">
|
1580
|
+
<p class="signature " id="prerequisites-instance_method">
|
1581
|
+
|
1582
|
+
- (<tt>Object</tt>) <strong>prerequisites</strong> <span class="extras">(readonly)</span>
|
1583
|
+
|
1584
|
+
|
1585
|
+
|
1586
|
+
</p><div class="docstring">
|
1587
|
+
<div class="discussion">
|
1588
|
+
<p>
|
1589
|
+
Returns the value of attribute prerequisites
|
1590
|
+
</p>
|
1591
|
+
|
1592
|
+
|
1593
|
+
</div>
|
1594
|
+
</div>
|
1595
|
+
<div class="tags">
|
1596
|
+
|
1597
|
+
|
1598
|
+
</div><table class="source_code">
|
1599
|
+
<tr>
|
1600
|
+
<td>
|
1601
|
+
<pre class="lines">
|
1602
|
+
|
1603
|
+
|
1604
|
+
218
|
1605
|
+
219
|
1606
|
+
220</pre>
|
1607
|
+
</td>
|
1608
|
+
<td>
|
1609
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 218</span>
|
1610
|
+
|
1611
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_prerequisites'>prerequisites</span>
|
1612
|
+
<span class='ivar'>@prerequisites</span>
|
1613
|
+
<span class='kw'>end</span></pre>
|
1614
|
+
</td>
|
1615
|
+
</tr>
|
1616
|
+
</table>
|
1617
|
+
</div>
|
1618
|
+
|
1619
|
+
|
1620
|
+
<span id="rake_task_name=-instance_method"></span>
|
1621
|
+
<span id="rake_task_name-instance_method"></span>
|
1622
|
+
<div class="method_details ">
|
1623
|
+
<p class="signature " id="rake_task_name-instance_method">
|
1624
|
+
|
1625
|
+
- (<tt>Object</tt>) <strong>rake_task_name</strong>
|
1626
|
+
|
1627
|
+
|
1628
|
+
|
1629
|
+
</p><div class="docstring">
|
1630
|
+
<div class="discussion">
|
1631
|
+
<p>
|
1632
|
+
If the executable is configured as a Rake::Task, it will extract the
|
1633
|
+
Rake::Task[:name] property and apply it to this field.
|
1634
|
+
</p>
|
1635
|
+
<p>
|
1636
|
+
Concrete parameters can pull this value from their <tt>belongs_to</tt>
|
1637
|
+
parameter.
|
1638
|
+
</p>
|
1639
|
+
|
1640
|
+
|
1641
|
+
</div>
|
1642
|
+
</div>
|
1643
|
+
<div class="tags">
|
1644
|
+
|
1645
|
+
|
1646
|
+
</div><table class="source_code">
|
1647
|
+
<tr>
|
1648
|
+
<td>
|
1649
|
+
<pre class="lines">
|
1650
|
+
|
1651
|
+
|
1652
|
+
214
|
1653
|
+
215
|
1654
|
+
216</pre>
|
1655
|
+
</td>
|
1656
|
+
<td>
|
1657
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 214</span>
|
1658
|
+
|
1659
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_rake_task_name'>rake_task_name</span>
|
1660
|
+
<span class='ivar'>@rake_task_name</span>
|
1661
|
+
<span class='kw'>end</span></pre>
|
1662
|
+
</td>
|
1663
|
+
</tr>
|
1664
|
+
</table>
|
1665
|
+
</div>
|
1666
|
+
|
1667
|
+
</div>
|
1668
|
+
|
1669
|
+
|
1670
|
+
<div id="class_method_details" class="method_details_list">
|
1671
|
+
<h2>Class Method Details</h2>
|
1672
|
+
|
1673
|
+
|
1674
|
+
<div class="method_details first">
|
1675
|
+
<p class="signature first" id="add_param-class_method">
|
1676
|
+
|
1677
|
+
+ (<tt>Object</tt>) <strong>add_param</strong>(name, type, options = nil)
|
1678
|
+
|
1679
|
+
|
1680
|
+
|
1681
|
+
</p><div class="docstring">
|
1682
|
+
<div class="discussion">
|
1683
|
+
<p>
|
1684
|
+
<tt>add_param</tt> is the workhorse of the Task. This method is used to add
|
1685
|
+
new shell parameters to the executable interface.
|
1686
|
+
</p>
|
1687
|
+
<p>
|
1688
|
+
<tt>name</tt> is a symbol or string that represents the parameter that you
|
1689
|
+
would like to add such as :debug or :source_path.
|
1690
|
+
</p>
|
1691
|
+
<p>
|
1692
|
+
<tt>type</tt> is a class reference of the Executable::Param that
|
1693
|
+
you’d like to use. At the time of this writing, add_param will
|
1694
|
+
accept 2 class references that do not extend Param - String and File. The
|
1695
|
+
ParameterFactory will automatically resolve these to the correct data type
|
1696
|
+
when they are created.
|
1697
|
+
</p>
|
1698
|
+
<pre class="code ruby"><code>
|
1699
|
+
<span class='const'>Boolean</span> <span class='kw'>true</span> <span class='kw'>or</span> <span class='kw'>false</span>
|
1700
|
+
<span class='const'>File</span> <span class='const'>Path</span> <span class='id identifier rubyid_to'>to</span> <span class='id identifier rubyid_a'>a</span> <span class='id identifier rubyid_file'>file</span>
|
1701
|
+
<span class='const'>Number</span> <span class='const'>Any</span> <span class='id identifier rubyid_number'>number</span>
|
1702
|
+
<span class='const'>Path</span> <span class='const'>Path</span> <span class='id identifier rubyid_to'>to</span> <span class='id identifier rubyid_a'>a</span> <span class='id identifier rubyid_directory'>directory</span>
|
1703
|
+
<span class='const'>String</span> <span class='const'>Any</span> <span class='id identifier rubyid_string'>string</span> <span class='id identifier rubyid_value'>value</span>
|
1704
|
+
<span class='const'>Url</span> <span class='const'>Basic</span> <span class='const'>URL</span>
|
1705
|
+
|
1706
|
+
<span class='const'>Files</span> <span class='const'>Collection</span> <span class='id identifier rubyid_of'>of</span> <span class='id identifier rubyid_files'>files</span>
|
1707
|
+
<span class='const'>Paths</span> <span class='const'>Collection</span> <span class='id identifier rubyid_of'>of</span> <span class='id identifier rubyid_directories'>directories</span>
|
1708
|
+
<span class='const'>Strings</span> <span class='const'>Collection</span> <span class='id identifier rubyid_of'>of</span> <span class='id identifier rubyid_arbitrary'>arbitrary</span> <span class='id identifier rubyid_strings'>strings</span>
|
1709
|
+
<span class='const'>Urls</span> <span class='const'>Collection</span> <span class='id identifier rubyid_of'>of</span> <span class='const'>URLs</span>
|
1710
|
+
</code></pre>
|
1711
|
+
<p>
|
1712
|
+
Be sure to check out the Sprout::Executable::Param class to learn more
|
1713
|
+
about working with executable parameters.
|
1714
|
+
</p>
|
1715
|
+
<p>
|
1716
|
+
Once parameters have been added using the <tt>add_param</tt> method,
|
1717
|
+
clients can set and get those parameters from any newly created executable
|
1718
|
+
instance, or from the command line.
|
1719
|
+
</p>
|
1720
|
+
<p>
|
1721
|
+
In the case of an executable delegate, parameter values will be sent to the
|
1722
|
+
command line executable in the order they are added using
|
1723
|
+
<tt>add_param</tt>.
|
1724
|
+
</p>
|
1725
|
+
<p>
|
1726
|
+
In the case of a Ruby executable, command line parameters will be
|
1727
|
+
interpreted in the order they are defined using <tt>add_param</tt>.
|
1728
|
+
</p>
|
1729
|
+
|
1730
|
+
|
1731
|
+
</div>
|
1732
|
+
</div>
|
1733
|
+
<div class="tags">
|
1734
|
+
|
1735
|
+
|
1736
|
+
</div><table class="source_code">
|
1737
|
+
<tr>
|
1738
|
+
<td>
|
1739
|
+
<pre class="lines">
|
1740
|
+
|
1741
|
+
|
1742
|
+
49
|
1743
|
+
50
|
1744
|
+
51
|
1745
|
+
52
|
1746
|
+
53
|
1747
|
+
54
|
1748
|
+
55
|
1749
|
+
56
|
1750
|
+
57
|
1751
|
+
58
|
1752
|
+
59
|
1753
|
+
60
|
1754
|
+
61
|
1755
|
+
62
|
1756
|
+
63
|
1757
|
+
64</pre>
|
1758
|
+
</td>
|
1759
|
+
<td>
|
1760
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 49</span>
|
1761
|
+
|
1762
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_add_param'>add_param</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span> <span class='comment'># :yields: Sprout::Executable::Param
|
1763
|
+
</span> <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='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>[DEPRECATED] add_param no longer uses closures, you can provide the same values as a hash in the optional last argument.</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
|
1764
|
+
<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='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>The first parameter (name:SymbolOrString) is required</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1765
|
+
<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='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>The second parameter (type:Class) is required</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1766
|
+
<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='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>The type parameter must be a Class by reference</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_type'>type</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Class</span><span class='rparen'>)</span>
|
1767
|
+
|
1768
|
+
<span class='id identifier rubyid_options'>options</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
1769
|
+
<span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span>
|
1770
|
+
<span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_type'>type</span>
|
1771
|
+
<span class='comment'># TODO: Integrate the RDOC-parsed parameter description here:
|
1772
|
+
</span> <span class='comment'>#options[:description] ||= Sprout::RDocParser.description_for_caller caller.shift
|
1773
|
+
</span>
|
1774
|
+
<span class='id identifier rubyid_create_param_accessors'>create_param_accessors</span> <span class='id identifier rubyid_options'>options</span>
|
1775
|
+
<span class='id identifier rubyid_static_parameter_collection'>static_parameter_collection</span> <span class='op'><<</span> <span class='id identifier rubyid_options'>options</span>
|
1776
|
+
<span class='id identifier rubyid_options'>options</span>
|
1777
|
+
<span class='kw'>end</span></pre>
|
1778
|
+
</td>
|
1779
|
+
</tr>
|
1780
|
+
</table>
|
1781
|
+
</div>
|
1782
|
+
|
1783
|
+
<div class="method_details ">
|
1784
|
+
<p class="signature " id="add_param_alias-class_method">
|
1785
|
+
|
1786
|
+
+ (<tt>Object</tt>) <strong>add_param_alias</strong>(new_name, old_name)
|
1787
|
+
|
1788
|
+
|
1789
|
+
|
1790
|
+
</p><table class="source_code">
|
1791
|
+
<tr>
|
1792
|
+
<td>
|
1793
|
+
<pre class="lines">
|
1794
|
+
|
1795
|
+
|
1796
|
+
66
|
1797
|
+
67
|
1798
|
+
68</pre>
|
1799
|
+
</td>
|
1800
|
+
<td>
|
1801
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 66</span>
|
1802
|
+
|
1803
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_add_param_alias'>add_param_alias</span> <span class='id identifier rubyid_new_name'>new_name</span><span class='comma'>,</span> <span class='id identifier rubyid_old_name'>old_name</span>
|
1804
|
+
<span class='id identifier rubyid_create_param_accessors'>create_param_accessors</span> <span class='symbol'>:name</span> <span class='op'>=></span> <span class='id identifier rubyid_new_name'>new_name</span><span class='comma'>,</span> <span class='symbol'>:real_name</span> <span class='op'>=></span> <span class='id identifier rubyid_old_name'>old_name</span>
|
1805
|
+
<span class='kw'>end</span></pre>
|
1806
|
+
</td>
|
1807
|
+
</tr>
|
1808
|
+
</table>
|
1809
|
+
</div>
|
1810
|
+
|
1811
|
+
<div class="method_details ">
|
1812
|
+
<p class="signature " id="set-class_method">
|
1813
|
+
|
1814
|
+
+ (<tt>Object</tt>) <strong>set</strong>(key, value)
|
1815
|
+
|
1816
|
+
|
1817
|
+
|
1818
|
+
</p><table class="source_code">
|
1819
|
+
<tr>
|
1820
|
+
<td>
|
1821
|
+
<pre class="lines">
|
1822
|
+
|
1823
|
+
|
1824
|
+
78
|
1825
|
+
79
|
1826
|
+
80</pre>
|
1827
|
+
</td>
|
1828
|
+
<td>
|
1829
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 78</span>
|
1830
|
+
|
1831
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_set'>set</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span>
|
1832
|
+
<span class='id identifier rubyid_set_default_value'>set_default_value</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span>
|
1833
|
+
<span class='kw'>end</span></pre>
|
1834
|
+
</td>
|
1835
|
+
</tr>
|
1836
|
+
</table>
|
1837
|
+
</div>
|
1838
|
+
|
1839
|
+
<div class="method_details ">
|
1840
|
+
<p class="signature " id="static_default_value_collection-class_method">
|
1841
|
+
|
1842
|
+
+ (<tt>Object</tt>) <strong>static_default_value_collection</strong>
|
1843
|
+
|
1844
|
+
|
1845
|
+
|
1846
|
+
</p><table class="source_code">
|
1847
|
+
<tr>
|
1848
|
+
<td>
|
1849
|
+
<pre class="lines">
|
1850
|
+
|
1851
|
+
|
1852
|
+
74
|
1853
|
+
75
|
1854
|
+
76</pre>
|
1855
|
+
</td>
|
1856
|
+
<td>
|
1857
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 74</span>
|
1858
|
+
|
1859
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_static_default_value_collection'>static_default_value_collection</span>
|
1860
|
+
<span class='ivar'>@static_default_value_collection</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
1861
|
+
<span class='kw'>end</span></pre>
|
1862
|
+
</td>
|
1863
|
+
</tr>
|
1864
|
+
</table>
|
1865
|
+
</div>
|
1866
|
+
|
1867
|
+
<div class="method_details ">
|
1868
|
+
<p class="signature " id="static_parameter_collection-class_method">
|
1869
|
+
|
1870
|
+
+ (<tt>Object</tt>) <strong>static_parameter_collection</strong>
|
1871
|
+
|
1872
|
+
|
1873
|
+
|
1874
|
+
</p><table class="source_code">
|
1875
|
+
<tr>
|
1876
|
+
<td>
|
1877
|
+
<pre class="lines">
|
1878
|
+
|
1879
|
+
|
1880
|
+
70
|
1881
|
+
71
|
1882
|
+
72</pre>
|
1883
|
+
</td>
|
1884
|
+
<td>
|
1885
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 70</span>
|
1886
|
+
|
1887
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_static_parameter_collection'>static_parameter_collection</span>
|
1888
|
+
<span class='ivar'>@static_parameter_collection</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
1889
|
+
<span class='kw'>end</span></pre>
|
1890
|
+
</td>
|
1891
|
+
</tr>
|
1892
|
+
</table>
|
1893
|
+
</div>
|
1894
|
+
|
1895
|
+
</div>
|
1896
|
+
|
1897
|
+
<div id="instance_method_details" class="method_details_list">
|
1898
|
+
<h2>Instance Method Details</h2>
|
1899
|
+
|
1900
|
+
|
1901
|
+
<div class="method_details first">
|
1902
|
+
<p class="signature first" id="binary_path-instance_method">
|
1903
|
+
|
1904
|
+
- (<tt>File</tt>) <strong>binary_path</strong>
|
1905
|
+
|
1906
|
+
|
1907
|
+
|
1908
|
+
</p><div class="docstring">
|
1909
|
+
<div class="discussion">
|
1910
|
+
<p>
|
1911
|
+
Path to the executable binary that should be executed.
|
1912
|
+
</p>
|
1913
|
+
|
1914
|
+
|
1915
|
+
</div>
|
1916
|
+
</div>
|
1917
|
+
<div class="tags">
|
1918
|
+
|
1919
|
+
<h3>Returns:</h3>
|
1920
|
+
<ul class="return">
|
1921
|
+
|
1922
|
+
<li>
|
1923
|
+
|
1924
|
+
|
1925
|
+
<span class='type'>(<tt>File</tt>)</span>
|
1926
|
+
|
1927
|
+
|
1928
|
+
|
1929
|
+
—
|
1930
|
+
<div class='inline'><p>
|
1931
|
+
Path to the executable binary that should be executed.
|
1932
|
+
</p>
|
1933
|
+
</div>
|
1934
|
+
|
1935
|
+
</li>
|
1936
|
+
|
1937
|
+
</ul>
|
1938
|
+
|
1939
|
+
</div><table class="source_code">
|
1940
|
+
<tr>
|
1941
|
+
<td>
|
1942
|
+
<pre class="lines">
|
1943
|
+
|
1944
|
+
|
1945
|
+
386
|
1946
|
+
387
|
1947
|
+
388</pre>
|
1948
|
+
</td>
|
1949
|
+
<td>
|
1950
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 386</span>
|
1951
|
+
|
1952
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_binary_path'>binary_path</span>
|
1953
|
+
<span class='ivar'>@binary_path</span> <span class='op'>||=</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Executable</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span><span class='lparen'>(</span><span class='id identifier rubyid_executable'>executable</span><span class='comma'>,</span> <span class='id identifier rubyid_pkg_name'>pkg_name</span><span class='comma'>,</span> <span class='id identifier rubyid_pkg_version'>pkg_version</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span>
|
1954
|
+
<span class='kw'>end</span></pre>
|
1955
|
+
</td>
|
1956
|
+
</tr>
|
1957
|
+
</table>
|
1958
|
+
</div>
|
1959
|
+
|
1960
|
+
<div class="method_details ">
|
1961
|
+
<p class="signature " id="binary_path=-instance_method">
|
1962
|
+
|
1963
|
+
- (<tt>File</tt>) <strong>binary_path=</strong>(path)
|
1964
|
+
|
1965
|
+
|
1966
|
+
|
1967
|
+
</p><div class="docstring">
|
1968
|
+
<div class="discussion">
|
1969
|
+
<p>
|
1970
|
+
Replace the binary that will be executed with a path to one of your
|
1971
|
+
choosing. This work is usually performed on the yielded instance from Rake
|
1972
|
+
like:
|
1973
|
+
</p>
|
1974
|
+
<pre class="code ruby"><code>
|
1975
|
+
<span class='id identifier rubyid_mxmlc'>mxmlc</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>bin/SomeProject.swf</span><span class='tstring_end'>'</span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_t'>t</span><span class='op'>|</span>
|
1976
|
+
<span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_input'>input</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>src/SomeProject.as</span><span class='tstring_end'>'</span></span>
|
1977
|
+
<span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_binary_path'>binary_path</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>vendor/sdks/4.1.0/bin/mxmlc</span><span class='tstring_end'>'</span></span>
|
1978
|
+
<span class='kw'>end</span>
|
1979
|
+
</code></pre>
|
1980
|
+
<p>
|
1981
|
+
It’s important to note that Windows systems will check the provided
|
1982
|
+
path for binaries of the same name that end with .exe and .bat and will use
|
1983
|
+
those in place of the provided name if they exist.
|
1984
|
+
</p>
|
1985
|
+
<p>
|
1986
|
+
For example, if you set <tt>binary_path</tt> to:
|
1987
|
+
</p>
|
1988
|
+
<pre class="code ruby"><code>
|
1989
|
+
<span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_binary_path'>binary_path</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>vendor/sdks/4.0.1/bin/mxmlc</span><span class='tstring_end'>'</span></span>
|
1990
|
+
</code></pre>
|
1991
|
+
<p>
|
1992
|
+
And there is a similarly-named file in the same directory, but named:
|
1993
|
+
</p>
|
1994
|
+
<pre class="code ruby"><code>
|
1995
|
+
vendor/sdks/4.0.1/bin/mxmlc.bat
|
1996
|
+
</code></pre>
|
1997
|
+
<p>
|
1998
|
+
Windows systems will execute this .bat file.
|
1999
|
+
</p>
|
2000
|
+
|
2001
|
+
|
2002
|
+
</div>
|
2003
|
+
</div>
|
2004
|
+
<div class="tags">
|
2005
|
+
<h3>Parameters:</h3>
|
2006
|
+
<ul class="param">
|
2007
|
+
|
2008
|
+
<li>
|
2009
|
+
|
2010
|
+
<span class='name'>path</span>
|
2011
|
+
|
2012
|
+
|
2013
|
+
<span class='type'>(<tt>File</tt>)</span>
|
2014
|
+
|
2015
|
+
|
2016
|
+
|
2017
|
+
—
|
2018
|
+
<div class='inline'><p>
|
2019
|
+
Path to the executable binary that should be executed instead of whatever
|
2020
|
+
Sprout.load would have provided. If a value is set here, Sprout.load will
|
2021
|
+
not be called.
|
2022
|
+
</p>
|
2023
|
+
</div>
|
2024
|
+
|
2025
|
+
</li>
|
2026
|
+
|
2027
|
+
</ul>
|
2028
|
+
|
2029
|
+
<h3>Returns:</h3>
|
2030
|
+
<ul class="return">
|
2031
|
+
|
2032
|
+
<li>
|
2033
|
+
|
2034
|
+
|
2035
|
+
<span class='type'>(<tt>File</tt>)</span>
|
2036
|
+
|
2037
|
+
|
2038
|
+
|
2039
|
+
—
|
2040
|
+
<div class='inline'><p>
|
2041
|
+
Path to the executable binary that should be executed.
|
2042
|
+
</p>
|
2043
|
+
</div>
|
2044
|
+
|
2045
|
+
</li>
|
2046
|
+
|
2047
|
+
</ul>
|
2048
|
+
|
2049
|
+
</div><table class="source_code">
|
2050
|
+
<tr>
|
2051
|
+
<td>
|
2052
|
+
<pre class="lines">
|
2053
|
+
|
2054
|
+
|
2055
|
+
380
|
2056
|
+
381
|
2057
|
+
382</pre>
|
2058
|
+
</td>
|
2059
|
+
<td>
|
2060
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 380</span>
|
2061
|
+
|
2062
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_binary_path='>binary_path=</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
2063
|
+
<span class='ivar'>@binary_path</span> <span class='op'>=</span> <span class='id identifier rubyid_path'>path</span>
|
2064
|
+
<span class='kw'>end</span></pre>
|
2065
|
+
</td>
|
2066
|
+
</tr>
|
2067
|
+
</table>
|
2068
|
+
</div>
|
2069
|
+
|
2070
|
+
<div class="method_details ">
|
2071
|
+
<p class="signature " id="create_outer_task-instance_method">
|
2072
|
+
|
2073
|
+
- (<tt>Object</tt>) <strong>create_outer_task</strong>(*args) <span class="extras">(protected)</span>
|
2074
|
+
|
2075
|
+
|
2076
|
+
|
2077
|
+
</p><div class="docstring">
|
2078
|
+
<div class="discussion">
|
2079
|
+
<p>
|
2080
|
+
Create the outer rake task. For most executables, this will be a
|
2081
|
+
Rake::File task, This is a template method that should be overridden for
|
2082
|
+
executables that do not result in the creation of a file.
|
2083
|
+
</p>
|
2084
|
+
|
2085
|
+
|
2086
|
+
</div>
|
2087
|
+
</div>
|
2088
|
+
<div class="tags">
|
2089
|
+
|
2090
|
+
|
2091
|
+
<h3>See Also:</h3>
|
2092
|
+
<ul class="see">
|
2093
|
+
|
2094
|
+
<li>update_rake_task_name_from_args</li>
|
2095
|
+
|
2096
|
+
</ul>
|
2097
|
+
|
2098
|
+
</div><table class="source_code">
|
2099
|
+
<tr>
|
2100
|
+
<td>
|
2101
|
+
<pre class="lines">
|
2102
|
+
|
2103
|
+
|
2104
|
+
417
|
2105
|
+
418
|
2106
|
+
419
|
2107
|
+
420
|
2108
|
+
421</pre>
|
2109
|
+
</td>
|
2110
|
+
<td>
|
2111
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 417</span>
|
2112
|
+
|
2113
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_create_outer_task'>create_outer_task</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span>
|
2114
|
+
<span class='const'>Rake</span><span class='op'>::</span><span class='const'>FileTask</span><span class='period'>.</span><span class='id identifier rubyid_define_task'>define_task</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span> <span class='kw'>do</span>
|
2115
|
+
<span class='id identifier rubyid_execute'>execute</span>
|
2116
|
+
<span class='kw'>end</span>
|
2117
|
+
<span class='kw'>end</span></pre>
|
2118
|
+
</td>
|
2119
|
+
</tr>
|
2120
|
+
</table>
|
2121
|
+
</div>
|
2122
|
+
|
2123
|
+
<div class="method_details ">
|
2124
|
+
<p class="signature " id="default_file_expression-instance_method">
|
2125
|
+
|
2126
|
+
- (<tt>Object</tt>) <strong>default_file_expression</strong>
|
2127
|
+
|
2128
|
+
|
2129
|
+
|
2130
|
+
</p><div class="docstring">
|
2131
|
+
<div class="discussion">
|
2132
|
+
<p>
|
2133
|
+
Called by Parameters like :path and :paths
|
2134
|
+
</p>
|
2135
|
+
|
2136
|
+
|
2137
|
+
</div>
|
2138
|
+
</div>
|
2139
|
+
<div class="tags">
|
2140
|
+
|
2141
|
+
|
2142
|
+
</div><table class="source_code">
|
2143
|
+
<tr>
|
2144
|
+
<td>
|
2145
|
+
<pre class="lines">
|
2146
|
+
|
2147
|
+
|
2148
|
+
345
|
2149
|
+
346
|
2150
|
+
347</pre>
|
2151
|
+
</td>
|
2152
|
+
<td>
|
2153
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 345</span>
|
2154
|
+
|
2155
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_default_file_expression'>default_file_expression</span>
|
2156
|
+
<span class='ivar'>@default_file_expression</span> <span class='op'>||=</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Executable</span><span class='op'>::</span><span class='const'>DEFAULT_FILE_EXPRESSION</span>
|
2157
|
+
<span class='kw'>end</span></pre>
|
2158
|
+
</td>
|
2159
|
+
</tr>
|
2160
|
+
</table>
|
2161
|
+
</div>
|
2162
|
+
|
2163
|
+
<div class="method_details ">
|
2164
|
+
<p class="signature " id="execute-instance_method">
|
2165
|
+
|
2166
|
+
- (<tt>Object</tt>) <strong>execute</strong>
|
2167
|
+
|
2168
|
+
|
2169
|
+
|
2170
|
+
</p><div class="docstring">
|
2171
|
+
<div class="discussion">
|
2172
|
+
<p>
|
2173
|
+
Execute the feature after calling parse with command line arguments.
|
2174
|
+
</p>
|
2175
|
+
<p>
|
2176
|
+
Subclasses will generally override this method if they are a Ruby
|
2177
|
+
executable, but if you’re just delegating to an external CLI
|
2178
|
+
application, calling execute will wind up executing the external process.
|
2179
|
+
</p>
|
2180
|
+
|
2181
|
+
|
2182
|
+
</div>
|
2183
|
+
</div>
|
2184
|
+
<div class="tags">
|
2185
|
+
|
2186
|
+
|
2187
|
+
</div><table class="source_code">
|
2188
|
+
<tr>
|
2189
|
+
<td>
|
2190
|
+
<pre class="lines">
|
2191
|
+
|
2192
|
+
|
2193
|
+
271
|
2194
|
+
272
|
2195
|
+
273
|
2196
|
+
274</pre>
|
2197
|
+
</td>
|
2198
|
+
<td>
|
2199
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 271</span>
|
2200
|
+
|
2201
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_execute'>execute</span>
|
2202
|
+
<span class='id identifier rubyid_prepare'>prepare</span>
|
2203
|
+
<span class='id identifier rubyid_execute_delegate'>execute_delegate</span>
|
2204
|
+
<span class='kw'>end</span></pre>
|
2205
|
+
</td>
|
2206
|
+
</tr>
|
2207
|
+
</table>
|
2208
|
+
</div>
|
2209
|
+
|
2210
|
+
<div class="method_details ">
|
2211
|
+
<p class="signature " id="execute_delegate-instance_method">
|
2212
|
+
|
2213
|
+
- (<tt>Object</tt>) <strong>execute_delegate</strong> <span class="extras">(protected)</span>
|
2214
|
+
|
2215
|
+
|
2216
|
+
|
2217
|
+
</p><div class="docstring">
|
2218
|
+
<div class="discussion">
|
2219
|
+
<p>
|
2220
|
+
Call the provided executable delegate.
|
2221
|
+
</p>
|
2222
|
+
<p>
|
2223
|
+
This method is generally called from Rake task wrappers.
|
2224
|
+
</p>
|
2225
|
+
|
2226
|
+
|
2227
|
+
</div>
|
2228
|
+
</div>
|
2229
|
+
<div class="tags">
|
2230
|
+
|
2231
|
+
|
2232
|
+
</div><table class="source_code">
|
2233
|
+
<tr>
|
2234
|
+
<td>
|
2235
|
+
<pre class="lines">
|
2236
|
+
|
2237
|
+
|
2238
|
+
397
|
2239
|
+
398
|
2240
|
+
399</pre>
|
2241
|
+
</td>
|
2242
|
+
<td>
|
2243
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 397</span>
|
2244
|
+
|
2245
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_execute_delegate'>execute_delegate</span>
|
2246
|
+
<span class='id identifier rubyid_system_execute'>system_execute</span> <span class='id identifier rubyid_binary_path'>binary_path</span><span class='comma'>,</span> <span class='id identifier rubyid_to_shell'>to_shell</span>
|
2247
|
+
<span class='kw'>end</span></pre>
|
2248
|
+
</td>
|
2249
|
+
</tr>
|
2250
|
+
</table>
|
2251
|
+
</div>
|
2252
|
+
|
2253
|
+
<div class="method_details ">
|
2254
|
+
<p class="signature " id="from_hash-instance_method">
|
2255
|
+
|
2256
|
+
- (<tt>Object</tt>) <strong>from_hash</strong>(hash)
|
2257
|
+
|
2258
|
+
|
2259
|
+
|
2260
|
+
</p><div class="docstring">
|
2261
|
+
<div class="discussion">
|
2262
|
+
<p>
|
2263
|
+
This will ignore unknown parameters, because our very first use case, is
|
2264
|
+
when generators call other generators and generator A might have different
|
2265
|
+
parameters than generator B.
|
2266
|
+
</p>
|
2267
|
+
|
2268
|
+
|
2269
|
+
</div>
|
2270
|
+
</div>
|
2271
|
+
<div class="tags">
|
2272
|
+
|
2273
|
+
|
2274
|
+
</div><table class="source_code">
|
2275
|
+
<tr>
|
2276
|
+
<td>
|
2277
|
+
<pre class="lines">
|
2278
|
+
|
2279
|
+
|
2280
|
+
315
|
2281
|
+
316
|
2282
|
+
317
|
2283
|
+
318
|
2284
|
+
319
|
2285
|
+
320
|
2286
|
+
321</pre>
|
2287
|
+
</td>
|
2288
|
+
<td>
|
2289
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 315</span>
|
2290
|
+
|
2291
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_from_hash'>from_hash</span> <span class='id identifier rubyid_hash'>hash</span>
|
2292
|
+
<span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
|
2293
|
+
<span class='kw'>if</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
2294
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span>
|
2295
|
+
<span class='kw'>end</span>
|
2296
|
+
<span class='kw'>end</span>
|
2297
|
+
<span class='kw'>end</span></pre>
|
2298
|
+
</td>
|
2299
|
+
</tr>
|
2300
|
+
</table>
|
2301
|
+
</div>
|
2302
|
+
|
2303
|
+
<div class="method_details ">
|
2304
|
+
<p class="signature " id="initialize_defaults-instance_method">
|
2305
|
+
|
2306
|
+
- (<tt>Object</tt>) <strong>initialize_defaults</strong> <span class="extras">(protected)</span>
|
2307
|
+
|
2308
|
+
|
2309
|
+
|
2310
|
+
</p><table class="source_code">
|
2311
|
+
<tr>
|
2312
|
+
<td>
|
2313
|
+
<pre class="lines">
|
2314
|
+
|
2315
|
+
|
2316
|
+
472
|
2317
|
+
473
|
2318
|
+
474
|
2319
|
+
475
|
2320
|
+
476
|
2321
|
+
477</pre>
|
2322
|
+
</td>
|
2323
|
+
<td>
|
2324
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 472</span>
|
2325
|
+
|
2326
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize_defaults'>initialize_defaults</span>
|
2327
|
+
<span class='id identifier rubyid_assembled_default_parameter_collection'>assembled_default_parameter_collection</span><span class='period'>.</span><span class='id identifier rubyid_reverse'>reverse</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_option'>option</span><span class='op'>|</span>
|
2328
|
+
<span class='comment'>#puts ">> updating default on: #{self} for: #{option[:name]} with: #{option[:value]}"
|
2329
|
+
</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_option'>option</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_option'>option</span><span class='lbracket'>[</span><span class='symbol'>:value</span><span class='rbracket'>]</span>
|
2330
|
+
<span class='kw'>end</span>
|
2331
|
+
<span class='kw'>end</span></pre>
|
2332
|
+
</td>
|
2333
|
+
</tr>
|
2334
|
+
</table>
|
2335
|
+
</div>
|
2336
|
+
|
2337
|
+
<div class="method_details ">
|
2338
|
+
<p class="signature " id="library_added-instance_method">
|
2339
|
+
|
2340
|
+
- (<tt>Object</tt>) <strong>library_added</strong>(path_or_paths) <span class="extras">(protected)</span>
|
2341
|
+
|
2342
|
+
|
2343
|
+
|
2344
|
+
</p><div class="docstring">
|
2345
|
+
<div class="discussion">
|
2346
|
+
<p>
|
2347
|
+
This method will generally be overridden by subclasses and they can do
|
2348
|
+
whatever customization is necessary for a particular library type.
|
2349
|
+
</p>
|
2350
|
+
<p>
|
2351
|
+
It’s important to note that this value can be a String path to a file
|
2352
|
+
(or folder), or it can be an Array of paths to files (or folders).
|
2353
|
+
</p>
|
2354
|
+
|
2355
|
+
|
2356
|
+
</div>
|
2357
|
+
</div>
|
2358
|
+
<div class="tags">
|
2359
|
+
|
2360
|
+
|
2361
|
+
</div><table class="source_code">
|
2362
|
+
<tr>
|
2363
|
+
<td>
|
2364
|
+
<pre class="lines">
|
2365
|
+
|
2366
|
+
|
2367
|
+
465
|
2368
|
+
466</pre>
|
2369
|
+
</td>
|
2370
|
+
<td>
|
2371
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 465</span>
|
2372
|
+
|
2373
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_library_added'>library_added</span> <span class='id identifier rubyid_path_or_paths'>path_or_paths</span>
|
2374
|
+
<span class='kw'>end</span></pre>
|
2375
|
+
</td>
|
2376
|
+
</tr>
|
2377
|
+
</table>
|
2378
|
+
</div>
|
2379
|
+
|
2380
|
+
<div class="method_details ">
|
2381
|
+
<p class="signature " id="parse!-instance_method">
|
2382
|
+
|
2383
|
+
- (<tt>Object</tt>) <strong>parse!</strong>(commandline_options)
|
2384
|
+
|
2385
|
+
|
2386
|
+
|
2387
|
+
</p><table class="source_code">
|
2388
|
+
<tr>
|
2389
|
+
<td>
|
2390
|
+
<pre class="lines">
|
2391
|
+
|
2392
|
+
|
2393
|
+
252
|
2394
|
+
253
|
2395
|
+
254
|
2396
|
+
255
|
2397
|
+
256
|
2398
|
+
257
|
2399
|
+
258
|
2400
|
+
259
|
2401
|
+
260</pre>
|
2402
|
+
</td>
|
2403
|
+
<td>
|
2404
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 252</span>
|
2405
|
+
|
2406
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_parse!'>parse!</span> <span class='id identifier rubyid_commandline_options'>commandline_options</span>
|
2407
|
+
<span class='kw'>begin</span>
|
2408
|
+
<span class='id identifier rubyid_option_parser'>option_parser</span><span class='period'>.</span><span class='id identifier rubyid_parse!'>parse!</span> <span class='id identifier rubyid_commandline_options'>commandline_options</span>
|
2409
|
+
<span class='id identifier rubyid_parse_extra_options!'>parse_extra_options!</span> <span class='id identifier rubyid_commandline_options'>commandline_options</span>
|
2410
|
+
<span class='id identifier rubyid_validate'>validate</span> <span class='kw'>unless</span> <span class='id identifier rubyid_help_requested?'>help_requested?</span> <span class='id identifier rubyid_commandline_options'>commandline_options</span>
|
2411
|
+
<span class='kw'>rescue</span> <span class='const'>StandardError</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
2412
|
+
<span class='id identifier rubyid_handle_parse_error'>handle_parse_error</span> <span class='id identifier rubyid_e'>e</span>
|
2413
|
+
<span class='kw'>end</span>
|
2414
|
+
<span class='kw'>end</span></pre>
|
2415
|
+
</td>
|
2416
|
+
</tr>
|
2417
|
+
</table>
|
2418
|
+
</div>
|
2419
|
+
|
2420
|
+
<div class="method_details ">
|
2421
|
+
<p class="signature " id="parse_extra_options!-instance_method">
|
2422
|
+
|
2423
|
+
- (<tt>Object</tt>) <strong>parse_extra_options!</strong>(options) <span class="extras">(protected)</span>
|
2424
|
+
|
2425
|
+
|
2426
|
+
|
2427
|
+
</p><table class="source_code">
|
2428
|
+
<tr>
|
2429
|
+
<td>
|
2430
|
+
<pre class="lines">
|
2431
|
+
|
2432
|
+
|
2433
|
+
446
|
2434
|
+
447
|
2435
|
+
448
|
2436
|
+
449
|
2437
|
+
450
|
2438
|
+
451
|
2439
|
+
452
|
2440
|
+
453
|
2441
|
+
454
|
2442
|
+
455</pre>
|
2443
|
+
</td>
|
2444
|
+
<td>
|
2445
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 446</span>
|
2446
|
+
|
2447
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_parse_extra_options!'>parse_extra_options!</span> <span class='id identifier rubyid_options'>options</span>
|
2448
|
+
<span class='id identifier rubyid_options'>options</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_value'>value</span><span class='op'>|</span>
|
2449
|
+
<span class='id identifier rubyid_params'>params</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_param'>param</span><span class='op'>|</span>
|
2450
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_param'>param</span><span class='period'>.</span><span class='id identifier rubyid_hidden_name?'>hidden_name?</span>
|
2451
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_param'>param</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span>
|
2452
|
+
<span class='kw'>break</span>
|
2453
|
+
<span class='kw'>end</span>
|
2454
|
+
<span class='kw'>end</span>
|
2455
|
+
<span class='kw'>end</span>
|
2456
|
+
<span class='kw'>end</span></pre>
|
2457
|
+
</td>
|
2458
|
+
</tr>
|
2459
|
+
</table>
|
2460
|
+
</div>
|
2461
|
+
|
2462
|
+
<div class="method_details ">
|
2463
|
+
<p class="signature " id="parse_rake_task_arg-instance_method">
|
2464
|
+
|
2465
|
+
- (<tt>Object</tt>) <strong>parse_rake_task_arg</strong>(arg) <span class="extras">(protected)</span>
|
2466
|
+
|
2467
|
+
|
2468
|
+
|
2469
|
+
</p><table class="source_code">
|
2470
|
+
<tr>
|
2471
|
+
<td>
|
2472
|
+
<pre class="lines">
|
2473
|
+
|
2474
|
+
|
2475
|
+
438
|
2476
|
+
439
|
2477
|
+
440
|
2478
|
+
441
|
2479
|
+
442
|
2480
|
+
443
|
2481
|
+
444</pre>
|
2482
|
+
</td>
|
2483
|
+
<td>
|
2484
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 438</span>
|
2485
|
+
|
2486
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_parse_rake_task_arg'>parse_rake_task_arg</span> <span class='id identifier rubyid_arg'>arg</span>
|
2487
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_arg'>arg</span> <span class='kw'>if</span> <span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Symbol</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span>
|
2488
|
+
<span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
|
2489
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_key'>key</span>
|
2490
|
+
<span class='kw'>end</span>
|
2491
|
+
<span class='kw'>nil</span>
|
2492
|
+
<span class='kw'>end</span></pre>
|
2493
|
+
</td>
|
2494
|
+
</tr>
|
2495
|
+
</table>
|
2496
|
+
</div>
|
2497
|
+
|
2498
|
+
<div class="method_details ">
|
2499
|
+
<p class="signature " id="prepare-instance_method">
|
2500
|
+
|
2501
|
+
- (<tt>Object</tt>) <strong>prepare</strong> <span class="extras">(protected)</span>
|
2502
|
+
|
2503
|
+
|
2504
|
+
|
2505
|
+
</p><table class="source_code">
|
2506
|
+
<tr>
|
2507
|
+
<td>
|
2508
|
+
<pre class="lines">
|
2509
|
+
|
2510
|
+
|
2511
|
+
401
|
2512
|
+
402
|
2513
|
+
403
|
2514
|
+
404
|
2515
|
+
405
|
2516
|
+
406
|
2517
|
+
407</pre>
|
2518
|
+
</td>
|
2519
|
+
<td>
|
2520
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 401</span>
|
2521
|
+
|
2522
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_prepare'>prepare</span>
|
2523
|
+
<span class='kw'>return</span> <span class='kw'>if</span> <span class='ivar'>@prepared</span>
|
2524
|
+
<span class='ivar'>@prepared</span> <span class='op'>=</span> <span class='kw'>true</span>
|
2525
|
+
<span class='id identifier rubyid_params'>params</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_param'>param</span><span class='op'>|</span>
|
2526
|
+
<span class='id identifier rubyid_param'>param</span><span class='period'>.</span><span class='id identifier rubyid_prepare'>prepare</span>
|
2527
|
+
<span class='kw'>end</span>
|
2528
|
+
<span class='kw'>end</span></pre>
|
2529
|
+
</td>
|
2530
|
+
</tr>
|
2531
|
+
</table>
|
2532
|
+
</div>
|
2533
|
+
|
2534
|
+
<div class="method_details ">
|
2535
|
+
<p class="signature " id="stderr-instance_method">
|
2536
|
+
|
2537
|
+
- (<tt>Object</tt>) <strong>stderr</strong>
|
2538
|
+
|
2539
|
+
|
2540
|
+
|
2541
|
+
</p><table class="source_code">
|
2542
|
+
<tr>
|
2543
|
+
<td>
|
2544
|
+
<pre class="lines">
|
2545
|
+
|
2546
|
+
|
2547
|
+
248
|
2548
|
+
249
|
2549
|
+
250</pre>
|
2550
|
+
</td>
|
2551
|
+
<td>
|
2552
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 248</span>
|
2553
|
+
|
2554
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_stderr'>stderr</span>
|
2555
|
+
<span class='ivar'>@stderr</span> <span class='op'>||=</span> <span class='const'>Sprout</span><span class='period'>.</span><span class='id identifier rubyid_stderr'>stderr</span>
|
2556
|
+
<span class='kw'>end</span></pre>
|
2557
|
+
</td>
|
2558
|
+
</tr>
|
2559
|
+
</table>
|
2560
|
+
</div>
|
2561
|
+
|
2562
|
+
<div class="method_details ">
|
2563
|
+
<p class="signature " id="stderr=-instance_method">
|
2564
|
+
|
2565
|
+
- (<tt>Object</tt>) <strong>stderr=</strong>(io)
|
2566
|
+
|
2567
|
+
|
2568
|
+
|
2569
|
+
</p><table class="source_code">
|
2570
|
+
<tr>
|
2571
|
+
<td>
|
2572
|
+
<pre class="lines">
|
2573
|
+
|
2574
|
+
|
2575
|
+
244
|
2576
|
+
245
|
2577
|
+
246</pre>
|
2578
|
+
</td>
|
2579
|
+
<td>
|
2580
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 244</span>
|
2581
|
+
|
2582
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_stderr='>stderr=</span><span class='lparen'>(</span><span class='id identifier rubyid_io'>io</span><span class='rparen'>)</span>
|
2583
|
+
<span class='ivar'>@stderr</span> <span class='op'>=</span> <span class='id identifier rubyid_io'>io</span>
|
2584
|
+
<span class='kw'>end</span></pre>
|
2585
|
+
</td>
|
2586
|
+
</tr>
|
2587
|
+
</table>
|
2588
|
+
</div>
|
2589
|
+
|
2590
|
+
<div class="method_details ">
|
2591
|
+
<p class="signature " id="stdout-instance_method">
|
2592
|
+
|
2593
|
+
- (<tt>Object</tt>) <strong>stdout</strong>
|
2594
|
+
|
2595
|
+
|
2596
|
+
|
2597
|
+
</p><table class="source_code">
|
2598
|
+
<tr>
|
2599
|
+
<td>
|
2600
|
+
<pre class="lines">
|
2601
|
+
|
2602
|
+
|
2603
|
+
240
|
2604
|
+
241
|
2605
|
+
242</pre>
|
2606
|
+
</td>
|
2607
|
+
<td>
|
2608
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 240</span>
|
2609
|
+
|
2610
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_stdout'>stdout</span>
|
2611
|
+
<span class='ivar'>@stdout</span> <span class='op'>||=</span> <span class='const'>Sprout</span><span class='period'>.</span><span class='id identifier rubyid_stdout'>stdout</span>
|
2612
|
+
<span class='kw'>end</span></pre>
|
2613
|
+
</td>
|
2614
|
+
</tr>
|
2615
|
+
</table>
|
2616
|
+
</div>
|
2617
|
+
|
2618
|
+
<div class="method_details ">
|
2619
|
+
<p class="signature " id="stdout=-instance_method">
|
2620
|
+
|
2621
|
+
- (<tt>Object</tt>) <strong>stdout=</strong>(io)
|
2622
|
+
|
2623
|
+
|
2624
|
+
|
2625
|
+
</p><table class="source_code">
|
2626
|
+
<tr>
|
2627
|
+
<td>
|
2628
|
+
<pre class="lines">
|
2629
|
+
|
2630
|
+
|
2631
|
+
236
|
2632
|
+
237
|
2633
|
+
238</pre>
|
2634
|
+
</td>
|
2635
|
+
<td>
|
2636
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 236</span>
|
2637
|
+
|
2638
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_stdout='>stdout=</span><span class='lparen'>(</span><span class='id identifier rubyid_io'>io</span><span class='rparen'>)</span>
|
2639
|
+
<span class='ivar'>@stdout</span> <span class='op'>=</span> <span class='id identifier rubyid_io'>io</span>
|
2640
|
+
<span class='kw'>end</span></pre>
|
2641
|
+
</td>
|
2642
|
+
</tr>
|
2643
|
+
</table>
|
2644
|
+
</div>
|
2645
|
+
|
2646
|
+
<div class="method_details ">
|
2647
|
+
<p class="signature " id="system_execute-instance_method">
|
2648
|
+
|
2649
|
+
- (<tt>Object</tt>) <strong>system_execute</strong>(binary, params) <span class="extras">(protected)</span>
|
2650
|
+
|
2651
|
+
|
2652
|
+
|
2653
|
+
</p><table class="source_code">
|
2654
|
+
<tr>
|
2655
|
+
<td>
|
2656
|
+
<pre class="lines">
|
2657
|
+
|
2658
|
+
|
2659
|
+
468
|
2660
|
+
469
|
2661
|
+
470</pre>
|
2662
|
+
</td>
|
2663
|
+
<td>
|
2664
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 468</span>
|
2665
|
+
|
2666
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_system_execute'>system_execute</span> <span class='id identifier rubyid_binary'>binary</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span>
|
2667
|
+
<span class='const'>Sprout</span><span class='period'>.</span><span class='id identifier rubyid_current_system'>current_system</span><span class='period'>.</span><span class='id identifier rubyid_execute'>execute</span> <span class='id identifier rubyid_binary'>binary</span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span>
|
2668
|
+
<span class='kw'>end</span></pre>
|
2669
|
+
</td>
|
2670
|
+
</tr>
|
2671
|
+
</table>
|
2672
|
+
</div>
|
2673
|
+
|
2674
|
+
<div class="method_details ">
|
2675
|
+
<p class="signature " id="to_hash-instance_method">
|
2676
|
+
|
2677
|
+
- (<tt>Object</tt>) <strong>to_hash</strong>
|
2678
|
+
|
2679
|
+
|
2680
|
+
|
2681
|
+
</p><div class="docstring">
|
2682
|
+
<div class="discussion">
|
2683
|
+
<p>
|
2684
|
+
This will create a hash of ONLY values that are created using
|
2685
|
+
<tt>add_param</tt>, properties that are created with attr_accessor must be
|
2686
|
+
handled manually, or patches are welcome!
|
2687
|
+
</p>
|
2688
|
+
|
2689
|
+
|
2690
|
+
</div>
|
2691
|
+
</div>
|
2692
|
+
<div class="tags">
|
2693
|
+
|
2694
|
+
|
2695
|
+
</div><table class="source_code">
|
2696
|
+
<tr>
|
2697
|
+
<td>
|
2698
|
+
<pre class="lines">
|
2699
|
+
|
2700
|
+
|
2701
|
+
302
|
2702
|
+
303
|
2703
|
+
304
|
2704
|
+
305
|
2705
|
+
306
|
2706
|
+
307
|
2707
|
+
308</pre>
|
2708
|
+
</td>
|
2709
|
+
<td>
|
2710
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 302</span>
|
2711
|
+
|
2712
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_hash'>to_hash</span>
|
2713
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
2714
|
+
<span class='id identifier rubyid_params'>params</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_param'>param</span><span class='op'>|</span>
|
2715
|
+
<span class='id identifier rubyid_result'>result</span><span class='lbracket'>[</span><span class='id identifier rubyid_param'>param</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</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_param'>param</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
2716
|
+
<span class='kw'>end</span>
|
2717
|
+
<span class='id identifier rubyid_result'>result</span>
|
2718
|
+
<span class='kw'>end</span></pre>
|
2719
|
+
</td>
|
2720
|
+
</tr>
|
2721
|
+
</table>
|
2722
|
+
</div>
|
2723
|
+
|
2724
|
+
<div class="method_details ">
|
2725
|
+
<p class="signature " id="to_help-instance_method">
|
2726
|
+
|
2727
|
+
- (<tt>Object</tt>) <strong>to_help</strong>
|
2728
|
+
|
2729
|
+
|
2730
|
+
|
2731
|
+
</p><table class="source_code">
|
2732
|
+
<tr>
|
2733
|
+
<td>
|
2734
|
+
<pre class="lines">
|
2735
|
+
|
2736
|
+
|
2737
|
+
323
|
2738
|
+
324
|
2739
|
+
325</pre>
|
2740
|
+
</td>
|
2741
|
+
<td>
|
2742
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 323</span>
|
2743
|
+
|
2744
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_help'>to_help</span>
|
2745
|
+
<span class='id identifier rubyid_option_parser'>option_parser</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
2746
|
+
<span class='kw'>end</span></pre>
|
2747
|
+
</td>
|
2748
|
+
</tr>
|
2749
|
+
</table>
|
2750
|
+
</div>
|
2751
|
+
|
2752
|
+
<div class="method_details ">
|
2753
|
+
<p class="signature " id="to_rake-instance_method">
|
2754
|
+
|
2755
|
+
- (<tt>Object</tt>) <strong>to_rake</strong>(*args) {|_self| ... }
|
2756
|
+
|
2757
|
+
|
2758
|
+
|
2759
|
+
</p><div class="docstring">
|
2760
|
+
<div class="discussion">
|
2761
|
+
|
2762
|
+
|
2763
|
+
</div>
|
2764
|
+
</div>
|
2765
|
+
<div class="tags">
|
2766
|
+
|
2767
|
+
<h3>Yields:</h3>
|
2768
|
+
<ul class="yield">
|
2769
|
+
|
2770
|
+
<li>
|
2771
|
+
|
2772
|
+
|
2773
|
+
<span class='type'>(<tt>_self</tt>)</span>
|
2774
|
+
|
2775
|
+
|
2776
|
+
|
2777
|
+
</li>
|
2778
|
+
|
2779
|
+
</ul>
|
2780
|
+
<h3>Yield Parameters:</h3>
|
2781
|
+
<ul class="yieldparam">
|
2782
|
+
|
2783
|
+
<li>
|
2784
|
+
|
2785
|
+
<span class='name'>_self</span>
|
2786
|
+
|
2787
|
+
|
2788
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Sprout::Executable::Base (class)">Sprout::Executable::Base</a></span></tt>)</span>
|
2789
|
+
|
2790
|
+
|
2791
|
+
|
2792
|
+
—
|
2793
|
+
<div class='inline'><p>
|
2794
|
+
the object that the method was called on
|
2795
|
+
</p>
|
2796
|
+
</div>
|
2797
|
+
|
2798
|
+
</li>
|
2799
|
+
|
2800
|
+
</ul>
|
2801
|
+
|
2802
|
+
</div><table class="source_code">
|
2803
|
+
<tr>
|
2804
|
+
<td>
|
2805
|
+
<pre class="lines">
|
2806
|
+
|
2807
|
+
|
2808
|
+
276
|
2809
|
+
277
|
2810
|
+
278
|
2811
|
+
279
|
2812
|
+
280
|
2813
|
+
281
|
2814
|
+
282
|
2815
|
+
283
|
2816
|
+
284
|
2817
|
+
285
|
2818
|
+
286
|
2819
|
+
287
|
2820
|
+
288
|
2821
|
+
289
|
2822
|
+
290
|
2823
|
+
291
|
2824
|
+
292
|
2825
|
+
293
|
2826
|
+
294
|
2827
|
+
295
|
2828
|
+
296</pre>
|
2829
|
+
</td>
|
2830
|
+
<td>
|
2831
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 276</span>
|
2832
|
+
|
2833
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_rake'>to_rake</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span>
|
2834
|
+
<span class='comment'># Define the file task first - so that
|
2835
|
+
</span> <span class='comment'># desc blocks hook up to it...
|
2836
|
+
</span> <span class='id identifier rubyid_outer_task'>outer_task</span> <span class='op'>=</span> <span class='id identifier rubyid_create_outer_task'>create_outer_task</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span>
|
2837
|
+
<span class='id identifier rubyid_update_rake_task_name_from_args'>update_rake_task_name_from_args</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span>
|
2838
|
+
<span class='kw'>yield</span> <span class='kw'>self</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
|
2839
|
+
<span class='id identifier rubyid_prepare'>prepare</span>
|
2840
|
+
|
2841
|
+
<span class='comment'># TODO: Tried auto-updating with library
|
2842
|
+
</span> <span class='comment'># prerequisites, but this led to strange
|
2843
|
+
</span> <span class='comment'># behavior with multiple registrations.
|
2844
|
+
</span> <span class='id identifier rubyid_handle_library_prerequisites'>handle_library_prerequisites</span> <span class='id identifier rubyid_outer_task'>outer_task</span><span class='period'>.</span><span class='id identifier rubyid_prerequisites'>prerequisites</span>
|
2845
|
+
|
2846
|
+
<span class='comment'># Add the library resolution rake task
|
2847
|
+
</span> <span class='comment'># as a prerequisite
|
2848
|
+
</span> <span class='id identifier rubyid_outer_task'>outer_task</span><span class='period'>.</span><span class='id identifier rubyid_prerequisites'>prerequisites</span> <span class='op'><<</span> <span class='const'>Rake</span><span class='op'>::</span><span class='const'>Task</span><span class='period'>.</span><span class='id identifier rubyid_define_task'>define_task</span><span class='lparen'>(</span><span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Library</span><span class='op'>::</span><span class='const'>TASK_NAME</span><span class='rparen'>)</span>
|
2849
|
+
<span class='id identifier rubyid_prerequisites'>prerequisites</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_prereq'>prereq</span><span class='op'>|</span>
|
2850
|
+
<span class='id identifier rubyid_outer_task'>outer_task</span><span class='period'>.</span><span class='id identifier rubyid_prerequisites'>prerequisites</span> <span class='op'><<</span> <span class='id identifier rubyid_prereq'>prereq</span>
|
2851
|
+
<span class='kw'>end</span>
|
2852
|
+
<span class='id identifier rubyid_outer_task'>outer_task</span>
|
2853
|
+
<span class='kw'>end</span></pre>
|
2854
|
+
</td>
|
2855
|
+
</tr>
|
2856
|
+
</table>
|
2857
|
+
</div>
|
2858
|
+
|
2859
|
+
<div class="method_details ">
|
2860
|
+
<p class="signature " id="to_shell-instance_method">
|
2861
|
+
|
2862
|
+
- (<tt>Object</tt>) <strong>to_shell</strong>
|
2863
|
+
|
2864
|
+
|
2865
|
+
|
2866
|
+
</p><div class="docstring">
|
2867
|
+
<div class="discussion">
|
2868
|
+
<p>
|
2869
|
+
Create a string that represents this configured executable for shell
|
2870
|
+
execution
|
2871
|
+
</p>
|
2872
|
+
|
2873
|
+
|
2874
|
+
</div>
|
2875
|
+
</div>
|
2876
|
+
<div class="tags">
|
2877
|
+
|
2878
|
+
|
2879
|
+
</div><table class="source_code">
|
2880
|
+
<tr>
|
2881
|
+
<td>
|
2882
|
+
<pre class="lines">
|
2883
|
+
|
2884
|
+
|
2885
|
+
328
|
2886
|
+
329
|
2887
|
+
330
|
2888
|
+
331
|
2889
|
+
332
|
2890
|
+
333
|
2891
|
+
334
|
2892
|
+
335
|
2893
|
+
336
|
2894
|
+
337
|
2895
|
+
338
|
2896
|
+
339
|
2897
|
+
340</pre>
|
2898
|
+
</td>
|
2899
|
+
<td>
|
2900
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 328</span>
|
2901
|
+
|
2902
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_shell'>to_shell</span>
|
2903
|
+
<span class='kw'>return</span> <span class='ivar'>@to_shell_proc</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='ivar'>@to_shell_proc</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
2904
|
+
|
2905
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
2906
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'><<</span> <span class='ivar'>@prepended_args</span> <span class='kw'>unless</span> <span class='ivar'>@prepended_args</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
2907
|
+
<span class='id identifier rubyid_params'>params</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_param'>param</span><span class='op'>|</span>
|
2908
|
+
<span class='kw'>if</span><span class='lparen'>(</span><span class='id identifier rubyid_param'>param</span><span class='period'>.</span><span class='id identifier rubyid_visible?'>visible?</span><span class='rparen'>)</span>
|
2909
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'><<</span> <span class='id identifier rubyid_param'>param</span><span class='period'>.</span><span class='id identifier rubyid_to_shell'>to_shell</span>
|
2910
|
+
<span class='kw'>end</span>
|
2911
|
+
<span class='kw'>end</span>
|
2912
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'><<</span> <span class='ivar'>@appended_args</span> <span class='kw'>unless</span> <span class='ivar'>@appended_args</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
2913
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_result'>result</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>
|
2914
|
+
<span class='kw'>end</span></pre>
|
2915
|
+
</td>
|
2916
|
+
</tr>
|
2917
|
+
</table>
|
2918
|
+
</div>
|
2919
|
+
|
2920
|
+
<div class="method_details ">
|
2921
|
+
<p class="signature " id="update_rake_task_name_from_args-instance_method">
|
2922
|
+
|
2923
|
+
- (<tt>Object</tt>) <strong>update_rake_task_name_from_args</strong>(*args) <span class="extras">(protected)</span>
|
2924
|
+
|
2925
|
+
|
2926
|
+
|
2927
|
+
</p><div class="docstring">
|
2928
|
+
<div class="discussion">
|
2929
|
+
<p>
|
2930
|
+
This method will add the current task to the Rake CLEAN collection.
|
2931
|
+
</p>
|
2932
|
+
<p>
|
2933
|
+
Any Executable that does not create a Rake::File task should also override
|
2934
|
+
this method and prevent it from calling <tt>CLEAN.add</tt>.
|
2935
|
+
</p>
|
2936
|
+
|
2937
|
+
|
2938
|
+
</div>
|
2939
|
+
</div>
|
2940
|
+
<div class="tags">
|
2941
|
+
|
2942
|
+
|
2943
|
+
<h3>See Also:</h3>
|
2944
|
+
<ul class="see">
|
2945
|
+
|
2946
|
+
<li>create_outer_task</li>
|
2947
|
+
|
2948
|
+
</ul>
|
2949
|
+
|
2950
|
+
</div><table class="source_code">
|
2951
|
+
<tr>
|
2952
|
+
<td>
|
2953
|
+
<pre class="lines">
|
2954
|
+
|
2955
|
+
|
2956
|
+
432
|
2957
|
+
433
|
2958
|
+
434
|
2959
|
+
435
|
2960
|
+
436</pre>
|
2961
|
+
</td>
|
2962
|
+
<td>
|
2963
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/base.rb', line 432</span>
|
2964
|
+
|
2965
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_update_rake_task_name_from_args'>update_rake_task_name_from_args</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span>
|
2966
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_rake_task_name'>rake_task_name</span> <span class='op'>=</span> <span class='id identifier rubyid_parse_rake_task_arg'>parse_rake_task_arg</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span>
|
2967
|
+
<span class='const'>CLEAN</span><span class='period'>.</span><span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_rake_task_name'>rake_task_name</span><span class='rparen'>)</span>
|
2968
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_rake_task_name'>rake_task_name</span>
|
2969
|
+
<span class='kw'>end</span></pre>
|
2970
|
+
</td>
|
2971
|
+
</tr>
|
2972
|
+
</table>
|
2973
|
+
</div>
|
2974
|
+
|
2975
|
+
</div>
|
2976
|
+
|
2977
|
+
</div>
|
2978
|
+
|
2979
|
+
<div id="footer">
|
2980
|
+
Generated on Sun Mar 11 14:30:33 2012 by
|
2981
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2982
|
+
0.7.5 (ruby-1.9.2).
|
2983
|
+
</div>
|
2984
|
+
|
2985
|
+
</body>
|
2986
|
+
</html>
|