rook 0.0.2 → 0.1.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.
Files changed (87) hide show
  1. data/README.txt +124 -37
  2. data/bin/rook +8 -902
  3. data/doc-api/classes/BZ2.html +111 -0
  4. data/doc-api/classes/BZ2/Reader.html +234 -0
  5. data/doc-api/classes/Digest.html +107 -0
  6. data/doc-api/classes/Digest/Base.html +254 -0
  7. data/doc-api/classes/Enumerable.html +430 -0
  8. data/doc-api/classes/File.html +208 -0
  9. data/doc-api/classes/FileUtils.html +758 -0
  10. data/doc-api/classes/Kernel.html +317 -0
  11. data/doc-api/classes/Rook.html +148 -0
  12. data/doc-api/classes/Rook/Assertion.html +164 -0
  13. data/doc-api/classes/Rook/AssertionError.html +111 -0
  14. data/doc-api/classes/Rook/CommandOptionError.html +113 -0
  15. data/doc-api/classes/Rook/Commands.html +1158 -0
  16. data/doc-api/classes/Rook/Cookbook.html +357 -0
  17. data/doc-api/classes/Rook/CookbookError.html +161 -0
  18. data/doc-api/classes/Rook/CookbookValidator.html +215 -0
  19. data/doc-api/classes/Rook/Kitchen.html +875 -0
  20. data/doc-api/classes/Rook/KitchenHelper.html +386 -0
  21. data/doc-api/classes/Rook/Main.html +325 -0
  22. data/doc-api/classes/Rook/Parameters.html +443 -0
  23. data/doc-api/classes/Rook/Recipe.html +546 -0
  24. data/doc-api/classes/Rook/RookError.html +111 -0
  25. data/doc-api/classes/Rook/Util.html +408 -0
  26. data/doc-api/classes/Rook/Util/UndefinedPropertyError.html +160 -0
  27. data/doc-api/created.rid +1 -0
  28. data/doc-api/files/__/README_txt.html +313 -0
  29. data/doc-api/files/rook/commands_rb.html +115 -0
  30. data/doc-api/files/rook/cookbook_rb.html +115 -0
  31. data/doc-api/files/rook/helper/bz2_rb.html +114 -0
  32. data/doc-api/files/rook/helper/digest_rb.html +114 -0
  33. data/doc-api/files/rook/helper/enumerable_rb.html +107 -0
  34. data/doc-api/files/rook/helper/file_rb.html +107 -0
  35. data/doc-api/files/rook/helper/fileutils_rb.html +124 -0
  36. data/doc-api/files/rook/helper/kernel_rb.html +107 -0
  37. data/doc-api/files/rook/kitchen_rb.html +117 -0
  38. data/doc-api/files/rook/main_rb.html +117 -0
  39. data/doc-api/files/rook/recipe_rb.html +114 -0
  40. data/doc-api/files/rook/util_rb.html +115 -0
  41. data/doc-api/files/rook_rb.html +122 -0
  42. data/doc-api/fr_class_index.html +50 -0
  43. data/doc-api/fr_file_index.html +40 -0
  44. data/doc-api/fr_method_index.html +181 -0
  45. data/doc-api/index.html +24 -0
  46. data/doc-api/rdoc-style.css +208 -0
  47. data/examples/hello_c/Rookbook.rb +37 -0
  48. data/examples/hello_c/Rookbook.yaml +45 -0
  49. data/examples/hello_c/hello.c +6 -3
  50. data/examples/project/README.txt +8 -0
  51. data/examples/project/Rookbook.props +1 -0
  52. data/examples/project/Rookbook.rb +120 -0
  53. data/examples/project/Rookbook.yaml +117 -0
  54. data/examples/project/bin/example +12 -0
  55. data/examples/project/example.gemspec +29 -0
  56. data/examples/project/lib/example.rb +36 -0
  57. data/examples/{archive → project}/lib/example/bar.rb +0 -0
  58. data/examples/{archive → project}/lib/example/baz.rb +0 -0
  59. data/examples/{archive → project}/lib/example/foo.rb +0 -0
  60. data/examples/project/setup.rb +1331 -0
  61. data/examples/project/test/test.rb +27 -0
  62. data/lib/rook.rb +50 -0
  63. data/lib/rook/commands.rb +426 -0
  64. data/lib/rook/cookbook.rb +237 -0
  65. data/lib/rook/helper/bz2.rb +39 -0
  66. data/lib/rook/helper/digest.rb +76 -0
  67. data/lib/rook/helper/enumerable.rb +121 -0
  68. data/lib/rook/helper/file.rb +50 -0
  69. data/lib/rook/helper/fileutils.rb +340 -0
  70. data/lib/rook/helper/kernel.rb +108 -0
  71. data/lib/rook/kitchen.rb +668 -0
  72. data/lib/rook/main.rb +280 -0
  73. data/lib/rook/recipe.rb +259 -0
  74. data/lib/rook/rookbook.schema.yaml +156 -0
  75. data/lib/rook/util.rb +172 -0
  76. data/rook.gemspec +56 -0
  77. metadata +139 -45
  78. data/examples/archive/COPYING +0 -340
  79. data/examples/archive/README.txt +0 -1
  80. data/examples/archive/Rookbook +0 -56
  81. data/examples/archive/bin/example +0 -0
  82. data/examples/archive/doc/index.html +0 -0
  83. data/examples/archive/doc/index.txt +0 -0
  84. data/examples/archive/lib/example.rb +0 -0
  85. data/examples/archive/test/test1.rb +0 -0
  86. data/examples/archive/test/test2.rb +0 -0
  87. data/examples/hello_c/Rookbook +0 -24
@@ -0,0 +1,160 @@
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>Class: Rook::Util::UndefinedPropertyError</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="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Rook::Util::UndefinedPropertyError</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/rook/util_rb.html">
59
+ rook/util.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ RookError
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000072">new</a>&nbsp;&nbsp;
90
+ </div>
91
+ </div>
92
+
93
+ </div>
94
+
95
+
96
+ <!-- if includes -->
97
+
98
+ <div id="section">
99
+
100
+
101
+
102
+
103
+
104
+ <div id="attribute-list">
105
+ <h3 class="section-bar">Attributes</h3>
106
+
107
+ <div class="name-list">
108
+ <table>
109
+ <tr class="top-aligned-row context-row">
110
+ <td class="context-item-name">property</td>
111
+ <td class="context-item-value">&nbsp;[R]&nbsp;</td>
112
+ <td class="context-item-desc"></td>
113
+ </tr>
114
+ </table>
115
+ </div>
116
+ </div>
117
+
118
+
119
+
120
+ <!-- if method_list -->
121
+ <div id="methods">
122
+ <h3 class="section-bar">Public Class methods</h3>
123
+
124
+ <div id="method-M000072" class="method-detail">
125
+ <a name="M000072"></a>
126
+
127
+ <div class="method-heading">
128
+ <a href="#M000072" class="method-signature">
129
+ <span class="method-name">new</span><span class="method-args">(message, property)</span>
130
+ </a>
131
+ </div>
132
+
133
+ <div class="method-description">
134
+ <p><a class="source-toggle" href="#"
135
+ onclick="toggleCode('M000072-source');return false;">[Source]</a></p>
136
+ <div class="method-source-code" id="M000072-source">
137
+ <pre>
138
+ <span class="ruby-comment cmt"># File rook/util.rb, line 22</span>
139
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">property</span>)
140
+ <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">message</span>)
141
+ <span class="ruby-ivar">@property</span> = <span class="ruby-identifier">property</span>
142
+ <span class="ruby-keyword kw">end</span>
143
+ </pre>
144
+ </div>
145
+ </div>
146
+ </div>
147
+
148
+
149
+ </div>
150
+
151
+
152
+ </div>
153
+
154
+
155
+ <div id="validator-badges">
156
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
157
+ </div>
158
+
159
+ </body>
160
+ </html>
@@ -0,0 +1 @@
1
+ Wed May 31 14:35:55 JST 2006
@@ -0,0 +1,313 @@
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>