rook 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. data/LGPL +504 -0
  2. data/README.txt +15 -6
  3. data/bin/rook +1 -1
  4. data/doc-api/classes/BZ2/Reader.html +24 -24
  5. data/doc-api/classes/Digest/Base.html +18 -18
  6. data/doc-api/classes/Enumerable.html +55 -55
  7. data/doc-api/classes/File.html +53 -6
  8. data/doc-api/classes/FileUtils.html +90 -90
  9. data/doc-api/classes/Kernel.html +48 -48
  10. data/doc-api/classes/Rook.html +18 -5
  11. data/doc-api/classes/Rook/Assertion.html +29 -14
  12. data/doc-api/classes/Rook/Commands.html +296 -364
  13. data/doc-api/classes/Rook/Cookbook.html +165 -60
  14. data/doc-api/classes/Rook/CookbookError.html +7 -7
  15. data/doc-api/classes/Rook/CookbookValidator.html +24 -24
  16. data/doc-api/classes/Rook/Kitchen.html +379 -224
  17. data/doc-api/classes/Rook/KitchenHelper.html +69 -69
  18. data/doc-api/classes/Rook/Main.html +47 -30
  19. data/doc-api/classes/Rook/Recipe.html +63 -35
  20. data/doc-api/classes/Rook/Util.html +72 -68
  21. data/doc-api/classes/Rook/Util/UndefinedPropertyError.html +6 -6
  22. data/doc-api/classes/Rook/{Parameters.html → ValueTable.html} +129 -123
  23. data/doc-api/created.rid +1 -1
  24. data/doc-api/files/rook/commands_rb.html +2 -2
  25. data/doc-api/files/rook/cookbook_rb.html +2 -2
  26. data/doc-api/files/rook/helper/bz2_rb.html +1 -1
  27. data/doc-api/files/rook/helper/digest_rb.html +1 -1
  28. data/doc-api/files/rook/helper/enumerable_rb.html +1 -1
  29. data/doc-api/files/rook/helper/file_rb.html +2 -2
  30. data/doc-api/files/rook/helper/fileutils_rb.html +1 -1
  31. data/doc-api/files/rook/helper/kernel_rb.html +1 -1
  32. data/doc-api/files/rook/kitchen_rb.html +2 -2
  33. data/doc-api/files/rook/main_rb.html +2 -2
  34. data/doc-api/files/rook/recipe_rb.html +2 -2
  35. data/doc-api/files/rook/util_rb.html +2 -2
  36. data/doc-api/files/rook_rb.html +2 -2
  37. data/doc-api/fr_class_index.html +1 -1
  38. data/doc-api/fr_file_index.html +0 -1
  39. data/doc-api/fr_method_index.html +148 -140
  40. data/doc-api/index.html +1 -1
  41. data/examples/hello_c/Rookbook.rb +1 -1
  42. data/examples/hello_c/Rookbook.yaml +8 -8
  43. data/examples/project/README.txt +2 -2
  44. data/examples/project/Rookbook.rb +20 -19
  45. data/examples/project/Rookbook.yaml +30 -28
  46. data/examples/project/bin/example +2 -2
  47. data/examples/project/example.gemspec +1 -1
  48. data/examples/project/lib/example.rb +2 -2
  49. data/examples/project/test/test.rb +2 -2
  50. data/lib/rook.rb +5 -2
  51. data/lib/rook/commands.rb +28 -17
  52. data/lib/rook/cookbook.rb +107 -92
  53. data/lib/rook/helper/bz2.rb +1 -1
  54. data/lib/rook/helper/digest.rb +1 -1
  55. data/lib/rook/helper/enumerable.rb +1 -1
  56. data/lib/rook/helper/file.rb +28 -3
  57. data/lib/rook/helper/fileutils.rb +1 -1
  58. data/lib/rook/helper/kernel.rb +1 -1
  59. data/lib/rook/kitchen.rb +138 -100
  60. data/lib/rook/main.rb +72 -47
  61. data/lib/rook/recipe.rb +51 -35
  62. data/lib/rook/rookbook.schema.yaml +34 -54
  63. data/lib/rook/util.rb +22 -8
  64. data/rook.gemspec +5 -5
  65. metadata +5 -7
  66. data/COPYING +0 -340
  67. 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>&#8216;tar.gz&#8217;, &#8216;tar.bz2&#8217;, and &#8217;.zip&#8217; support
102
- (requires &#8216;minitar&#8217;, &#8216;bz2&#8217;, and
103
- &#8216;rubyzip&#8217; 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 &#8216;gem install -r
117
- rook&#8217;.
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 (&gt;= 1.0.0) (<a
136
- href="http://www.rubyforge.org/projects/abstract">www.rubyforge.org/projects/abstract</a>)
137
-
138
- </li>
139
- <li>kwalify (&gt;= 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 &#8216;ruby_X.X.X/contrib/inline_require.rb&#8217;
164
- merges &#8216;bin/rook&#8217; 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 &gt; 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 &quot;gcc #{@c_flags} -o #{@product} #{@ingreds.join(' ')}&quot;
191
-
192
- - product: *.o
193
- ingreds: [ $(1).c ]
194
- options: [ $(1).h ]
195
- method: |
196
- sys &quot;gcc #{@c_flags} -c #{@ingred}&quot;
197
-
198
- - product: :clean
199
- method: |
200
- rm_f Dir.glob(&quot;*.o&quot;)
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 (&#8216;Rookbook.rb&#8217;) 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 &quot;create '#{command}' command&quot;
216
- recipe command, objfiles do |r|
217
- sys &quot;gcc #{@c_flags} -o #{@product} #{@ingreds.join(' ')}&quot;
218
- end
219
-
220
- recipe &quot;*.o&quot;, '$(1).c', :options=&gt;['$(1).h'] do |r|
221
- sys &quot;gcc #{@c_flags} -c #{@ingred}&quot;
222
- end
223
-
224
- recipe :clean do |r|
225
- rm_f Dir.glob(&quot;*.o&quot;)
226
- end
227
- </pre>
228
- <p>
229
- See &#8216;examples/&#8217; 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
- &#8216;rule&#8217; in Rake.
251
-
252
- </dd>
253
- <dt> Specific recipe </dt><dd>Recipe which product is specified by name. This is equivarent to
254
- &#8216;file&#8217; in Rake.
255
-
256
- </dd>
257
- <dt> Symbolic recipe </dt><dd>Recipe which product is specified by Symbol. This is equivarent to
258
- &#8216;task&#8217; 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>