rook 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LGPL +504 -0
- data/README.txt +15 -6
- data/bin/rook +1 -1
- data/doc-api/classes/BZ2/Reader.html +24 -24
- data/doc-api/classes/Digest/Base.html +18 -18
- data/doc-api/classes/Enumerable.html +55 -55
- data/doc-api/classes/File.html +53 -6
- data/doc-api/classes/FileUtils.html +90 -90
- data/doc-api/classes/Kernel.html +48 -48
- data/doc-api/classes/Rook.html +18 -5
- data/doc-api/classes/Rook/Assertion.html +29 -14
- data/doc-api/classes/Rook/Commands.html +296 -364
- data/doc-api/classes/Rook/Cookbook.html +165 -60
- data/doc-api/classes/Rook/CookbookError.html +7 -7
- data/doc-api/classes/Rook/CookbookValidator.html +24 -24
- data/doc-api/classes/Rook/Kitchen.html +379 -224
- data/doc-api/classes/Rook/KitchenHelper.html +69 -69
- data/doc-api/classes/Rook/Main.html +47 -30
- data/doc-api/classes/Rook/Recipe.html +63 -35
- data/doc-api/classes/Rook/Util.html +72 -68
- data/doc-api/classes/Rook/Util/UndefinedPropertyError.html +6 -6
- data/doc-api/classes/Rook/{Parameters.html → ValueTable.html} +129 -123
- data/doc-api/created.rid +1 -1
- data/doc-api/files/rook/commands_rb.html +2 -2
- data/doc-api/files/rook/cookbook_rb.html +2 -2
- data/doc-api/files/rook/helper/bz2_rb.html +1 -1
- data/doc-api/files/rook/helper/digest_rb.html +1 -1
- data/doc-api/files/rook/helper/enumerable_rb.html +1 -1
- data/doc-api/files/rook/helper/file_rb.html +2 -2
- data/doc-api/files/rook/helper/fileutils_rb.html +1 -1
- data/doc-api/files/rook/helper/kernel_rb.html +1 -1
- data/doc-api/files/rook/kitchen_rb.html +2 -2
- data/doc-api/files/rook/main_rb.html +2 -2
- data/doc-api/files/rook/recipe_rb.html +2 -2
- data/doc-api/files/rook/util_rb.html +2 -2
- data/doc-api/files/rook_rb.html +2 -2
- data/doc-api/fr_class_index.html +1 -1
- data/doc-api/fr_file_index.html +0 -1
- data/doc-api/fr_method_index.html +148 -140
- data/doc-api/index.html +1 -1
- data/examples/hello_c/Rookbook.rb +1 -1
- data/examples/hello_c/Rookbook.yaml +8 -8
- data/examples/project/README.txt +2 -2
- data/examples/project/Rookbook.rb +20 -19
- data/examples/project/Rookbook.yaml +30 -28
- data/examples/project/bin/example +2 -2
- data/examples/project/example.gemspec +1 -1
- data/examples/project/lib/example.rb +2 -2
- data/examples/project/test/test.rb +2 -2
- data/lib/rook.rb +5 -2
- data/lib/rook/commands.rb +28 -17
- data/lib/rook/cookbook.rb +107 -92
- data/lib/rook/helper/bz2.rb +1 -1
- data/lib/rook/helper/digest.rb +1 -1
- data/lib/rook/helper/enumerable.rb +1 -1
- data/lib/rook/helper/file.rb +28 -3
- data/lib/rook/helper/fileutils.rb +1 -1
- data/lib/rook/helper/kernel.rb +1 -1
- data/lib/rook/kitchen.rb +138 -100
- data/lib/rook/main.rb +72 -47
- data/lib/rook/recipe.rb +51 -35
- data/lib/rook/rookbook.schema.yaml +34 -54
- data/lib/rook/util.rb +22 -8
- data/rook.gemspec +5 -5
- metadata +5 -7
- data/COPYING +0 -340
- data/doc-api/files/__/README_txt.html +0 -313
@@ -1,313 +0,0 @@
|
|
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: README.txt</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>README.txt</h1>
|
51
|
-
<table class="header-table">
|
52
|
-
<tr class="top-aligned-row">
|
53
|
-
<td><strong>Path:</strong></td>
|
54
|
-
<td>../README.txt
|
55
|
-
</td>
|
56
|
-
</tr>
|
57
|
-
<tr class="top-aligned-row">
|
58
|
-
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>Wed May 31 13:53:20 JST 2006</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
|
-
<h1>README</h1>
|
73
|
-
<table>
|
74
|
-
<tr><td valign="top">release:</td><td>$Release: 0.1.0 $
|
75
|
-
|
76
|
-
</td></tr>
|
77
|
-
<tr><td valign="top">copyright:</td><td>copyright(c) 2006 kuwata-lab.com all rights reserved.
|
78
|
-
|
79
|
-
</td></tr>
|
80
|
-
</table>
|
81
|
-
<h2>Introduction</h2>
|
82
|
-
<p>
|
83
|
-
<a href="../../classes/Rook.html">Rook</a> is a tool for SCM such as Make,
|
84
|
-
Rake, Ant, and so on. <a href="../../classes/Rook.html">Rook</a> has
|
85
|
-
inspired by Cook which is made by Peter Miller. <a
|
86
|
-
href="http://www.canb.auug.org.au/~millerp/cook/cook.html">www.canb.auug.org.au/~millerp/cook/cook.html</a>
|
87
|
-
</p>
|
88
|
-
<p>
|
89
|
-
Features:
|
90
|
-
</p>
|
91
|
-
<ul>
|
92
|
-
<li>Liken software build process to cooking.
|
93
|
-
|
94
|
-
</li>
|
95
|
-
<li>Two-style approach support: YAML-style and Ruby-style.
|
96
|
-
|
97
|
-
</li>
|
98
|
-
<li>Natural notation for production rule and optional ingredients.
|
99
|
-
|
100
|
-
</li>
|
101
|
-
<li>‘tar.gz’, ‘tar.bz2’, and ’.zip’ support
|
102
|
-
(requires ‘minitar’, ‘bz2’, and
|
103
|
-
‘rubyzip’ libraries.)
|
104
|
-
|
105
|
-
</li>
|
106
|
-
<li>Able to invoke build command forcedly
|
107
|
-
|
108
|
-
</li>
|
109
|
-
</ul>
|
110
|
-
<p>
|
111
|
-
Attention! <a href="../../classes/Rook.html">Rook</a> is under alpha
|
112
|
-
version and specification may change frequently.
|
113
|
-
</p>
|
114
|
-
<h2>Installation</h2>
|
115
|
-
<p>
|
116
|
-
If you have installed RubyGems, just stype ‘gem install -r
|
117
|
-
rook’.
|
118
|
-
</p>
|
119
|
-
<pre>
|
120
|
-
$ sudo gem install -r rook
|
121
|
-
</pre>
|
122
|
-
<p>
|
123
|
-
Otherwise download ruby_X.X.X.tar.bz2 and install with setup.rb.
|
124
|
-
</p>
|
125
|
-
<pre>
|
126
|
-
$ tar xjf rook_X.X.X.tar.bz2
|
127
|
-
$ cd rook_X.X.X/
|
128
|
-
$ sudo setup.rb
|
129
|
-
</pre>
|
130
|
-
<p>
|
131
|
-
(Must) If you have installed rook without RubyGems, the following libraries
|
132
|
-
must be installed.
|
133
|
-
</p>
|
134
|
-
<ul>
|
135
|
-
<li>abstract.rb (>= 1.0.0) (<a
|
136
|
-
href="http://www.rubyforge.org/projects/abstract">www.rubyforge.org/projects/abstract</a>)
|
137
|
-
|
138
|
-
</li>
|
139
|
-
<li>kwalify (>= 0.6.0) (<a
|
140
|
-
href="http://www.rubyforge.org/projects/kwalify">www.rubyforge.org/projects/kwalify</a>)
|
141
|
-
|
142
|
-
</li>
|
143
|
-
</ul>
|
144
|
-
<p>
|
145
|
-
(Optional) If you want to handle *.tar.gz, *.tar.bz2, or *.zip files, you
|
146
|
-
must install the following libraries.
|
147
|
-
</p>
|
148
|
-
<ul>
|
149
|
-
<li>minitar - <a
|
150
|
-
href="http://raa.ruby-lang.org/project/minitar">raa.ruby-lang.org/project/minitar</a>/
|
151
|
-
|
152
|
-
</li>
|
153
|
-
<li>bz2 - <a
|
154
|
-
href="http://raa.ruby-lang.org/project/bz2">raa.ruby-lang.org/project/bz2</a>/
|
155
|
-
|
156
|
-
</li>
|
157
|
-
<li>rubyzip - <a
|
158
|
-
href="http://raa.ruby-lang.org/project/rubyzip">raa.ruby-lang.org/project/rubyzip</a>/
|
159
|
-
|
160
|
-
</li>
|
161
|
-
</ul>
|
162
|
-
<p>
|
163
|
-
(Optional) Helper script ‘ruby_X.X.X/contrib/inline_require.rb’
|
164
|
-
merges ‘bin/rook’ and rook libraries into a file.
|
165
|
-
</p>
|
166
|
-
<pre>
|
167
|
-
$ cd rook_X.X.X/
|
168
|
-
$ unset RUBYLIB
|
169
|
-
$ ruby contrib/inline_require.rb -I lib bin/rook > contrib/rook
|
170
|
-
</pre>
|
171
|
-
<h2>Examples</h2>
|
172
|
-
<p>
|
173
|
-
The following is an example of Rookbook.yaml to cook *.c files. (Rookbook
|
174
|
-
is the equivarent to Makefile in Make or Rakefile in Rake.)
|
175
|
-
</p>
|
176
|
-
<pre>
|
177
|
-
properties:
|
178
|
-
- project: hello
|
179
|
-
- c_flags: '-g -Wall -O2'
|
180
|
-
|
181
|
-
variables:
|
182
|
-
- command: $(project)
|
183
|
-
- objfiles*: Dir.glob('*.c').collect{|f| f.sub(/\.c$/, '.o')}
|
184
|
-
|
185
|
-
recipes:
|
186
|
-
- product: $(command)
|
187
|
-
ingreds: [ $(objfiles) ]
|
188
|
-
desc: create '$(command)' command
|
189
|
-
method: |
|
190
|
-
sys "gcc #{@c_flags} -o #{@product} #{@ingreds.join(' ')}"
|
191
|
-
|
192
|
-
- product: *.o
|
193
|
-
ingreds: [ $(1).c ]
|
194
|
-
options: [ $(1).h ]
|
195
|
-
method: |
|
196
|
-
sys "gcc #{@c_flags} -c #{@ingred}"
|
197
|
-
|
198
|
-
- product: :clean
|
199
|
-
method: |
|
200
|
-
rm_f Dir.glob("*.o")
|
201
|
-
</pre>
|
202
|
-
<p>
|
203
|
-
<a href="../../classes/Rook.html">Rook</a> supports two style of Rookbook:
|
204
|
-
YAML-style and Ruby-style. The following (‘Rookbook.rb’) is the
|
205
|
-
Ruby-style example of Rookbook which is equivarent to the above YAML-style
|
206
|
-
example.
|
207
|
-
</p>
|
208
|
-
<pre>
|
209
|
-
property :project, 'hello'
|
210
|
-
property :c_flags, '-g -Wall -O2'
|
211
|
-
|
212
|
-
command = @project
|
213
|
-
objfiles = Dir.glob('*.c').collect{|f| f.sub(/\.c$/, '.o')}
|
214
|
-
|
215
|
-
desc "create '#{command}' command"
|
216
|
-
recipe command, objfiles do |r|
|
217
|
-
sys "gcc #{@c_flags} -o #{@product} #{@ingreds.join(' ')}"
|
218
|
-
end
|
219
|
-
|
220
|
-
recipe "*.o", '$(1).c', :options=>['$(1).h'] do |r|
|
221
|
-
sys "gcc #{@c_flags} -c #{@ingred}"
|
222
|
-
end
|
223
|
-
|
224
|
-
recipe :clean do |r|
|
225
|
-
rm_f Dir.glob("*.o")
|
226
|
-
end
|
227
|
-
</pre>
|
228
|
-
<p>
|
229
|
-
See ‘examples/’ directory for more examples.
|
230
|
-
</p>
|
231
|
-
<h2>Documents</h2>
|
232
|
-
<p>
|
233
|
-
Sorry, there is no documentation.
|
234
|
-
</p>
|
235
|
-
<h2>Terms</h2>
|
236
|
-
<dl>
|
237
|
-
<dt> Product </dt><dd>Output of cooking.
|
238
|
-
|
239
|
-
</dd>
|
240
|
-
<dt> Ingredient </dt><dd>Materials needed for cooking.
|
241
|
-
|
242
|
-
</dd>
|
243
|
-
<dt> Byproduct </dt><dd>Garbages produced in cooking.
|
244
|
-
|
245
|
-
</dd>
|
246
|
-
<dt> Recipe </dt><dd>Method how to cook product.
|
247
|
-
|
248
|
-
</dd>
|
249
|
-
<dt> Generic recipe </dt><dd>Recipe which product is specified by pattern. This is equivarent to
|
250
|
-
‘rule’ in Rake.
|
251
|
-
|
252
|
-
</dd>
|
253
|
-
<dt> Specific recipe </dt><dd>Recipe which product is specified by name. This is equivarent to
|
254
|
-
‘file’ in Rake.
|
255
|
-
|
256
|
-
</dd>
|
257
|
-
<dt> Symbolic recipe </dt><dd>Recipe which product is specified by Symbol. This is equivarent to
|
258
|
-
‘task’ in Rake.
|
259
|
-
|
260
|
-
</dd>
|
261
|
-
</dl>
|
262
|
-
<h2>To Do</h2>
|
263
|
-
<ul>
|
264
|
-
<li>[_] Documentation
|
265
|
-
|
266
|
-
</li>
|
267
|
-
<li>[_] Fingerprint support
|
268
|
-
|
269
|
-
</li>
|
270
|
-
<li>[_] Dependency Tree
|
271
|
-
|
272
|
-
</li>
|
273
|
-
<li>[_] Plugin architecture
|
274
|
-
|
275
|
-
</li>
|
276
|
-
</ul>
|
277
|
-
<h2>License</h2>
|
278
|
-
<p>
|
279
|
-
GPL ver2
|
280
|
-
</p>
|
281
|
-
|
282
|
-
</div>
|
283
|
-
|
284
|
-
|
285
|
-
</div>
|
286
|
-
|
287
|
-
|
288
|
-
</div>
|
289
|
-
|
290
|
-
|
291
|
-
<!-- if includes -->
|
292
|
-
|
293
|
-
<div id="section">
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
<!-- if method_list -->
|
303
|
-
|
304
|
-
|
305
|
-
</div>
|
306
|
-
|
307
|
-
|
308
|
-
<div id="validator-badges">
|
309
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
310
|
-
</div>
|
311
|
-
|
312
|
-
</body>
|
313
|
-
</html>
|