ratch 0.2.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/ratch +60 -47
- data/bin/ratch-find +21 -0
- data/demo/{README → XR} +0 -0
- data/demo/task/stats +0 -2
- data/doc/images/clipboard.jpg +0 -0
- data/doc/images/clipboard2.png +0 -0
- data/doc/images/milles-tn.jpg +0 -0
- data/doc/images/mints.png +0 -0
- data/doc/images/ratch2.png +0 -0
- data/doc/images/ruby-sm.png +0 -0
- data/doc/images/silver.gif +0 -0
- data/doc/images/toolbox.jpg +0 -0
- data/doc/index.html +181 -0
- data/doc/notes/original.rb +308 -0
- data/doc/rdoc/classes/Array.html +194 -0
- data/doc/rdoc/classes/Dir.html +317 -0
- data/doc/rdoc/classes/Hash.html +217 -0
- data/doc/rdoc/classes/Ratch.html +201 -0
- data/doc/rdoc/classes/Ratch/ArgvUtils.html +173 -0
- data/doc/rdoc/classes/Ratch/ArgvUtils/Ext.html +285 -0
- data/doc/rdoc/classes/Ratch/BatchFile.html +207 -0
- data/doc/rdoc/classes/Ratch/BatchManager.html +250 -0
- data/doc/rdoc/classes/Ratch/BatchScript.html +127 -0
- data/doc/rdoc/classes/Ratch/Batchable.html +373 -0
- data/doc/rdoc/classes/Ratch/Build.html +321 -0
- data/doc/rdoc/classes/Ratch/BuildManager.html +319 -0
- data/doc/rdoc/classes/Ratch/Buildable.html +202 -0
- data/doc/rdoc/classes/Ratch/ConfigUtils.html +281 -0
- data/doc/rdoc/classes/Ratch/ConsoleUtils.html +189 -0
- data/doc/rdoc/classes/Ratch/EmailUtils.html +209 -0
- data/doc/rdoc/classes/Ratch/FileUtils.html +674 -0
- data/doc/rdoc/classes/Ratch/GeneralOptions.html +430 -0
- data/doc/rdoc/classes/Ratch/Task.html +201 -0
- data/doc/rdoc/classes/Ratch/TaskManager.html +330 -0
- data/doc/rdoc/classes/Ratch/Taskable.html +231 -0
- data/doc/rdoc/classes/Ratch/UploadUtils.html +566 -0
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/files/COPYING.html +1003 -0
- data/{demo/doc → doc}/rdoc/files/README.html +36 -5
- data/doc/rdoc/files/lib/ratch/argvutils_rb.html +131 -0
- data/doc/rdoc/files/lib/ratch/batch_rb.html +155 -0
- data/doc/rdoc/files/lib/ratch/batchable_rb.html +131 -0
- data/doc/rdoc/files/lib/ratch/batchfile_rb.html +148 -0
- data/doc/rdoc/files/lib/ratch/buildable_rb.html +131 -0
- data/doc/rdoc/files/lib/ratch/consoleutils_rb.html +131 -0
- data/{demo/doc/rdoc/files/lib/foo/foo_rb.html → doc/rdoc/files/lib/ratch/emailutils_rb.html} +35 -41
- data/doc/rdoc/files/lib/ratch/facets/multiglob_rb.html +137 -0
- data/doc/rdoc/files/lib/ratch/fileutils_rb.html +139 -0
- data/doc/rdoc/files/lib/ratch/options_rb.html +131 -0
- data/doc/rdoc/files/lib/ratch/taskable_rb.html +131 -0
- data/doc/rdoc/files/lib/ratch/uploadutils_rb.html +150 -0
- data/doc/rdoc/fr_class_index.html +48 -0
- data/doc/rdoc/fr_file_index.html +41 -0
- data/doc/rdoc/fr_method_index.html +133 -0
- data/{demo/doc → doc}/rdoc/index.html +1 -1
- data/{demo/doc → doc}/rdoc/rdoc-style.css +0 -0
- data/doc/scrap/flexihead-flip.jpg +0 -0
- data/doc/scrap/flexihead.jpg +0 -0
- data/doc/scrap/head1.jpg +0 -0
- data/doc/scrap/ratch.jpg +0 -0
- data/doc/scrap/ratch1.png +0 -0
- data/doc/scrap/ratch2.jpg +0 -0
- data/doc/scrap/ratch3.png +0 -0
- data/doc/scrap/red-ratch.jpg +0 -0
- data/doc/scrap/redratchet.jpg +0 -0
- data/doc/scrap/ruby-kit/ruby.png +0 -0
- data/doc/scrap/scrap.red +256 -0
- data/doc/sitemap.yaml +10 -0
- data/doc/siteparts/index.red +100 -0
- data/doc/siteparts/layout.rhtml +56 -0
- data/doc/siteparts/tutorial.red +578 -0
- data/doc/style.css +112 -0
- data/doc/tutorial.html +722 -0
- data/lib/ratch/batch.rb +417 -30
- data/lib/ratch/{argvutils.rb → batch/argvutils.rb} +27 -19
- data/lib/ratch/batch/build.rb +95 -0
- data/lib/ratch/{consoleutils.rb → batch/consoleutils.rb} +0 -0
- data/lib/ratch/{emailutils.rb → batch/emailutils.rb} +0 -0
- data/lib/ratch/{fileutils.rb → batch/fileutils.rb} +32 -32
- data/lib/ratch/{options.rb → batch/options.rb} +0 -0
- data/lib/ratch/batch/task.rb +43 -0
- data/lib/ratch/manager.rb +34 -0
- data/lib/ratch/project/information.rb +257 -0
- data/lib/ratch/project/package.rb +82 -0
- data/lib/ratch/project/project.rb +531 -0
- data/lib/ratch/project/release.rb +112 -0
- data/lib/ratch/support/filetest.rb +29 -0
- data/lib/ratch/support/setuputils.rb +124 -0
- data/lib/ratch/support/signiture.rb +252 -0
- data/lib/ratch/support/stage.rb +292 -0
- data/lib/ratch/toolset/ruby/pack/gem +85 -0
- data/lib/ratch/toolset/ruby/pack/tgz +85 -0
- data/lib/ratch/toolset/ruby/{crosstest → test/crosstest} +0 -0
- data/lib/ratch/toolset/ruby/{extest → test/extest} +0 -0
- data/lib/ratch/toolset/ruby/{isotest → test/isotest} +0 -0
- data/lib/ratch/toolset/ruby/{load → test/load} +0 -0
- data/lib/ratch/toolset/ruby/{loadtest → test/loadtest} +0 -0
- data/lib/ratch/toolset/ruby/{syntax → test/syntax} +0 -0
- data/lib/ratch/toolset/ruby/{test → test/test} +0 -0
- data/log/{history.rd → history} +6 -0
- data/log/{todo.rd → todo} +0 -0
- data/meta/MANIFEST +52 -36
- data/meta/ROLLRC +2 -0
- data/meta/icli.yaml +16 -0
- data/meta/{ratch-0.2.3.roll → project.yaml} +1 -7
- data/task/release +12 -0
- data/{lib/ratch → work/old}/batchfile.rb +0 -0
- data/work/project-old.rb +67 -0
- data/work/scrap/install +89 -0
- data/work/scrap/install.0 +49 -0
- data/work/scrap/install.1 +63 -0
- data/work/scrap/ludo +25 -0
- data/work/scrap/oldtaskable.rb +573 -0
- data/work/scrap/ratch.man +39 -0
- data/work/scrap/taskable-simple.rb +42 -0
- data/work/scrap/taskable.rb +120 -0
- metadata +170 -72
- data/demo/doc/rdoc/created.rid +0 -1
- data/demo/doc/rdoc/fr_class_index.html +0 -26
- data/demo/doc/rdoc/fr_file_index.html +0 -28
- data/demo/doc/rdoc/fr_method_index.html +0 -27
- data/demo/task/config.yaml +0 -2
- data/lib/ratch/batchable.rb +0 -169
- data/lib/ratch/buildable.rb +0 -182
- data/lib/ratch/configutils.rb +0 -132
- data/lib/ratch/facets/multiglob.rb +0 -160
- data/lib/ratch/taskable.rb +0 -152
- data/log/recent.rd +0 -8
- data/task/config.yaml +0 -10
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
7
|
+
<head>
|
|
8
|
+
<title>File: uploadutils.rb</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
11
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
12
|
+
<script type="text/javascript">
|
|
13
|
+
// <![CDATA[
|
|
14
|
+
|
|
15
|
+
function popupCode( url ) {
|
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function toggleCode( id ) {
|
|
20
|
+
if ( document.getElementById )
|
|
21
|
+
elem = document.getElementById( id );
|
|
22
|
+
else if ( document.all )
|
|
23
|
+
elem = eval( "document.all." + id );
|
|
24
|
+
else
|
|
25
|
+
return false;
|
|
26
|
+
|
|
27
|
+
elemStyle = elem.style;
|
|
28
|
+
|
|
29
|
+
if ( elemStyle.display != "block" ) {
|
|
30
|
+
elemStyle.display = "block"
|
|
31
|
+
} else {
|
|
32
|
+
elemStyle.display = "none"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Make codeblocks hidden by default
|
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
40
|
+
|
|
41
|
+
// ]]>
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
</head>
|
|
45
|
+
<body>
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div id="fileHeader">
|
|
50
|
+
<h1>uploadutils.rb</h1>
|
|
51
|
+
<table class="header-table">
|
|
52
|
+
<tr class="top-aligned-row">
|
|
53
|
+
<td><strong>Path:</strong></td>
|
|
54
|
+
<td>lib/ratch/uploadutils.rb
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr class="top-aligned-row">
|
|
58
|
+
<td><strong>Last Update:</strong></td>
|
|
59
|
+
<td>Sat Nov 10 12:32:14 -0500 2007</td>
|
|
60
|
+
</tr>
|
|
61
|
+
</table>
|
|
62
|
+
</div>
|
|
63
|
+
<!-- banner header -->
|
|
64
|
+
|
|
65
|
+
<div id="bodyContent">
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<div id="contextContent">
|
|
70
|
+
|
|
71
|
+
<div id="description">
|
|
72
|
+
<p>
|
|
73
|
+
TITLE:
|
|
74
|
+
</p>
|
|
75
|
+
<pre>
|
|
76
|
+
UploadUtils
|
|
77
|
+
</pre>
|
|
78
|
+
<p>
|
|
79
|
+
COPYING:
|
|
80
|
+
</p>
|
|
81
|
+
<pre>
|
|
82
|
+
Copyright (c) 2007 Psi T Corp.
|
|
83
|
+
|
|
84
|
+
This file is part of the ProUtils' Ratch program.
|
|
85
|
+
|
|
86
|
+
Ratch is free software: you can redistribute it and/or modify
|
|
87
|
+
it under the terms of the GNU General Public License as published by
|
|
88
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
89
|
+
(at your option) any later version.
|
|
90
|
+
|
|
91
|
+
Ratch is distributed in the hope that it will be useful,
|
|
92
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
93
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
94
|
+
GNU General Public License for more details.
|
|
95
|
+
|
|
96
|
+
You should have received a copy of the GNU General Public License
|
|
97
|
+
along with Ratch. If not, see <http://www.gnu.org/licenses/>.
|
|
98
|
+
</pre>
|
|
99
|
+
<p>
|
|
100
|
+
TODO:
|
|
101
|
+
</p>
|
|
102
|
+
<pre>
|
|
103
|
+
- Incorporate password into scp and ftp ?
|
|
104
|
+
- rsync needs --delete option
|
|
105
|
+
</pre>
|
|
106
|
+
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
<div id="requires-list">
|
|
110
|
+
<h3 class="section-bar">Required files</h3>
|
|
111
|
+
|
|
112
|
+
<div class="name-list">
|
|
113
|
+
openssl
|
|
114
|
+
shellwords
|
|
115
|
+
tmpdir
|
|
116
|
+
facets/openobject
|
|
117
|
+
net/ftp
|
|
118
|
+
net/sftp
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
<!-- if includes -->
|
|
129
|
+
|
|
130
|
+
<div id="section">
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
<!-- if method_list -->
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
<div id="validator-badges">
|
|
146
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
147
|
+
</div>
|
|
148
|
+
|
|
149
|
+
</body>
|
|
150
|
+
</html>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
|
|
2
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
3
|
+
<!DOCTYPE html
|
|
4
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
5
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
6
|
+
|
|
7
|
+
<!--
|
|
8
|
+
|
|
9
|
+
Classes
|
|
10
|
+
|
|
11
|
+
-->
|
|
12
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
13
|
+
<head>
|
|
14
|
+
<title>Classes</title>
|
|
15
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
16
|
+
<link rel="stylesheet" href="rdoc-style.css" type="text/css" />
|
|
17
|
+
<base target="docwin" />
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<div id="index">
|
|
21
|
+
<h1 class="section-bar">Classes</h1>
|
|
22
|
+
<div id="index-entries">
|
|
23
|
+
<a href="classes/Array.html">Array</a><br />
|
|
24
|
+
<a href="classes/Dir.html">Dir</a><br />
|
|
25
|
+
<a href="classes/Hash.html">Hash</a><br />
|
|
26
|
+
<a href="classes/Ratch.html">Ratch</a><br />
|
|
27
|
+
<a href="classes/Ratch/ArgvUtils.html">Ratch::ArgvUtils</a><br />
|
|
28
|
+
<a href="classes/Ratch/ArgvUtils/Ext.html">Ratch::ArgvUtils::Ext</a><br />
|
|
29
|
+
<a href="classes/Ratch/BatchFile.html">Ratch::BatchFile</a><br />
|
|
30
|
+
<a href="classes/Ratch/BatchManager.html">Ratch::BatchManager</a><br />
|
|
31
|
+
<a href="classes/Ratch/BatchScript.html">Ratch::BatchScript</a><br />
|
|
32
|
+
<a href="classes/Ratch/Batchable.html">Ratch::Batchable</a><br />
|
|
33
|
+
<a href="classes/Ratch/Build.html">Ratch::Build</a><br />
|
|
34
|
+
<a href="classes/Ratch/BuildManager.html">Ratch::BuildManager</a><br />
|
|
35
|
+
<a href="classes/Ratch/Buildable.html">Ratch::Buildable</a><br />
|
|
36
|
+
<a href="classes/Ratch/ConfigUtils.html">Ratch::ConfigUtils</a><br />
|
|
37
|
+
<a href="classes/Ratch/ConsoleUtils.html">Ratch::ConsoleUtils</a><br />
|
|
38
|
+
<a href="classes/Ratch/EmailUtils.html">Ratch::EmailUtils</a><br />
|
|
39
|
+
<a href="classes/Ratch/FileUtils.html">Ratch::FileUtils</a><br />
|
|
40
|
+
<a href="classes/Ratch/GeneralOptions.html">Ratch::GeneralOptions</a><br />
|
|
41
|
+
<a href="classes/Ratch/Task.html">Ratch::Task</a><br />
|
|
42
|
+
<a href="classes/Ratch/TaskManager.html">Ratch::TaskManager</a><br />
|
|
43
|
+
<a href="classes/Ratch/Taskable.html">Ratch::Taskable</a><br />
|
|
44
|
+
<a href="classes/Ratch/UploadUtils.html">Ratch::UploadUtils</a><br />
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</body>
|
|
48
|
+
</html>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
3
|
+
<!DOCTYPE html
|
|
4
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
5
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
6
|
+
|
|
7
|
+
<!--
|
|
8
|
+
|
|
9
|
+
Files
|
|
10
|
+
|
|
11
|
+
-->
|
|
12
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
13
|
+
<head>
|
|
14
|
+
<title>Files</title>
|
|
15
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
16
|
+
<link rel="stylesheet" href="rdoc-style.css" type="text/css" />
|
|
17
|
+
<base target="docwin" />
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<div id="index">
|
|
21
|
+
<h1 class="section-bar">Files</h1>
|
|
22
|
+
<div id="index-entries">
|
|
23
|
+
<a href="files/COPYING.html">COPYING</a><br />
|
|
24
|
+
<a href="files/README.html">README</a><br />
|
|
25
|
+
<a href="files/lib/ratch/argvutils_rb.html">lib/ratch/argvutils.rb</a><br />
|
|
26
|
+
<a href="files/lib/ratch/batch_rb.html">lib/ratch/batch.rb</a><br />
|
|
27
|
+
<a href="files/lib/ratch/batchable_rb.html">lib/ratch/batchable.rb</a><br />
|
|
28
|
+
<a href="files/lib/ratch/batchfile_rb.html">lib/ratch/batchfile.rb</a><br />
|
|
29
|
+
<a href="files/lib/ratch/buildable_rb.html">lib/ratch/buildable.rb</a><br />
|
|
30
|
+
<a href="files/lib/ratch/configutils_rb.html">lib/ratch/configutils.rb</a><br />
|
|
31
|
+
<a href="files/lib/ratch/consoleutils_rb.html">lib/ratch/consoleutils.rb</a><br />
|
|
32
|
+
<a href="files/lib/ratch/emailutils_rb.html">lib/ratch/emailutils.rb</a><br />
|
|
33
|
+
<a href="files/lib/ratch/facets/multiglob_rb.html">lib/ratch/facets/multiglob.rb</a><br />
|
|
34
|
+
<a href="files/lib/ratch/fileutils_rb.html">lib/ratch/fileutils.rb</a><br />
|
|
35
|
+
<a href="files/lib/ratch/options_rb.html">lib/ratch/options.rb</a><br />
|
|
36
|
+
<a href="files/lib/ratch/taskable_rb.html">lib/ratch/taskable.rb</a><br />
|
|
37
|
+
<a href="files/lib/ratch/uploadutils_rb.html">lib/ratch/uploadutils.rb</a><br />
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</body>
|
|
41
|
+
</html>
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
|
|
2
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
3
|
+
<!DOCTYPE html
|
|
4
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
5
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
6
|
+
|
|
7
|
+
<!--
|
|
8
|
+
|
|
9
|
+
Methods
|
|
10
|
+
|
|
11
|
+
-->
|
|
12
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
13
|
+
<head>
|
|
14
|
+
<title>Methods</title>
|
|
15
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
16
|
+
<link rel="stylesheet" href="rdoc-style.css" type="text/css" />
|
|
17
|
+
<base target="docwin" />
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<div id="index">
|
|
21
|
+
<h1 class="section-bar">Methods</h1>
|
|
22
|
+
<div id="index-entries">
|
|
23
|
+
<a href="classes/Ratch/ArgvUtils.html#M000067">argument_vector (Ratch::ArgvUtils)</a><br />
|
|
24
|
+
<a href="classes/Hash.html#M000005">argumentize (Hash)</a><br />
|
|
25
|
+
<a href="classes/Ratch/ArgvUtils/Ext.html#M000068">arguments (Ratch::ArgvUtils::Ext)</a><br />
|
|
26
|
+
<a href="classes/Ratch/GeneralOptions.html#M000010">argv (Ratch::GeneralOptions)</a><br />
|
|
27
|
+
<a href="classes/Ratch/ConsoleUtils.html#M000074">ask (Ratch::ConsoleUtils)</a><br />
|
|
28
|
+
<a href="classes/Ratch/Batchable.html#M000077">batch (Ratch::Batchable)</a><br />
|
|
29
|
+
<a href="classes/Ratch/BatchManager.html#M000105">batch (Ratch::BatchManager)</a><br />
|
|
30
|
+
<a href="classes/Ratch/Batchable.html#M000081">batch? (Ratch::Batchable)</a><br />
|
|
31
|
+
<a href="classes/Ratch/Batchable.html#M000076">batch_manager (Ratch::Batchable)</a><br />
|
|
32
|
+
<a href="classes/Ratch/FileUtils.html#M000049">bin? (Ratch::FileUtils)</a><br />
|
|
33
|
+
<a href="classes/Ratch/Buildable.html#M000025">build (Ratch::Buildable)</a><br />
|
|
34
|
+
<a href="classes/Ratch/Buildable.html#M000023">build_manager (Ratch::Buildable)</a><br />
|
|
35
|
+
<a href="classes/Ratch/BatchFile.html#M000084">call (Ratch::BatchFile)</a><br />
|
|
36
|
+
<a href="classes/Ratch/TaskManager.html#M000089">call (Ratch::TaskManager)</a><br />
|
|
37
|
+
<a href="classes/Ratch/Build.html#M000100">call (Ratch::Build)</a><br />
|
|
38
|
+
<a href="classes/Ratch/BuildManager.html#M000094">call (Ratch::BuildManager)</a><br />
|
|
39
|
+
<a href="classes/Ratch/Task.html#M000098">call (Ratch::Task)</a><br />
|
|
40
|
+
<a href="classes/Ratch/TaskManager.html#M000088">call_main (Ratch::TaskManager)</a><br />
|
|
41
|
+
<a href="classes/Ratch/FileUtils.html#M000036">cd (Ratch::FileUtils)</a><br />
|
|
42
|
+
<a href="classes/Ratch/GeneralOptions.html#M000011">command_parameters (Ratch::GeneralOptions)</a><br />
|
|
43
|
+
<a href="classes/Ratch/FileUtils.html#M000050">command_paths (Ratch::FileUtils)</a><br />
|
|
44
|
+
<a href="classes/Hash.html#M000006">command_vector (Hash)</a><br />
|
|
45
|
+
<a href="classes/Ratch/ArgvUtils.html#M000066">commandline (Ratch::ArgvUtils)</a><br />
|
|
46
|
+
<a href="classes/Ratch/ConfigUtils.html#M000054">config_file (Ratch::ConfigUtils)</a><br />
|
|
47
|
+
<a href="classes/Ratch/ConfigUtils.html#M000055">config_read (Ratch::ConfigUtils)</a><br />
|
|
48
|
+
<a href="classes/Ratch/ConfigUtils.html#M000057">config_vector (Ratch::ConfigUtils)</a><br />
|
|
49
|
+
<a href="classes/Ratch/ConfigUtils.html#M000053">configuration (Ratch::ConfigUtils)</a><br />
|
|
50
|
+
<a href="classes/Ratch/GeneralOptions.html#M000012">debug? (Ratch::GeneralOptions)</a><br />
|
|
51
|
+
<a href="classes/Ratch/BuildManager.html#M000093">define_file (Ratch::BuildManager)</a><br />
|
|
52
|
+
<a href="classes/Ratch/TaskManager.html#M000086">define_main (Ratch::TaskManager)</a><br />
|
|
53
|
+
<a href="classes/Ratch/TaskManager.html#M000087">define_task (Ratch::TaskManager)</a><br />
|
|
54
|
+
<a href="classes/Ratch/FileUtils.html#M000041">dir! (Ratch::FileUtils)</a><br />
|
|
55
|
+
<a href="classes/Ratch/FileUtils.html#M000039">dir? (Ratch::FileUtils)</a><br />
|
|
56
|
+
<a href="classes/Ratch/FileUtils.html#M000042">directory! (Ratch::FileUtils)</a><br />
|
|
57
|
+
<a href="classes/Ratch/FileUtils.html#M000040">directory? (Ratch::FileUtils)</a><br />
|
|
58
|
+
<a href="classes/Ratch/Batchable.html#M000079">done? (Ratch::Batchable)</a><br />
|
|
59
|
+
<a href="classes/Ratch/BatchManager.html#M000107">done? (Ratch::BatchManager)</a><br />
|
|
60
|
+
<a href="classes/Ratch/GeneralOptions.html#M000020">dryrun! (Ratch::GeneralOptions)</a><br />
|
|
61
|
+
<a href="classes/Ratch/GeneralOptions.html#M000018">dryrun? (Ratch::GeneralOptions)</a><br />
|
|
62
|
+
<a href="classes/Ratch/EmailUtils.html#M000052">email (Ratch::EmailUtils)</a><br />
|
|
63
|
+
<a href="classes/Ratch/FileUtils.html#M000047">exist! (Ratch::FileUtils)</a><br />
|
|
64
|
+
<a href="classes/Ratch/FileUtils.html#M000044">exist? (Ratch::FileUtils)</a><br />
|
|
65
|
+
<a href="classes/Ratch/FileUtils.html#M000046">exists! (Ratch::FileUtils)</a><br />
|
|
66
|
+
<a href="classes/Ratch/FileUtils.html#M000043">exists? (Ratch::FileUtils)</a><br />
|
|
67
|
+
<a href="classes/Ratch/Buildable.html#M000024">file (Ratch::Buildable)</a><br />
|
|
68
|
+
<a href="classes/Ratch/FileUtils.html#M000038">file! (Ratch::FileUtils)</a><br />
|
|
69
|
+
<a href="classes/Ratch/FileUtils.html#M000037">file? (Ratch::FileUtils)</a><br />
|
|
70
|
+
<a href="classes/Ratch/FileUtils.html#M000033">file_read (Ratch::FileUtils)</a><br />
|
|
71
|
+
<a href="classes/Ratch/FileUtils.html#M000034">file_write (Ratch::FileUtils)</a><br />
|
|
72
|
+
<a href="classes/Ratch/UploadUtils.html#M000063">files (Ratch::UploadUtils)</a><br />
|
|
73
|
+
<a href="classes/Ratch/FileUtils.html#M000035">fileutils (Ratch::FileUtils)</a><br />
|
|
74
|
+
<a href="classes/Ratch/BuildManager.html#M000095">find (Ratch::BuildManager)</a><br />
|
|
75
|
+
<a href="classes/Ratch/ArgvUtils/Ext.html#M000071">flag? (Ratch::ArgvUtils::Ext)</a><br />
|
|
76
|
+
<a href="classes/Ratch/ArgvUtils/Ext.html#M000070">flags (Ratch::ArgvUtils::Ext)</a><br />
|
|
77
|
+
<a href="classes/Ratch/GeneralOptions.html#M000022">force! (Ratch::GeneralOptions)</a><br />
|
|
78
|
+
<a href="classes/Ratch/BuildManager.html#M000092">force? (Ratch::BuildManager)</a><br />
|
|
79
|
+
<a href="classes/Ratch/GeneralOptions.html#M000021">force? (Ratch::GeneralOptions)</a><br />
|
|
80
|
+
<a href="classes/Ratch/UploadUtils.html#M000059">ftp (Ratch::UploadUtils)</a><br />
|
|
81
|
+
<a href="classes/Ratch/FileUtils.html#M000030">glob (Ratch::FileUtils)</a><br />
|
|
82
|
+
<a href="classes/Ratch/Batchable.html#M000078">launch (Ratch::Batchable)</a><br />
|
|
83
|
+
<a href="classes/Ratch/Taskable.html#M000027">main (Ratch::Taskable)</a><br />
|
|
84
|
+
<a href="classes/Ratch/Build.html#M000101">match? (Ratch::Build)</a><br />
|
|
85
|
+
<a href="classes/Ratch/Batchable.html#M000082">method_missing (Ratch::Batchable)</a><br />
|
|
86
|
+
<a href="classes/Dir.html#M000001">multiglob (Dir)</a><br />
|
|
87
|
+
<a href="classes/Ratch/FileUtils.html#M000031">multiglob (Ratch::FileUtils)</a><br />
|
|
88
|
+
<a href="classes/Ratch/FileUtils.html#M000032">multiglob_r (Ratch::FileUtils)</a><br />
|
|
89
|
+
<a href="classes/Dir.html#M000002">multiglob_r (Dir)</a><br />
|
|
90
|
+
<a href="classes/Dir.html#M000003">multiglob_with_default (Dir)</a><br />
|
|
91
|
+
<a href="classes/Ratch/Build.html#M000102">needed_for? (Ratch::Build)</a><br />
|
|
92
|
+
<a href="classes/Ratch/Build.html#M000103">needed_paths (Ratch::Build)</a><br />
|
|
93
|
+
<a href="classes/Ratch/BuildManager.html#M000091">new (Ratch::BuildManager)</a><br />
|
|
94
|
+
<a href="classes/Ratch/Task.html#M000097">new (Ratch::Task)</a><br />
|
|
95
|
+
<a href="classes/Ratch/BatchFile.html#M000083">new (Ratch::BatchFile)</a><br />
|
|
96
|
+
<a href="classes/Ratch/BatchManager.html#M000104">new (Ratch::BatchManager)</a><br />
|
|
97
|
+
<a href="classes/Ratch/Build.html#M000099">new (Ratch::Build)</a><br />
|
|
98
|
+
<a href="classes/Ratch/TaskManager.html#M000085">new (Ratch::TaskManager)</a><br />
|
|
99
|
+
<a href="classes/Ratch/GeneralOptions.html#M000019">noharm! (Ratch::GeneralOptions)</a><br />
|
|
100
|
+
<a href="classes/Ratch/GeneralOptions.html#M000017">noharm? (Ratch::GeneralOptions)</a><br />
|
|
101
|
+
<a href="classes/Array.html#M000007">not_empty? (Array)</a><br />
|
|
102
|
+
<a href="classes/Ratch/ArgvUtils/Ext.html#M000069">options (Ratch::ArgvUtils::Ext)</a><br />
|
|
103
|
+
<a href="classes/Ratch/ConsoleUtils.html#M000075">password (Ratch::ConsoleUtils)</a><br />
|
|
104
|
+
<a href="classes/Ratch/FileUtils.html#M000048">path! (Ratch::FileUtils)</a><br />
|
|
105
|
+
<a href="classes/Ratch/FileUtils.html#M000045">path? (Ratch::FileUtils)</a><br />
|
|
106
|
+
<a href="classes/Ratch/BuildManager.html#M000096">plan (Ratch::BuildManager)</a><br />
|
|
107
|
+
<a href="classes/Ratch/TaskManager.html#M000090">plan (Ratch::TaskManager)</a><br />
|
|
108
|
+
<a href="classes/Ratch/UploadUtils.html#M000061">rsync (Ratch::UploadUtils)</a><br />
|
|
109
|
+
<a href="classes/Ratch/Taskable.html#M000029">run (Ratch::Taskable)</a><br />
|
|
110
|
+
<a href="classes/Ratch/BatchManager.html#M000106">run (Ratch::BatchManager)</a><br />
|
|
111
|
+
<a href="classes/Ratch/FileUtils.html#M000051">safe? (Ratch::FileUtils)</a><br />
|
|
112
|
+
<a href="classes/Ratch/UploadUtils.html#M000060">sftp (Ratch::UploadUtils)</a><br />
|
|
113
|
+
<a href="classes/Ratch/Batchable.html#M000080">sh (Ratch::Batchable)</a><br />
|
|
114
|
+
<a href="classes/Ratch/UploadUtils.html#M000065">stage_linkdir (Ratch::UploadUtils)</a><br />
|
|
115
|
+
<a href="classes/Ratch/UploadUtils.html#M000064">stage_transfer (Ratch::UploadUtils)</a><br />
|
|
116
|
+
<a href="classes/Ratch/Taskable.html#M000028">task (Ratch::Taskable)</a><br />
|
|
117
|
+
<a href="classes/Ratch/Taskable.html#M000026">task_manager (Ratch::Taskable)</a><br />
|
|
118
|
+
<a href="classes/Array.html#M000008">to_console (Array)</a><br />
|
|
119
|
+
<a href="classes/Hash.html#M000004">to_console (Hash)</a><br />
|
|
120
|
+
<a href="classes/Array.html#M000009">to_params (Array)</a><br />
|
|
121
|
+
<a href="classes/Ratch/GeneralOptions.html#M000016">trace! (Ratch::GeneralOptions)</a><br />
|
|
122
|
+
<a href="classes/Ratch/GeneralOptions.html#M000015">trace? (Ratch::GeneralOptions)</a><br />
|
|
123
|
+
<a href="classes/Ratch/UploadUtils.html#M000058">upload (Ratch::UploadUtils)</a><br />
|
|
124
|
+
<a href="classes/Ratch/UploadUtils.html#M000062">upload_parameters (Ratch::UploadUtils)</a><br />
|
|
125
|
+
<a href="classes/Ratch/ConfigUtils.html#M000056">utility_directory (Ratch::ConfigUtils)</a><br />
|
|
126
|
+
<a href="classes/Ratch/ArgvUtils/Ext.html#M000072">value (Ratch::ArgvUtils::Ext)</a><br />
|
|
127
|
+
<a href="classes/Ratch/ArgvUtils/Ext.html#M000073">value! (Ratch::ArgvUtils::Ext)</a><br />
|
|
128
|
+
<a href="classes/Ratch/GeneralOptions.html#M000014">verbose! (Ratch::GeneralOptions)</a><br />
|
|
129
|
+
<a href="classes/Ratch/GeneralOptions.html#M000013">verbose? (Ratch::GeneralOptions)</a><br />
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
</body>
|
|
133
|
+
</html>
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
data/doc/scrap/head1.jpg
ADDED
|
Binary file
|
data/doc/scrap/ratch.jpg
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/doc/scrap/scrap.red
ADDED
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
h1. UNDER CONSTRUCTION
|
|
2
|
+
|
|
3
|
+
h1. Interoperability
|
|
4
|
+
|
|
5
|
+
h2. Ratch a la Rake
|
|
6
|
+
|
|
7
|
+
Rake is the the popular choice for Ruby delvelopers. Since Ratch is alsow written Ruby it is possible
|
|
8
|
+
to use Ratch tasks via one;s Rakefile. This can be approached in either of two ways.
|
|
9
|
+
|
|
10
|
+
Since Ratch' project tools are designed as stand-alone reusable modules, one can
|
|
11
|
+
access them directly. For instance let's define an RDoc task by calling directly on
|
|
12
|
+
Ratcehts' <code>Doc.rdoc</code> module method.
|
|
13
|
+
|
|
14
|
+
<pre class="script">
|
|
15
|
+
require 'ratchets/doc'
|
|
16
|
+
|
|
17
|
+
desc 'rdoc the project'
|
|
18
|
+
|
|
19
|
+
task :rdoc do
|
|
20
|
+
Ratchets::Doc.rdoc do |r|
|
|
21
|
+
r.title = "MyApplication"
|
|
22
|
+
r.main = "README"
|
|
23
|
+
r.template = "html"
|
|
24
|
+
r.options = ["--all", "--inline-source"]
|
|
25
|
+
r.include = ["lib/**/*", "bin/*", "[A-Z]*"]
|
|
26
|
+
r.basedir = "src"
|
|
27
|
+
r.output = "rdoc"
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
</pre>
|
|
31
|
+
|
|
32
|
+
This usage leaves everything up to the the Rake file. Although most of these fields have reasonable
|
|
33
|
+
defaults. Nonetheless, no information is being provided to the tool via a project information file,
|
|
34
|
+
becuase we are invoking Ratchet's underlying rdoc tool directly.
|
|
35
|
+
|
|
36
|
+
Now let's do the same thing, but via the Project class.
|
|
37
|
+
|
|
38
|
+
<pre>
|
|
39
|
+
require 'ratchets/project'
|
|
40
|
+
|
|
41
|
+
project = Project.new do |info|
|
|
42
|
+
info.title = "MyApplication"
|
|
43
|
+
info.basedir = "src"
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
desc 'rdoc the project'
|
|
48
|
+
|
|
49
|
+
task :rdoc do
|
|
50
|
+
project.rdoc do |r|
|
|
51
|
+
r.main = "README"
|
|
52
|
+
r.template = "html"
|
|
53
|
+
r.options = ["--all", "--inline-source"]
|
|
54
|
+
r.include = ["lib/**/*", "bin/*", "[A-Z]*"]
|
|
55
|
+
r.output = "rdoc"
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
</pre>
|
|
59
|
+
|
|
60
|
+
Here we have created a new Project object and have invoked the rdoc tool <i>via</i> it's interface.
|
|
61
|
+
This automatically incorporates general information about the project of use to the tool --in this case
|
|
62
|
+
the project's title and it's basedir. The other fields are rdoc specific so they cannot be shared.
|
|
63
|
+
But we can go a step further and define a set of <i>tool specific defaults</i> for any rdoc task.
|
|
64
|
+
|
|
65
|
+
<pre>
|
|
66
|
+
require 'ratchets/project'
|
|
67
|
+
|
|
68
|
+
project = Project.new(
|
|
69
|
+
:title => "MyApplication"
|
|
70
|
+
:basedir => "src"
|
|
71
|
+
:rdoc => {
|
|
72
|
+
:main => 'README'
|
|
73
|
+
:template => "html"
|
|
74
|
+
:options => ["--all", "--inline-source"]
|
|
75
|
+
:include => ["lib/**/*", "bin/*", "[A-Z]*"]
|
|
76
|
+
:output => "rdoc"
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
desc 'rdoc the project'
|
|
81
|
+
|
|
82
|
+
task :rdoc do
|
|
83
|
+
project.rdoc
|
|
84
|
+
end
|
|
85
|
+
</pre>
|
|
86
|
+
|
|
87
|
+
You'll also notice that we are demonstrating Ratchet's versitility in accepting arguments.
|
|
88
|
+
The <code>Project.new</code> method can take either a hash <u>or</u> a block. In fact, this is
|
|
89
|
+
a widely used pattern throughout Ratchets.
|
|
90
|
+
|
|
91
|
+
One final step. It's is likely we don't need to fuss with each and every tool Ratchets
|
|
92
|
+
provides us. All-in-all we will probably want most, if not all, of them avaialble to us, and
|
|
93
|
+
since Ratcehts generally provides reasonable defaults for most fields, we will rarely have
|
|
94
|
+
to explicitly fill out each one. In fact, every field we gave thus far for rdoc, except
|
|
95
|
+
title and basedir, are the default settings. So to facilitate this, the project class has an
|
|
96
|
+
<code>autonew</code> method which automatically generates all the tasks for every project tool
|
|
97
|
+
Ratchets offers.
|
|
98
|
+
|
|
99
|
+
<pre>
|
|
100
|
+
require 'ratchets/project'
|
|
101
|
+
|
|
102
|
+
project = Project.autonew(
|
|
103
|
+
:title => "MyApplication"
|
|
104
|
+
:basedir => "src"
|
|
105
|
+
)
|
|
106
|
+
</pre>
|
|
107
|
+
|
|
108
|
+
Now when you invoke <code>Rake -T</code> you will see a good sized list of available tasks.
|
|
109
|
+
|
|
110
|
+
The techinque as discussed thus far is quite usable, and those heavily favoring pure Rake usage
|
|
111
|
+
may wish to venture no further than right here. But there are is one final variation that has
|
|
112
|
+
it's own benefits. Rather then store the project information as Ruby code within one's Rakefile,
|
|
113
|
+
the information can be placed in a separate <i>ProjectInfo</i> file (something you are already
|
|
114
|
+
familiar with if you read about Project Generation). To utilize this file, instead of using the
|
|
115
|
+
<code>new</code> or <code>autonew</code> methods you instead use the <code>load</code> and
|
|
116
|
+
<code>autoload</code> methods. The upshot is that your typical Rakefile may have little more
|
|
117
|
+
than these two-lines:
|
|
118
|
+
|
|
119
|
+
<pre>
|
|
120
|
+
require 'ratchets/project'
|
|
121
|
+
Project.autoload
|
|
122
|
+
</pre>
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
<!--Adding code to a rakefile or a sake-style script is fine for one-off tasks. But what if you
|
|
131
|
+
need a more versitle and reusable tool --one you can add to your projectinfo file like Ratchets
|
|
132
|
+
built-in tools? In that case you need to build a <i>custom tool</i>.
|
|
133
|
+
|
|
134
|
+
If you have custom tools you'd like to use for all your projects you can place them
|
|
135
|
+
either in you home directory under ~/.share/ratchets/tools/, or you could make them
|
|
136
|
+
universally available to all users in the shared data directory, on Debian,
|
|
137
|
+
/usr/share/ratchets/tools/. If, on the other hand, the tool is specific to a project,
|
|
138
|
+
place it in a project tools/ folder.-->
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
<!--h2. Task Versitility
|
|
145
|
+
|
|
146
|
+
Ratchets is a very versitile application. Ratchets supports a number of techniques
|
|
147
|
+
for utilizing it's built-in tools and defining new tasks. Depedending on the desired usage,
|
|
148
|
+
Ratchets can be a build tool <i>library</i>, or taking advantage of it's own system, can
|
|
149
|
+
be used as a build tool in its own right.
|
|
150
|
+
|
|
151
|
+
One easily adopted usage of Ratchets is as a build library invoked from Rake.
|
|
152
|
+
Rake is the prevalent build tool for Ruby, and an excellent one at that. Ratchets
|
|
153
|
+
tools can be easily called from any application, so calling them from a Rake task
|
|
154
|
+
is a natural endeavor. Ratchets goes a step further in its support of Rake however
|
|
155
|
+
by allowing the built-in tools to be setup as Rake tasks automatically.
|
|
156
|
+
If this is intended usage jump down to <a href="#ch4">Ratchets a la Rake</a>
|
|
157
|
+
to learn more.
|
|
158
|
+
|
|
159
|
+
On the other hand, forgoing a separate build tool, tasks can instead be defined
|
|
160
|
+
as YAML descriptors and invoked via thae <code>project</code> command-line utility.
|
|
161
|
+
This makes tasks extremely easy to read and write, and allows project information
|
|
162
|
+
and task definitions to be jointly located but still universally accessible as
|
|
163
|
+
pure data. We will cover this usage in <a href="#ch2">Describing Tasks
|
|
164
|
+
via YAML</a>.
|
|
165
|
+
|
|
166
|
+
The other alternative, which we will discuss last, is for tasks to be defined as
|
|
167
|
+
stand-alone executables. This approach is in the spirit of Unix --it's favor of many
|
|
168
|
+
small tools over single monolithic applications. Ratchets provides strong support
|
|
169
|
+
for this mode of operation, which we have dubbed the <a href="#ch3">Sake Technique</a>.
|
|
170
|
+
[ed- In fact, it is my prefered usage.]
|
|
171
|
+
|
|
172
|
+
In any case, no matter which technique is used. The centralized data resource
|
|
173
|
+
for project information is readily available. This <i>reapability</i> of
|
|
174
|
+
information, probably more than any other feature, makes Ratchets so effective.-->
|
|
175
|
+
|
|
176
|
+
<!--
|
|
177
|
+
|
|
178
|
+
<p>The conversion is almost seemless. The task class needs only conform to some simple conventions (in this case
|
|
179
|
+
for example you can see the package_file.include needs to be reduced to a single 'include' attribnute) which are farily
|
|
180
|
+
trivial to implement. This format has been a big hit with Reap's users. Of course it's optional, one can still do
|
|
181
|
+
everything through the Reapfile (but why?).</p>
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
<h2>Sake may have some nice built-in tasks, but we use Rake. So what good is it?</h2>
|
|
185
|
+
|
|
186
|
+
<p>Sake's unix style of many small scripts is fairly orthongonal to Rake's,
|
|
187
|
+
So you can still call upon Sake's built-in scripts in your Rakefile, if you so prefer.
|
|
188
|
+
Check it out:</p>
|
|
189
|
+
|
|
190
|
+
<pre>
|
|
191
|
+
require 'sake/project'
|
|
192
|
+
|
|
193
|
+
desc "Generate RDocs"
|
|
194
|
+
|
|
195
|
+
task :rdoc do
|
|
196
|
+
Automation.rdoc do |s|
|
|
197
|
+
s.template = 'jamis'
|
|
198
|
+
s.include = 'lib/**/*'
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
</pre>
|
|
202
|
+
|
|
203
|
+
<p>Of course, you don't have to use Reap's task system. You can still use Rake's for all your project tasks if
|
|
204
|
+
you prefer or for some reason must, and you can still get Reap's task functionality. Reap provides a simple interface
|
|
205
|
+
for doing this. Here's an example of a Rakefile using Reap.</p>
|
|
206
|
+
|
|
207
|
+
<pre>
|
|
208
|
+
require 'reap/reap'
|
|
209
|
+
|
|
210
|
+
task_package 'pack' do |pkg|
|
|
211
|
+
pkg.distribute = [ 'gem' ]
|
|
212
|
+
pkg.dependencies = [ facets ]
|
|
213
|
+
end
|
|
214
|
+
</pre>
|
|
215
|
+
|
|
216
|
+
<p>In the above, all information is provided directly via the Ruby task code. No information is coming from the
|
|
217
|
+
projectinfo file (same is tru for a Reapfile). But you can also use Rake while utilizing the projectinfo file if
|
|
218
|
+
you wish. In your Rakefile simple put:</p>
|
|
219
|
+
|
|
220
|
+
<pre>
|
|
221
|
+
require 'reap/rake'
|
|
222
|
+
</pre>
|
|
223
|
+
|
|
224
|
+
<p>Then all the tasks defined in the projectinfo file will be available via Rake. You can still add additional
|
|
225
|
+
Rake tasks, of course.</p>
|
|
226
|
+
|
|
227
|
+
<p>Reap can be used in the same fashion as Rake. Simply create a Reapfile and use the <code>reap</code>
|
|
228
|
+
command to utilize your tasks.</p>
|
|
229
|
+
|
|
230
|
+
<p>Adding a extra Reap task is pretty easy. Just define a task in a the special <i>meta/reapfile</i>.
|
|
231
|
+
If you have ever created a task in Rake's 'Rakefile' then you know how to do it here too. A simple
|
|
232
|
+
task would look like this:</p>
|
|
233
|
+
|
|
234
|
+
<pre>
|
|
235
|
+
desc "My special task"
|
|
236
|
+
task :hello do
|
|
237
|
+
puts "Hello, World!"
|
|
238
|
+
end
|
|
239
|
+
</pre>
|
|
240
|
+
|
|
241
|
+
<p>You may not like keeping a "monolithic" file of tasks and instead prefer to keep a collection of
|
|
242
|
+
individual task scripts. You can do this by placing your script in the <i>meta/tasks</i> folder and
|
|
243
|
+
encapsulating your task defintion in the Tasks module.</p>
|
|
244
|
+
|
|
245
|
+
<pre>
|
|
246
|
+
module Tasks
|
|
247
|
+
|
|
248
|
+
desc "My special task"
|
|
249
|
+
task :hello do
|
|
250
|
+
puts "Hello, World!"
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
end
|
|
254
|
+
</pre>
|
|
255
|
+
|
|
256
|
+
-->
|