sprout 1.0.11.pre → 1.0.13.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/lib/sprout/executable.rb +37 -10
- data/lib/sprout/generator/base.rb +17 -0
- data/lib/sprout/ruby_feature.rb +1 -1
- data/lib/sprout/version.rb +1 -1
- data/rdoc/<.html +274 -0
- data/rdoc/Dir.html +387 -0
- data/rdoc/Object.html +344 -0
- data/rdoc/Sprout.html +440 -0
- data/rdoc/Sprout/ArchiveUnpacker.html +1045 -0
- data/rdoc/Sprout/Base.html +283 -0
- data/rdoc/Sprout/Base/ClassMethods.html +474 -0
- data/rdoc/Sprout/Concern.html +415 -0
- data/rdoc/Sprout/Errors.html +324 -0
- data/rdoc/Sprout/Errors/ArchiveUnpackerError.html +284 -0
- data/rdoc/Sprout/Errors/DestinationExistsError.html +286 -0
- data/rdoc/Sprout/Errors/DuplicateMemberError.html +284 -0
- data/rdoc/Sprout/Errors/ExecutableError.html +285 -0
- data/rdoc/Sprout/Errors/ExecutableRegistrationError.html +284 -0
- data/rdoc/Sprout/Errors/ExecutionError.html +284 -0
- data/rdoc/Sprout/Errors/GeneratorError.html +284 -0
- data/rdoc/Sprout/Errors/InvalidArgumentError.html +284 -0
- data/rdoc/Sprout/Errors/LoadError.html +284 -0
- data/rdoc/Sprout/Errors/MissingArgumentError.html +284 -0
- data/rdoc/Sprout/Errors/MissingExecutableError.html +284 -0
- data/rdoc/Sprout/Errors/MissingGeneratorError.html +285 -0
- data/rdoc/Sprout/Errors/MissingTemplateError.html +285 -0
- data/rdoc/Sprout/Errors/ProcessRunnerError.html +284 -0
- data/rdoc/Sprout/Errors/RemoteFileLoaderError.html +284 -0
- data/rdoc/Sprout/Errors/SproutError.html +284 -0
- data/rdoc/Sprout/Errors/UnknownArchiveType.html +285 -0
- data/rdoc/Sprout/Errors/UsageError.html +284 -0
- data/rdoc/Sprout/Errors/ValidationError.html +284 -0
- data/rdoc/Sprout/Errors/VersionRequirementNotMetError.html +284 -0
- data/rdoc/Sprout/Executable.html +549 -0
- data/rdoc/Sprout/Executable/Boolean.html +445 -0
- data/rdoc/Sprout/Executable/ClassMethods.html +713 -0
- data/rdoc/Sprout/Executable/CollectionParam.html +501 -0
- data/rdoc/Sprout/Executable/FileParam.html +512 -0
- data/rdoc/Sprout/Executable/Files.html +385 -0
- data/rdoc/Sprout/Executable/InstanceMethods.html +1597 -0
- data/rdoc/Sprout/Executable/Number.html +284 -0
- data/rdoc/Sprout/Executable/Param.html +1660 -0
- data/rdoc/Sprout/Executable/ParameterFactory.html +345 -0
- data/rdoc/Sprout/Executable/Path.html +339 -0
- data/rdoc/Sprout/Executable/Paths.html +339 -0
- data/rdoc/Sprout/Executable/StringParam.html +333 -0
- data/rdoc/Sprout/Executable/Strings.html +295 -0
- data/rdoc/Sprout/Executable/Url.html +284 -0
- data/rdoc/Sprout/Executable/Urls.html +284 -0
- data/rdoc/Sprout/FileTarget.html +660 -0
- data/rdoc/Sprout/Generator.html +643 -0
- data/rdoc/Sprout/Generator/Base.html +1143 -0
- data/rdoc/Sprout/Generator/Command.html +604 -0
- data/rdoc/Sprout/Generator/DirectoryManifest.html +561 -0
- data/rdoc/Sprout/Generator/FileManifest.html +545 -0
- data/rdoc/Sprout/Generator/Manifest.html +387 -0
- data/rdoc/Sprout/Generator/TemplateManifest.html +331 -0
- data/rdoc/Sprout/GeneratorGenerator.html +358 -0
- data/rdoc/Sprout/Library.html +646 -0
- data/rdoc/Sprout/LibraryGenerator.html +368 -0
- data/rdoc/Sprout/Log.html +281 -0
- data/rdoc/Sprout/Platform.html +610 -0
- data/rdoc/Sprout/ProcessRunner.html +1145 -0
- data/rdoc/Sprout/ProgressBar.html +281 -0
- data/rdoc/Sprout/ProgressBarImpl.html +281 -0
- data/rdoc/Sprout/ProgressBarManager.html +281 -0
- data/rdoc/Sprout/ProgressBarOutputStream.html +281 -0
- data/rdoc/Sprout/RDocParser.html +702 -0
- data/rdoc/Sprout/RemoteFileLoader.html +537 -0
- data/rdoc/Sprout/RemoteFileTarget.html +741 -0
- data/rdoc/Sprout/ReversedProgressBar.html +281 -0
- data/rdoc/Sprout/RubyFeature.html +324 -0
- data/rdoc/Sprout/RubyFeature/ClassMethods.html +821 -0
- data/rdoc/Sprout/RubyGenerator.html +576 -0
- data/rdoc/Sprout/Specification.html +915 -0
- data/rdoc/Sprout/System.html +383 -0
- data/rdoc/Sprout/System/BaseSystem.html +1173 -0
- data/rdoc/Sprout/System/JavaSystem.html +284 -0
- data/rdoc/Sprout/System/OSXSystem.html +419 -0
- data/rdoc/Sprout/System/ThreadMock.html +281 -0
- data/rdoc/Sprout/System/UnixSystem.html +583 -0
- data/rdoc/Sprout/System/VistaSystem.html +367 -0
- data/rdoc/Sprout/System/WinNixSystem.html +417 -0
- data/rdoc/Sprout/System/WinSystem.html +672 -0
- data/rdoc/Sprout/ToolGenerator.html +376 -0
- data/rdoc/Sprout/VERSION.html +274 -0
- data/rdoc/SproutTestCase.html +279 -0
- data/rdoc/String.html +411 -0
- data/rdoc/created.rid +61 -0
- data/rdoc/index.html +795 -0
- data/rdoc/lib/sprout/archive_unpacker_rb.html +56 -0
- data/rdoc/lib/sprout/base_rb.html +111 -0
- data/rdoc/lib/sprout/concern_rb.html +52 -0
- data/rdoc/lib/sprout/dir_rb.html +52 -0
- data/rdoc/lib/sprout/errors_rb.html +52 -0
- data/rdoc/lib/sprout/executable/boolean_rb.html +52 -0
- data/rdoc/lib/sprout/executable/collection_param_rb.html +52 -0
- data/rdoc/lib/sprout/executable/file_param_rb.html +52 -0
- data/rdoc/lib/sprout/executable/files_rb.html +52 -0
- data/rdoc/lib/sprout/executable/number_rb.html +52 -0
- data/rdoc/lib/sprout/executable/param_rb.html +52 -0
- data/rdoc/lib/sprout/executable/parameter_factory_rb.html +52 -0
- data/rdoc/lib/sprout/executable/path_rb.html +52 -0
- data/rdoc/lib/sprout/executable/paths_rb.html +52 -0
- data/rdoc/lib/sprout/executable/string_param_rb.html +52 -0
- data/rdoc/lib/sprout/executable/strings_rb.html +52 -0
- data/rdoc/lib/sprout/executable/url_rb.html +52 -0
- data/rdoc/lib/sprout/executable/urls_rb.html +52 -0
- data/rdoc/lib/sprout/executable_rb.html +78 -0
- data/rdoc/lib/sprout/file_target_rb.html +52 -0
- data/rdoc/lib/sprout/generator/base_rb.html +54 -0
- data/rdoc/lib/sprout/generator/command_rb.html +52 -0
- data/rdoc/lib/sprout/generator/directory_manifest_rb.html +52 -0
- data/rdoc/lib/sprout/generator/file_manifest_rb.html +52 -0
- data/rdoc/lib/sprout/generator/manifest_rb.html +52 -0
- data/rdoc/lib/sprout/generator/template_manifest_rb.html +52 -0
- data/rdoc/lib/sprout/generators/generator/generator_generator_rb.html +52 -0
- data/rdoc/lib/sprout/generators/generator/templates/generator_test_helper_rb.html +64 -0
- data/rdoc/lib/sprout/generators/library/library_generator_rb.html +52 -0
- data/rdoc/lib/sprout/generators/ruby/ruby_generator_rb.html +52 -0
- data/rdoc/lib/sprout/generators/ruby/templates/ruby_base_rb.html +54 -0
- data/rdoc/lib/sprout/generators/tool/tool_generator_rb.html +52 -0
- data/rdoc/lib/sprout/library_rb.html +52 -0
- data/rdoc/lib/sprout/log_rb.html +52 -0
- data/rdoc/lib/sprout/platform_rb.html +52 -0
- data/rdoc/lib/sprout/process_runner_rb.html +58 -0
- data/rdoc/lib/sprout/progress_bar_rb.html +72 -0
- data/rdoc/lib/sprout/rdoc_parser_rb.html +54 -0
- data/rdoc/lib/sprout/remote_file_loader_rb.html +54 -0
- data/rdoc/lib/sprout/remote_file_target_rb.html +52 -0
- data/rdoc/lib/sprout/ruby_feature_rb.html +52 -0
- data/rdoc/lib/sprout/specification_rb.html +52 -0
- data/rdoc/lib/sprout/string_rb.html +52 -0
- data/rdoc/lib/sprout/system/base_system_rb.html +52 -0
- data/rdoc/lib/sprout/system/java_system_rb.html +52 -0
- data/rdoc/lib/sprout/system/osx_system_rb.html +52 -0
- data/rdoc/lib/sprout/system/unix_system_rb.html +52 -0
- data/rdoc/lib/sprout/system/vista_system_rb.html +52 -0
- data/rdoc/lib/sprout/system/win_nix_system_rb.html +52 -0
- data/rdoc/lib/sprout/system/win_system_rb.html +52 -0
- data/rdoc/lib/sprout/system_rb.html +66 -0
- data/rdoc/lib/sprout/test/sprout_test_case_rb.html +57 -0
- data/rdoc/lib/sprout/version_rb.html +52 -0
- data/rdoc/lib/sprout_rb.html +54 -0
- data/rdoc/rdoc.css +706 -0
- data/test/fixtures/executable/mxmlc.rb +2 -2
- data/test/unit/executable_test.rb +13 -0
- data/test/unit/generator_test.rb +25 -2
- metadata +144 -3
@@ -0,0 +1,915 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Class: Sprout::Specification</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="../js/jquery.js" type="text/javascript"
|
13
|
+
charset="utf-8"></script>
|
14
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
15
|
+
charset="utf-8"></script>
|
16
|
+
<script src="../js/quicksearch.js" type="text/javascript"
|
17
|
+
charset="utf-8"></script>
|
18
|
+
<script src="../js/darkfish.js" type="text/javascript"
|
19
|
+
charset="utf-8"></script>
|
20
|
+
|
21
|
+
</head>
|
22
|
+
<body class="class">
|
23
|
+
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="home-metadata">
|
26
|
+
<div id="home-section" class="section">
|
27
|
+
<h3 class="section-header">
|
28
|
+
<a href="../index.html">Home</a>
|
29
|
+
<a href="../index.html#classes">Classes</a>
|
30
|
+
<a href="../index.html#methods">Methods</a>
|
31
|
+
</h3>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="file-metadata">
|
36
|
+
<div id="file-list-section" class="section">
|
37
|
+
<h3 class="section-header">In Files</h3>
|
38
|
+
<div class="section-body">
|
39
|
+
<ul>
|
40
|
+
|
41
|
+
<li><a href="../lib/sprout/specification_rb.html?TB_iframe=true&height=550&width=785"
|
42
|
+
class="thickbox" title="lib/sprout/specification.rb">lib/sprout/specification.rb</a></li>
|
43
|
+
|
44
|
+
</ul>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div id="class-metadata">
|
52
|
+
|
53
|
+
<!-- Parent Class -->
|
54
|
+
|
55
|
+
<div id="parent-class-section" class="section">
|
56
|
+
<h3 class="section-header">Parent</h3>
|
57
|
+
|
58
|
+
<p class="link"><a href="../Object.html">Object</a></p>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
|
62
|
+
|
63
|
+
<!-- Namespace Contents -->
|
64
|
+
|
65
|
+
|
66
|
+
<!-- Method Quickref -->
|
67
|
+
|
68
|
+
<div id="method-list-section" class="section">
|
69
|
+
<h3 class="section-header">Methods</h3>
|
70
|
+
<ul class="link-list">
|
71
|
+
|
72
|
+
<li><a href="#method-c-new">::new</a></li>
|
73
|
+
|
74
|
+
<li><a href="#method-i-add_file_target">#add_file_target</a></li>
|
75
|
+
|
76
|
+
<li><a href="#method-i-add_remote_file_target">#add_remote_file_target</a></li>
|
77
|
+
|
78
|
+
<li><a href="#method-i-configure_target">#configure_target</a></li>
|
79
|
+
|
80
|
+
<li><a href="#method-i-register_file_target">#register_file_target</a></li>
|
81
|
+
|
82
|
+
<li><a href="#method-i-register_items">#register_items</a></li>
|
83
|
+
|
84
|
+
</ul>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
|
88
|
+
<!-- Included Modules -->
|
89
|
+
|
90
|
+
</div>
|
91
|
+
|
92
|
+
<div id="project-metadata">
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<div id="classindex-section" class="section project-section">
|
97
|
+
<h3 class="section-header">Class Index
|
98
|
+
<span class="search-toggle"><img src="../images/find.png"
|
99
|
+
height="16" width="16" alt="[+]"
|
100
|
+
title="show/hide quicksearch" /></span></h3>
|
101
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
102
|
+
<fieldset>
|
103
|
+
<legend>Quicksearch</legend>
|
104
|
+
<input type="text" name="quicksearch" value=""
|
105
|
+
class="quicksearch-field" />
|
106
|
+
</fieldset>
|
107
|
+
</form>
|
108
|
+
|
109
|
+
<ul class="link-list">
|
110
|
+
|
111
|
+
<li><a href="../Sprout/ArchiveUnpacker.html">Sprout::ArchiveUnpacker</a></li>
|
112
|
+
|
113
|
+
<li><a href="../Sprout/Base.html">Sprout::Base</a></li>
|
114
|
+
|
115
|
+
<li><a href="../Sprout/Base/ClassMethods.html">Sprout::Base::ClassMethods</a></li>
|
116
|
+
|
117
|
+
<li><a href="../Sprout/Concern.html">Sprout::Concern</a></li>
|
118
|
+
|
119
|
+
<li><a href="../Sprout/Errors.html">Sprout::Errors</a></li>
|
120
|
+
|
121
|
+
<li><a href="../Sprout/Errors/ArchiveUnpackerError.html">Sprout::Errors::ArchiveUnpackerError</a></li>
|
122
|
+
|
123
|
+
<li><a href="../Sprout/Errors/DestinationExistsError.html">Sprout::Errors::DestinationExistsError</a></li>
|
124
|
+
|
125
|
+
<li><a href="../Sprout/Errors/DuplicateMemberError.html">Sprout::Errors::DuplicateMemberError</a></li>
|
126
|
+
|
127
|
+
<li><a href="../Sprout/Errors/ExecutableError.html">Sprout::Errors::ExecutableError</a></li>
|
128
|
+
|
129
|
+
<li><a href="../Sprout/Errors/ExecutableRegistrationError.html">Sprout::Errors::ExecutableRegistrationError</a></li>
|
130
|
+
|
131
|
+
<li><a href="../Sprout/Errors/ExecutionError.html">Sprout::Errors::ExecutionError</a></li>
|
132
|
+
|
133
|
+
<li><a href="../Sprout/Errors/GeneratorError.html">Sprout::Errors::GeneratorError</a></li>
|
134
|
+
|
135
|
+
<li><a href="../Sprout/Errors/InvalidArgumentError.html">Sprout::Errors::InvalidArgumentError</a></li>
|
136
|
+
|
137
|
+
<li><a href="../Sprout/Errors/LoadError.html">Sprout::Errors::LoadError</a></li>
|
138
|
+
|
139
|
+
<li><a href="../Sprout/Errors/MissingArgumentError.html">Sprout::Errors::MissingArgumentError</a></li>
|
140
|
+
|
141
|
+
<li><a href="../Sprout/Errors/MissingExecutableError.html">Sprout::Errors::MissingExecutableError</a></li>
|
142
|
+
|
143
|
+
<li><a href="../Sprout/Errors/MissingGeneratorError.html">Sprout::Errors::MissingGeneratorError</a></li>
|
144
|
+
|
145
|
+
<li><a href="../Sprout/Errors/MissingTemplateError.html">Sprout::Errors::MissingTemplateError</a></li>
|
146
|
+
|
147
|
+
<li><a href="../Sprout/Errors/ProcessRunnerError.html">Sprout::Errors::ProcessRunnerError</a></li>
|
148
|
+
|
149
|
+
<li><a href="../Sprout/Errors/RemoteFileLoaderError.html">Sprout::Errors::RemoteFileLoaderError</a></li>
|
150
|
+
|
151
|
+
<li><a href="../Sprout/Errors/SproutError.html">Sprout::Errors::SproutError</a></li>
|
152
|
+
|
153
|
+
<li><a href="../Sprout/Errors/UnknownArchiveType.html">Sprout::Errors::UnknownArchiveType</a></li>
|
154
|
+
|
155
|
+
<li><a href="../Sprout/Errors/UsageError.html">Sprout::Errors::UsageError</a></li>
|
156
|
+
|
157
|
+
<li><a href="../Sprout/Errors/ValidationError.html">Sprout::Errors::ValidationError</a></li>
|
158
|
+
|
159
|
+
<li><a href="../Sprout/Errors/VersionRequirementNotMetError.html">Sprout::Errors::VersionRequirementNotMetError</a></li>
|
160
|
+
|
161
|
+
<li><a href="../Sprout/Executable.html">Sprout::Executable</a></li>
|
162
|
+
|
163
|
+
<li><a href="../Sprout/Executable/Boolean.html">Sprout::Executable::Boolean</a></li>
|
164
|
+
|
165
|
+
<li><a href="../Sprout/Executable/ClassMethods.html">Sprout::Executable::ClassMethods</a></li>
|
166
|
+
|
167
|
+
<li><a href="../Sprout/Executable/CollectionParam.html">Sprout::Executable::CollectionParam</a></li>
|
168
|
+
|
169
|
+
<li><a href="../Sprout/Executable/FileParam.html">Sprout::Executable::FileParam</a></li>
|
170
|
+
|
171
|
+
<li><a href="../Sprout/Executable/Files.html">Sprout::Executable::Files</a></li>
|
172
|
+
|
173
|
+
<li><a href="../Sprout/Executable/InstanceMethods.html">Sprout::Executable::InstanceMethods</a></li>
|
174
|
+
|
175
|
+
<li><a href="../Sprout/Executable/Number.html">Sprout::Executable::Number</a></li>
|
176
|
+
|
177
|
+
<li><a href="../Sprout/Executable/Param.html">Sprout::Executable::Param</a></li>
|
178
|
+
|
179
|
+
<li><a href="../Sprout/Executable/ParameterFactory.html">Sprout::Executable::ParameterFactory</a></li>
|
180
|
+
|
181
|
+
<li><a href="../Sprout/Executable/Path.html">Sprout::Executable::Path</a></li>
|
182
|
+
|
183
|
+
<li><a href="../Sprout/Executable/Paths.html">Sprout::Executable::Paths</a></li>
|
184
|
+
|
185
|
+
<li><a href="../Sprout/Executable/StringParam.html">Sprout::Executable::StringParam</a></li>
|
186
|
+
|
187
|
+
<li><a href="../Sprout/Executable/Strings.html">Sprout::Executable::Strings</a></li>
|
188
|
+
|
189
|
+
<li><a href="../Sprout/Executable/Url.html">Sprout::Executable::Url</a></li>
|
190
|
+
|
191
|
+
<li><a href="../Sprout/Executable/Urls.html">Sprout::Executable::Urls</a></li>
|
192
|
+
|
193
|
+
<li><a href="../Sprout/FileTarget.html">Sprout::FileTarget</a></li>
|
194
|
+
|
195
|
+
<li><a href="../Sprout/Generator.html">Sprout::Generator</a></li>
|
196
|
+
|
197
|
+
<li><a href="../Sprout/Generator/Base.html">Sprout::Generator::Base</a></li>
|
198
|
+
|
199
|
+
<li><a href="../Sprout/Generator/Command.html">Sprout::Generator::Command</a></li>
|
200
|
+
|
201
|
+
<li><a href="../Sprout/Generator/DirectoryManifest.html">Sprout::Generator::DirectoryManifest</a></li>
|
202
|
+
|
203
|
+
<li><a href="../Sprout/Generator/FileManifest.html">Sprout::Generator::FileManifest</a></li>
|
204
|
+
|
205
|
+
<li><a href="../Sprout/Generator/Manifest.html">Sprout::Generator::Manifest</a></li>
|
206
|
+
|
207
|
+
<li><a href="../Sprout/Generator/TemplateManifest.html">Sprout::Generator::TemplateManifest</a></li>
|
208
|
+
|
209
|
+
<li><a href="../Sprout/GeneratorGenerator.html">Sprout::GeneratorGenerator</a></li>
|
210
|
+
|
211
|
+
<li><a href="../Sprout/Library.html">Sprout::Library</a></li>
|
212
|
+
|
213
|
+
<li><a href="../Sprout/LibraryGenerator.html">Sprout::LibraryGenerator</a></li>
|
214
|
+
|
215
|
+
<li><a href="../Sprout/Platform.html">Sprout::Platform</a></li>
|
216
|
+
|
217
|
+
<li><a href="../Sprout/ProcessRunner.html">Sprout::ProcessRunner</a></li>
|
218
|
+
|
219
|
+
<li><a href="../Sprout/RDocParser.html">Sprout::RDocParser</a></li>
|
220
|
+
|
221
|
+
<li><a href="../Sprout/RemoteFileLoader.html">Sprout::RemoteFileLoader</a></li>
|
222
|
+
|
223
|
+
<li><a href="../Sprout/RemoteFileTarget.html">Sprout::RemoteFileTarget</a></li>
|
224
|
+
|
225
|
+
<li><a href="../Sprout/RubyFeature.html">Sprout::RubyFeature</a></li>
|
226
|
+
|
227
|
+
<li><a href="../Sprout/RubyFeature/ClassMethods.html">Sprout::RubyFeature::ClassMethods</a></li>
|
228
|
+
|
229
|
+
<li><a href="../Sprout/RubyGenerator.html">Sprout::RubyGenerator</a></li>
|
230
|
+
|
231
|
+
<li><a href="../Sprout/Specification.html">Sprout::Specification</a></li>
|
232
|
+
|
233
|
+
<li><a href="../Sprout/System.html">Sprout::System</a></li>
|
234
|
+
|
235
|
+
<li><a href="../Sprout/System/BaseSystem.html">Sprout::System::BaseSystem</a></li>
|
236
|
+
|
237
|
+
<li><a href="../Sprout/System/JavaSystem.html">Sprout::System::JavaSystem</a></li>
|
238
|
+
|
239
|
+
<li><a href="../Sprout/System/OSXSystem.html">Sprout::System::OSXSystem</a></li>
|
240
|
+
|
241
|
+
<li><a href="../Sprout/System/UnixSystem.html">Sprout::System::UnixSystem</a></li>
|
242
|
+
|
243
|
+
<li><a href="../Sprout/System/VistaSystem.html">Sprout::System::VistaSystem</a></li>
|
244
|
+
|
245
|
+
<li><a href="../Sprout/System/WinNixSystem.html">Sprout::System::WinNixSystem</a></li>
|
246
|
+
|
247
|
+
<li><a href="../Sprout/System/WinSystem.html">Sprout::System::WinSystem</a></li>
|
248
|
+
|
249
|
+
<li><a href="../Sprout/ToolGenerator.html">Sprout::ToolGenerator</a></li>
|
250
|
+
|
251
|
+
<li><a href="../<.html"><</a></li>
|
252
|
+
|
253
|
+
<li><a href="../Dir.html">Dir</a></li>
|
254
|
+
|
255
|
+
<li><a href="../Object.html">Object</a></li>
|
256
|
+
|
257
|
+
<li><a href="../String.html">String</a></li>
|
258
|
+
|
259
|
+
</ul>
|
260
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
261
|
+
</div>
|
262
|
+
|
263
|
+
|
264
|
+
</div>
|
265
|
+
</div>
|
266
|
+
|
267
|
+
<div id="documentation">
|
268
|
+
<h1 class="class">Sprout::Specification</h1>
|
269
|
+
|
270
|
+
<div id="description">
|
271
|
+
<p>
|
272
|
+
Sprouts provides us with the ability to distribute source files,
|
273
|
+
precompiled libraries, and remote executables. It does all of this by
|
274
|
+
(ab)using RubyGems.
|
275
|
+
</p>
|
276
|
+
<p>
|
277
|
+
RubyGems gives us the ability to version-manage, and distribute arbitrary
|
278
|
+
text and binary payloads.
|
279
|
+
</p>
|
280
|
+
<p>
|
281
|
+
In order to support Flash development, we have one major problem that
|
282
|
+
RubyGems does not solve for us. This is the fact that many elements of our
|
283
|
+
executable chain are not open-source, and we do not have the rights to
|
284
|
+
directly distribute them.
|
285
|
+
</p>
|
286
|
+
<p>
|
287
|
+
This restriction means that many of our tools and dependencies cannot be
|
288
|
+
packaged and distributed <em>directly</em> within a RubyGem (or from any
|
289
|
+
server other than Adobe’s as a matter of fact).
|
290
|
+
</p>
|
291
|
+
<p>
|
292
|
+
In order to overcome this restriction, we have introduced a <a
|
293
|
+
href="Specification.html">Sprout::Specification</a>. This is a regular Ruby
|
294
|
+
file with regular Ruby code in it. The main idea behind this file, is that
|
295
|
+
it needs to be given a name and available in your load path.
|
296
|
+
</p>
|
297
|
+
<p>
|
298
|
+
Whenever a rake build task (<a
|
299
|
+
href="Executable.html">Sprout::Executable</a>) or library task, (<a
|
300
|
+
href="Library.html">Sprout::Library</a>) is encountered, it will call
|
301
|
+
Sprout::Executable.load or Sprout::Library.load (respectively).
|
302
|
+
</p>
|
303
|
+
<p>
|
304
|
+
These methods will attempt to <tt>require</tt> the provided specification
|
305
|
+
and - if it’s in your load path - the specification will be loaded,
|
306
|
+
and any relevant file targets will be returned.
|
307
|
+
</p>
|
308
|
+
<p>
|
309
|
+
There are many ways to get Ruby code into your load path. One of the
|
310
|
+
easiest to package it up in a RubyGem and configure the
|
311
|
+
<tt>require_paths</tt> parameter of your Gem::Specification.
|
312
|
+
</p>
|
313
|
+
<p>
|
314
|
+
<a
|
315
|
+
href="http://docs.rubygems.org/read/chapter/20#require_paths">docs.rubygems.org/read/chapter/20#require_paths</a>
|
316
|
+
</p>
|
317
|
+
<p>
|
318
|
+
To learn more about packaging RubyGems:
|
319
|
+
</p>
|
320
|
+
<p>
|
321
|
+
<a
|
322
|
+
href="http://docs.rubygems.org/read/chapter/20#page85">docs.rubygems.org/read/chapter/20#page85</a>
|
323
|
+
<a
|
324
|
+
href="http://rubygems.rubyforge.org/rdoc/Gem/Specification.html">rubygems.rubyforge.org/rdoc/Gem/Specification.html</a>
|
325
|
+
</p>
|
326
|
+
<p>
|
327
|
+
To learn more about published RubyGems:
|
328
|
+
</p>
|
329
|
+
<p>
|
330
|
+
<a
|
331
|
+
href="http://rubygems.org/pages/gem_docs">rubygems.org/pages/gem_docs</a>
|
332
|
+
</p>
|
333
|
+
<p>
|
334
|
+
To package a SWC library into a Sprout RubyGem, you would create a file
|
335
|
+
(usually) named [project_name.spec] in the root of the project.
|
336
|
+
</p>
|
337
|
+
<p>
|
338
|
+
This is your Gem::Specification.
|
339
|
+
</p>
|
340
|
+
<p>
|
341
|
+
You would also create a file named [projet_name.rb] and put that into the
|
342
|
+
root of the project or some other folder that you have added to the
|
343
|
+
Gem::Specification.require_paths parameter.
|
344
|
+
</p>
|
345
|
+
<h2>Example: Include a file directly in the RubyGem</h2>
|
346
|
+
<p>
|
347
|
+
In the case of AsUnit, this file would be named asunit4.rb and it’s
|
348
|
+
contents are as follows:
|
349
|
+
</p>
|
350
|
+
<pre>
|
351
|
+
Sprout::Specification.new do |s|
|
352
|
+
s.name = "asunit4"
|
353
|
+
s.version = "4.2.pre"
|
354
|
+
|
355
|
+
# Sprout Spec is no longer a wrapper to Gem::Specification...
|
356
|
+
#s.authors = ["Luke Bayes", "Ali Mills", "Robert Penner"]
|
357
|
+
#s.email = "asunit-users@lists.sourceforge.net"
|
358
|
+
#s.homepage = "http://asunit.org"
|
359
|
+
#s.summary = "The fastest and most flexible ActionScript unit test framework"
|
360
|
+
#s.description = <<EOS
|
361
|
+
#AsUnit is the only ActionScript unit test framework that
|
362
|
+
#supports every development and runtime environment that is currently available.
|
363
|
+
#This includes Flex 2, 3, 4, AIR 1 and 2, Flash Lite, and of course the
|
364
|
+
#Flash Authoring executable.
|
365
|
+
#EOS
|
366
|
+
|
367
|
+
s.add_file_target do |t|
|
368
|
+
t.platform = :universal
|
369
|
+
t.add_library :src, ['src', 'lib/as3reflection']
|
370
|
+
t.add_library :swc, 'ext/AsUnit-4.1.pre.swc'
|
371
|
+
end
|
372
|
+
|
373
|
+
end
|
374
|
+
|
375
|
+
</pre>
|
376
|
+
<h2>Example: Refer to files that are not in the RubyGem</h2>
|
377
|
+
<p>
|
378
|
+
For projects like the Flex SDK, we can’t distribute many of the
|
379
|
+
required files, so we can refer to these files in our <a
|
380
|
+
href="Specification.html">Sprout::Specification</a> as
|
381
|
+
<tt>remote_file_targets</tt>.
|
382
|
+
</p>
|
383
|
+
<pre>
|
384
|
+
# This is a sample Sprout Specification.
|
385
|
+
#
|
386
|
+
# This document describes the Flex 4 SDK in terms of the libraries and executables
|
387
|
+
# that is provides.
|
388
|
+
#
|
389
|
+
# Whenever this file is loaded (required) by a Ruby application that has already loaded
|
390
|
+
# the core sprout files, the remote_file_target will be downloaded and installed,
|
391
|
+
# and each executable and library will be available to any interested rake
|
392
|
+
# tasks.
|
393
|
+
#
|
394
|
+
# An example of how one might retrieve a path to the downloaded MXMLC executable is
|
395
|
+
# as follows:
|
396
|
+
#
|
397
|
+
# Sprout.get_executable :mxmlc, 'flex4sdk', '>= 4.0.pre'
|
398
|
+
#
|
399
|
+
Sprout::Specification.new do |s|
|
400
|
+
|
401
|
+
s.name = 'flex4sdk'
|
402
|
+
s.version = '4.0.pre'
|
403
|
+
|
404
|
+
s.add_remote_file_target do |t|
|
405
|
+
# Apply the windows-specific configuration:
|
406
|
+
t.platform = :universal
|
407
|
+
# Apply the shared platform configuration:
|
408
|
+
# Remote Archive:
|
409
|
+
t.archive_type = :zip
|
410
|
+
t.url = "http://download.macromedia.com/pub/labs/flex/4/flex4sdk_b2_100509.zip"
|
411
|
+
t.md5 = "6a0838c5cb33145fe88933778ddb966d"
|
412
|
+
|
413
|
+
# Executables: (add .exe suffix if it was passed in)
|
414
|
+
t.add_executable :aasdoc, "bin/aasdoc"
|
415
|
+
t.add_executable :acompc, "bin/acompc"
|
416
|
+
t.add_executable :adl, "bin/adl"
|
417
|
+
t.add_executable :adt, "bin/adt"
|
418
|
+
t.add_executable :amxmlc, "bin/amxmlc"
|
419
|
+
t.add_executable :asdoc, "bin/asdoc"
|
420
|
+
t.add_executable :compc, "bin/compc"
|
421
|
+
t.add_executable :copylocale, "bin/compc"
|
422
|
+
t.add_executable :digest, "bin/digest"
|
423
|
+
t.add_executable :fcsh, "bin/fcsh"
|
424
|
+
t.add_executable :fdb, "bin/fdb"
|
425
|
+
t.add_executable :mxmlc, "bin/mxmlc"
|
426
|
+
t.add_executable :optimizer, "bin/optimizer"
|
427
|
+
|
428
|
+
# Flex framework SWCs:
|
429
|
+
t.add_library :flex, "frameworks/libs/flex.swc"
|
430
|
+
t.add_library :flex4, "frameworks/libs/flex4.swc"
|
431
|
+
t.add_library :f_textlayout, "frameworks/libs/framework_textLayout.swc"
|
432
|
+
t.add_library :framework, "frameworks/libs/framework.swc"
|
433
|
+
t.add_library :rpc, "frameworks/libs/rpc.swc"
|
434
|
+
t.add_library :sparkskins, "frameworks/libs/sparkskins.swc"
|
435
|
+
t.add_library :textlayout, "frameworks/libs/textLayout.swc"
|
436
|
+
t.add_library :utilities, "frameworks/libs/utilities.swc"
|
437
|
+
t.add_library :playerglobal_9, "frameworks/libs/player/9/playerglobal.swc"
|
438
|
+
t.add_library :playerglobal_10, "frameworks/libs/player/10/playerglobal.swc"
|
439
|
+
|
440
|
+
# AsDoc templates:
|
441
|
+
t.add_library :asdoc_templates, "asdoc/templates"
|
442
|
+
|
443
|
+
# Locale-Specific Flex SWCs:
|
444
|
+
[
|
445
|
+
'da_DK', 'de_DE', 'en_US', 'es_ES', 'fi_FL', 'fr_FR', 'it_IT', 'ja_JP',
|
446
|
+
'ko_KR', 'nb_NO', 'nl_NL', 'pt_BR', 'ru_RU', 'sv_SE', 'zh_CN', 'zh_TW'
|
447
|
+
].each do |locale|
|
448
|
+
t.add_library "flex_4_#{locale}".to_sym, "frameworks/locale/#{locale}/flex4_rb.swc"
|
449
|
+
t.add_library "airframework_#{locale}".to_sym, "frameworks/locale/#{locale}/airframework_rb.swc"
|
450
|
+
t.add_library "framework_#{locale}".to_sym, "frameworks/locale/#{locale}/framework_rb.swc"
|
451
|
+
t.add_library "rpc_#{locale}".to_sym, "frameworks/locale/#{locale}/rpc_rb.swc"
|
452
|
+
end
|
453
|
+
end
|
454
|
+
end
|
455
|
+
|
456
|
+
</pre>
|
457
|
+
<h2>Example: Create custom downloads for each supported platform</h2>
|
458
|
+
<p>
|
459
|
+
For projects like the Flash Player itself, we need to refer to different
|
460
|
+
downloadable content for each supported platform.
|
461
|
+
</p>
|
462
|
+
<pre>
|
463
|
+
Sprout::Specification.new do |s|
|
464
|
+
s.name = "flashplayer"
|
465
|
+
s.version = "10.1.pre"
|
466
|
+
|
467
|
+
s.add_remote_file_target do |t|
|
468
|
+
t.platform = :macosx
|
469
|
+
t.archive_type = :zip
|
470
|
+
t.url = "http://download.macromedia.com/pub/flashplayer/updaters/10/flashplayer_10_sa_debug.app.zip"
|
471
|
+
t.md5 = "fb998833d0faf11f0c4f412643f63d3f"
|
472
|
+
t.add_executable :flashplayer, "Flash Player.app/Contents/MacOS/Flash Player"
|
473
|
+
end
|
474
|
+
|
475
|
+
s.add_remote_file_target do |t|
|
476
|
+
t.platform = :win32
|
477
|
+
t.archive_type = :exe
|
478
|
+
t.url = "http://download.macromedia.com/pub/flashplayer/updaters/10/flashplayer_10_sa_debug.exe"
|
479
|
+
t.md5 = "c364068fad3fed190983845a35e4ccdc"
|
480
|
+
t.add_executable :flashplayer, "flashplayer_10_sa_debug.exe"
|
481
|
+
end
|
482
|
+
|
483
|
+
s.add_remote_file_target do |t|
|
484
|
+
t.platform = :linux
|
485
|
+
t.archive_type = :tgz
|
486
|
+
t.url = "http://download.macromedia.com/pub/flashplayer/updaters/10/flash_player_10_linux_dev.tar.gz"
|
487
|
+
t.md5 = "67f5081cf7d122063b332ea3e59d838b"
|
488
|
+
t.add_executable :flashplayer, "flash_player_10_linux_dev/standalone/debugger/flashplayer"
|
489
|
+
end
|
490
|
+
end
|
491
|
+
|
492
|
+
</pre>
|
493
|
+
<h2>Packaging and Sharing</h2>
|
494
|
+
<p>
|
495
|
+
Public RubyGems are hosted at <a
|
496
|
+
href="http://rubygems.org.">rubygems.org.</a>
|
497
|
+
</p>
|
498
|
+
|
499
|
+
</div>
|
500
|
+
|
501
|
+
<!-- Constants -->
|
502
|
+
|
503
|
+
|
504
|
+
<!-- Attributes -->
|
505
|
+
|
506
|
+
<div id="attribute-method-details" class="method-section section">
|
507
|
+
<h3 class="section-header">Attributes</h3>
|
508
|
+
|
509
|
+
|
510
|
+
<div id="name-attribute-method" class="method-detail">
|
511
|
+
<a name="name"></a>
|
512
|
+
|
513
|
+
<a name="name="></a>
|
514
|
+
|
515
|
+
<div class="method-heading attribute-method-heading">
|
516
|
+
<span class="method-name">name</span><span
|
517
|
+
class="attribute-access-type">[RW]</span>
|
518
|
+
</div>
|
519
|
+
|
520
|
+
<div class="method-description">
|
521
|
+
|
522
|
+
|
523
|
+
|
524
|
+
</div>
|
525
|
+
</div>
|
526
|
+
|
527
|
+
<div id="version-attribute-method" class="method-detail">
|
528
|
+
<a name="version"></a>
|
529
|
+
|
530
|
+
<a name="version="></a>
|
531
|
+
|
532
|
+
<div class="method-heading attribute-method-heading">
|
533
|
+
<span class="method-name">version</span><span
|
534
|
+
class="attribute-access-type">[RW]</span>
|
535
|
+
</div>
|
536
|
+
|
537
|
+
<div class="method-description">
|
538
|
+
|
539
|
+
|
540
|
+
|
541
|
+
</div>
|
542
|
+
</div>
|
543
|
+
|
544
|
+
<div id="file-targets-attribute-method" class="method-detail">
|
545
|
+
<a name="file_targets"></a>
|
546
|
+
|
547
|
+
<div class="method-heading attribute-method-heading">
|
548
|
+
<span class="method-name">file_targets</span><span
|
549
|
+
class="attribute-access-type">[R]</span>
|
550
|
+
</div>
|
551
|
+
|
552
|
+
<div class="method-description">
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
</div>
|
557
|
+
</div>
|
558
|
+
|
559
|
+
<div id="load-path-attribute-method" class="method-detail">
|
560
|
+
<a name="load_path"></a>
|
561
|
+
|
562
|
+
<div class="method-heading attribute-method-heading">
|
563
|
+
<span class="method-name">load_path</span><span
|
564
|
+
class="attribute-access-type">[R]</span>
|
565
|
+
</div>
|
566
|
+
|
567
|
+
<div class="method-description">
|
568
|
+
|
569
|
+
|
570
|
+
|
571
|
+
</div>
|
572
|
+
</div>
|
573
|
+
|
574
|
+
</div>
|
575
|
+
|
576
|
+
|
577
|
+
<!-- Methods -->
|
578
|
+
|
579
|
+
<div id="public-class-method-details" class="method-section section">
|
580
|
+
<h3 class="section-header">Public Class Methods</h3>
|
581
|
+
|
582
|
+
|
583
|
+
<div id="new-method" class="method-detail ">
|
584
|
+
<a name="method-c-new"></a>
|
585
|
+
|
586
|
+
<div class="method-heading">
|
587
|
+
|
588
|
+
<span class="method-name">new</span><span
|
589
|
+
class="method-args">()</span>
|
590
|
+
<span class="method-click-advice">click to toggle source</span>
|
591
|
+
|
592
|
+
</div>
|
593
|
+
|
594
|
+
<div class="method-description">
|
595
|
+
|
596
|
+
<p>
|
597
|
+
Create a new <a href="Specification.html">Sprout::Specification</a>.
|
598
|
+
</p>
|
599
|
+
<p>
|
600
|
+
This method will yield the new <a
|
601
|
+
href="Specification.html">Sprout::Specification</a> to the provided block,
|
602
|
+
and delegate most configuration parameters to a <a
|
603
|
+
href="http://rubygems.rubyforge.org/rdoc/Gem/Specification.html">Gem::Specification</a>.
|
604
|
+
</p>
|
605
|
+
<p>
|
606
|
+
To learn more about what parameters are available and/or required, please
|
607
|
+
check out RubyGems documentation for their <a
|
608
|
+
href="http://rubygems.rubyforge.org/rdoc/Gem/Specification.html">Gem::Specification</a>.
|
609
|
+
</p>
|
610
|
+
|
611
|
+
|
612
|
+
|
613
|
+
<div class="method-source-code"
|
614
|
+
id="new-source">
|
615
|
+
<pre>
|
616
|
+
<span class="ruby-comment cmt"># File lib/sprout/specification.rb, line 99</span>
|
617
|
+
99: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
|
618
|
+
100: <span class="ruby-identifier">filename</span> = <span class="ruby-constant">Sprout</span>.<span class="ruby-identifier">file_from_caller</span> <span class="ruby-identifier">caller</span>.<span class="ruby-identifier">first</span>
|
619
|
+
101: <span class="ruby-ivar">@load_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span> <span class="ruby-identifier">filename</span>
|
620
|
+
102: <span class="ruby-ivar">@name</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">filename</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">'.rb'</span>, <span class="ruby-value str">''</span>)
|
621
|
+
103: <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
622
|
+
104: <span class="ruby-keyword kw">end</span></pre>
|
623
|
+
</div>
|
624
|
+
|
625
|
+
</div>
|
626
|
+
|
627
|
+
|
628
|
+
|
629
|
+
|
630
|
+
</div>
|
631
|
+
|
632
|
+
|
633
|
+
</div>
|
634
|
+
|
635
|
+
<div id="public-instance-method-details" class="method-section section">
|
636
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
637
|
+
|
638
|
+
|
639
|
+
<div id="add-file-target-method" class="method-detail ">
|
640
|
+
<a name="method-i-add_file_target"></a>
|
641
|
+
|
642
|
+
<div class="method-heading">
|
643
|
+
|
644
|
+
<span class="method-name">add_file_target</span><span
|
645
|
+
class="method-args">(&block)</span>
|
646
|
+
<span class="method-click-advice">click to toggle source</span>
|
647
|
+
|
648
|
+
</div>
|
649
|
+
|
650
|
+
<div class="method-description">
|
651
|
+
|
652
|
+
<p>
|
653
|
+
Add a file to the RubyGem itself. This is a great way to package smallish
|
654
|
+
libraries in either source or already-packaged form. For example, one might
|
655
|
+
add a SWC to a RubyGem library.
|
656
|
+
</p>
|
657
|
+
<p>
|
658
|
+
Each time this method is called, a new <a
|
659
|
+
href="FileTarget.html">Sprout::FileTarget</a> instance will be yielded to
|
660
|
+
the provided block, and added to a collection for packaging.
|
661
|
+
</p>
|
662
|
+
<pre>
|
663
|
+
Sprout::Specification.new do |s|
|
664
|
+
...
|
665
|
+
s.add_file_target do |t|
|
666
|
+
t.platform = :universal
|
667
|
+
t.add_executable :asdoc, 'bin/asdoc'
|
668
|
+
end
|
669
|
+
end</pre>
|
670
|
+
|
671
|
+
|
672
|
+
|
673
|
+
<div class="method-source-code"
|
674
|
+
id="add-file-target-source">
|
675
|
+
<pre>
|
676
|
+
<span class="ruby-comment cmt"># File lib/sprout/specification.rb, line 159</span>
|
677
|
+
159: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_file_target</span> &<span class="ruby-identifier">block</span>
|
678
|
+
160: <span class="ruby-identifier">target</span> = <span class="ruby-constant">FileTarget</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span>
|
679
|
+
161: <span class="ruby-identifier">configure_target</span> <span class="ruby-identifier">t</span>, &<span class="ruby-identifier">block</span>
|
680
|
+
162: <span class="ruby-keyword kw">end</span>
|
681
|
+
163: <span class="ruby-identifier">register_file_target</span> <span class="ruby-identifier">target</span>
|
682
|
+
164: <span class="ruby-keyword kw">end</span></pre>
|
683
|
+
</div>
|
684
|
+
|
685
|
+
</div>
|
686
|
+
|
687
|
+
|
688
|
+
|
689
|
+
|
690
|
+
</div>
|
691
|
+
|
692
|
+
|
693
|
+
<div id="add-remote-file-target-method" class="method-detail ">
|
694
|
+
<a name="method-i-add_remote_file_target"></a>
|
695
|
+
|
696
|
+
<div class="method-heading">
|
697
|
+
|
698
|
+
<span class="method-name">add_remote_file_target</span><span
|
699
|
+
class="method-args">(&block)</span>
|
700
|
+
<span class="method-click-advice">click to toggle source</span>
|
701
|
+
|
702
|
+
</div>
|
703
|
+
|
704
|
+
<div class="method-description">
|
705
|
+
|
706
|
+
<p>
|
707
|
+
Add a remote file target to this RubyGem so that when it is loaded, Sprouts
|
708
|
+
will go fetch this file from the network.
|
709
|
+
</p>
|
710
|
+
<p>
|
711
|
+
Each time this method is called, a new Sprout::RemoteFiletarget instance
|
712
|
+
will be yielded to the provided block and resolved after the block
|
713
|
+
completes.
|
714
|
+
</p>
|
715
|
+
<p>
|
716
|
+
After this block is evaluated, Sprouts will first check the collection of
|
717
|
+
env_names to see if the expected paths are available. If a valid env_name
|
718
|
+
is found, Sprouts will return the path to the requested executable from the
|
719
|
+
environment variable.
|
720
|
+
</p>
|
721
|
+
<p>
|
722
|
+
If no env_names are set, or the requested executable is not found within
|
723
|
+
any that are identified, Sprouts will check to see if the archive has
|
724
|
+
already been unpacked into the expected location:
|
725
|
+
</p>
|
726
|
+
<pre>
|
727
|
+
#{SPROUT_HOME}/cache/#{SPROUT_VERSION}/flex4sdk/#{md5}/4.0.pre
|
728
|
+
</pre>
|
729
|
+
<p>
|
730
|
+
If the archive been unpacked, Sprouts will return the path to the
|
731
|
+
requested executable.
|
732
|
+
</p>
|
733
|
+
<p>
|
734
|
+
If the archive has not been unpacked, Sprouts will check to see if the
|
735
|
+
archive has been downloaded to:
|
736
|
+
</p>
|
737
|
+
<pre>
|
738
|
+
#{SPROUT_HOME}/cache/#{SPROUT_VERSION}/flex4sdk/#{md5}.zip
|
739
|
+
</pre>
|
740
|
+
<p>
|
741
|
+
If the archive has been downloaded, it will be unpacked and the path to the
|
742
|
+
requested executable will be returned.
|
743
|
+
</p>
|
744
|
+
<p>
|
745
|
+
If the archive has not been downloaded, it will be downloaded, unpacked and
|
746
|
+
the path to the requested executable will be returned.
|
747
|
+
</p>
|
748
|
+
|
749
|
+
|
750
|
+
|
751
|
+
<div class="method-source-code"
|
752
|
+
id="add-remote-file-target-source">
|
753
|
+
<pre>
|
754
|
+
<span class="ruby-comment cmt"># File lib/sprout/specification.rb, line 137</span>
|
755
|
+
137: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_remote_file_target</span> &<span class="ruby-identifier">block</span>
|
756
|
+
138: <span class="ruby-identifier">target</span> = <span class="ruby-constant">RemoteFileTarget</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span>
|
757
|
+
139: <span class="ruby-identifier">configure_target</span> <span class="ruby-identifier">t</span>, &<span class="ruby-identifier">block</span>
|
758
|
+
140: <span class="ruby-keyword kw">end</span>
|
759
|
+
141: <span class="ruby-identifier">target</span>.<span class="ruby-identifier">resolve</span>
|
760
|
+
142: <span class="ruby-identifier">register_file_target</span> <span class="ruby-identifier">target</span>
|
761
|
+
143: <span class="ruby-keyword kw">end</span></pre>
|
762
|
+
</div>
|
763
|
+
|
764
|
+
</div>
|
765
|
+
|
766
|
+
|
767
|
+
|
768
|
+
|
769
|
+
</div>
|
770
|
+
|
771
|
+
|
772
|
+
</div>
|
773
|
+
|
774
|
+
<div id="private-instance-method-details" class="method-section section">
|
775
|
+
<h3 class="section-header">Private Instance Methods</h3>
|
776
|
+
|
777
|
+
|
778
|
+
<div id="configure-target-method" class="method-detail ">
|
779
|
+
<a name="method-i-configure_target"></a>
|
780
|
+
|
781
|
+
<div class="method-heading">
|
782
|
+
|
783
|
+
<span class="method-name">configure_target</span><span
|
784
|
+
class="method-args">(t, &block)</span>
|
785
|
+
<span class="method-click-advice">click to toggle source</span>
|
786
|
+
|
787
|
+
</div>
|
788
|
+
|
789
|
+
<div class="method-description">
|
790
|
+
|
791
|
+
|
792
|
+
|
793
|
+
|
794
|
+
|
795
|
+
<div class="method-source-code"
|
796
|
+
id="configure-target-source">
|
797
|
+
<pre>
|
798
|
+
<span class="ruby-comment cmt"># File lib/sprout/specification.rb, line 168</span>
|
799
|
+
168: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure_target</span> <span class="ruby-identifier">t</span>, &<span class="ruby-identifier">block</span>
|
800
|
+
169: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">load_path</span> = <span class="ruby-identifier">load_path</span>
|
801
|
+
170: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">pkg_name</span> = <span class="ruby-identifier">name</span>
|
802
|
+
171: <span class="ruby-identifier">t</span>.<span class="ruby-identifier">pkg_version</span> = <span class="ruby-identifier">version</span>
|
803
|
+
172: <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">t</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
804
|
+
173: <span class="ruby-keyword kw">end</span></pre>
|
805
|
+
</div>
|
806
|
+
|
807
|
+
</div>
|
808
|
+
|
809
|
+
|
810
|
+
|
811
|
+
|
812
|
+
</div>
|
813
|
+
|
814
|
+
|
815
|
+
<div id="register-file-target-method" class="method-detail ">
|
816
|
+
<a name="method-i-register_file_target"></a>
|
817
|
+
|
818
|
+
<div class="method-heading">
|
819
|
+
|
820
|
+
<span class="method-name">register_file_target</span><span
|
821
|
+
class="method-args">(target)</span>
|
822
|
+
<span class="method-click-advice">click to toggle source</span>
|
823
|
+
|
824
|
+
</div>
|
825
|
+
|
826
|
+
<div class="method-description">
|
827
|
+
|
828
|
+
|
829
|
+
|
830
|
+
|
831
|
+
|
832
|
+
<div class="method-source-code"
|
833
|
+
id="register-file-target-source">
|
834
|
+
<pre>
|
835
|
+
<span class="ruby-comment cmt"># File lib/sprout/specification.rb, line 175</span>
|
836
|
+
175: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register_file_target</span> <span class="ruby-identifier">target</span>
|
837
|
+
176: <span class="ruby-identifier">register_items</span> <span class="ruby-identifier">target</span>.<span class="ruby-identifier">executables</span>, <span class="ruby-constant">Sprout</span><span class="ruby-operator">::</span><span class="ruby-constant">Executable</span>, <span class="ruby-identifier">target</span>
|
838
|
+
177: <span class="ruby-comment cmt"># Reversing the libraries makes it so that definitions like:</span>
|
839
|
+
178: <span class="ruby-comment cmt">#</span>
|
840
|
+
179: <span class="ruby-comment cmt"># target.add_library :swc, 'abcd'</span>
|
841
|
+
180: <span class="ruby-comment cmt"># target.add_library :src, 'efgh'</span>
|
842
|
+
181: <span class="ruby-comment cmt"># </span>
|
843
|
+
182: <span class="ruby-comment cmt"># When loading, if no name is specified, the :swc will be</span>
|
844
|
+
183: <span class="ruby-comment cmt"># returned to clients.</span>
|
845
|
+
184: <span class="ruby-identifier">register_items</span> <span class="ruby-identifier">target</span>.<span class="ruby-identifier">libraries</span>, <span class="ruby-constant">Sprout</span><span class="ruby-operator">::</span><span class="ruby-constant">Library</span>, <span class="ruby-identifier">target</span>
|
846
|
+
185: <span class="ruby-keyword kw">end</span></pre>
|
847
|
+
</div>
|
848
|
+
|
849
|
+
</div>
|
850
|
+
|
851
|
+
|
852
|
+
|
853
|
+
|
854
|
+
</div>
|
855
|
+
|
856
|
+
|
857
|
+
<div id="register-items-method" class="method-detail ">
|
858
|
+
<a name="method-i-register_items"></a>
|
859
|
+
|
860
|
+
<div class="method-heading">
|
861
|
+
|
862
|
+
<span class="method-name">register_items</span><span
|
863
|
+
class="method-args">(collection, source, target)</span>
|
864
|
+
<span class="method-click-advice">click to toggle source</span>
|
865
|
+
|
866
|
+
</div>
|
867
|
+
|
868
|
+
<div class="method-description">
|
869
|
+
|
870
|
+
|
871
|
+
|
872
|
+
|
873
|
+
|
874
|
+
<div class="method-source-code"
|
875
|
+
id="register-items-source">
|
876
|
+
<pre>
|
877
|
+
<span class="ruby-comment cmt"># File lib/sprout/specification.rb, line 187</span>
|
878
|
+
187: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register_items</span> <span class="ruby-identifier">collection</span>, <span class="ruby-identifier">source</span>, <span class="ruby-identifier">target</span>
|
879
|
+
188: <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span>
|
880
|
+
189: <span class="ruby-identifier">item</span>.<span class="ruby-identifier">pkg_name</span> = <span class="ruby-identifier">target</span>.<span class="ruby-identifier">pkg_name</span>
|
881
|
+
190: <span class="ruby-identifier">item</span>.<span class="ruby-identifier">pkg_version</span> = <span class="ruby-identifier">target</span>.<span class="ruby-identifier">pkg_version</span>
|
882
|
+
191: <span class="ruby-identifier">source</span>.<span class="ruby-identifier">register</span> <span class="ruby-identifier">item</span>
|
883
|
+
192: <span class="ruby-keyword kw">end</span>
|
884
|
+
193: <span class="ruby-keyword kw">end</span></pre>
|
885
|
+
</div>
|
886
|
+
|
887
|
+
</div>
|
888
|
+
|
889
|
+
|
890
|
+
|
891
|
+
|
892
|
+
</div>
|
893
|
+
|
894
|
+
|
895
|
+
</div>
|
896
|
+
|
897
|
+
|
898
|
+
</div>
|
899
|
+
|
900
|
+
|
901
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
902
|
+
|
903
|
+
<p>Disabled; run with --debug to generate this.</p>
|
904
|
+
|
905
|
+
</div>
|
906
|
+
|
907
|
+
<div id="validator-badges">
|
908
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
909
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
910
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
911
|
+
</div>
|
912
|
+
|
913
|
+
</body>
|
914
|
+
</html>
|
915
|
+
|