sprout 1.0.35.pre → 1.1.2.pre

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

Potentially problematic release.


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

Files changed (234) hide show
  1. data/Gemfile +1 -1
  2. data/Gemfile.lock +0 -2
  3. data/README.textile +1 -1
  4. data/VERSION +1 -1
  5. data/lib/sprout/concern.rb +5 -7
  6. data/lib/sprout/daemon.rb +183 -143
  7. data/lib/sprout/executable/base.rb +564 -0
  8. data/lib/sprout/executable.rb +1 -550
  9. data/lib/sprout/generator/base.rb +2 -3
  10. data/lib/sprout/generator.rb +2 -1
  11. data/lib/sprout/generators/ruby/templates/ruby_base.rb +1 -2
  12. data/lib/sprout/library.rb +3 -3
  13. data/lib/sprout/output_buffer.rb +35 -0
  14. data/lib/sprout/process_runner.rb +68 -17
  15. data/lib/sprout/progress_bar.rb +5 -5
  16. data/lib/sprout/remote_file_target.rb +1 -1
  17. data/lib/sprout/system/base_system.rb +3 -3
  18. data/lib/sprout/system/unix_system.rb +1 -1
  19. data/lib/sprout/{test/sprout_test_case.rb → test_helper.rb} +214 -14
  20. data/lib/sprout/version.rb +1 -1
  21. data/lib/sprout.rb +133 -2
  22. data/rakefile.rb +2 -0
  23. data/test/fixtures/examples/echo_inputs.rb +1 -2
  24. data/test/fixtures/executable/fdb.rb +7 -9
  25. data/test/fixtures/executable/flex3sdk_gem/fdb +49 -18
  26. data/test/fixtures/executable/mxmlc.rb +1 -2
  27. data/test/fixtures/executable/subclass/executable_subclass.rb +0 -1
  28. data/test/fixtures/executable/subclass/executable_superclass.rb +1 -2
  29. data/test/fixtures/specification/flex4sdk.rb +35 -24
  30. data/test/unit/archive_unpacker_test.rb +1 -1
  31. data/test/unit/boolean_param_test.rb +1 -1
  32. data/test/unit/daemon_test.rb +35 -3
  33. data/test/unit/executable_option_parser_test.rb +2 -3
  34. data/test/unit/executable_param_test.rb +1 -1
  35. data/test/unit/executable_test.rb +8 -15
  36. data/test/unit/fake_other_executable.rb +1 -2
  37. data/test/unit/file_param_test.rb +1 -1
  38. data/test/unit/file_target_test.rb +1 -1
  39. data/test/unit/files_param_test.rb +1 -1
  40. data/test/unit/generator_generator_test.rb +1 -1
  41. data/test/unit/generator_test.rb +1 -1
  42. data/test/unit/library_generator_test.rb +1 -1
  43. data/test/unit/library_test.rb +1 -1
  44. data/test/unit/osx_system_test.rb +1 -1
  45. data/test/unit/path_param_test.rb +1 -1
  46. data/test/unit/paths_param_test.rb +1 -1
  47. data/test/unit/platform_test.rb +1 -1
  48. data/test/unit/process_runner_test.rb +1 -1
  49. data/test/unit/rdoc_parser_test.rb +1 -1
  50. data/test/unit/remote_file_loader_test.rb +1 -1
  51. data/test/unit/remote_file_target_test.rb +1 -1
  52. data/test/unit/ruby_feature_test.rb +1 -1
  53. data/test/unit/ruby_generator_test.rb +1 -1
  54. data/test/unit/specification_test.rb +8 -1
  55. data/test/unit/sprout_test.rb +2 -2
  56. data/test/unit/string_param_test.rb +1 -1
  57. data/test/unit/string_test.rb +1 -1
  58. data/test/unit/strings_param_test.rb +1 -1
  59. data/test/unit/test_helper.rb +33 -1
  60. data/test/unit/tool_generator_test.rb +1 -1
  61. data/test/unit/unix_system_test.rb +1 -1
  62. data/test/unit/user_test.rb +1 -1
  63. data/test/unit/vista_system_test.rb +1 -1
  64. data/test/unit/win_nix_system_test.rb +1 -1
  65. data/test/unit/win_system_test.rb +1 -1
  66. data/test-stderr.log +1 -0
  67. data/test-stdout.log +237 -0
  68. metadata +15 -190
  69. data/doc/Dir.html +0 -288
  70. data/doc/Rake/Task.html +0 -184
  71. data/doc/Sprout/ArchiveUnpacker.html +0 -1246
  72. data/doc/Sprout/Base/ClassMethods.html +0 -434
  73. data/doc/Sprout/Base.html +0 -126
  74. data/doc/Sprout/Concern.html +0 -353
  75. data/doc/Sprout/Daemon/ClassMethods.html +0 -244
  76. data/doc/Sprout/Daemon/InstanceMethods.html +0 -601
  77. data/doc/Sprout/Daemon.html +0 -166
  78. data/doc/Sprout/Errors/ArchiveUnpackerError.html +0 -125
  79. data/doc/Sprout/Errors/DestinationExistsError.html +0 -133
  80. data/doc/Sprout/Errors/DuplicateMemberError.html +0 -132
  81. data/doc/Sprout/Errors/ExecutableError.html +0 -125
  82. data/doc/Sprout/Errors/ExecutableRegistrationError.html +0 -132
  83. data/doc/Sprout/Errors/ExecutionError.html +0 -121
  84. data/doc/Sprout/Errors/GeneratorError.html +0 -125
  85. data/doc/Sprout/Errors/InvalidArgumentError.html +0 -132
  86. data/doc/Sprout/Errors/LoadError.html +0 -121
  87. data/doc/Sprout/Errors/MissingArgumentError.html +0 -132
  88. data/doc/Sprout/Errors/MissingExecutableError.html +0 -132
  89. data/doc/Sprout/Errors/MissingGeneratorError.html +0 -132
  90. data/doc/Sprout/Errors/MissingTemplateError.html +0 -132
  91. data/doc/Sprout/Errors/ProcessRunnerError.html +0 -121
  92. data/doc/Sprout/Errors/RemoteFileLoaderError.html +0 -110
  93. data/doc/Sprout/Errors/SproutError.html +0 -114
  94. data/doc/Sprout/Errors/UnknownArchiveType.html +0 -122
  95. data/doc/Sprout/Errors/UsageError.html +0 -121
  96. data/doc/Sprout/Errors/ValidationError.html +0 -121
  97. data/doc/Sprout/Errors/VersionRequirementNotMetError.html +0 -121
  98. data/doc/Sprout/Errors.html +0 -101
  99. data/doc/Sprout/Executable/Boolean.html +0 -483
  100. data/doc/Sprout/Executable/ClassMethods.html +0 -417
  101. data/doc/Sprout/Executable/CollectionParam.html +0 -483
  102. data/doc/Sprout/Executable/FileParam.html +0 -484
  103. data/doc/Sprout/Executable/Files.html +0 -292
  104. data/doc/Sprout/Executable/InstanceMethods.html +0 -2006
  105. data/doc/Sprout/Executable/Number.html +0 -141
  106. data/doc/Sprout/Executable/Param.html +0 -2818
  107. data/doc/Sprout/Executable/ParameterFactory.html +0 -232
  108. data/doc/Sprout/Executable/Path.html +0 -223
  109. data/doc/Sprout/Executable/Paths.html +0 -253
  110. data/doc/Sprout/Executable/StringParam.html +0 -213
  111. data/doc/Sprout/Executable/Strings.html +0 -167
  112. data/doc/Sprout/Executable/Url.html +0 -160
  113. data/doc/Sprout/Executable/Urls.html +0 -170
  114. data/doc/Sprout/Executable.html +0 -173
  115. data/doc/Sprout/FileTarget.html +0 -1109
  116. data/doc/Sprout/Generator/Base.html +0 -1626
  117. data/doc/Sprout/Generator/Command.html +0 -690
  118. data/doc/Sprout/Generator/DirectoryManifest.html +0 -476
  119. data/doc/Sprout/Generator/FileManifest.html +0 -572
  120. data/doc/Sprout/Generator/Manifest.html +0 -377
  121. data/doc/Sprout/Generator/TemplateManifest.html +0 -196
  122. data/doc/Sprout/Generator.html +0 -689
  123. data/doc/Sprout/GeneratorGenerator.html +0 -1018
  124. data/doc/Sprout/Library.html +0 -1141
  125. data/doc/Sprout/LibraryGenerator.html +0 -309
  126. data/doc/Sprout/Log.html +0 -496
  127. data/doc/Sprout/MXMLC.html +0 -6373
  128. data/doc/Sprout/Platform.html +0 -714
  129. data/doc/Sprout/ProcessRunner.html +0 -1352
  130. data/doc/Sprout/ProgressBar.html +0 -376
  131. data/doc/Sprout/ProgressBarImpl.html +0 -2119
  132. data/doc/Sprout/ProgressBarManager.html +0 -434
  133. data/doc/Sprout/ProgressBarOutputStream.html +0 -416
  134. data/doc/Sprout/RDocParser.html +0 -211
  135. data/doc/Sprout/RemoteFileLoader.html +0 -172
  136. data/doc/Sprout/RemoteFileTarget.html +0 -679
  137. data/doc/Sprout/ReversedProgressBar.html +0 -194
  138. data/doc/Sprout/RubyFeature/ClassMethods.html +0 -1065
  139. data/doc/Sprout/RubyFeature.html +0 -155
  140. data/doc/Sprout/RubyGenerator.html +0 -764
  141. data/doc/Sprout/Specification.html +0 -767
  142. data/doc/Sprout/System/BaseSystem.html +0 -1455
  143. data/doc/Sprout/System/JavaSystem.html +0 -122
  144. data/doc/Sprout/System/OSXSystem.html +0 -335
  145. data/doc/Sprout/System/ThreadMock.html +0 -193
  146. data/doc/Sprout/System/UnixSystem.html +0 -584
  147. data/doc/Sprout/System/VistaSystem.html +0 -251
  148. data/doc/Sprout/System/WinNixSystem.html +0 -325
  149. data/doc/Sprout/System/WinSystem.html +0 -571
  150. data/doc/Sprout/System.html +0 -191
  151. data/doc/Sprout/ToolGenerator.html +0 -931
  152. data/doc/Sprout/VERSION.html +0 -128
  153. data/doc/Sprout.html +0 -144
  154. data/doc/SproutTestCase.html +0 -1412
  155. data/doc/String.html +0 -286
  156. data/doc/_index.html +0 -1035
  157. data/doc/class_list.html +0 -36
  158. data/doc/css/common.css +0 -1
  159. data/doc/css/full_list.css +0 -53
  160. data/doc/css/style.css +0 -310
  161. data/doc/file.README.html +0 -96
  162. data/doc/file.archive_unpacker.html +0 -288
  163. data/doc/file.base.html +0 -208
  164. data/doc/file.base_system.html +0 -278
  165. data/doc/file.boolean.html +0 -135
  166. data/doc/file.collection_param.html +0 -139
  167. data/doc/file.command.html +0 -126
  168. data/doc/file.concern.html +0 -136
  169. data/doc/file.daemon.html +0 -309
  170. data/doc/file.dir.html +0 -76
  171. data/doc/file.directory_manifest.html +0 -122
  172. data/doc/file.errors.html +0 -147
  173. data/doc/file.executable.html +0 -638
  174. data/doc/file.file_manifest.html +0 -109
  175. data/doc/file.file_param.html +0 -120
  176. data/doc/file.file_target.html +0 -140
  177. data/doc/file.files.html +0 -85
  178. data/doc/file.generator.html +0 -296
  179. data/doc/file.generator_class.html +0 -72
  180. data/doc/file.generator_generator.html +0 -137
  181. data/doc/file.generator_test.html +0 -92
  182. data/doc/file.generator_test_helper.html +0 -67
  183. data/doc/file.java_system.html +0 -62
  184. data/doc/file.library.html +0 -291
  185. data/doc/file.library_generator.html +0 -74
  186. data/doc/file.log.html +0 -100
  187. data/doc/file.manifest.html +0 -67
  188. data/doc/file.mxmlc.html +0 -740
  189. data/doc/file.number.html +0 -67
  190. data/doc/file.osx_system.html +0 -79
  191. data/doc/file.param.html +0 -491
  192. data/doc/file.parameter_factory.html +0 -119
  193. data/doc/file.path.html +0 -81
  194. data/doc/file.paths.html +0 -80
  195. data/doc/file.platform.html +0 -124
  196. data/doc/file.process_runner.html +0 -224
  197. data/doc/file.progress_bar.html +0 -390
  198. data/doc/file.rdoc_parser.html +0 -145
  199. data/doc/file.remote_file_loader.html +0 -117
  200. data/doc/file.remote_file_target.html +0 -176
  201. data/doc/file.ruby_base.html +0 -64
  202. data/doc/file.ruby_feature.html +0 -244
  203. data/doc/file.ruby_generator.html +0 -118
  204. data/doc/file.ruby_input.html +0 -62
  205. data/doc/file.ruby_test_case.html +0 -78
  206. data/doc/file.ruby_test_helper.html +0 -61
  207. data/doc/file.specification.html +0 -248
  208. data/doc/file.sprout.html +0 -64
  209. data/doc/file.sprout_test_case.html +0 -280
  210. data/doc/file.string.html +0 -72
  211. data/doc/file.string_param.html +0 -76
  212. data/doc/file.strings.html +0 -71
  213. data/doc/file.system.html +0 -86
  214. data/doc/file.template_manifest.html +0 -67
  215. data/doc/file.tool.html +0 -92
  216. data/doc/file.tool_generator.html +0 -90
  217. data/doc/file.unix_system.html +0 -128
  218. data/doc/file.url.html +0 -71
  219. data/doc/file.urls.html +0 -70
  220. data/doc/file.version.html +0 -71
  221. data/doc/file.vista_system.html +0 -69
  222. data/doc/file.win_nix_system.html +0 -88
  223. data/doc/file.win_system.html +0 -129
  224. data/doc/file_list.html +0 -230
  225. data/doc/frames.html +0 -13
  226. data/doc/index.html +0 -96
  227. data/doc/js/app.js +0 -202
  228. data/doc/js/full_list.js +0 -149
  229. data/doc/js/jquery.js +0 -154
  230. data/doc/method_list.html +0 -3355
  231. data/doc/top-level-namespace.html +0 -192
  232. data/lib/sprout/base.rb +0 -121
  233. data/lib/sprout/log.rb +0 -46
  234. data/test/unit/sprout_test_helper.rb +0 -33
@@ -1,767 +0,0 @@
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 name="Content-Type" content="text/html; charset=utf-8" />
6
- <title>Class: Sprout::Specification</title>
7
- <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
8
- <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
9
-
10
- <script type="text/javascript" charset="utf-8">
11
- relpath = '..';
12
- if (relpath != '') relpath += '/';
13
- </script>
14
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
15
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
16
-
17
- </head>
18
- <body>
19
- <script type="text/javascript" charset="utf-8">
20
- if (window.top.frames.main) document.body.className = 'frames';
21
- </script>
22
-
23
- <div id="header">
24
- <div id="menu">
25
-
26
- <a href="../_index.html">Index (S)</a> &raquo;
27
- <span class='title'><span class='object_link'><a href="../Sprout.html" title="Sprout (module)">Sprout</a></span></span>
28
- &raquo;
29
- <span class="title">Specification</span>
30
-
31
-
32
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
33
- </div>
34
-
35
- <div id="search">
36
- <a id="class_list_link" href="#">Class List</a>
37
- <a id="method_list_link" href="#">Method List</a>
38
- <a id ="file_list_link" href="#">File List</a>
39
- </div>
40
-
41
- <div class="clear"></div>
42
- </div>
43
-
44
- <iframe id="search_frame"></iframe>
45
-
46
- <div id="content"><h1>Class: Sprout::Specification
47
-
48
-
49
-
50
- </h1>
51
-
52
- <dl class="box">
53
-
54
- <dt class="r1">Inherits:</dt>
55
- <dd class="r1">
56
- <span class="inheritName">Object</span>
57
-
58
- <ul class="fullTree">
59
- <li>Object</li>
60
-
61
- <li class="next">Sprout::Specification</li>
62
-
63
- </ul>
64
- <a href="#" class="inheritanceTree">show all</a>
65
-
66
- </dd>
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
- <dt class="r2 last">Defined in:</dt>
77
- <dd class="r2 last">lib/sprout/specification.rb</dd>
78
-
79
- </dl>
80
- <div class="clear"></div>
81
-
82
- <h2>Overview</h2><div class="docstring">
83
- <div class="discussion">
84
-
85
- <p>Sprouts provides us with the ability to distribute source files,
86
- precompiled libraries, and remote executables. It does all of this by
87
- (ab)using RubyGems.</p>
88
-
89
- <p>RubyGems gives us the ability to version-manage, and distribute arbitrary
90
- text and binary payloads.</p>
91
-
92
- <p>In order to support Flash development, we have one major problem that
93
- RubyGems does not solve for us. This is the fact that many elements of our
94
- executable chain are not open-source, and we do not have the rights to
95
- directly distribute them.</p>
96
-
97
- <p>This restriction means that many of our tools and dependencies cannot be
98
- packaged and distributed <em>directly</em> within a RubyGem (or from any
99
- server other than Adobe's as a matter of fact).</p>
100
-
101
- <p>In order to overcome this restriction, we have introduced a
102
- Sprout::Specification. This is a regular Ruby file with regular Ruby code
103
- in it. The main idea behind this file, is that it needs to be given a name
104
- and available in your load path.</p>
105
-
106
- <p>Whenever a rake build task (Sprout::Executable) or library task,
107
- (Sprout::Library) is encountered, it will call Sprout::Executable.load or
108
- Sprout::Library.load (respectively).</p>
109
-
110
- <p>These methods will attempt to <tt>require</tt> the provided specification
111
- and - if it's in your load path - the specification will be loaded, and any
112
- relevant file targets will be returned.</p>
113
-
114
- <p>There are many ways to get Ruby code into your load path. One of the
115
- easiest to package it up in a RubyGem and configure the
116
- <tt>require_paths</tt> parameter of your Gem::Specification.</p>
117
-
118
- <p><a
119
- href="http://docs.rubygems.org/read/chapter/20#require_paths">docs.rubygems.org/read/chapter/20#require_paths</a></p>
120
-
121
- <p>To learn more about packaging RubyGems:</p>
122
-
123
- <p><a
124
- href="http://docs.rubygems.org/read/chapter/20#page85">docs.rubygems.org/read/chapter/20#page85</a>
125
- <a
126
- href="http://rubygems.rubyforge.org/rdoc/Gem/Specification.html">rubygems.rubyforge.org/rdoc/Gem/Specification.html</a></p>
127
-
128
- <p>To learn more about published RubyGems:</p>
129
-
130
- <p><a
131
- href="http://rubygems.org/pages/gem_docs">rubygems.org/pages/gem_docs</a></p>
132
-
133
- <p>To package a SWC library into a Sprout RubyGem, you would create a file
134
- (usually) named [project_name.spec] in the root of the project.</p>
135
-
136
- <p>This is your Gem::Specification.</p>
137
-
138
- <p>You would also create a file named [projet_name.rb] and put that into the
139
- root of the project or some other folder that you have added to the
140
- Gem::Specification.require_paths parameter.</p>
141
-
142
- <h2>Example: Include a file directly in the RubyGem</h2>
143
-
144
- <p>In the case of AsUnit, this file would be named asunit4.rb and it's
145
- contents are as follows:</p>
146
-
147
- <pre class="code">:include:../../test/fixtures/specification/asunit4.rb</pre>
148
-
149
- <h2>Example: Refer to files that are not in the RubyGem</h2>
150
-
151
- <p>For projects like the Flex SDK, we can't distribute many of the required
152
- files, so we can refer to these files in our Sprout::Specification as
153
- <tt>remote_file_targets</tt>.</p>
154
-
155
- <pre class="code">:include:../../test/fixtures/specification/flex4sdk.rb</pre>
156
-
157
- <h2>Example: Create custom downloads for each supported platform</h2>
158
-
159
- <p>For projects like the Flash Player itself, we need to refer to different
160
- downloadable content for each supported platform.</p>
161
-
162
- <pre class="code">:include:../../test/fixtures/specification/flashplayer.rb</pre>
163
-
164
- <h2>Packaging and Sharing</h2>
165
-
166
- <p>Public RubyGems are hosted at <a
167
- href="http://rubygems.org">rubygems.org</a>.</p>
168
-
169
-
170
- </div>
171
- </div>
172
- <div class="tags">
173
-
174
- </div>
175
-
176
- <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
177
- <ul class="summary">
178
-
179
- <li class="public ">
180
- <span class="summary_signature">
181
-
182
- <a href="#file_targets-instance_method" title="#file_targets (instance method)">- (Object) <strong>file_targets</strong> </a>
183
-
184
-
185
-
186
- </span>
187
-
188
-
189
- <span class="note title readonly">readonly</span>
190
-
191
-
192
-
193
-
194
-
195
-
196
-
197
-
198
- <span class="summary_desc"><div class='inline'>
199
- <p>Returns the value of attribute file_targets.</p>
200
- </div></span>
201
-
202
- </li>
203
-
204
-
205
- <li class="public ">
206
- <span class="summary_signature">
207
-
208
- <a href="#load_path-instance_method" title="#load_path (instance method)">- (Object) <strong>load_path</strong> </a>
209
-
210
-
211
-
212
- </span>
213
-
214
-
215
- <span class="note title readonly">readonly</span>
216
-
217
-
218
-
219
-
220
-
221
-
222
-
223
-
224
- <span class="summary_desc"><div class='inline'>
225
- <p>Returns the value of attribute load_path.</p>
226
- </div></span>
227
-
228
- </li>
229
-
230
-
231
- <li class="public ">
232
- <span class="summary_signature">
233
-
234
- <a href="#name-instance_method" title="#name (instance method)">- (Object) <strong>name</strong> </a>
235
-
236
-
237
-
238
- </span>
239
-
240
-
241
-
242
-
243
-
244
-
245
-
246
-
247
-
248
-
249
-
250
- <span class="summary_desc"><div class='inline'>
251
- <p>Returns the value of attribute name.</p>
252
- </div></span>
253
-
254
- </li>
255
-
256
-
257
- <li class="public ">
258
- <span class="summary_signature">
259
-
260
- <a href="#version-instance_method" title="#version (instance method)">- (Object) <strong>version</strong> </a>
261
-
262
-
263
-
264
- </span>
265
-
266
-
267
-
268
-
269
-
270
-
271
-
272
-
273
-
274
-
275
-
276
- <span class="summary_desc"><div class='inline'>
277
- <p>Returns the value of attribute version.</p>
278
- </div></span>
279
-
280
- </li>
281
-
282
-
283
- </ul>
284
-
285
-
286
-
287
- <h2>
288
- Instance Method Summary
289
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
290
- </h2>
291
-
292
- <ul class="summary">
293
-
294
- <li class="public ">
295
- <span class="summary_signature">
296
-
297
- <a href="#add_file_target-instance_method" title="#add_file_target (instance method)">- (Object) <strong>add_file_target</strong>(&amp;block) </a>
298
-
299
-
300
-
301
- </span>
302
-
303
-
304
-
305
-
306
-
307
-
308
-
309
-
310
- <span class="summary_desc"><div class='inline'>
311
- <p>Add a file to the RubyGem itself.</p>
312
- </div></span>
313
-
314
- </li>
315
-
316
-
317
- <li class="public ">
318
- <span class="summary_signature">
319
-
320
- <a href="#add_remote_file_target-instance_method" title="#add_remote_file_target (instance method)">- (Object) <strong>add_remote_file_target</strong>(&amp;block) </a>
321
-
322
-
323
-
324
- </span>
325
-
326
-
327
-
328
-
329
-
330
-
331
-
332
-
333
- <span class="summary_desc"><div class='inline'>
334
- <p>Add a remote file target to this RubyGem so that when it is loaded, Sprouts
335
- will go fetch this file from the network.</p>
336
- </div></span>
337
-
338
- </li>
339
-
340
-
341
- <li class="public ">
342
- <span class="summary_signature">
343
-
344
- <a href="#initialize-instance_method" title="#initialize (instance method)">- (Specification) <strong>initialize</strong> {|_self| ... }</a>
345
-
346
-
347
-
348
- </span>
349
-
350
- <span class="note title constructor">constructor</span>
351
-
352
-
353
-
354
-
355
-
356
-
357
-
358
-
359
- <span class="summary_desc"><div class='inline'>
360
- <p>Create a new Sprout::Specification.</p>
361
- </div></span>
362
-
363
- </li>
364
-
365
-
366
- </ul>
367
-
368
-
369
- <div id="constructor_details" class="method_details_list">
370
- <h2>Constructor Details</h2>
371
-
372
- <div class="method_details first">
373
- <p class="signature first" id="initialize-instance_method">
374
-
375
- - (<tt><span class='object_link'><a href="" title="Sprout::Specification (class)">Specification</a></span></tt>) <strong>initialize</strong> {|_self| ... }
376
-
377
-
378
-
379
- </p><div class="docstring">
380
- <div class="discussion">
381
-
382
- <p>Create a new Sprout::Specification.</p>
383
-
384
- <p>This method will yield the new Sprout::Specification to the provided block,
385
- and delegate most configuration parameters to a <a
386
- href="http://rubygems.rubyforge.org/rdoc/Gem/Specification.html">Gem::Specification</a>.</p>
387
-
388
- <p>To learn more about what parameters are available and/or required, please
389
- check out RubyGems documentation for their <a
390
- href="http://rubygems.rubyforge.org/rdoc/Gem/Specification.html">Gem::Specification</a>.</p>
391
-
392
-
393
- </div>
394
- </div>
395
- <div class="tags">
396
- <h3>Yields:</h3>
397
- <ul class="yield">
398
-
399
- <li>
400
-
401
- <span class='type'>(<tt>_self</tt>)</span>
402
-
403
-
404
-
405
-
406
- </li>
407
-
408
- </ul>
409
- <h3>Yield Parameters:</h3>
410
- <ul class="yieldparam">
411
-
412
- <li>
413
-
414
- <span class='type'>(<tt><span class='object_link'><a href="" title="Sprout::Specification (class)">Sprout::Specification</a></span></tt>)</span>
415
-
416
-
417
- <span class='name'>_self</span>
418
-
419
-
420
-
421
- &mdash;
422
- <div class='inline'>
423
- <p>the object that the method was called on</p>
424
- </div>
425
-
426
- </li>
427
-
428
- </ul>
429
-
430
- </div><table class="source_code">
431
- <tr>
432
- <td>
433
- <pre class="lines">
434
-
435
-
436
- 99
437
- 100
438
- 101
439
- 102
440
- 103
441
- 104</pre>
442
- </td>
443
- <td>
444
- <pre class="code"><span class="info file"># File 'lib/sprout/specification.rb', line 99</span>
445
-
446
- <span class='kw'>def</span> <span class='id initialize'>initialize</span>
447
- <span class='id filename'>filename</span> <span class='op'>=</span> <span class='const'>Sprout</span><span class='period'>.</span><span class='id file_from_caller'>file_from_caller</span> <span class='id caller'>caller</span><span class='period'>.</span><span class='id first'>first</span>
448
- <span class='ivar'>@load_path</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id dirname'>dirname</span> <span class='id filename'>filename</span>
449
- <span class='ivar'>@name</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id basename'>basename</span><span class='lparen'>(</span><span class='id filename'>filename</span><span class='rparen'>)</span><span class='period'>.</span><span class='id gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.rb</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
450
- <span class='kw'>yield</span> <span class='kw'>self</span> <span class='kw'>if</span> <span class='id block_given?'>block_given?</span>
451
- <span class='kw'>end</span></pre>
452
- </td>
453
- </tr>
454
- </table>
455
- </div>
456
-
457
- </div>
458
-
459
- <div id="instance_attr_details" class="attr_details">
460
- <h2>Instance Attribute Details</h2>
461
-
462
-
463
- <span id=""></span>
464
- <span id="file_targets-instance_method"></span>
465
- <div class="method_details first">
466
- <p class="signature first" id="file_targets-instance_method">
467
-
468
- - (<tt>Object</tt>) <strong>file_targets</strong> <span class="extras">(readonly)</span>
469
-
470
-
471
-
472
- </p><div class="docstring">
473
- <div class="discussion">
474
-
475
- <p>Returns the value of attribute file_targets</p>
476
-
477
-
478
- </div>
479
- </div>
480
- <div class="tags">
481
-
482
- </div><table class="source_code">
483
- <tr>
484
- <td>
485
- <pre class="lines">
486
-
487
-
488
- 87
489
- 88
490
- 89</pre>
491
- </td>
492
- <td>
493
- <pre class="code"><span class="info file"># File 'lib/sprout/specification.rb', line 87</span>
494
-
495
- <span class='kw'>def</span> <span class='id file_targets'>file_targets</span>
496
- <span class='ivar'>@file_targets</span>
497
- <span class='kw'>end</span></pre>
498
- </td>
499
- </tr>
500
- </table>
501
- </div>
502
-
503
-
504
- <span id=""></span>
505
- <span id="load_path-instance_method"></span>
506
- <div class="method_details ">
507
- <p class="signature " id="load_path-instance_method">
508
-
509
- - (<tt>Object</tt>) <strong>load_path</strong> <span class="extras">(readonly)</span>
510
-
511
-
512
-
513
- </p><div class="docstring">
514
- <div class="discussion">
515
-
516
- <p>Returns the value of attribute load_path</p>
517
-
518
-
519
- </div>
520
- </div>
521
- <div class="tags">
522
-
523
- </div><table class="source_code">
524
- <tr>
525
- <td>
526
- <pre class="lines">
527
-
528
-
529
- 88
530
- 89
531
- 90</pre>
532
- </td>
533
- <td>
534
- <pre class="code"><span class="info file"># File 'lib/sprout/specification.rb', line 88</span>
535
-
536
- <span class='kw'>def</span> <span class='id load_path'>load_path</span>
537
- <span class='ivar'>@load_path</span>
538
- <span class='kw'>end</span></pre>
539
- </td>
540
- </tr>
541
- </table>
542
- </div>
543
-
544
-
545
- <span id="name=-instance_method"></span>
546
- <span id="name-instance_method"></span>
547
- <div class="method_details ">
548
- <p class="signature " id="name-instance_method">
549
-
550
- - (<tt>Object</tt>) <strong>name</strong>
551
-
552
-
553
-
554
- </p><div class="docstring">
555
- <div class="discussion">
556
-
557
- <p>Returns the value of attribute name</p>
558
-
559
-
560
- </div>
561
- </div>
562
- <div class="tags">
563
-
564
- </div><table class="source_code">
565
- <tr>
566
- <td>
567
- <pre class="lines">
568
-
569
-
570
- 84
571
- 85
572
- 86</pre>
573
- </td>
574
- <td>
575
- <pre class="code"><span class="info file"># File 'lib/sprout/specification.rb', line 84</span>
576
-
577
- <span class='kw'>def</span> <span class='id name'>name</span>
578
- <span class='ivar'>@name</span>
579
- <span class='kw'>end</span></pre>
580
- </td>
581
- </tr>
582
- </table>
583
- </div>
584
-
585
-
586
- <span id="version=-instance_method"></span>
587
- <span id="version-instance_method"></span>
588
- <div class="method_details ">
589
- <p class="signature " id="version-instance_method">
590
-
591
- - (<tt>Object</tt>) <strong>version</strong>
592
-
593
-
594
-
595
- </p><div class="docstring">
596
- <div class="discussion">
597
-
598
- <p>Returns the value of attribute version</p>
599
-
600
-
601
- </div>
602
- </div>
603
- <div class="tags">
604
-
605
- </div><table class="source_code">
606
- <tr>
607
- <td>
608
- <pre class="lines">
609
-
610
-
611
- 85
612
- 86
613
- 87</pre>
614
- </td>
615
- <td>
616
- <pre class="code"><span class="info file"># File 'lib/sprout/specification.rb', line 85</span>
617
-
618
- <span class='kw'>def</span> <span class='id version'>version</span>
619
- <span class='ivar'>@version</span>
620
- <span class='kw'>end</span></pre>
621
- </td>
622
- </tr>
623
- </table>
624
- </div>
625
-
626
- </div>
627
-
628
-
629
- <div id="instance_method_details" class="method_details_list">
630
- <h2>Instance Method Details</h2>
631
-
632
-
633
- <div class="method_details first">
634
- <p class="signature first" id="add_file_target-instance_method">
635
-
636
- - (<tt>Object</tt>) <strong>add_file_target</strong>(&amp;block)
637
-
638
-
639
-
640
- </p><div class="docstring">
641
- <div class="discussion">
642
-
643
- <p>Add a file to the RubyGem itself. This is a great way to package smallish
644
- libraries in either source or already-packaged form. For example, one might
645
- add a SWC to a RubyGem library.</p>
646
-
647
- <p>Each time this method is called, a new Sprout::FileTarget instance will be
648
- yielded to the provided block, and added to a collection for packaging.</p>
649
-
650
- <pre class="code">Sprout::Specification.new do |s|
651
- ...
652
- s.add_file_target do |t|
653
- t.platform = :universal
654
- t.add_executable :asdoc, 'bin/asdoc'
655
- end
656
- end</pre>
657
-
658
-
659
- </div>
660
- </div>
661
- <div class="tags">
662
-
663
- </div><table class="source_code">
664
- <tr>
665
- <td>
666
- <pre class="lines">
667
-
668
-
669
- 156
670
- 157
671
- 158
672
- 159</pre>
673
- </td>
674
- <td>
675
- <pre class="code"><span class="info file"># File 'lib/sprout/specification.rb', line 156</span>
676
-
677
- <span class='kw'>def</span> <span class='id add_file_target'>add_file_target</span> <span class='op'>&amp;</span><span class='id block'>block</span>
678
- <span class='id target'>target</span> <span class='op'>=</span> <span class='const'>FileTarget</span><span class='period'>.</span><span class='id new'>new</span>
679
- <span class='id configure_target'>configure_target</span> <span class='id target'>target</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id block'>block</span>
680
- <span class='kw'>end</span></pre>
681
- </td>
682
- </tr>
683
- </table>
684
- </div>
685
-
686
- <div class="method_details ">
687
- <p class="signature " id="add_remote_file_target-instance_method">
688
-
689
- - (<tt>Object</tt>) <strong>add_remote_file_target</strong>(&amp;block)
690
-
691
-
692
-
693
- </p><div class="docstring">
694
- <div class="discussion">
695
-
696
- <p>Add a remote file target to this RubyGem so that when it is loaded, Sprouts
697
- will go fetch this file from the network.</p>
698
-
699
- <p>Each time this method is called, a new Sprout::RemoteFiletarget instance
700
- will be yielded to the provided block and resolved after the block
701
- completes.</p>
702
-
703
- <p>After this block is evaluated, Sprouts will first check the collection of
704
- env_names to see if the expected paths are available. If a valid env_name
705
- is found, Sprouts will return the path to the requested executable from the
706
- environment variable.</p>
707
-
708
- <p>If no env_names are set, or the requested executable is not found within
709
- any that are identified, Sprouts will check to see if the archive has
710
- already been unpacked into the expected location:</p>
711
-
712
- <pre class="code"><span class='comment'>#{SPROUT_HOME}/cache/#{SPROUT_VERSION}/flex4sdk/#{md5}/4.0.pre</span></pre>
713
-
714
- <p>If the archive been unpacked, Sprouts will return the path to the
715
- requested executable.</p>
716
-
717
- <p>If the archive has not been unpacked, Sprouts will check to see if the
718
- archive has been downloaded to:</p>
719
-
720
- <pre class="code"><span class='comment'>#{SPROUT_HOME}/cache/#{SPROUT_VERSION}/flex4sdk/#{md5}.zip</span></pre>
721
-
722
- <p>If the archive has been downloaded, it will be unpacked and the path to the
723
- requested executable will be returned.</p>
724
-
725
- <p>If the archive has not been downloaded, it will be downloaded, unpacked and
726
- the path to the requested executable will be returned.</p>
727
-
728
-
729
- </div>
730
- </div>
731
- <div class="tags">
732
-
733
- </div><table class="source_code">
734
- <tr>
735
- <td>
736
- <pre class="lines">
737
-
738
-
739
- 137
740
- 138
741
- 139
742
- 140</pre>
743
- </td>
744
- <td>
745
- <pre class="code"><span class="info file"># File 'lib/sprout/specification.rb', line 137</span>
746
-
747
- <span class='kw'>def</span> <span class='id add_remote_file_target'>add_remote_file_target</span> <span class='op'>&amp;</span><span class='id block'>block</span>
748
- <span class='id target'>target</span> <span class='op'>=</span> <span class='const'>RemoteFileTarget</span><span class='period'>.</span><span class='id new'>new</span>
749
- <span class='id configure_target'>configure_target</span> <span class='id target'>target</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id block'>block</span>
750
- <span class='kw'>end</span></pre>
751
- </td>
752
- </tr>
753
- </table>
754
- </div>
755
-
756
- </div>
757
-
758
- </div>
759
-
760
- <div id="footer">
761
- Generated on Wed Dec 22 11:58:34 2010 by
762
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
763
- 0.6.3 (ruby-1.9.2).
764
- </div>
765
-
766
- </body>
767
- </html>