sprout 1.0.32.pre → 1.0.35.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/Gemfile +2 -1
- data/Gemfile.lock +4 -2
- data/README.textile +12 -13
- data/VERSION +1 -0
- data/doc/Dir.html +288 -0
- data/doc/Rake/Task.html +184 -0
- data/doc/Sprout.html +144 -0
- data/doc/Sprout/ArchiveUnpacker.html +1246 -0
- data/doc/Sprout/Base.html +126 -0
- data/doc/Sprout/Base/ClassMethods.html +434 -0
- data/doc/Sprout/Concern.html +353 -0
- data/doc/Sprout/Daemon.html +166 -0
- data/doc/Sprout/Daemon/ClassMethods.html +244 -0
- data/doc/Sprout/Daemon/InstanceMethods.html +601 -0
- data/doc/Sprout/Errors.html +101 -0
- data/doc/Sprout/Errors/ArchiveUnpackerError.html +125 -0
- data/doc/Sprout/Errors/DestinationExistsError.html +133 -0
- data/doc/Sprout/Errors/DuplicateMemberError.html +132 -0
- data/doc/Sprout/Errors/ExecutableError.html +125 -0
- data/doc/Sprout/Errors/ExecutableRegistrationError.html +132 -0
- data/doc/Sprout/Errors/ExecutionError.html +121 -0
- data/doc/Sprout/Errors/GeneratorError.html +125 -0
- data/doc/Sprout/Errors/InvalidArgumentError.html +132 -0
- data/doc/Sprout/Errors/LoadError.html +121 -0
- data/doc/Sprout/Errors/MissingArgumentError.html +132 -0
- data/doc/Sprout/Errors/MissingExecutableError.html +132 -0
- data/doc/Sprout/Errors/MissingGeneratorError.html +132 -0
- data/doc/Sprout/Errors/MissingTemplateError.html +132 -0
- data/doc/Sprout/Errors/ProcessRunnerError.html +121 -0
- data/doc/Sprout/Errors/RemoteFileLoaderError.html +110 -0
- data/doc/Sprout/Errors/SproutError.html +114 -0
- data/doc/Sprout/Errors/UnknownArchiveType.html +122 -0
- data/doc/Sprout/Errors/UsageError.html +121 -0
- data/doc/Sprout/Errors/ValidationError.html +121 -0
- data/doc/Sprout/Errors/VersionRequirementNotMetError.html +121 -0
- data/doc/Sprout/Executable.html +173 -0
- data/doc/Sprout/Executable/Boolean.html +483 -0
- data/doc/Sprout/Executable/ClassMethods.html +417 -0
- data/doc/Sprout/Executable/CollectionParam.html +483 -0
- data/doc/Sprout/Executable/FileParam.html +484 -0
- data/doc/Sprout/Executable/Files.html +292 -0
- data/doc/Sprout/Executable/InstanceMethods.html +2006 -0
- data/doc/Sprout/Executable/Number.html +141 -0
- data/doc/Sprout/Executable/Param.html +2818 -0
- data/doc/Sprout/Executable/ParameterFactory.html +232 -0
- data/doc/Sprout/Executable/Path.html +223 -0
- data/doc/Sprout/Executable/Paths.html +253 -0
- data/doc/Sprout/Executable/StringParam.html +213 -0
- data/doc/Sprout/Executable/Strings.html +167 -0
- data/doc/Sprout/Executable/Url.html +160 -0
- data/doc/Sprout/Executable/Urls.html +170 -0
- data/doc/Sprout/FileTarget.html +1109 -0
- data/doc/Sprout/Generator.html +689 -0
- data/doc/Sprout/Generator/Base.html +1626 -0
- data/doc/Sprout/Generator/Command.html +690 -0
- data/doc/Sprout/Generator/DirectoryManifest.html +476 -0
- data/doc/Sprout/Generator/FileManifest.html +572 -0
- data/doc/Sprout/Generator/Manifest.html +377 -0
- data/doc/Sprout/Generator/TemplateManifest.html +196 -0
- data/doc/Sprout/GeneratorGenerator.html +1018 -0
- data/doc/Sprout/Library.html +1141 -0
- data/doc/Sprout/LibraryGenerator.html +309 -0
- data/doc/Sprout/Log.html +496 -0
- data/doc/Sprout/MXMLC.html +6373 -0
- data/doc/Sprout/Platform.html +714 -0
- data/doc/Sprout/ProcessRunner.html +1352 -0
- data/doc/Sprout/ProgressBar.html +376 -0
- data/doc/Sprout/ProgressBarImpl.html +2119 -0
- data/doc/Sprout/ProgressBarManager.html +434 -0
- data/doc/Sprout/ProgressBarOutputStream.html +416 -0
- data/doc/Sprout/RDocParser.html +211 -0
- data/doc/Sprout/RemoteFileLoader.html +172 -0
- data/doc/Sprout/RemoteFileTarget.html +679 -0
- data/doc/Sprout/ReversedProgressBar.html +194 -0
- data/doc/Sprout/RubyFeature.html +155 -0
- data/doc/Sprout/RubyFeature/ClassMethods.html +1065 -0
- data/doc/Sprout/RubyGenerator.html +764 -0
- data/doc/Sprout/Specification.html +767 -0
- data/doc/Sprout/System.html +191 -0
- data/doc/Sprout/System/BaseSystem.html +1455 -0
- data/doc/Sprout/System/JavaSystem.html +122 -0
- data/doc/Sprout/System/OSXSystem.html +335 -0
- data/doc/Sprout/System/ThreadMock.html +193 -0
- data/doc/Sprout/System/UnixSystem.html +584 -0
- data/doc/Sprout/System/VistaSystem.html +251 -0
- data/doc/Sprout/System/WinNixSystem.html +325 -0
- data/doc/Sprout/System/WinSystem.html +571 -0
- data/doc/Sprout/ToolGenerator.html +931 -0
- data/doc/Sprout/VERSION.html +128 -0
- data/doc/SproutTestCase.html +1412 -0
- data/doc/String.html +286 -0
- data/doc/_index.html +1035 -0
- data/doc/class_list.html +36 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +53 -0
- data/doc/css/style.css +310 -0
- data/doc/file.README.html +96 -0
- data/doc/file.archive_unpacker.html +288 -0
- data/doc/file.base.html +208 -0
- data/doc/file.base_system.html +278 -0
- data/doc/file.boolean.html +135 -0
- data/doc/file.collection_param.html +139 -0
- data/doc/file.command.html +126 -0
- data/doc/file.concern.html +136 -0
- data/doc/file.daemon.html +309 -0
- data/doc/file.dir.html +76 -0
- data/doc/file.directory_manifest.html +122 -0
- data/doc/file.errors.html +147 -0
- data/doc/file.executable.html +638 -0
- data/doc/file.file_manifest.html +109 -0
- data/doc/file.file_param.html +120 -0
- data/doc/file.file_target.html +140 -0
- data/doc/file.files.html +85 -0
- data/doc/file.generator.html +296 -0
- data/doc/file.generator_class.html +72 -0
- data/doc/file.generator_generator.html +137 -0
- data/doc/file.generator_test.html +92 -0
- data/doc/file.generator_test_helper.html +67 -0
- data/doc/file.java_system.html +62 -0
- data/doc/file.library.html +291 -0
- data/doc/file.library_generator.html +74 -0
- data/doc/file.log.html +100 -0
- data/doc/file.manifest.html +67 -0
- data/doc/file.mxmlc.html +740 -0
- data/doc/file.number.html +67 -0
- data/doc/file.osx_system.html +79 -0
- data/doc/file.param.html +491 -0
- data/doc/file.parameter_factory.html +119 -0
- data/doc/file.path.html +81 -0
- data/doc/file.paths.html +80 -0
- data/doc/file.platform.html +124 -0
- data/doc/file.process_runner.html +224 -0
- data/doc/file.progress_bar.html +390 -0
- data/doc/file.rdoc_parser.html +145 -0
- data/doc/file.remote_file_loader.html +117 -0
- data/doc/file.remote_file_target.html +176 -0
- data/doc/file.ruby_base.html +64 -0
- data/doc/file.ruby_feature.html +244 -0
- data/doc/file.ruby_generator.html +118 -0
- data/doc/file.ruby_input.html +62 -0
- data/doc/file.ruby_test_case.html +78 -0
- data/doc/file.ruby_test_helper.html +61 -0
- data/doc/file.specification.html +248 -0
- data/doc/file.sprout.html +64 -0
- data/doc/file.sprout_test_case.html +280 -0
- data/doc/file.string.html +72 -0
- data/doc/file.string_param.html +76 -0
- data/doc/file.strings.html +71 -0
- data/doc/file.system.html +86 -0
- data/doc/file.template_manifest.html +67 -0
- data/doc/file.tool.html +92 -0
- data/doc/file.tool_generator.html +90 -0
- data/doc/file.unix_system.html +128 -0
- data/doc/file.url.html +71 -0
- data/doc/file.urls.html +70 -0
- data/doc/file.version.html +71 -0
- data/doc/file.vista_system.html +69 -0
- data/doc/file.win_nix_system.html +88 -0
- data/doc/file.win_system.html +129 -0
- data/doc/file_list.html +230 -0
- data/doc/frames.html +13 -0
- data/doc/index.html +96 -0
- data/doc/js/app.js +202 -0
- data/doc/js/full_list.js +149 -0
- data/doc/js/jquery.js +154 -0
- data/doc/method_list.html +3355 -0
- data/doc/top-level-namespace.html +192 -0
- data/lib/sprout/archive_unpacker.rb +203 -137
- data/lib/sprout/base.rb +38 -11
- data/lib/sprout/concern.rb +51 -0
- data/lib/sprout/daemon.rb +256 -0
- data/lib/sprout/executable.rb +40 -11
- data/lib/sprout/executable/boolean.rb +47 -1
- data/lib/sprout/executable/collection_param.rb +33 -1
- data/lib/sprout/executable/file_param.rb +16 -3
- data/lib/sprout/executable/files.rb +5 -0
- data/lib/sprout/executable/number.rb +5 -1
- data/lib/sprout/executable/param.rb +232 -16
- data/lib/sprout/executable/parameter_factory.rb +39 -1
- data/lib/sprout/executable/path.rb +7 -1
- data/lib/sprout/executable/paths.rb +6 -1
- data/lib/sprout/executable/string_param.rb +8 -1
- data/lib/sprout/executable/strings.rb +7 -1
- data/lib/sprout/executable/url.rb +8 -1
- data/lib/sprout/executable/urls.rb +7 -1
- data/lib/sprout/file_target.rb +11 -11
- data/lib/sprout/generator.rb +244 -0
- data/lib/sprout/generator/base.rb +0 -94
- data/lib/sprout/generators/generator/generator_generator.rb +35 -1
- data/lib/sprout/generators/generator/templates/generator_class.rb +3 -3
- data/lib/sprout/library.rb +75 -0
- data/lib/sprout/log.rb +11 -12
- data/lib/sprout/process_runner.rb +29 -9
- data/lib/sprout/remote_file_target.rb +20 -9
- data/lib/sprout/system/base_system.rb +11 -3
- data/lib/sprout/test/sprout_test_case.rb +1 -0
- data/lib/sprout/version.rb +7 -11
- data/rakefile.rb +7 -12
- data/script/add_param_handler.rb +43 -0
- data/sprout.gemspec +2 -3
- data/test/fixtures/executable/fdb.rb +764 -0
- data/test/fixtures/executable/flex3sdk_gem/fdb +60 -0
- data/test/fixtures/executable/mxmlc.rb +9 -11
- data/test/unit/daemon_test.rb +61 -0
- data/test/unit/process_runner_test.rb +21 -0
- data/test/unit/remote_file_target_test.rb +45 -11
- data/test/unit/sprout_test_helper.rb +1 -1
- metadata +210 -29
@@ -0,0 +1,118 @@
|
|
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>File: ruby_generator</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" title="Index">Index</a> »
|
27
|
+
<span class="title">File: ruby_generator</span>
|
28
|
+
|
29
|
+
|
30
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<div id="search">
|
34
|
+
<a id="class_list_link" href="#">Class List</a>
|
35
|
+
<a id="method_list_link" href="#">Method List</a>
|
36
|
+
<a id ="file_list_link" href="#">File List</a>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div class="clear"></div>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<iframe id="search_frame"></iframe>
|
43
|
+
|
44
|
+
<div id="content"><div id='filecontents'>
|
45
|
+
<p>module Sprout</p>
|
46
|
+
|
47
|
+
<pre class="code"><span class='kw'>class</span> <span class='const'>RubyGenerator</span> <span class='op'><</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Generator</span><span class='op'>::</span><span class='const'>Base</span>
|
48
|
+
|
49
|
+
<span class='comment'>##
|
50
|
+
</span> <span class='comment'># The 3-part version for the new Ruby application.
|
51
|
+
</span> <span class='id add_param'>add_param</span> <span class='symbol'>:version</span><span class='comma'>,</span> <span class='const'>String</span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='symbol'>:default</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.0.0.pre</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span>
|
52
|
+
|
53
|
+
<span class='comment'>##
|
54
|
+
</span> <span class='comment'># The name of the 'lib' directory - where your Ruby
|
55
|
+
</span> <span class='comment'># files will be located.
|
56
|
+
</span> <span class='id add_param'>add_param</span> <span class='symbol'>:lib</span><span class='comma'>,</span> <span class='const'>String</span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='symbol'>:default</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>lib</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span>
|
57
|
+
|
58
|
+
<span class='comment'>##
|
59
|
+
</span> <span class='comment'># The name of the 'test' directory - where all tests
|
60
|
+
</span> <span class='comment'># and fixtures will be located.
|
61
|
+
</span> <span class='id add_param'>add_param</span> <span class='symbol'>:test</span><span class='comma'>,</span> <span class='const'>String</span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='symbol'>:default</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>test</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span>
|
62
|
+
|
63
|
+
<span class='comment'>##
|
64
|
+
</span> <span class='comment'># The name of the 'unit' directory - where unit tests
|
65
|
+
</span> <span class='comment'># will be located.
|
66
|
+
</span> <span class='id add_param'>add_param</span> <span class='symbol'>:unit</span><span class='comma'>,</span> <span class='const'>String</span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='symbol'>:default</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>unit</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span>
|
67
|
+
|
68
|
+
<span class='comment'>##
|
69
|
+
</span> <span class='comment'># The name of the 'fixtures' directory - where test
|
70
|
+
</span> <span class='comment'># fixtures will be located.
|
71
|
+
</span> <span class='id add_param'>add_param</span> <span class='symbol'>:fixtures</span><span class='comma'>,</span> <span class='const'>String</span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='symbol'>:default</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>fixtures</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span>
|
72
|
+
|
73
|
+
<span class='comment'>##
|
74
|
+
</span> <span class='comment'># The name of the bin directory - where executables
|
75
|
+
</span> <span class='comment'># will be located.
|
76
|
+
</span> <span class='id add_param'>add_param</span> <span class='symbol'>:bin</span><span class='comma'>,</span> <span class='const'>String</span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='symbol'>:default</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>bin</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span>
|
77
|
+
|
78
|
+
<span class='kw'>def</span> <span class='id manifest'>manifest</span>
|
79
|
+
<span class='id snake'>snake</span> <span class='op'>=</span> <span class='id input'>input</span><span class='period'>.</span><span class='id snake_case'>snake_case</span>
|
80
|
+
|
81
|
+
<span class='id directory'>directory</span> <span class='id snake'>snake</span> <span class='kw'>do</span>
|
82
|
+
<span class='id template'>template</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Gemfile</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ruby_gemfile</span><span class='tstring_end'>'</span></span>
|
83
|
+
<span class='id template'>template</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Rakefile</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ruby_rakefile</span><span class='tstring_end'>'</span></span>
|
84
|
+
<span class='id template'>template</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id input'>input</span><span class='period'>.</span><span class='id snake_case'>snake_case</span><span class='rbrace'>}</span><span class='tstring_content'>.gemspec</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ruby_gemspec</span><span class='tstring_end'>'</span></span>
|
85
|
+
|
86
|
+
<span class='id directory'>directory</span> <span class='id lib'>lib</span> <span class='kw'>do</span>
|
87
|
+
<span class='id template'>template</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id snake'>snake</span><span class='rbrace'>}</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_content'>ruby_input.rb</span><span class='tstring_end'>'</span></span>
|
88
|
+
<span class='id directory'>directory</span> <span class='id snake'>snake</span> <span class='kw'>do</span>
|
89
|
+
<span class='id template'>template</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>base.rb</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ruby_base.rb</span><span class='tstring_end'>'</span></span>
|
90
|
+
<span class='kw'>end</span>
|
91
|
+
<span class='kw'>end</span>
|
92
|
+
|
93
|
+
<span class='id directory'>directory</span> <span class='id test'>test</span> <span class='kw'>do</span>
|
94
|
+
<span class='id directory'>directory</span> <span class='id fixtures'>fixtures</span>
|
95
|
+
<span class='id directory'>directory</span> <span class='id unit'>unit</span> <span class='kw'>do</span>
|
96
|
+
<span class='id template'>template</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id input'>input</span><span class='period'>.</span><span class='id snake_case'>snake_case</span><span class='rbrace'>}</span><span class='tstring_content'>_test.rb</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ruby_test_case.rb</span><span class='tstring_end'>'</span></span>
|
97
|
+
<span class='kw'>end</span>
|
98
|
+
<span class='id template'>template</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>test_helper.rb</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ruby_test_helper.rb</span><span class='tstring_end'>'</span></span>
|
99
|
+
<span class='kw'>end</span>
|
100
|
+
|
101
|
+
<span class='id directory'>directory</span> <span class='id bin'>bin</span> <span class='kw'>do</span>
|
102
|
+
<span class='id template'>template</span> <span class='id input'>input</span><span class='period'>.</span><span class='id dash_case'>dash_case</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ruby_executable</span><span class='tstring_end'>'</span></span>
|
103
|
+
<span class='kw'>end</span>
|
104
|
+
<span class='kw'>end</span>
|
105
|
+
<span class='kw'>end</span>
|
106
|
+
<span class='kw'>end</span></pre>
|
107
|
+
|
108
|
+
<p>end</p>
|
109
|
+
</div></div>
|
110
|
+
|
111
|
+
<div id="footer">
|
112
|
+
Generated on Wed Dec 22 11:58:32 2010 by
|
113
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
114
|
+
0.6.3 (ruby-1.9.2).
|
115
|
+
</div>
|
116
|
+
|
117
|
+
</body>
|
118
|
+
</html>
|
@@ -0,0 +1,62 @@
|
|
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>File: ruby_input</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" title="Index">Index</a> »
|
27
|
+
<span class="title">File: ruby_input</span>
|
28
|
+
|
29
|
+
|
30
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<div id="search">
|
34
|
+
<a id="class_list_link" href="#">Class List</a>
|
35
|
+
<a id="method_list_link" href="#">Method List</a>
|
36
|
+
<a id ="file_list_link" href="#">File List</a>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div class="clear"></div>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<iframe id="search_frame"></iframe>
|
43
|
+
|
44
|
+
<div id="content"><div id='filecontents'>
|
45
|
+
<p>require ‘<%= input.snake_case %>/base’</p>
|
46
|
+
|
47
|
+
<p>module <%= input.camel_case %></p>
|
48
|
+
|
49
|
+
<pre class="code"><span class='const'>NAME</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'><%= input.snake_case %></span><span class='tstring_end'>'</span></span>
|
50
|
+
<span class='const'>VERSION</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'><%= version %></span><span class='tstring_end'>'</span></span></pre>
|
51
|
+
|
52
|
+
<p>end</p>
|
53
|
+
</div></div>
|
54
|
+
|
55
|
+
<div id="footer">
|
56
|
+
Generated on Wed Dec 22 11:58:32 2010 by
|
57
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
58
|
+
0.6.3 (ruby-1.9.2).
|
59
|
+
</div>
|
60
|
+
|
61
|
+
</body>
|
62
|
+
</html>
|
@@ -0,0 +1,78 @@
|
|
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>File: ruby_test_case</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" title="Index">Index</a> »
|
27
|
+
<span class="title">File: ruby_test_case</span>
|
28
|
+
|
29
|
+
|
30
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<div id="search">
|
34
|
+
<a id="class_list_link" href="#">Class List</a>
|
35
|
+
<a id="method_list_link" href="#">Method List</a>
|
36
|
+
<a id ="file_list_link" href="#">File List</a>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div class="clear"></div>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<iframe id="search_frame"></iframe>
|
43
|
+
|
44
|
+
<div id="content"><div id='filecontents'>
|
45
|
+
<p>require File.join(File.dirname(__FILE__), ‘..’, ‘test_helper’)</p>
|
46
|
+
|
47
|
+
<p>class <%= input.camel_case %>Test < Test::Unit::TestCase</p>
|
48
|
+
|
49
|
+
<pre class="code"><span class='id include'>include</span> <span class='const'>SproutTestCase</span>
|
50
|
+
|
51
|
+
<span class='id context'>context</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>A <%= input.camel_case %></span><span class='tstring_end'>"</span></span> <span class='kw'>do</span>
|
52
|
+
|
53
|
+
<span class='id setup'>setup</span> <span class='kw'>do</span>
|
54
|
+
<span class='ivar'>@fixture</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id join'>join</span> <span class='id fixtures'>fixtures</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'><%= input.snake_case %></span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>tmp</span><span class='tstring_end'>'</span></span>
|
55
|
+
<span class='const'>FileUtils</span><span class='period'>.</span><span class='id makedirs'>makedirs</span> <span class='ivar'>@fixture</span>
|
56
|
+
<span class='kw'>end</span>
|
57
|
+
|
58
|
+
<span class='id teardown'>teardown</span> <span class='kw'>do</span>
|
59
|
+
<span class='id remove_file'>remove_file</span> <span class='ivar'>@fixture</span>
|
60
|
+
<span class='kw'>end</span>
|
61
|
+
|
62
|
+
<span class='id should'>should</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>do something</span><span class='tstring_end'>"</span></span> <span class='kw'>do</span>
|
63
|
+
<span class='id assert_file'>assert_file</span> <span class='ivar'>@fixture</span>
|
64
|
+
<span class='id assert'>assert</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Force test failure</span><span class='tstring_end'>'</span></span>
|
65
|
+
<span class='kw'>end</span>
|
66
|
+
<span class='kw'>end</span></pre>
|
67
|
+
|
68
|
+
<p>end</p>
|
69
|
+
</div></div>
|
70
|
+
|
71
|
+
<div id="footer">
|
72
|
+
Generated on Wed Dec 22 11:58:32 2010 by
|
73
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
74
|
+
0.6.3 (ruby-1.9.2).
|
75
|
+
</div>
|
76
|
+
|
77
|
+
</body>
|
78
|
+
</html>
|
@@ -0,0 +1,61 @@
|
|
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>File: ruby_test_helper</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" title="Index">Index</a> »
|
27
|
+
<span class="title">File: ruby_test_helper</span>
|
28
|
+
|
29
|
+
|
30
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<div id="search">
|
34
|
+
<a id="class_list_link" href="#">Class List</a>
|
35
|
+
<a id="method_list_link" href="#">Method List</a>
|
36
|
+
<a id ="file_list_link" href="#">File List</a>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div class="clear"></div>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<iframe id="search_frame"></iframe>
|
43
|
+
|
44
|
+
<div id="content"><div id='filecontents'>
|
45
|
+
<p>require “rubygems” require “bundler” Bundler.require :default, :development</p>
|
46
|
+
|
47
|
+
<p>lib = File.join(File.dirname(__FILE__), ‘..’, ‘lib’) $:.unshift lib unless
|
48
|
+
$:.include? lib</p>
|
49
|
+
|
50
|
+
<p>require ‘<%= input.snake_case %>’ require
|
51
|
+
‘sprout/test/sprout_test_case’</p>
|
52
|
+
</div></div>
|
53
|
+
|
54
|
+
<div id="footer">
|
55
|
+
Generated on Wed Dec 22 11:58:32 2010 by
|
56
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
57
|
+
0.6.3 (ruby-1.9.2).
|
58
|
+
</div>
|
59
|
+
|
60
|
+
</body>
|
61
|
+
</html>
|
@@ -0,0 +1,248 @@
|
|
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>File: 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" title="Index">Index</a> »
|
27
|
+
<span class="title">File: specification</span>
|
28
|
+
|
29
|
+
|
30
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<div id="search">
|
34
|
+
<a id="class_list_link" href="#">Class List</a>
|
35
|
+
<a id="method_list_link" href="#">Method List</a>
|
36
|
+
<a id ="file_list_link" href="#">File List</a>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div class="clear"></div>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<iframe id="search_frame"></iframe>
|
43
|
+
|
44
|
+
<div id="content"><div id='filecontents'>
|
45
|
+
<p>module Sprout</p>
|
46
|
+
|
47
|
+
<pre class="code"><span class='comment'>##
|
48
|
+
</span><span class='comment'># Sprouts provides us with the ability to distribute source files,
|
49
|
+
</span><span class='comment'># precompiled libraries, and remote executables. It does all of
|
50
|
+
</span><span class='comment'># this by (ab)using RubyGems.
|
51
|
+
</span><span class='comment'>#
|
52
|
+
</span><span class='comment'># RubyGems gives us the ability to version-manage, and distribute
|
53
|
+
</span><span class='comment'># arbitrary text and binary payloads.
|
54
|
+
</span><span class='comment'>#
|
55
|
+
</span><span class='comment'># In order to support Flash development, we have one major problem
|
56
|
+
</span><span class='comment'># that RubyGems does not solve for us. This is the fact that
|
57
|
+
</span><span class='comment'># many elements of our executable chain are not open-source, and we do
|
58
|
+
</span><span class='comment'># not have the rights to directly distribute them.
|
59
|
+
</span><span class='comment'>#
|
60
|
+
</span><span class='comment'># This restriction means that many of our tools and dependencies cannot be
|
61
|
+
</span><span class='comment'># packaged and distributed _directly_ within a RubyGem (or from
|
62
|
+
</span><span class='comment'># any server other than Adobe's as a matter of fact).
|
63
|
+
</span><span class='comment'>#
|
64
|
+
</span><span class='comment'># In order to overcome this restriction, we have introduced
|
65
|
+
</span><span class='comment'># a Sprout::Specification. This is a regular Ruby file with regular
|
66
|
+
</span><span class='comment'># Ruby code in it. The main idea behind this file, is that it
|
67
|
+
</span><span class='comment'># needs to be given a name and available in your load path.
|
68
|
+
</span><span class='comment'>#
|
69
|
+
</span><span class='comment'># Whenever a rake build task (Sprout::Executable) or library task,
|
70
|
+
</span><span class='comment'># (Sprout::Library) is encountered, it will call
|
71
|
+
</span><span class='comment'># Sprout::Executable.load or Sprout::Library.load (respectively).
|
72
|
+
</span><span class='comment'>#
|
73
|
+
</span><span class='comment'># These methods will attempt to +require+ the provided
|
74
|
+
</span><span class='comment'># specification and - if it's in your load path - the specification
|
75
|
+
</span><span class='comment'># will be loaded, and any relevant file targets will be returned.
|
76
|
+
</span><span class='comment'>#
|
77
|
+
</span><span class='comment'># There are many ways to get Ruby code into your load path.
|
78
|
+
</span><span class='comment'># One of the easiest to package it up in a RubyGem and
|
79
|
+
</span><span class='comment'># configure the +require_paths+ parameter of your Gem::Specification.
|
80
|
+
</span><span class='comment'>#
|
81
|
+
</span><span class='comment'># http://docs.rubygems.org/read/chapter/20#require_paths
|
82
|
+
</span><span class='comment'>#
|
83
|
+
</span><span class='comment'># To learn more about packaging RubyGems:
|
84
|
+
</span><span class='comment'>#
|
85
|
+
</span><span class='comment'># http://docs.rubygems.org/read/chapter/20#page85
|
86
|
+
</span><span class='comment'># http://rubygems.rubyforge.org/rdoc/Gem/Specification.html
|
87
|
+
</span><span class='comment'>#
|
88
|
+
</span><span class='comment'># To learn more about published RubyGems:
|
89
|
+
</span><span class='comment'>#
|
90
|
+
</span><span class='comment'># http://rubygems.org/pages/gem_docs
|
91
|
+
</span><span class='comment'>#
|
92
|
+
</span><span class='comment'># To package a SWC library into a Sprout RubyGem, you would create a file (usually)
|
93
|
+
</span><span class='comment'># named [project_name.spec] in the root of the project.
|
94
|
+
</span><span class='comment'>#
|
95
|
+
</span><span class='comment'># This is your Gem::Specification.
|
96
|
+
</span><span class='comment'>#
|
97
|
+
</span><span class='comment'># You would also create a file named [projet_name.rb] and put that
|
98
|
+
</span><span class='comment'># into the root of the project or some other folder that you have added to
|
99
|
+
</span><span class='comment'># the Gem::Specification.require_paths parameter.
|
100
|
+
</span><span class='comment'>#
|
101
|
+
</span><span class='comment'># == Example: Include a file directly in the RubyGem
|
102
|
+
</span><span class='comment'>#
|
103
|
+
</span><span class='comment'># In the case of AsUnit, this file would be named asunit4.rb and it's contents
|
104
|
+
</span><span class='comment'># are as follows:
|
105
|
+
</span><span class='comment'>#
|
106
|
+
</span><span class='comment'># :include:../../test/fixtures/specification/asunit4.rb
|
107
|
+
</span><span class='comment'>#
|
108
|
+
</span><span class='comment'># == Example: Refer to files that are not in the RubyGem
|
109
|
+
</span><span class='comment'>#
|
110
|
+
</span><span class='comment'># For projects like the Flex SDK, we can't distribute many of the required files,
|
111
|
+
</span><span class='comment'># so we can refer to these files in our Sprout::Specification as +remote_file_targets+.
|
112
|
+
</span><span class='comment'>#
|
113
|
+
</span><span class='comment'># :include:../../test/fixtures/specification/flex4sdk.rb
|
114
|
+
</span><span class='comment'>#
|
115
|
+
</span><span class='comment'># == Example: Create custom downloads for each supported platform
|
116
|
+
</span><span class='comment'>#
|
117
|
+
</span><span class='comment'># For projects like the Flash Player itself, we need to refer to different
|
118
|
+
</span><span class='comment'># downloadable content for each supported platform.
|
119
|
+
</span><span class='comment'>#
|
120
|
+
</span><span class='comment'># :include:../../test/fixtures/specification/flashplayer.rb
|
121
|
+
</span><span class='comment'>#
|
122
|
+
</span><span class='comment'># == Packaging and Sharing
|
123
|
+
</span><span class='comment'>#
|
124
|
+
</span><span class='comment'># Public RubyGems are hosted at http://rubygems.org.
|
125
|
+
</span><span class='kw'>class</span> <span class='const'>Specification</span>
|
126
|
+
|
127
|
+
<span class='id attr_accessor'>attr_accessor</span> <span class='symbol'>:name</span>
|
128
|
+
<span class='id attr_accessor'>attr_accessor</span> <span class='symbol'>:version</span>
|
129
|
+
|
130
|
+
<span class='id attr_reader'>attr_reader</span> <span class='symbol'>:file_targets</span>
|
131
|
+
<span class='id attr_reader'>attr_reader</span> <span class='symbol'>:load_path</span>
|
132
|
+
|
133
|
+
<span class='comment'>##
|
134
|
+
</span> <span class='comment'># Create a new Sprout::Specification.
|
135
|
+
</span> <span class='comment'>#
|
136
|
+
</span> <span class='comment'># This method will yield the new Sprout::Specification to the provided block,
|
137
|
+
</span> <span class='comment'># and delegate most configuration parameters to a {Gem::Specification}[http://rubygems.rubyforge.org/rdoc/Gem/Specification.html].
|
138
|
+
</span> <span class='comment'>#
|
139
|
+
</span> <span class='comment'># To learn more about what parameters are available and/or required, please
|
140
|
+
</span> <span class='comment'># check out RubyGems documentation for their {Gem::Specification}[http://rubygems.rubyforge.org/rdoc/Gem/Specification.html].
|
141
|
+
</span> <span class='comment'>#
|
142
|
+
</span> <span class='kw'>def</span> <span class='id initialize'>initialize</span>
|
143
|
+
<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>
|
144
|
+
<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>
|
145
|
+
<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>
|
146
|
+
<span class='kw'>yield</span> <span class='kw'>self</span> <span class='kw'>if</span> <span class='id block_given?'>block_given?</span>
|
147
|
+
<span class='kw'>end</span>
|
148
|
+
|
149
|
+
<span class='comment'>##
|
150
|
+
</span> <span class='comment'># Add a remote file target to this RubyGem so that when it
|
151
|
+
</span> <span class='comment'># is loaded, Sprouts will go fetch this file from the network.
|
152
|
+
</span> <span class='comment'>#
|
153
|
+
</span> <span class='comment'># Each time this method is called, a new Sprout::RemoteFiletarget instance will be yielded to
|
154
|
+
</span> <span class='comment'># the provided block and resolved after the block completes.
|
155
|
+
</span> <span class='comment'>#
|
156
|
+
</span> <span class='comment'># After this block is evaluated, Sprouts will first check the collection
|
157
|
+
</span> <span class='comment'># of env_names to see if the expected paths are available. If a valid
|
158
|
+
</span> <span class='comment'># env_name is found, Sprouts will return the path to the requested
|
159
|
+
</span> <span class='comment'># executable from the environment variable.
|
160
|
+
</span> <span class='comment'>#
|
161
|
+
</span> <span class='comment'># If no env_names are set, or the requested executable is not found within
|
162
|
+
</span> <span class='comment'># any that are identified, Sprouts will check to see if the archive
|
163
|
+
</span> <span class='comment'># has already been unpacked into the expected location:
|
164
|
+
</span> <span class='comment'>#
|
165
|
+
</span> <span class='comment'># #{SPROUT_HOME}/cache/#{SPROUT_VERSION}/flex4sdk/#{md5}/4.0.pre
|
166
|
+
</span> <span class='comment'>#
|
167
|
+
</span> <span class='comment'># If the archive been unpacked, Sprouts will return the path to the
|
168
|
+
</span> <span class='comment'># requested executable.
|
169
|
+
</span> <span class='comment'>#
|
170
|
+
</span> <span class='comment'># If the archive has not been unpacked, Sprouts will check to see if the
|
171
|
+
</span> <span class='comment'># archive has been downloaded to:
|
172
|
+
</span> <span class='comment'>#
|
173
|
+
</span> <span class='comment'># #{SPROUT_HOME}/cache/#{SPROUT_VERSION}/flex4sdk/#{md5}.zip
|
174
|
+
</span> <span class='comment'>#
|
175
|
+
</span> <span class='comment'># If the archive has been downloaded, it will be unpacked and the path
|
176
|
+
</span> <span class='comment'># to the requested executable will be returned.
|
177
|
+
</span> <span class='comment'>#
|
178
|
+
</span> <span class='comment'># If the archive has not been downloaded, it will be downloaded, unpacked
|
179
|
+
</span> <span class='comment'># and the path to the requested executable will be returned.
|
180
|
+
</span> <span class='kw'>def</span> <span class='id add_remote_file_target'>add_remote_file_target</span> <span class='op'>&</span><span class='id block'>block</span>
|
181
|
+
<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>
|
182
|
+
<span class='id configure_target'>configure_target</span> <span class='id target'>target</span><span class='comma'>,</span> <span class='op'>&</span><span class='id block'>block</span>
|
183
|
+
<span class='kw'>end</span>
|
184
|
+
|
185
|
+
<span class='comment'># Add a file to the RubyGem itself. This is a great way to package smallish libraries in either
|
186
|
+
</span> <span class='comment'># source or already-packaged form. For example, one might add a SWC to a RubyGem library.
|
187
|
+
</span> <span class='comment'>#
|
188
|
+
</span> <span class='comment'># Each time this method is called, a new Sprout::FileTarget instance will be yielded to the
|
189
|
+
</span> <span class='comment'># provided block, and added to a collection for packaging.
|
190
|
+
</span> <span class='comment'>#
|
191
|
+
</span> <span class='comment'># Sprout::Specification.new do |s|
|
192
|
+
</span> <span class='comment'># ...
|
193
|
+
</span> <span class='comment'># s.add_file_target do |t|
|
194
|
+
</span> <span class='comment'># t.platform = :universal
|
195
|
+
</span> <span class='comment'># t.add_executable :asdoc, 'bin/asdoc'
|
196
|
+
</span> <span class='comment'># end
|
197
|
+
</span> <span class='comment'># end
|
198
|
+
</span> <span class='comment'>#
|
199
|
+
</span> <span class='kw'>def</span> <span class='id add_file_target'>add_file_target</span> <span class='op'>&</span><span class='id block'>block</span>
|
200
|
+
<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>
|
201
|
+
<span class='id configure_target'>configure_target</span> <span class='id target'>target</span><span class='comma'>,</span> <span class='op'>&</span><span class='id block'>block</span>
|
202
|
+
<span class='kw'>end</span>
|
203
|
+
|
204
|
+
<span class='id private'>private</span>
|
205
|
+
|
206
|
+
<span class='kw'>def</span> <span class='id configure_target'>configure_target</span> <span class='id t'>t</span><span class='comma'>,</span> <span class='op'>&</span><span class='id block'>block</span>
|
207
|
+
<span class='id t'>t</span><span class='period'>.</span><span class='id load_path'>load_path</span> <span class='op'>=</span> <span class='id load_path'>load_path</span>
|
208
|
+
<span class='id t'>t</span><span class='period'>.</span><span class='id pkg_name'>pkg_name</span> <span class='op'>=</span> <span class='id name'>name</span>
|
209
|
+
<span class='id t'>t</span><span class='period'>.</span><span class='id pkg_version'>pkg_version</span> <span class='op'>=</span> <span class='id version'>version</span>
|
210
|
+
<span class='kw'>yield</span> <span class='id t'>t</span> <span class='kw'>if</span> <span class='id block_given?'>block_given?</span>
|
211
|
+
<span class='id register_file_target_libs_and_exes'>register_file_target_libs_and_exes</span> <span class='id t'>t</span>
|
212
|
+
<span class='kw'>end</span>
|
213
|
+
|
214
|
+
<span class='kw'>def</span> <span class='id register_file_target_libs_and_exes'>register_file_target_libs_and_exes</span> <span class='id target'>target</span>
|
215
|
+
<span class='id register_items'>register_items</span> <span class='id target'>target</span><span class='period'>.</span><span class='id executables'>executables</span><span class='comma'>,</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Executable</span><span class='comma'>,</span> <span class='id target'>target</span>
|
216
|
+
<span class='comment'># Reversing the libraries makes it so that definitions like:
|
217
|
+
</span> <span class='comment'>#
|
218
|
+
</span> <span class='comment'># target.add_library :swc, 'abcd'
|
219
|
+
</span> <span class='comment'># target.add_library :src, 'efgh'
|
220
|
+
</span> <span class='comment'>#
|
221
|
+
</span> <span class='comment'># When loading, if no name is specified, the :swc will be
|
222
|
+
</span> <span class='comment'># returned to clients.
|
223
|
+
</span> <span class='id register_items'>register_items</span> <span class='id target'>target</span><span class='period'>.</span><span class='id libraries'>libraries</span><span class='comma'>,</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Library</span><span class='comma'>,</span> <span class='id target'>target</span>
|
224
|
+
<span class='kw'>end</span>
|
225
|
+
|
226
|
+
<span class='kw'>def</span> <span class='id register_items'>register_items</span> <span class='id collection'>collection</span><span class='comma'>,</span> <span class='id ruby_feature'>ruby_feature</span><span class='comma'>,</span> <span class='id target'>target</span>
|
227
|
+
<span class='id collection'>collection</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id exe_or_lib'>exe_or_lib</span><span class='op'>|</span>
|
228
|
+
<span class='id exe_or_lib'>exe_or_lib</span><span class='period'>.</span><span class='id pkg_name'>pkg_name</span> <span class='op'>=</span> <span class='id target'>target</span><span class='period'>.</span><span class='id pkg_name'>pkg_name</span>
|
229
|
+
<span class='id exe_or_lib'>exe_or_lib</span><span class='period'>.</span><span class='id pkg_version'>pkg_version</span> <span class='op'>=</span> <span class='id target'>target</span><span class='period'>.</span><span class='id pkg_version'>pkg_version</span>
|
230
|
+
<span class='id exe_or_lib'>exe_or_lib</span><span class='period'>.</span><span class='id platform'>platform</span> <span class='op'>=</span> <span class='id target'>target</span><span class='period'>.</span><span class='id platform'>platform</span>
|
231
|
+
<span class='id exe_or_lib'>exe_or_lib</span><span class='period'>.</span><span class='id file_target'>file_target</span> <span class='op'>=</span> <span class='id target'>target</span>
|
232
|
+
<span class='id ruby_feature'>ruby_feature</span><span class='period'>.</span><span class='id register'>register</span> <span class='id exe_or_lib'>exe_or_lib</span>
|
233
|
+
<span class='kw'>end</span>
|
234
|
+
<span class='kw'>end</span>
|
235
|
+
|
236
|
+
<span class='kw'>end</span></pre>
|
237
|
+
|
238
|
+
<p>end</p>
|
239
|
+
</div></div>
|
240
|
+
|
241
|
+
<div id="footer">
|
242
|
+
Generated on Wed Dec 22 11:58:32 2010 by
|
243
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
244
|
+
0.6.3 (ruby-1.9.2).
|
245
|
+
</div>
|
246
|
+
|
247
|
+
</body>
|
248
|
+
</html>
|