bpm 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/.gitmodules +0 -0
- data/Gemfile +16 -0
- data/README.md +55 -0
- data/TODO.md +3 -0
- data/bin/bpm +8 -0
- data/bpm.gemspec +41 -0
- data/lib/bpm.rb +18 -0
- data/lib/bpm/cli.rb +6 -0
- data/lib/bpm/cli/base.rb +358 -0
- data/lib/bpm/cli/owner.rb +46 -0
- data/lib/bpm/credentials.rb +36 -0
- data/lib/bpm/default.json +9 -0
- data/lib/bpm/generator.rb +69 -0
- data/lib/bpm/init_generator.rb +43 -0
- data/lib/bpm/libgems_ext.rb +11 -0
- data/lib/bpm/libgems_ext/config_file.rb +33 -0
- data/lib/bpm/libgems_ext/dependency_installer.rb +150 -0
- data/lib/bpm/libgems_ext/installer.rb +39 -0
- data/lib/bpm/libgems_ext/libgems.rb +39 -0
- data/lib/bpm/libgems_ext/spec_fetcher.rb +11 -0
- data/lib/bpm/local.rb +76 -0
- data/lib/bpm/package.rb +277 -0
- data/lib/bpm/pipeline.rb +100 -0
- data/lib/bpm/pipeline/directive_processor.rb +47 -0
- data/lib/bpm/pipeline/generated_asset.rb +68 -0
- data/lib/bpm/pipeline/transport_processor.rb +32 -0
- data/lib/bpm/project.rb +427 -0
- data/lib/bpm/project_generator.rb +34 -0
- data/lib/bpm/remote.rb +104 -0
- data/lib/bpm/repository.rb +18 -0
- data/lib/bpm/server.rb +44 -0
- data/lib/bpm/version.rb +3 -0
- data/spec/cli/add_spec.rb +159 -0
- data/spec/cli/build_spec.rb +87 -0
- data/spec/cli/fetch_spec.rb +135 -0
- data/spec/cli/fetched_spec.rb +52 -0
- data/spec/cli/init_spec.rb +50 -0
- data/spec/cli/list_spec.rb +74 -0
- data/spec/cli/login_spec.rb +110 -0
- data/spec/cli/new_spec.rb +92 -0
- data/spec/cli/owner_spec.rb +114 -0
- data/spec/cli/push_spec.rb +73 -0
- data/spec/cli/remove_spec.rb +84 -0
- data/spec/cli/unpack_spec.rb +72 -0
- data/spec/cli/unyank_spec.rb +73 -0
- data/spec/cli/yank_spec.rb +73 -0
- data/spec/credentials_spec.rb +23 -0
- data/spec/fixtures/badrake-0.8.7.spd +0 -0
- data/spec/fixtures/builder-3.0.0.spd +0 -0
- data/spec/fixtures/bundler-1.1.pre.spd +0 -0
- data/spec/fixtures/coffee-1.0.1.pre.spd +0 -0
- data/spec/fixtures/core-test-0.4.9.spd +0 -0
- data/spec/fixtures/core-test/bin/cot +3 -0
- data/spec/fixtures/core-test/lib/main.js +1 -0
- data/spec/fixtures/core-test/package.json +46 -0
- data/spec/fixtures/core-test/resources/runner.css +1 -0
- data/spec/fixtures/core-test/tests/test.js +1 -0
- data/spec/fixtures/custom_generator-1.0.spd +0 -0
- data/spec/fixtures/custom_generator/lib/main.js +1 -0
- data/spec/fixtures/custom_generator/package.json +12 -0
- data/spec/fixtures/custom_generator/templates/init/project.json +19 -0
- data/spec/fixtures/custom_generator/templates/project/app.js +1 -0
- data/spec/fixtures/custom_generator/templates/project/lib/main.js +0 -0
- data/spec/fixtures/custom_generator/templates/project_generator.rb +20 -0
- data/spec/fixtures/hello_world/LICENSE +19 -0
- data/spec/fixtures/hello_world/README.md +21 -0
- data/spec/fixtures/hello_world/assets/bpm_packages.js +13 -0
- data/spec/fixtures/hello_world/assets/bpm_styles.css +14 -0
- data/spec/fixtures/hello_world/assets/papa-smurf.jpg +0 -0
- data/spec/fixtures/hello_world/hello_world.json +20 -0
- data/spec/fixtures/hello_world/lib/main.js +9 -0
- data/spec/fixtures/hello_world/packages/custom_package/assets/dummy.txt +1 -0
- data/spec/fixtures/hello_world/packages/custom_package/css/sample_styles.css +3 -0
- data/spec/fixtures/hello_world/packages/custom_package/custom_dir/basic-module.js +1 -0
- data/spec/fixtures/hello_world/packages/custom_package/lib/main.js +1 -0
- data/spec/fixtures/hello_world/packages/custom_package/package.json +22 -0
- data/spec/fixtures/hello_world/tests/main-test.js +8 -0
- data/spec/fixtures/highline-1.6.1.spd +0 -0
- data/spec/fixtures/ivory-0.0.1.spd +0 -0
- data/spec/fixtures/jquery-1.4.3.spd +0 -0
- data/spec/fixtures/optparse-1.0.1.spd +0 -0
- data/spec/fixtures/rake-0.8.6.spd +0 -0
- data/spec/fixtures/rake-0.8.7.spd +0 -0
- data/spec/fixtures/simple_hello/assets/bpm_packages.js +1 -0
- data/spec/fixtures/simple_hello/lib/main.js +1 -0
- data/spec/fixtures/spade-0.5.0.spd +0 -0
- data/spec/fixtures/src/README.txt +1 -0
- data/spec/fixtures/src/bundler-1.1.pre/.gitignore +22 -0
- data/spec/fixtures/src/bundler-1.1.pre/CHANGELOG.md +646 -0
- data/spec/fixtures/src/bundler-1.1.pre/ISSUES.md +47 -0
- data/spec/fixtures/src/bundler-1.1.pre/LICENSE +21 -0
- data/spec/fixtures/src/bundler-1.1.pre/README.md +29 -0
- data/spec/fixtures/src/bundler-1.1.pre/UPGRADING.md +103 -0
- data/spec/fixtures/src/bundler-1.1.pre/bin/bundle +20 -0
- data/spec/fixtures/src/bundler-1.1.pre/lib/bundler.js +23 -0
- data/spec/fixtures/src/bundler-1.1.pre/lib/bundler/definition.js +14 -0
- data/spec/fixtures/src/bundler-1.1.pre/lib/bundler/dependency.js +15 -0
- data/spec/fixtures/src/bundler-1.1.pre/lib/bundler/dsl.js +9 -0
- data/spec/fixtures/src/bundler-1.1.pre/lib/bundler/ui.js +6 -0
- data/spec/fixtures/src/bundler-1.1.pre/man/bundle-config.ronn +90 -0
- data/spec/fixtures/src/bundler-1.1.pre/man/bundle-exec.ronn +111 -0
- data/spec/fixtures/src/bundler-1.1.pre/man/bundle-install.ronn +314 -0
- data/spec/fixtures/src/bundler-1.1.pre/man/bundle-package.ronn +59 -0
- data/spec/fixtures/src/bundler-1.1.pre/man/bundle-update.ronn +176 -0
- data/spec/fixtures/src/bundler-1.1.pre/man/bundle.ronn +80 -0
- data/spec/fixtures/src/bundler-1.1.pre/man/gemfile.5.ronn +279 -0
- data/spec/fixtures/src/bundler-1.1.pre/man/index.txt +6 -0
- data/spec/fixtures/src/bundler-1.1.pre/package.json +19 -0
- data/spec/fixtures/src/coffee-1.0.1.pre/bin/cake +0 -0
- data/spec/fixtures/src/coffee-1.0.1.pre/bin/coffee +0 -0
- data/spec/fixtures/src/coffee-1.0.1.pre/lib/coffee.js +0 -0
- data/spec/fixtures/src/coffee-1.0.1.pre/lib/coffee/base.js +0 -0
- data/spec/fixtures/src/coffee-1.0.1.pre/lib/coffee/mocha/chai.js +0 -0
- data/spec/fixtures/src/coffee-1.0.1.pre/package.json +19 -0
- data/spec/fixtures/src/coffee-1.0.1.pre/qunit/coffee/test.js +0 -0
- data/spec/fixtures/src/coffee-1.0.1.pre/qunit/test.js +0 -0
- data/spec/fixtures/src/jquery/lib/main.js +7179 -0
- data/spec/fixtures/src/jquery/package.json +15 -0
- data/spec/fixtures/src/rake-0.8.6/CHANGES +436 -0
- data/spec/fixtures/src/rake-0.8.6/MIT-LICENSE +21 -0
- data/spec/fixtures/src/rake-0.8.6/README +196 -0
- data/spec/fixtures/src/rake-0.8.6/Rakefile +430 -0
- data/spec/fixtures/src/rake-0.8.6/TODO +20 -0
- data/spec/fixtures/src/rake-0.8.6/bin/rake +31 -0
- data/spec/fixtures/src/rake-0.8.6/doc/command_line_usage.rdoc +102 -0
- data/spec/fixtures/src/rake-0.8.6/doc/example/Rakefile1 +38 -0
- data/spec/fixtures/src/rake-0.8.6/doc/example/Rakefile2 +35 -0
- data/spec/fixtures/src/rake-0.8.6/doc/example/a.c +6 -0
- data/spec/fixtures/src/rake-0.8.6/doc/example/b.c +6 -0
- data/spec/fixtures/src/rake-0.8.6/doc/example/main.c +11 -0
- data/spec/fixtures/src/rake-0.8.6/doc/glossary.rdoc +51 -0
- data/spec/fixtures/src/rake-0.8.6/doc/jamis.rb +591 -0
- data/spec/fixtures/src/rake-0.8.6/doc/proto_rake.rdoc +127 -0
- data/spec/fixtures/src/rake-0.8.6/doc/rake.1.gz +0 -0
- data/spec/fixtures/src/rake-0.8.6/doc/rakefile.rdoc +534 -0
- data/spec/fixtures/src/rake-0.8.6/doc/rational.rdoc +151 -0
- data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.4.14.rdoc +23 -0
- data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.4.15.rdoc +35 -0
- data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.5.0.rdoc +53 -0
- data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.5.3.rdoc +78 -0
- data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.5.4.rdoc +46 -0
- data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.6.0.rdoc +141 -0
- data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.7.0.rdoc +119 -0
- data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.7.1.rdoc +59 -0
- data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.7.2.rdoc +121 -0
- data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.7.3.rdoc +47 -0
- data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.8.0.rdoc +114 -0
- data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.8.2.rdoc +165 -0
- data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.8.3.rdoc +112 -0
- data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.8.4.rdoc +147 -0
- data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.8.5.rdoc +53 -0
- data/spec/fixtures/src/rake-0.8.6/doc/release_notes/rake-0.8.6.rdoc +55 -0
- data/spec/fixtures/src/rake-0.8.6/install.rb +88 -0
- data/spec/fixtures/src/rake-0.8.6/lib/rake.rb +2502 -0
- data/spec/fixtures/src/rake-0.8.6/lib/rake/alt_system.rb +108 -0
- data/spec/fixtures/src/rake-0.8.6/lib/rake/classic_namespace.rb +8 -0
- data/spec/fixtures/src/rake-0.8.6/lib/rake/clean.rb +33 -0
- data/spec/fixtures/src/rake-0.8.6/lib/rake/contrib/compositepublisher.rb +24 -0
- data/spec/fixtures/src/rake-0.8.6/lib/rake/contrib/ftptools.rb +153 -0
- data/spec/fixtures/src/rake-0.8.6/lib/rake/contrib/publisher.rb +75 -0
- data/spec/fixtures/src/rake-0.8.6/lib/rake/contrib/rubyforgepublisher.rb +18 -0
- data/spec/fixtures/src/rake-0.8.6/lib/rake/contrib/sshpublisher.rb +47 -0
- data/spec/fixtures/src/rake-0.8.6/lib/rake/contrib/sys.rb +209 -0
- data/spec/fixtures/src/rake-0.8.6/lib/rake/gempackagetask.rb +97 -0
- data/spec/fixtures/src/rake-0.8.6/lib/rake/loaders/makefile.rb +42 -0
- data/spec/fixtures/src/rake-0.8.6/lib/rake/packagetask.rb +184 -0
- data/spec/fixtures/src/rake-0.8.6/lib/rake/rake_test_loader.rb +5 -0
- data/spec/fixtures/src/rake-0.8.6/lib/rake/rdoctask.rb +209 -0
- data/spec/fixtures/src/rake-0.8.6/lib/rake/ruby182_test_unit_fix.rb +23 -0
- data/spec/fixtures/src/rake-0.8.6/lib/rake/runtest.rb +23 -0
- data/spec/fixtures/src/rake-0.8.6/lib/rake/tasklib.rb +23 -0
- data/spec/fixtures/src/rake-0.8.6/lib/rake/testtask.rb +161 -0
- data/spec/fixtures/src/rake-0.8.6/lib/rake/win32.rb +55 -0
- data/spec/fixtures/src/rake-0.8.6/package.json +18 -0
- data/spec/fixtures/src/rake-0.8.6/test/capture_stdout.rb +26 -0
- data/spec/fixtures/src/rake-0.8.7/CHANGES +440 -0
- data/spec/fixtures/src/rake-0.8.7/MIT-LICENSE +21 -0
- data/spec/fixtures/src/rake-0.8.7/README +196 -0
- data/spec/fixtures/src/rake-0.8.7/Rakefile +430 -0
- data/spec/fixtures/src/rake-0.8.7/TODO +20 -0
- data/spec/fixtures/src/rake-0.8.7/bin/rake +31 -0
- data/spec/fixtures/src/rake-0.8.7/doc/command_line_usage.rdoc +102 -0
- data/spec/fixtures/src/rake-0.8.7/doc/example/Rakefile1 +38 -0
- data/spec/fixtures/src/rake-0.8.7/doc/example/Rakefile2 +35 -0
- data/spec/fixtures/src/rake-0.8.7/doc/example/a.c +6 -0
- data/spec/fixtures/src/rake-0.8.7/doc/example/b.c +6 -0
- data/spec/fixtures/src/rake-0.8.7/doc/example/main.c +11 -0
- data/spec/fixtures/src/rake-0.8.7/doc/glossary.rdoc +51 -0
- data/spec/fixtures/src/rake-0.8.7/doc/jamis.rb +591 -0
- data/spec/fixtures/src/rake-0.8.7/doc/proto_rake.rdoc +127 -0
- data/spec/fixtures/src/rake-0.8.7/doc/rake.1.gz +0 -0
- data/spec/fixtures/src/rake-0.8.7/doc/rakefile.rdoc +534 -0
- data/spec/fixtures/src/rake-0.8.7/doc/rational.rdoc +151 -0
- data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.4.14.rdoc +23 -0
- data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.4.15.rdoc +35 -0
- data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.5.0.rdoc +53 -0
- data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.5.3.rdoc +78 -0
- data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.5.4.rdoc +46 -0
- data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.6.0.rdoc +141 -0
- data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.7.0.rdoc +119 -0
- data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.7.1.rdoc +59 -0
- data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.7.2.rdoc +121 -0
- data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.7.3.rdoc +47 -0
- data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.8.0.rdoc +114 -0
- data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.8.2.rdoc +165 -0
- data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.8.3.rdoc +112 -0
- data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.8.4.rdoc +147 -0
- data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.8.5.rdoc +53 -0
- data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.8.6.rdoc +55 -0
- data/spec/fixtures/src/rake-0.8.7/doc/release_notes/rake-0.8.7.rdoc +55 -0
- data/spec/fixtures/src/rake-0.8.7/install.rb +88 -0
- data/spec/fixtures/src/rake-0.8.7/lib/rake.rb +2506 -0
- data/spec/fixtures/src/rake-0.8.7/lib/rake/alt_system.rb +108 -0
- data/spec/fixtures/src/rake-0.8.7/lib/rake/classic_namespace.rb +8 -0
- data/spec/fixtures/src/rake-0.8.7/lib/rake/clean.rb +33 -0
- data/spec/fixtures/src/rake-0.8.7/lib/rake/contrib/compositepublisher.rb +24 -0
- data/spec/fixtures/src/rake-0.8.7/lib/rake/contrib/ftptools.rb +153 -0
- data/spec/fixtures/src/rake-0.8.7/lib/rake/contrib/publisher.rb +75 -0
- data/spec/fixtures/src/rake-0.8.7/lib/rake/contrib/rubyforgepublisher.rb +18 -0
- data/spec/fixtures/src/rake-0.8.7/lib/rake/contrib/sshpublisher.rb +47 -0
- data/spec/fixtures/src/rake-0.8.7/lib/rake/contrib/sys.rb +209 -0
- data/spec/fixtures/src/rake-0.8.7/lib/rake/gempackagetask.rb +97 -0
- data/spec/fixtures/src/rake-0.8.7/lib/rake/loaders/makefile.rb +42 -0
- data/spec/fixtures/src/rake-0.8.7/lib/rake/packagetask.rb +184 -0
- data/spec/fixtures/src/rake-0.8.7/lib/rake/rake_test_loader.rb +5 -0
- data/spec/fixtures/src/rake-0.8.7/lib/rake/rdoctask.rb +209 -0
- data/spec/fixtures/src/rake-0.8.7/lib/rake/ruby182_test_unit_fix.rb +23 -0
- data/spec/fixtures/src/rake-0.8.7/lib/rake/runtest.rb +23 -0
- data/spec/fixtures/src/rake-0.8.7/lib/rake/tasklib.rb +23 -0
- data/spec/fixtures/src/rake-0.8.7/lib/rake/testtask.rb +161 -0
- data/spec/fixtures/src/rake-0.8.7/lib/rake/win32.rb +55 -0
- data/spec/fixtures/src/rake-0.8.7/package.json +18 -0
- data/spec/fixtures/src/rake-0.8.7/test/capture_stdout.rb +26 -0
- data/spec/fixtures/src/spade/lib/main.js +1 -0
- data/spec/fixtures/src/spade/package.json +15 -0
- data/spec/fixtures/transporter/lib/main.js +3 -0
- data/spec/fixtures/transporter/packages/transport/lib/wrapper.js +5 -0
- data/spec/fixtures/transporter/packages/transport/package.json +21 -0
- data/spec/fixtures/transporter/transporter.json +18 -0
- data/spec/gauntlet_spec.rb +33 -0
- data/spec/package_spec.rb +319 -0
- data/spec/pipeline_spec.rb +213 -0
- data/spec/project_spec.rb +130 -0
- data/spec/spec_helper.rb +42 -0
- data/spec/support/cli.rb +93 -0
- data/spec/support/env.rb +18 -0
- data/spec/support/fake.rb +53 -0
- data/spec/support/fake_gem_server.rb +72 -0
- data/spec/support/fake_gemcutter.rb +50 -0
- data/spec/support/matchers.rb +32 -0
- data/spec/support/path.rb +63 -0
- data/spec/support/project.rb +43 -0
- data/templates/init/assets/bpm_packages.js +7 -0
- data/templates/init/assets/bpm_styles.css +7 -0
- data/templates/init/project.json +16 -0
- data/templates/project/LICENSE +19 -0
- data/templates/project/README.md +21 -0
- data/templates/project/app.js +1 -0
- data/templates/project/index.html +13 -0
- metadata +627 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
= Rake Project -- To Do List
|
2
|
+
|
3
|
+
Send suggestions for this list to mailto:jim@weirichhouse.org or on
|
4
|
+
the rake-devel@rubyforge.org mailing list.
|
5
|
+
|
6
|
+
=== To Do
|
7
|
+
* Need a nice API for accessing tasks in namespaces, namespaces in an app, etc.
|
8
|
+
* Provide a way to disable -w warning mode.
|
9
|
+
* Define a set of default rules that work in the absense of any Rakefile
|
10
|
+
* What about cyclic dependencies?
|
11
|
+
* Java support utilities
|
12
|
+
* Installation support utilities
|
13
|
+
* Check out installpkg.rb
|
14
|
+
* Autogenerate Dependencies
|
15
|
+
* Rules should apply to existing tasks if no actions are defined.
|
16
|
+
* How to create multiple package tasks without task name collision?
|
17
|
+
* Trap "ln -s" commands that fail and use "cp" instead (SMB mounted
|
18
|
+
drives have problems with "ln -s".
|
19
|
+
|
20
|
+
(moved DONE list to CHANGES file)
|
@@ -0,0 +1,31 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
#--
|
4
|
+
# Copyright (c) 2003, 2004, 2005, 2006, 2007 Jim Weirich
|
5
|
+
#
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
# of this software and associated documentation files (the "Software"), to
|
8
|
+
# deal in the Software without restriction, including without limitation the
|
9
|
+
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
10
|
+
# sell copies of the Software, and to permit persons to whom the Software is
|
11
|
+
# furnished to do so, subject to the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be included in
|
14
|
+
# all copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
22
|
+
# IN THE SOFTWARE.
|
23
|
+
#++
|
24
|
+
|
25
|
+
begin
|
26
|
+
require 'rake'
|
27
|
+
rescue LoadError
|
28
|
+
require 'rubygems'
|
29
|
+
require 'rake'
|
30
|
+
end
|
31
|
+
Rake.application.run
|
@@ -0,0 +1,102 @@
|
|
1
|
+
= Rake Command Line Usage
|
2
|
+
|
3
|
+
Rake is invoked from the command line using:
|
4
|
+
|
5
|
+
% rake [<em>options</em> ...] [<em>VAR</em>=<em>VALUE</em>] [<em>targets</em> ...]
|
6
|
+
|
7
|
+
Options are:
|
8
|
+
|
9
|
+
[<tt><em>name</em>=<em>value</em></tt>]
|
10
|
+
Set the environment variable <em>name</em> to <em>value</em>
|
11
|
+
during the execution of the <b>rake</b> command. You can access
|
12
|
+
the value by using ENV['<em>name</em>'].
|
13
|
+
|
14
|
+
[<tt>--classic-namespace</tt> (-n)]
|
15
|
+
Import the Task, FileTask, and FileCreateTask into the top-level
|
16
|
+
scope to be compatible with older versions of Rake. Alternatively
|
17
|
+
you can include the line <code>require
|
18
|
+
'rake/classic_namespace'</code> in your Rakefile to get the
|
19
|
+
classic behavior.
|
20
|
+
|
21
|
+
[<tt>--describe</tt> _pattern_ (-D)]
|
22
|
+
Describe the tasks (matching optional PATTERN), then exit.
|
23
|
+
|
24
|
+
[<tt>--dry-run</tt> (-n)]
|
25
|
+
Do a dry run. Print the tasks invoked and executed, but do not
|
26
|
+
actually execute any of the actions.
|
27
|
+
|
28
|
+
[<tt>--execute</tt> _code_ (-e)]
|
29
|
+
Execute some Ruby code and exit.
|
30
|
+
|
31
|
+
[<tt>--execute-print</tt> _code_ (-p)]
|
32
|
+
Execute some Ruby code, print the result, and exit.
|
33
|
+
|
34
|
+
[<tt>--execute-continue</tt> _code_ (-p)]
|
35
|
+
Execute some Ruby code, then continue with normal task processing.
|
36
|
+
|
37
|
+
[<tt>--help</tt> (-H)]
|
38
|
+
Display some help text and exit.
|
39
|
+
|
40
|
+
[<tt>--libdir</tt> _directory_ (-I)]
|
41
|
+
Add _directory_ to the list of directories searched for require.
|
42
|
+
|
43
|
+
[<tt>--nosearch</tt> (-N)]
|
44
|
+
Do not search for a Rakefile in parent directories.
|
45
|
+
|
46
|
+
[<tt>--prereqs</tt> (-P)]
|
47
|
+
Display a list of all tasks and their immediate prerequisites.
|
48
|
+
|
49
|
+
[<tt>--quiet</tt> (-q)]
|
50
|
+
Do not echo commands from FileUtils.
|
51
|
+
|
52
|
+
[<tt>--rakefile</tt> _filename_ (-f)]
|
53
|
+
Use _filename_ as the name of the rakefile. The default rakefile
|
54
|
+
names are +rakefile+ and +Rakefile+ (with +rakefile+ taking
|
55
|
+
precedence). If the rakefile is not found in the current
|
56
|
+
directory, +rake+ will search parent directories for a match. The
|
57
|
+
directory where the Rakefile is found will become the current
|
58
|
+
directory for the actions executed in the Rakefile.
|
59
|
+
|
60
|
+
[<tt>--rakelibdir</tt> _rakelibdir_ (-R)]
|
61
|
+
Auto-import any .rake files in RAKELIBDIR. (default is 'rakelib')
|
62
|
+
|
63
|
+
[<tt>--require</tt> _name_ (-r)]
|
64
|
+
Require _name_ before executing the Rakefile.
|
65
|
+
|
66
|
+
[<tt>--rules</tt>]
|
67
|
+
Trace the rules resolution.
|
68
|
+
|
69
|
+
[<tt>--silent (-s)</tt>]
|
70
|
+
Like --quiet, but also suppresses the 'in directory' announcement.
|
71
|
+
|
72
|
+
[<tt>--system</tt> (-g)]
|
73
|
+
Use the system wide (global) rakefiles. The project Rakefile is
|
74
|
+
ignored. By default, the system wide rakefiles are used only if no
|
75
|
+
project Rakefile is found. On Unix-like system, the system wide
|
76
|
+
rake files are located in $HOME/.rake. On a windows system they
|
77
|
+
are stored in $APPDATA/Rake.
|
78
|
+
|
79
|
+
[<tt>--no-system</tt> (-G)]
|
80
|
+
Use the project level Rakefile, ignoring the system-wide (global)
|
81
|
+
rakefiles.
|
82
|
+
|
83
|
+
[<tt>--tasks</tt> (-T)]
|
84
|
+
Display a list of the major tasks and their comments. Comments
|
85
|
+
are defined using the "desc" command.
|
86
|
+
|
87
|
+
[<tt>--trace</tt> (-t)]
|
88
|
+
Turn on invoke/execute tracing. Also enable full backtrace on
|
89
|
+
errors.
|
90
|
+
|
91
|
+
[<tt>--usage</tt> (-h)]
|
92
|
+
Display a usage message and exit.
|
93
|
+
|
94
|
+
[<tt>--verbose</tt> (-v)]
|
95
|
+
Echo the Sys commands to standard output.
|
96
|
+
|
97
|
+
[<tt>--version</tt> (-V)]
|
98
|
+
Display the program version and exit.
|
99
|
+
|
100
|
+
In addition, any command line option of the form
|
101
|
+
<em>VAR</em>=<em>VALUE</em> will be added to the environment hash
|
102
|
+
<tt>ENV</tt> and may be tested in the Rakefile.
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# Example Rakefile -*- ruby -*-
|
2
|
+
|
3
|
+
task :default => [:main]
|
4
|
+
|
5
|
+
file "a.o" => ["a.c"] do |t|
|
6
|
+
src = t.name.sub(/\.o$/, '.c')
|
7
|
+
sh "gcc #{src} -c -o #{t.name}"
|
8
|
+
end
|
9
|
+
|
10
|
+
file "b.o" => ["b.c"] do |t|
|
11
|
+
src = t.name.sub(/\.o$/, '.c')
|
12
|
+
sh "gcc #{src} -c -o #{t.name}"
|
13
|
+
end
|
14
|
+
|
15
|
+
file "main.o" => ["main.c"] do |t|
|
16
|
+
src = t.name.sub(/\.o$/, '.c')
|
17
|
+
sh "gcc #{src} -c -o #{t.name}"
|
18
|
+
end
|
19
|
+
|
20
|
+
OBJFILES = ["a.o", "b.o", "main.o"]
|
21
|
+
task :obj => OBJFILES
|
22
|
+
|
23
|
+
file "main" => OBJFILES do |t|
|
24
|
+
sh "gcc -o #{t.name} main.o a.o b.o"
|
25
|
+
end
|
26
|
+
|
27
|
+
task :clean do
|
28
|
+
rm_f FileList['*.o']
|
29
|
+
Dir['*~'].each { |fn| rm_f fn }
|
30
|
+
end
|
31
|
+
|
32
|
+
task :clobber => [:clean] do
|
33
|
+
rm_f "main"
|
34
|
+
end
|
35
|
+
|
36
|
+
task :run => ["main"] do
|
37
|
+
sh "./main"
|
38
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# Example Rakefile -*- ruby -*-
|
2
|
+
# Using the power of Ruby
|
3
|
+
|
4
|
+
task :default => [:main]
|
5
|
+
|
6
|
+
def ext(fn, newext)
|
7
|
+
fn.sub(/\.[^.]+$/, newext)
|
8
|
+
end
|
9
|
+
|
10
|
+
SRCFILES = Dir['*.c']
|
11
|
+
OBJFILES = SRCFILES.collect { |fn| ext(fn,".o") }
|
12
|
+
|
13
|
+
OBJFILES.each do |objfile|
|
14
|
+
srcfile = ext(objfile, ".c")
|
15
|
+
file objfile => [srcfile] do |t|
|
16
|
+
sh "gcc #{srcfile} -c -o #{t.name}"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
file "main" => OBJFILES do |t|
|
21
|
+
sh "gcc -o #{t.name} main.o a.o b.o"
|
22
|
+
end
|
23
|
+
|
24
|
+
task :clean do
|
25
|
+
rm_f FileList['*.o']
|
26
|
+
Dir['*~'].each { |fn| rm_f fn }
|
27
|
+
end
|
28
|
+
|
29
|
+
task :clobber => [:clean] do
|
30
|
+
rm_f "main"
|
31
|
+
end
|
32
|
+
|
33
|
+
task :run => ["main"] do
|
34
|
+
sh "./main"
|
35
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
= Glossary
|
2
|
+
|
3
|
+
[<b>action</b>]
|
4
|
+
Code to be executed in order to perform a task. Actions in a
|
5
|
+
rakefile are specified in a code block (usually delimited by
|
6
|
+
+do+/+end+ pairs.
|
7
|
+
|
8
|
+
[<b>execute</b>]
|
9
|
+
When a task is executed, all of its actions are performed, in
|
10
|
+
the order they were defined. Note that unlike
|
11
|
+
<tt>invoke</tt>, <tt>execute</tt> always executes the actions
|
12
|
+
(without invoking or executing the prerequisites).
|
13
|
+
|
14
|
+
[<b>file task</b> (FileTask)]
|
15
|
+
A file task is a task whose purpose is to create a file
|
16
|
+
(which has the same name as the task). When invoked, a file
|
17
|
+
task will only execute if one or more of the following
|
18
|
+
conditions are true.
|
19
|
+
|
20
|
+
1. The associated file does not exist.
|
21
|
+
2. A prerequisite has a later time stamp than the existing file.
|
22
|
+
|
23
|
+
Because normal Tasks always have the current time as
|
24
|
+
timestamp, a FileTask that has a normal Task prerequisite
|
25
|
+
will always execute.
|
26
|
+
|
27
|
+
[<b>invoke</b>]
|
28
|
+
When a task is invoked, first we check to see if it has been
|
29
|
+
invoked before. if it has been, then nothing else is done.
|
30
|
+
If this is the first time its been invoked, then we invoke
|
31
|
+
each of its prerequisites. Finally, we check to see if we
|
32
|
+
need to execute the actions of this task by calling
|
33
|
+
<tt>needed?</tt>. Finally, if the task is needed, we execute
|
34
|
+
its actions.
|
35
|
+
|
36
|
+
NOTE: Currently prerequisites are invoked even if the task is
|
37
|
+
not needed. This may change in the future.
|
38
|
+
|
39
|
+
[<b>prerequisites</b>]
|
40
|
+
Every task has a set (possiblity empty) of prerequisites. A
|
41
|
+
prerequisite P to Task T is itself a task that must be invoked
|
42
|
+
before Task T.
|
43
|
+
|
44
|
+
[<b>rule</b>]
|
45
|
+
A rule is a recipe for synthesizing a task when no task is
|
46
|
+
explicitly defined. Rules generally synthesize file tasks.
|
47
|
+
|
48
|
+
[<b>task</b> (Task)]
|
49
|
+
Basic unit of work in a rakefile. A task has a name, a set of
|
50
|
+
prerequisites and a list of actions to be performed.
|
51
|
+
|
@@ -0,0 +1,591 @@
|
|
1
|
+
module RDoc
|
2
|
+
module Page
|
3
|
+
|
4
|
+
FONTS = "\"Bitstream Vera Sans\", Verdana, Arial, Helvetica, sans-serif"
|
5
|
+
|
6
|
+
STYLE = <<CSS
|
7
|
+
a {
|
8
|
+
color: #00F;
|
9
|
+
text-decoration: none;
|
10
|
+
}
|
11
|
+
|
12
|
+
a:hover {
|
13
|
+
color: #77F;
|
14
|
+
text-decoration: underline;
|
15
|
+
}
|
16
|
+
|
17
|
+
body, td, p {
|
18
|
+
font-family: %fonts%;
|
19
|
+
background: #FFF;
|
20
|
+
color: #000;
|
21
|
+
margin: 0px;
|
22
|
+
font-size: small;
|
23
|
+
}
|
24
|
+
|
25
|
+
#content {
|
26
|
+
margin: 2em;
|
27
|
+
}
|
28
|
+
|
29
|
+
#description p {
|
30
|
+
margin-bottom: 0.5em;
|
31
|
+
}
|
32
|
+
|
33
|
+
.sectiontitle {
|
34
|
+
margin-top: 1em;
|
35
|
+
margin-bottom: 1em;
|
36
|
+
padding: 0.5em;
|
37
|
+
padding-left: 2em;
|
38
|
+
background: #005;
|
39
|
+
color: #FFF;
|
40
|
+
font-weight: bold;
|
41
|
+
border: 1px dotted black;
|
42
|
+
}
|
43
|
+
|
44
|
+
.attr-rw {
|
45
|
+
padding-left: 1em;
|
46
|
+
padding-right: 1em;
|
47
|
+
text-align: center;
|
48
|
+
color: #055;
|
49
|
+
}
|
50
|
+
|
51
|
+
.attr-name {
|
52
|
+
font-weight: bold;
|
53
|
+
}
|
54
|
+
|
55
|
+
.attr-desc {
|
56
|
+
}
|
57
|
+
|
58
|
+
.attr-value {
|
59
|
+
font-family: monospace;
|
60
|
+
}
|
61
|
+
|
62
|
+
.file-title-prefix {
|
63
|
+
font-size: large;
|
64
|
+
}
|
65
|
+
|
66
|
+
.file-title {
|
67
|
+
font-size: large;
|
68
|
+
font-weight: bold;
|
69
|
+
background: #005;
|
70
|
+
color: #FFF;
|
71
|
+
}
|
72
|
+
|
73
|
+
.banner {
|
74
|
+
background: #005;
|
75
|
+
color: #FFF;
|
76
|
+
border: 1px solid black;
|
77
|
+
padding: 1em;
|
78
|
+
}
|
79
|
+
|
80
|
+
.banner td {
|
81
|
+
background: transparent;
|
82
|
+
color: #FFF;
|
83
|
+
}
|
84
|
+
|
85
|
+
h1 a, h2 a, .sectiontitle a, .banner a {
|
86
|
+
color: #FF0;
|
87
|
+
}
|
88
|
+
|
89
|
+
h1 a:hover, h2 a:hover, .sectiontitle a:hover, .banner a:hover {
|
90
|
+
color: #FF7;
|
91
|
+
}
|
92
|
+
|
93
|
+
.dyn-source {
|
94
|
+
display: none;
|
95
|
+
background: #FFE;
|
96
|
+
color: #000;
|
97
|
+
border: 1px dotted black;
|
98
|
+
margin: 0.5em 2em 0.5em 2em;
|
99
|
+
padding: 0.5em;
|
100
|
+
}
|
101
|
+
|
102
|
+
.dyn-source .cmt {
|
103
|
+
color: #00F;
|
104
|
+
font-style: italic;
|
105
|
+
}
|
106
|
+
|
107
|
+
.dyn-source .kw {
|
108
|
+
color: #070;
|
109
|
+
font-weight: bold;
|
110
|
+
}
|
111
|
+
|
112
|
+
.method {
|
113
|
+
margin-left: 1em;
|
114
|
+
margin-right: 1em;
|
115
|
+
margin-bottom: 1em;
|
116
|
+
}
|
117
|
+
|
118
|
+
.description pre {
|
119
|
+
padding: 0.5em;
|
120
|
+
border: 1px dotted black;
|
121
|
+
background: #FFE;
|
122
|
+
}
|
123
|
+
|
124
|
+
.method .title {
|
125
|
+
font-family: monospace;
|
126
|
+
font-size: large;
|
127
|
+
border-bottom: 1px dashed black;
|
128
|
+
margin-bottom: 0.3em;
|
129
|
+
padding-bottom: 0.1em;
|
130
|
+
}
|
131
|
+
|
132
|
+
.method .description, .method .sourcecode {
|
133
|
+
margin-left: 1em;
|
134
|
+
}
|
135
|
+
|
136
|
+
.description p, .sourcecode p {
|
137
|
+
margin-bottom: 0.5em;
|
138
|
+
}
|
139
|
+
|
140
|
+
.method .sourcecode p.source-link {
|
141
|
+
text-indent: 0em;
|
142
|
+
margin-top: 0.5em;
|
143
|
+
}
|
144
|
+
|
145
|
+
.method .aka {
|
146
|
+
margin-top: 0.3em;
|
147
|
+
margin-left: 1em;
|
148
|
+
font-style: italic;
|
149
|
+
text-indent: 2em;
|
150
|
+
}
|
151
|
+
|
152
|
+
h1 {
|
153
|
+
padding: 1em;
|
154
|
+
border: 1px solid black;
|
155
|
+
font-size: x-large;
|
156
|
+
font-weight: bold;
|
157
|
+
color: #FFF;
|
158
|
+
background: #007;
|
159
|
+
}
|
160
|
+
|
161
|
+
h2 {
|
162
|
+
padding: 0.5em 1em 0.5em 1em;
|
163
|
+
border: 1px solid black;
|
164
|
+
font-size: large;
|
165
|
+
font-weight: bold;
|
166
|
+
color: #FFF;
|
167
|
+
background: #009;
|
168
|
+
}
|
169
|
+
|
170
|
+
h3, h4, h5, h6 {
|
171
|
+
padding: 0.2em 1em 0.2em 1em;
|
172
|
+
border: 1px dashed black;
|
173
|
+
color: #000;
|
174
|
+
background: #AAF;
|
175
|
+
}
|
176
|
+
|
177
|
+
.sourcecode > pre {
|
178
|
+
padding: 0.5em;
|
179
|
+
border: 1px dotted black;
|
180
|
+
background: #FFE;
|
181
|
+
}
|
182
|
+
|
183
|
+
CSS
|
184
|
+
|
185
|
+
XHTML_PREAMBLE = %{<?xml version="1.0" encoding="%charset%"?>
|
186
|
+
<!DOCTYPE html
|
187
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
188
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
189
|
+
}
|
190
|
+
|
191
|
+
HEADER = XHTML_PREAMBLE + <<ENDHEADER
|
192
|
+
<html>
|
193
|
+
<head>
|
194
|
+
<title>%title%</title>
|
195
|
+
<meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
|
196
|
+
<link rel="stylesheet" href="%style_url%" type="text/css" media="screen" />
|
197
|
+
|
198
|
+
<script language="JavaScript" type="text/javascript">
|
199
|
+
// <![CDATA[
|
200
|
+
|
201
|
+
function toggleSource( id )
|
202
|
+
{
|
203
|
+
var elem
|
204
|
+
var link
|
205
|
+
|
206
|
+
if( document.getElementById )
|
207
|
+
{
|
208
|
+
elem = document.getElementById( id )
|
209
|
+
link = document.getElementById( "l_" + id )
|
210
|
+
}
|
211
|
+
else if ( document.all )
|
212
|
+
{
|
213
|
+
elem = eval( "document.all." + id )
|
214
|
+
link = eval( "document.all.l_" + id )
|
215
|
+
}
|
216
|
+
else
|
217
|
+
return false;
|
218
|
+
|
219
|
+
if( elem.style.display == "block" )
|
220
|
+
{
|
221
|
+
elem.style.display = "none"
|
222
|
+
link.innerHTML = "show source"
|
223
|
+
}
|
224
|
+
else
|
225
|
+
{
|
226
|
+
elem.style.display = "block"
|
227
|
+
link.innerHTML = "hide source"
|
228
|
+
}
|
229
|
+
}
|
230
|
+
|
231
|
+
function openCode( url )
|
232
|
+
{
|
233
|
+
window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
|
234
|
+
}
|
235
|
+
// ]]>
|
236
|
+
</script>
|
237
|
+
</head>
|
238
|
+
|
239
|
+
<body>
|
240
|
+
ENDHEADER
|
241
|
+
|
242
|
+
FILE_PAGE = <<HTML
|
243
|
+
<table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'>
|
244
|
+
<tr><td>
|
245
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0'><tr>
|
246
|
+
<td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />%short_name%</td>
|
247
|
+
<td align="right">
|
248
|
+
<table border='0' cellspacing="0" cellpadding="2">
|
249
|
+
<tr>
|
250
|
+
<td>Path:</td>
|
251
|
+
<td>%full_path%
|
252
|
+
IF:cvsurl
|
253
|
+
(<a href="%cvsurl%">CVS</a>)
|
254
|
+
ENDIF:cvsurl
|
255
|
+
</td>
|
256
|
+
</tr>
|
257
|
+
<tr>
|
258
|
+
<td>Modified:</td>
|
259
|
+
<td>%dtm_modified%</td>
|
260
|
+
</tr>
|
261
|
+
</table>
|
262
|
+
</td></tr>
|
263
|
+
</table>
|
264
|
+
</td></tr>
|
265
|
+
</table><br>
|
266
|
+
HTML
|
267
|
+
|
268
|
+
###################################################################
|
269
|
+
|
270
|
+
CLASS_PAGE = <<HTML
|
271
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
272
|
+
<td class="file-title"><span class="file-title-prefix">%classmod%</span><br />%full_name%</td>
|
273
|
+
<td align="right">
|
274
|
+
<table cellspacing=0 cellpadding=2>
|
275
|
+
<tr valign="top">
|
276
|
+
<td>In:</td>
|
277
|
+
<td>
|
278
|
+
START:infiles
|
279
|
+
HREF:full_path_url:full_path:
|
280
|
+
IF:cvsurl
|
281
|
+
(<a href="%cvsurl%">CVS</a>)
|
282
|
+
ENDIF:cvsurl
|
283
|
+
END:infiles
|
284
|
+
</td>
|
285
|
+
</tr>
|
286
|
+
IF:parent
|
287
|
+
<tr>
|
288
|
+
<td>Parent:</td>
|
289
|
+
<td>
|
290
|
+
IF:par_url
|
291
|
+
<a href="%par_url%">
|
292
|
+
ENDIF:par_url
|
293
|
+
%parent%
|
294
|
+
IF:par_url
|
295
|
+
</a>
|
296
|
+
ENDIF:par_url
|
297
|
+
</td>
|
298
|
+
</tr>
|
299
|
+
ENDIF:parent
|
300
|
+
</table>
|
301
|
+
</td>
|
302
|
+
</tr>
|
303
|
+
</table>
|
304
|
+
HTML
|
305
|
+
|
306
|
+
###################################################################
|
307
|
+
|
308
|
+
METHOD_LIST = <<HTML
|
309
|
+
<div id="content">
|
310
|
+
IF:diagram
|
311
|
+
<table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center">
|
312
|
+
%diagram%
|
313
|
+
</td></tr></table>
|
314
|
+
ENDIF:diagram
|
315
|
+
|
316
|
+
IF:description
|
317
|
+
<div class="description">%description%</div>
|
318
|
+
ENDIF:description
|
319
|
+
|
320
|
+
IF:requires
|
321
|
+
<div class="sectiontitle">Required Files</div>
|
322
|
+
<ul>
|
323
|
+
START:requires
|
324
|
+
<li>HREF:aref:name:</li>
|
325
|
+
END:requires
|
326
|
+
</ul>
|
327
|
+
ENDIF:requires
|
328
|
+
|
329
|
+
IF:toc
|
330
|
+
<div class="sectiontitle">Contents</div>
|
331
|
+
<ul>
|
332
|
+
START:toc
|
333
|
+
<li><a href="#%href%">%secname%</a></li>
|
334
|
+
END:toc
|
335
|
+
</ul>
|
336
|
+
ENDIF:toc
|
337
|
+
|
338
|
+
IF:methods
|
339
|
+
<div class="sectiontitle">Methods</div>
|
340
|
+
<ul>
|
341
|
+
START:methods
|
342
|
+
<li>HREF:aref:name:</li>
|
343
|
+
END:methods
|
344
|
+
</ul>
|
345
|
+
ENDIF:methods
|
346
|
+
|
347
|
+
IF:includes
|
348
|
+
<div class="sectiontitle">Included Modules</div>
|
349
|
+
<ul>
|
350
|
+
START:includes
|
351
|
+
<li>HREF:aref:name:</li>
|
352
|
+
END:includes
|
353
|
+
</ul>
|
354
|
+
ENDIF:includes
|
355
|
+
|
356
|
+
START:sections
|
357
|
+
IF:sectitle
|
358
|
+
<div class="sectiontitle"><a nem="%secsequence%">%sectitle%</a></div>
|
359
|
+
IF:seccomment
|
360
|
+
<div class="description">
|
361
|
+
%seccomment%
|
362
|
+
</div>
|
363
|
+
ENDIF:seccomment
|
364
|
+
ENDIF:sectitle
|
365
|
+
|
366
|
+
IF:classlist
|
367
|
+
<div class="sectiontitle">Classes and Modules</div>
|
368
|
+
%classlist%
|
369
|
+
ENDIF:classlist
|
370
|
+
|
371
|
+
IF:constants
|
372
|
+
<div class="sectiontitle">Constants</div>
|
373
|
+
<table border='0' cellpadding='5'>
|
374
|
+
START:constants
|
375
|
+
<tr valign='top'>
|
376
|
+
<td class="attr-name">%name%</td>
|
377
|
+
<td>=</td>
|
378
|
+
<td class="attr-value">%value%</td>
|
379
|
+
</tr>
|
380
|
+
IF:desc
|
381
|
+
<tr valign='top'>
|
382
|
+
<td> </td>
|
383
|
+
<td colspan="2" class="attr-desc">%desc%</td>
|
384
|
+
</tr>
|
385
|
+
ENDIF:desc
|
386
|
+
END:constants
|
387
|
+
</table>
|
388
|
+
ENDIF:constants
|
389
|
+
|
390
|
+
IF:attributes
|
391
|
+
<div class="sectiontitle">Attributes</div>
|
392
|
+
<table border='0' cellpadding='5'>
|
393
|
+
START:attributes
|
394
|
+
<tr valign='top'>
|
395
|
+
<td class='attr-rw'>
|
396
|
+
IF:rw
|
397
|
+
[%rw%]
|
398
|
+
ENDIF:rw
|
399
|
+
</td>
|
400
|
+
<td class='attr-name'>%name%</td>
|
401
|
+
<td class='attr-desc'>%a_desc%</td>
|
402
|
+
</tr>
|
403
|
+
END:attributes
|
404
|
+
</table>
|
405
|
+
ENDIF:attributes
|
406
|
+
|
407
|
+
IF:method_list
|
408
|
+
START:method_list
|
409
|
+
IF:methods
|
410
|
+
<div class="sectiontitle">%type% %category% methods</div>
|
411
|
+
START:methods
|
412
|
+
<div class="method">
|
413
|
+
<div class="title">
|
414
|
+
IF:callseq
|
415
|
+
<a name="%aref%"></a><b>%callseq%</b>
|
416
|
+
ENDIF:callseq
|
417
|
+
IFNOT:callseq
|
418
|
+
<a name="%aref%"></a><b>%name%</b>%params%
|
419
|
+
ENDIF:callseq
|
420
|
+
IF:codeurl
|
421
|
+
[ <a href="javascript:openCode('%codeurl%')">source</a> ]
|
422
|
+
ENDIF:codeurl
|
423
|
+
</div>
|
424
|
+
IF:m_desc
|
425
|
+
<div class="description">
|
426
|
+
%m_desc%
|
427
|
+
</div>
|
428
|
+
ENDIF:m_desc
|
429
|
+
IF:aka
|
430
|
+
<div class="aka">
|
431
|
+
This method is also aliased as
|
432
|
+
START:aka
|
433
|
+
<a href="%aref%">%name%</a>
|
434
|
+
END:aka
|
435
|
+
</div>
|
436
|
+
ENDIF:aka
|
437
|
+
IF:sourcecode
|
438
|
+
<div class="sourcecode">
|
439
|
+
<p class="source-link">[ <a href="javascript:toggleSource('%aref%_source')" id="l_%aref%_source">show source</a> ]</p>
|
440
|
+
<div id="%aref%_source" class="dyn-source">
|
441
|
+
<pre>
|
442
|
+
%sourcecode%
|
443
|
+
</pre>
|
444
|
+
</div>
|
445
|
+
</div>
|
446
|
+
ENDIF:sourcecode
|
447
|
+
</div>
|
448
|
+
END:methods
|
449
|
+
ENDIF:methods
|
450
|
+
END:method_list
|
451
|
+
ENDIF:method_list
|
452
|
+
END:sections
|
453
|
+
</div>
|
454
|
+
HTML
|
455
|
+
|
456
|
+
FOOTER = <<ENDFOOTER
|
457
|
+
</body>
|
458
|
+
</html>
|
459
|
+
ENDFOOTER
|
460
|
+
|
461
|
+
BODY = HEADER + <<ENDBODY
|
462
|
+
!INCLUDE! <!-- banner header -->
|
463
|
+
|
464
|
+
<div id="bodyContent">
|
465
|
+
#{METHOD_LIST}
|
466
|
+
</div>
|
467
|
+
|
468
|
+
#{FOOTER}
|
469
|
+
ENDBODY
|
470
|
+
|
471
|
+
########################## Source code ##########################
|
472
|
+
|
473
|
+
SRC_PAGE = XHTML_PREAMBLE + <<HTML
|
474
|
+
<html>
|
475
|
+
<head><title>%title%</title>
|
476
|
+
<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
|
477
|
+
<style>
|
478
|
+
.ruby-comment { color: green; font-style: italic }
|
479
|
+
.ruby-constant { color: #4433aa; font-weight: bold; }
|
480
|
+
.ruby-identifier { color: #222222; }
|
481
|
+
.ruby-ivar { color: #2233dd; }
|
482
|
+
.ruby-keyword { color: #3333FF; font-weight: bold }
|
483
|
+
.ruby-node { color: #777777; }
|
484
|
+
.ruby-operator { color: #111111; }
|
485
|
+
.ruby-regexp { color: #662222; }
|
486
|
+
.ruby-value { color: #662222; font-style: italic }
|
487
|
+
.kw { color: #3333FF; font-weight: bold }
|
488
|
+
.cmt { color: green; font-style: italic }
|
489
|
+
.str { color: #662222; font-style: italic }
|
490
|
+
.re { color: #662222; }
|
491
|
+
</style>
|
492
|
+
</head>
|
493
|
+
<body bgcolor="white">
|
494
|
+
<pre>%code%</pre>
|
495
|
+
</body>
|
496
|
+
</html>
|
497
|
+
HTML
|
498
|
+
|
499
|
+
########################## Index ################################
|
500
|
+
|
501
|
+
FR_INDEX_BODY = <<HTML
|
502
|
+
!INCLUDE!
|
503
|
+
HTML
|
504
|
+
|
505
|
+
FILE_INDEX = XHTML_PREAMBLE + <<HTML
|
506
|
+
<html>
|
507
|
+
<head>
|
508
|
+
<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
|
509
|
+
<style>
|
510
|
+
<!--
|
511
|
+
body {
|
512
|
+
background-color: #EEE;
|
513
|
+
font-family: #{FONTS};
|
514
|
+
color: #000;
|
515
|
+
margin: 0px;
|
516
|
+
}
|
517
|
+
.banner {
|
518
|
+
background: #005;
|
519
|
+
color: #FFF;
|
520
|
+
padding: 0.2em;
|
521
|
+
font-size: small;
|
522
|
+
font-weight: bold;
|
523
|
+
text-align: center;
|
524
|
+
}
|
525
|
+
.entries {
|
526
|
+
margin: 0.25em 1em 0 1em;
|
527
|
+
font-size: x-small;
|
528
|
+
}
|
529
|
+
a {
|
530
|
+
color: #00F;
|
531
|
+
text-decoration: none;
|
532
|
+
white-space: nowrap;
|
533
|
+
}
|
534
|
+
a:hover {
|
535
|
+
color: #77F;
|
536
|
+
text-decoration: underline;
|
537
|
+
}
|
538
|
+
-->
|
539
|
+
</style>
|
540
|
+
<base target="docwin">
|
541
|
+
</head>
|
542
|
+
<body>
|
543
|
+
<div class="banner">%list_title%</div>
|
544
|
+
<div class="entries">
|
545
|
+
START:entries
|
546
|
+
<a href="%href%">%name%</a><br>
|
547
|
+
END:entries
|
548
|
+
</div>
|
549
|
+
</body></html>
|
550
|
+
HTML
|
551
|
+
|
552
|
+
CLASS_INDEX = FILE_INDEX
|
553
|
+
METHOD_INDEX = FILE_INDEX
|
554
|
+
|
555
|
+
INDEX = XHTML_PREAMBLE + <<HTML
|
556
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
557
|
+
<head>
|
558
|
+
<title>%title%</title>
|
559
|
+
<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
|
560
|
+
</head>
|
561
|
+
|
562
|
+
<frameset cols="20%,*">
|
563
|
+
<frameset rows="15%,35%,50%">
|
564
|
+
<frame src="fr_file_index.html" title="Files" name="Files" />
|
565
|
+
<frame src="fr_class_index.html" name="Classes" />
|
566
|
+
<frame src="fr_method_index.html" name="Methods" />
|
567
|
+
</frameset>
|
568
|
+
IF:inline_source
|
569
|
+
<frame src="%initial_page%" name="docwin">
|
570
|
+
ENDIF:inline_source
|
571
|
+
IFNOT:inline_source
|
572
|
+
<frameset rows="80%,20%">
|
573
|
+
<frame src="%initial_page%" name="docwin">
|
574
|
+
<frame src="blank.html" name="source">
|
575
|
+
</frameset>
|
576
|
+
ENDIF:inline_source
|
577
|
+
<noframes>
|
578
|
+
<body bgcolor="white">
|
579
|
+
Click <a href="html/index.html">here</a> for a non-frames
|
580
|
+
version of this page.
|
581
|
+
</body>
|
582
|
+
</noframes>
|
583
|
+
</frameset>
|
584
|
+
|
585
|
+
</html>
|
586
|
+
HTML
|
587
|
+
|
588
|
+
end
|
589
|
+
end
|
590
|
+
|
591
|
+
|