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.
- data/Gemfile +1 -1
- data/Gemfile.lock +0 -2
- data/README.textile +1 -1
- data/VERSION +1 -1
- data/lib/sprout/concern.rb +5 -7
- data/lib/sprout/daemon.rb +183 -143
- data/lib/sprout/executable/base.rb +564 -0
- data/lib/sprout/executable.rb +1 -550
- data/lib/sprout/generator/base.rb +2 -3
- data/lib/sprout/generator.rb +2 -1
- data/lib/sprout/generators/ruby/templates/ruby_base.rb +1 -2
- data/lib/sprout/library.rb +3 -3
- data/lib/sprout/output_buffer.rb +35 -0
- data/lib/sprout/process_runner.rb +68 -17
- data/lib/sprout/progress_bar.rb +5 -5
- data/lib/sprout/remote_file_target.rb +1 -1
- data/lib/sprout/system/base_system.rb +3 -3
- data/lib/sprout/system/unix_system.rb +1 -1
- data/lib/sprout/{test/sprout_test_case.rb → test_helper.rb} +214 -14
- data/lib/sprout/version.rb +1 -1
- data/lib/sprout.rb +133 -2
- data/rakefile.rb +2 -0
- data/test/fixtures/examples/echo_inputs.rb +1 -2
- data/test/fixtures/executable/fdb.rb +7 -9
- data/test/fixtures/executable/flex3sdk_gem/fdb +49 -18
- data/test/fixtures/executable/mxmlc.rb +1 -2
- data/test/fixtures/executable/subclass/executable_subclass.rb +0 -1
- data/test/fixtures/executable/subclass/executable_superclass.rb +1 -2
- data/test/fixtures/specification/flex4sdk.rb +35 -24
- data/test/unit/archive_unpacker_test.rb +1 -1
- data/test/unit/boolean_param_test.rb +1 -1
- data/test/unit/daemon_test.rb +35 -3
- data/test/unit/executable_option_parser_test.rb +2 -3
- data/test/unit/executable_param_test.rb +1 -1
- data/test/unit/executable_test.rb +8 -15
- data/test/unit/fake_other_executable.rb +1 -2
- data/test/unit/file_param_test.rb +1 -1
- data/test/unit/file_target_test.rb +1 -1
- data/test/unit/files_param_test.rb +1 -1
- data/test/unit/generator_generator_test.rb +1 -1
- data/test/unit/generator_test.rb +1 -1
- data/test/unit/library_generator_test.rb +1 -1
- data/test/unit/library_test.rb +1 -1
- data/test/unit/osx_system_test.rb +1 -1
- data/test/unit/path_param_test.rb +1 -1
- data/test/unit/paths_param_test.rb +1 -1
- data/test/unit/platform_test.rb +1 -1
- data/test/unit/process_runner_test.rb +1 -1
- data/test/unit/rdoc_parser_test.rb +1 -1
- data/test/unit/remote_file_loader_test.rb +1 -1
- data/test/unit/remote_file_target_test.rb +1 -1
- data/test/unit/ruby_feature_test.rb +1 -1
- data/test/unit/ruby_generator_test.rb +1 -1
- data/test/unit/specification_test.rb +8 -1
- data/test/unit/sprout_test.rb +2 -2
- data/test/unit/string_param_test.rb +1 -1
- data/test/unit/string_test.rb +1 -1
- data/test/unit/strings_param_test.rb +1 -1
- data/test/unit/test_helper.rb +33 -1
- data/test/unit/tool_generator_test.rb +1 -1
- data/test/unit/unix_system_test.rb +1 -1
- data/test/unit/user_test.rb +1 -1
- data/test/unit/vista_system_test.rb +1 -1
- data/test/unit/win_nix_system_test.rb +1 -1
- data/test/unit/win_system_test.rb +1 -1
- data/test-stderr.log +1 -0
- data/test-stdout.log +237 -0
- metadata +15 -190
- data/doc/Dir.html +0 -288
- data/doc/Rake/Task.html +0 -184
- data/doc/Sprout/ArchiveUnpacker.html +0 -1246
- data/doc/Sprout/Base/ClassMethods.html +0 -434
- data/doc/Sprout/Base.html +0 -126
- data/doc/Sprout/Concern.html +0 -353
- data/doc/Sprout/Daemon/ClassMethods.html +0 -244
- data/doc/Sprout/Daemon/InstanceMethods.html +0 -601
- data/doc/Sprout/Daemon.html +0 -166
- data/doc/Sprout/Errors/ArchiveUnpackerError.html +0 -125
- data/doc/Sprout/Errors/DestinationExistsError.html +0 -133
- data/doc/Sprout/Errors/DuplicateMemberError.html +0 -132
- data/doc/Sprout/Errors/ExecutableError.html +0 -125
- data/doc/Sprout/Errors/ExecutableRegistrationError.html +0 -132
- data/doc/Sprout/Errors/ExecutionError.html +0 -121
- data/doc/Sprout/Errors/GeneratorError.html +0 -125
- data/doc/Sprout/Errors/InvalidArgumentError.html +0 -132
- data/doc/Sprout/Errors/LoadError.html +0 -121
- data/doc/Sprout/Errors/MissingArgumentError.html +0 -132
- data/doc/Sprout/Errors/MissingExecutableError.html +0 -132
- data/doc/Sprout/Errors/MissingGeneratorError.html +0 -132
- data/doc/Sprout/Errors/MissingTemplateError.html +0 -132
- data/doc/Sprout/Errors/ProcessRunnerError.html +0 -121
- data/doc/Sprout/Errors/RemoteFileLoaderError.html +0 -110
- data/doc/Sprout/Errors/SproutError.html +0 -114
- data/doc/Sprout/Errors/UnknownArchiveType.html +0 -122
- data/doc/Sprout/Errors/UsageError.html +0 -121
- data/doc/Sprout/Errors/ValidationError.html +0 -121
- data/doc/Sprout/Errors/VersionRequirementNotMetError.html +0 -121
- data/doc/Sprout/Errors.html +0 -101
- data/doc/Sprout/Executable/Boolean.html +0 -483
- data/doc/Sprout/Executable/ClassMethods.html +0 -417
- data/doc/Sprout/Executable/CollectionParam.html +0 -483
- data/doc/Sprout/Executable/FileParam.html +0 -484
- data/doc/Sprout/Executable/Files.html +0 -292
- data/doc/Sprout/Executable/InstanceMethods.html +0 -2006
- data/doc/Sprout/Executable/Number.html +0 -141
- data/doc/Sprout/Executable/Param.html +0 -2818
- data/doc/Sprout/Executable/ParameterFactory.html +0 -232
- data/doc/Sprout/Executable/Path.html +0 -223
- data/doc/Sprout/Executable/Paths.html +0 -253
- data/doc/Sprout/Executable/StringParam.html +0 -213
- data/doc/Sprout/Executable/Strings.html +0 -167
- data/doc/Sprout/Executable/Url.html +0 -160
- data/doc/Sprout/Executable/Urls.html +0 -170
- data/doc/Sprout/Executable.html +0 -173
- data/doc/Sprout/FileTarget.html +0 -1109
- data/doc/Sprout/Generator/Base.html +0 -1626
- data/doc/Sprout/Generator/Command.html +0 -690
- data/doc/Sprout/Generator/DirectoryManifest.html +0 -476
- data/doc/Sprout/Generator/FileManifest.html +0 -572
- data/doc/Sprout/Generator/Manifest.html +0 -377
- data/doc/Sprout/Generator/TemplateManifest.html +0 -196
- data/doc/Sprout/Generator.html +0 -689
- data/doc/Sprout/GeneratorGenerator.html +0 -1018
- data/doc/Sprout/Library.html +0 -1141
- data/doc/Sprout/LibraryGenerator.html +0 -309
- data/doc/Sprout/Log.html +0 -496
- data/doc/Sprout/MXMLC.html +0 -6373
- data/doc/Sprout/Platform.html +0 -714
- data/doc/Sprout/ProcessRunner.html +0 -1352
- data/doc/Sprout/ProgressBar.html +0 -376
- data/doc/Sprout/ProgressBarImpl.html +0 -2119
- data/doc/Sprout/ProgressBarManager.html +0 -434
- data/doc/Sprout/ProgressBarOutputStream.html +0 -416
- data/doc/Sprout/RDocParser.html +0 -211
- data/doc/Sprout/RemoteFileLoader.html +0 -172
- data/doc/Sprout/RemoteFileTarget.html +0 -679
- data/doc/Sprout/ReversedProgressBar.html +0 -194
- data/doc/Sprout/RubyFeature/ClassMethods.html +0 -1065
- data/doc/Sprout/RubyFeature.html +0 -155
- data/doc/Sprout/RubyGenerator.html +0 -764
- data/doc/Sprout/Specification.html +0 -767
- data/doc/Sprout/System/BaseSystem.html +0 -1455
- data/doc/Sprout/System/JavaSystem.html +0 -122
- data/doc/Sprout/System/OSXSystem.html +0 -335
- data/doc/Sprout/System/ThreadMock.html +0 -193
- data/doc/Sprout/System/UnixSystem.html +0 -584
- data/doc/Sprout/System/VistaSystem.html +0 -251
- data/doc/Sprout/System/WinNixSystem.html +0 -325
- data/doc/Sprout/System/WinSystem.html +0 -571
- data/doc/Sprout/System.html +0 -191
- data/doc/Sprout/ToolGenerator.html +0 -931
- data/doc/Sprout/VERSION.html +0 -128
- data/doc/Sprout.html +0 -144
- data/doc/SproutTestCase.html +0 -1412
- data/doc/String.html +0 -286
- data/doc/_index.html +0 -1035
- data/doc/class_list.html +0 -36
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -53
- data/doc/css/style.css +0 -310
- data/doc/file.README.html +0 -96
- data/doc/file.archive_unpacker.html +0 -288
- data/doc/file.base.html +0 -208
- data/doc/file.base_system.html +0 -278
- data/doc/file.boolean.html +0 -135
- data/doc/file.collection_param.html +0 -139
- data/doc/file.command.html +0 -126
- data/doc/file.concern.html +0 -136
- data/doc/file.daemon.html +0 -309
- data/doc/file.dir.html +0 -76
- data/doc/file.directory_manifest.html +0 -122
- data/doc/file.errors.html +0 -147
- data/doc/file.executable.html +0 -638
- data/doc/file.file_manifest.html +0 -109
- data/doc/file.file_param.html +0 -120
- data/doc/file.file_target.html +0 -140
- data/doc/file.files.html +0 -85
- data/doc/file.generator.html +0 -296
- data/doc/file.generator_class.html +0 -72
- data/doc/file.generator_generator.html +0 -137
- data/doc/file.generator_test.html +0 -92
- data/doc/file.generator_test_helper.html +0 -67
- data/doc/file.java_system.html +0 -62
- data/doc/file.library.html +0 -291
- data/doc/file.library_generator.html +0 -74
- data/doc/file.log.html +0 -100
- data/doc/file.manifest.html +0 -67
- data/doc/file.mxmlc.html +0 -740
- data/doc/file.number.html +0 -67
- data/doc/file.osx_system.html +0 -79
- data/doc/file.param.html +0 -491
- data/doc/file.parameter_factory.html +0 -119
- data/doc/file.path.html +0 -81
- data/doc/file.paths.html +0 -80
- data/doc/file.platform.html +0 -124
- data/doc/file.process_runner.html +0 -224
- data/doc/file.progress_bar.html +0 -390
- data/doc/file.rdoc_parser.html +0 -145
- data/doc/file.remote_file_loader.html +0 -117
- data/doc/file.remote_file_target.html +0 -176
- data/doc/file.ruby_base.html +0 -64
- data/doc/file.ruby_feature.html +0 -244
- data/doc/file.ruby_generator.html +0 -118
- data/doc/file.ruby_input.html +0 -62
- data/doc/file.ruby_test_case.html +0 -78
- data/doc/file.ruby_test_helper.html +0 -61
- data/doc/file.specification.html +0 -248
- data/doc/file.sprout.html +0 -64
- data/doc/file.sprout_test_case.html +0 -280
- data/doc/file.string.html +0 -72
- data/doc/file.string_param.html +0 -76
- data/doc/file.strings.html +0 -71
- data/doc/file.system.html +0 -86
- data/doc/file.template_manifest.html +0 -67
- data/doc/file.tool.html +0 -92
- data/doc/file.tool_generator.html +0 -90
- data/doc/file.unix_system.html +0 -128
- data/doc/file.url.html +0 -71
- data/doc/file.urls.html +0 -70
- data/doc/file.version.html +0 -71
- data/doc/file.vista_system.html +0 -69
- data/doc/file.win_nix_system.html +0 -88
- data/doc/file.win_system.html +0 -129
- data/doc/file_list.html +0 -230
- data/doc/frames.html +0 -13
- data/doc/index.html +0 -96
- data/doc/js/app.js +0 -202
- data/doc/js/full_list.js +0 -149
- data/doc/js/jquery.js +0 -154
- data/doc/method_list.html +0 -3355
- data/doc/top-level-namespace.html +0 -192
- data/lib/sprout/base.rb +0 -121
- data/lib/sprout/log.rb +0 -46
- data/test/unit/sprout_test_helper.rb +0 -33
@@ -1,61 +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>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>
|
data/doc/file.specification.html
DELETED
@@ -1,248 +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>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>
|
data/doc/file.sprout.html
DELETED
@@ -1,64 +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>File: sprout</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: sprout</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>lib = File.expand_path File.dirname(__FILE__) $:.unshift lib unless
|
46
|
-
$:.include?(lib)</p>
|
47
|
-
|
48
|
-
<p>require ‘sprout/base’</p>
|
49
|
-
|
50
|
-
<p>module Sprout</p>
|
51
|
-
|
52
|
-
<pre class="code"><span class='id include'>include</span> <span class='const'>Base</span></pre>
|
53
|
-
|
54
|
-
<p>end</p>
|
55
|
-
</div></div>
|
56
|
-
|
57
|
-
<div id="footer">
|
58
|
-
Generated on Wed Dec 22 11:58:32 2010 by
|
59
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
60
|
-
0.6.3 (ruby-1.9.2).
|
61
|
-
</div>
|
62
|
-
|
63
|
-
</body>
|
64
|
-
</html>
|