rook 0.1.0 → 0.2.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/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
data/doc-api/classes/File.html
CHANGED
@@ -93,7 +93,8 @@ extends <a href="File.html">File</a> class
|
|
93
93
|
|
94
94
|
<div class="name-list">
|
95
95
|
<a href="#M000001">edit</a>
|
96
|
-
<a href="#M000002">
|
96
|
+
<a href="#M000002">replace</a>
|
97
|
+
<a href="#M000003">write</a>
|
97
98
|
</div>
|
98
99
|
</div>
|
99
100
|
|
@@ -135,20 +136,22 @@ ex.
|
|
135
136
|
File.edit('file.txt') do |content|
|
136
137
|
content.gsub!(/\$Release\$/, '1.0.0')
|
137
138
|
content.gsub!(/\$Copyright\$/, '(c)kuwata-lab')
|
139
|
+
content
|
138
140
|
end
|
139
141
|
</pre>
|
140
142
|
<p><a class="source-toggle" href="#"
|
141
143
|
onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
|
142
144
|
<div class="method-source-code" id="M000001-source">
|
143
145
|
<pre>
|
144
|
-
<span class="ruby-comment cmt"># File rook/helper/file.rb, line
|
146
|
+
<span class="ruby-comment cmt"># File rook/helper/file.rb, line 24</span>
|
145
147
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">edit</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
146
148
|
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">'r+'</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
147
149
|
<span class="ruby-identifier">content</span> = <span class="ruby-identifier">f</span>.<span class="ruby-identifier">read</span>()
|
148
150
|
<span class="ruby-comment cmt">#yield(content)</span>
|
149
|
-
<span class="ruby-identifier">block</span>.<span class="ruby-identifier">arity</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span> <span class="ruby-operator">?</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">content</span>) <span class="ruby-operator">:</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">content</span>, <span class="ruby-identifier">filename</span>)
|
151
|
+
<span class="ruby-identifier">result</span> = <span class="ruby-identifier">block</span>.<span class="ruby-identifier">arity</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span> <span class="ruby-operator">?</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">content</span>) <span class="ruby-operator">:</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">content</span>, <span class="ruby-identifier">filename</span>)
|
150
152
|
<span class="ruby-identifier">f</span>.<span class="ruby-identifier">rewind</span>()
|
151
153
|
<span class="ruby-identifier">f</span>.<span class="ruby-identifier">truncate</span>(<span class="ruby-value">0</span>)
|
154
|
+
<span class="ruby-comment cmt">#f.write(result)</span>
|
152
155
|
<span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">content</span>)
|
153
156
|
<span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">test</span>(<span class="ruby-value">?f</span>, <span class="ruby-identifier">filename</span>)
|
154
157
|
<span class="ruby-keyword kw">end</span>
|
@@ -162,6 +165,50 @@ ex.
|
|
162
165
|
|
163
166
|
<div class="method-heading">
|
164
167
|
<a href="#M000002" class="method-signature">
|
168
|
+
<span class="method-name">replace</span><span class="method-args">(filename) {|content| ...}</span>
|
169
|
+
</a>
|
170
|
+
</div>
|
171
|
+
|
172
|
+
<div class="method-description">
|
173
|
+
<p>
|
174
|
+
replace file content with the result of block.
|
175
|
+
</p>
|
176
|
+
<p>
|
177
|
+
ex.
|
178
|
+
</p>
|
179
|
+
<pre>
|
180
|
+
File.replace('file.txt') do |content|
|
181
|
+
s = content
|
182
|
+
s = s.gsub(/\$Release\$/, '1.0.0')
|
183
|
+
s = s.gsub(/\$Copyright\$/, '(c)kuwata-lab')
|
184
|
+
s
|
185
|
+
end
|
186
|
+
</pre>
|
187
|
+
<p><a class="source-toggle" href="#"
|
188
|
+
onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
|
189
|
+
<div class="method-source-code" id="M000002-source">
|
190
|
+
<pre>
|
191
|
+
<span class="ruby-comment cmt"># File rook/helper/file.rb, line 48</span>
|
192
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">replace</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
193
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">'r+'</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
194
|
+
<span class="ruby-identifier">content</span> = <span class="ruby-identifier">f</span>.<span class="ruby-identifier">read</span>()
|
195
|
+
<span class="ruby-comment cmt">#yield(content)</span>
|
196
|
+
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">block</span>.<span class="ruby-identifier">arity</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span> <span class="ruby-operator">?</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">content</span>) <span class="ruby-operator">:</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">content</span>, <span class="ruby-identifier">filename</span>)
|
197
|
+
<span class="ruby-identifier">f</span>.<span class="ruby-identifier">rewind</span>()
|
198
|
+
<span class="ruby-identifier">f</span>.<span class="ruby-identifier">truncate</span>(<span class="ruby-value">0</span>)
|
199
|
+
<span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">s</span>)
|
200
|
+
<span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">test</span>(<span class="ruby-value">?f</span>, <span class="ruby-identifier">filename</span>)
|
201
|
+
<span class="ruby-keyword kw">end</span>
|
202
|
+
</pre>
|
203
|
+
</div>
|
204
|
+
</div>
|
205
|
+
</div>
|
206
|
+
|
207
|
+
<div id="method-M000003" class="method-detail">
|
208
|
+
<a name="M000003"></a>
|
209
|
+
|
210
|
+
<div class="method-heading">
|
211
|
+
<a href="#M000003" class="method-signature">
|
165
212
|
<span class="method-name">write</span><span class="method-args">(filename, content)</span>
|
166
213
|
</a>
|
167
214
|
</div>
|
@@ -181,10 +228,10 @@ ex.
|
|
181
228
|
File.write('file.txt', content)
|
182
229
|
</pre>
|
183
230
|
<p><a class="source-toggle" href="#"
|
184
|
-
onclick="toggleCode('
|
185
|
-
<div class="method-source-code" id="
|
231
|
+
onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
|
232
|
+
<div class="method-source-code" id="M000003-source">
|
186
233
|
<pre>
|
187
|
-
<span class="ruby-comment cmt"># File rook/helper/file.rb, line
|
234
|
+
<span class="ruby-comment cmt"># File rook/helper/file.rb, line 70</span>
|
188
235
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-identifier">content</span>)
|
189
236
|
<span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">'w'</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">content</span>) }
|
190
237
|
<span class="ruby-keyword kw">end</span>
|
@@ -104,21 +104,21 @@ href="http://raa.ruby-lang.org/project/minitar">raa.ruby-lang.org/project/minita
|
|
104
104
|
<h3 class="section-bar">Methods</h3>
|
105
105
|
|
106
106
|
<div class="name-list">
|
107
|
-
<a href="#
|
108
|
-
<a href="#
|
109
|
-
<a href="#
|
110
|
-
<a href="#
|
111
|
-
<a href="#
|
112
|
-
<a href="#
|
113
|
-
<a href="#
|
114
|
-
<a href="#
|
115
|
-
<a href="#
|
116
|
-
<a href="#
|
117
|
-
<a href="#
|
118
|
-
<a href="#
|
119
|
-
<a href="#
|
120
|
-
<a href="#
|
121
|
-
<a href="#
|
107
|
+
<a href="#M000006">cp_a</a>
|
108
|
+
<a href="#M000004">cp_p</a>
|
109
|
+
<a href="#M000005">cp_pr</a>
|
110
|
+
<a href="#M000007">store</a>
|
111
|
+
<a href="#M000009">store_a</a>
|
112
|
+
<a href="#M000008">store_p</a>
|
113
|
+
<a href="#M000013">tar_cf</a>
|
114
|
+
<a href="#M000017">tar_cjf</a>
|
115
|
+
<a href="#M000015">tar_czf</a>
|
116
|
+
<a href="#M000014">tar_xf</a>
|
117
|
+
<a href="#M000018">tar_xjf</a>
|
118
|
+
<a href="#M000016">tar_xzf</a>
|
119
|
+
<a href="#M000012">unzip</a>
|
120
|
+
<a href="#M000010">zip</a>
|
121
|
+
<a href="#M000011">zip_r</a>
|
122
122
|
</div>
|
123
123
|
</div>
|
124
124
|
|
@@ -140,11 +140,11 @@ href="http://raa.ruby-lang.org/project/minitar">raa.ruby-lang.org/project/minita
|
|
140
140
|
<div id="methods">
|
141
141
|
<h3 class="section-bar">Public Instance methods</h3>
|
142
142
|
|
143
|
-
<div id="method-
|
144
|
-
<a name="
|
143
|
+
<div id="method-M000006" class="method-detail">
|
144
|
+
<a name="M000006"></a>
|
145
145
|
|
146
146
|
<div class="method-heading">
|
147
|
-
<a href="#
|
147
|
+
<a href="#M000006" class="method-signature">
|
148
148
|
<span class="method-name">cp_a</span><span class="method-args">(src, dest, options={})</span>
|
149
149
|
</a>
|
150
150
|
</div>
|
@@ -166,8 +166,8 @@ ex2.
|
|
166
166
|
cp_a(['file1', 'file2', 'file3'], 'dir')
|
167
167
|
</pre>
|
168
168
|
<p><a class="source-toggle" href="#"
|
169
|
-
onclick="toggleCode('
|
170
|
-
<div class="method-source-code" id="
|
169
|
+
onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
|
170
|
+
<div class="method-source-code" id="M000006-source">
|
171
171
|
<pre>
|
172
172
|
<span class="ruby-comment cmt"># File rook/helper/fileutils.rb, line 61</span>
|
173
173
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cp_a</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">dest</span>, <span class="ruby-identifier">options</span>={})
|
@@ -190,11 +190,11 @@ ex2.
|
|
190
190
|
</div>
|
191
191
|
</div>
|
192
192
|
|
193
|
-
<div id="method-
|
194
|
-
<a name="
|
193
|
+
<div id="method-M000004" class="method-detail">
|
194
|
+
<a name="M000004"></a>
|
195
195
|
|
196
196
|
<div class="method-heading">
|
197
|
-
<a href="#
|
197
|
+
<a href="#M000004" class="method-signature">
|
198
198
|
<span class="method-name">cp_p</span><span class="method-args">(src, dest, options={})</span>
|
199
199
|
</a>
|
200
200
|
</div>
|
@@ -216,8 +216,8 @@ ex2.
|
|
216
216
|
cp_p(['file1', 'file2', 'file3'], 'dir')
|
217
217
|
</pre>
|
218
218
|
<p><a class="source-toggle" href="#"
|
219
|
-
onclick="toggleCode('
|
220
|
-
<div class="method-source-code" id="
|
219
|
+
onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
|
220
|
+
<div class="method-source-code" id="M000004-source">
|
221
221
|
<pre>
|
222
222
|
<span class="ruby-comment cmt"># File rook/helper/fileutils.rb, line 31</span>
|
223
223
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cp_p</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">dest</span>, <span class="ruby-identifier">options</span>={})
|
@@ -229,11 +229,11 @@ ex2.
|
|
229
229
|
</div>
|
230
230
|
</div>
|
231
231
|
|
232
|
-
<div id="method-
|
233
|
-
<a name="
|
232
|
+
<div id="method-M000005" class="method-detail">
|
233
|
+
<a name="M000005"></a>
|
234
234
|
|
235
235
|
<div class="method-heading">
|
236
|
-
<a href="#
|
236
|
+
<a href="#M000005" class="method-signature">
|
237
237
|
<span class="method-name">cp_pr</span><span class="method-args">(src, dest, options={})</span>
|
238
238
|
</a>
|
239
239
|
</div>
|
@@ -255,8 +255,8 @@ ex2.
|
|
255
255
|
cp_pr(['file1', 'file2', 'file3'], 'dir')
|
256
256
|
</pre>
|
257
257
|
<p><a class="source-toggle" href="#"
|
258
|
-
onclick="toggleCode('
|
259
|
-
<div class="method-source-code" id="
|
258
|
+
onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
|
259
|
+
<div class="method-source-code" id="M000005-source">
|
260
260
|
<pre>
|
261
261
|
<span class="ruby-comment cmt"># File rook/helper/fileutils.rb, line 46</span>
|
262
262
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cp_pr</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">dest</span>, <span class="ruby-identifier">options</span>={})
|
@@ -268,11 +268,11 @@ ex2.
|
|
268
268
|
</div>
|
269
269
|
</div>
|
270
270
|
|
271
|
-
<div id="method-
|
272
|
-
<a name="
|
271
|
+
<div id="method-M000007" class="method-detail">
|
272
|
+
<a name="M000007"></a>
|
273
273
|
|
274
274
|
<div class="method-heading">
|
275
|
-
<a href="#
|
275
|
+
<a href="#M000007" class="method-signature">
|
276
276
|
<span class="method-name">store</span><span class="method-args">(src, dest, options={})</span>
|
277
277
|
</a>
|
278
278
|
</div>
|
@@ -295,8 +295,8 @@ ex2. copy all ‘lib/**/*.rb’ into ‘tmp/lib/**/*.rb’
|
|
295
295
|
cp_a(Dir.glob('lib/**/*.rb'), 'tmp')
|
296
296
|
</pre>
|
297
297
|
<p><a class="source-toggle" href="#"
|
298
|
-
onclick="toggleCode('
|
299
|
-
<div class="method-source-code" id="
|
298
|
+
onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
|
299
|
+
<div class="method-source-code" id="M000007-source">
|
300
300
|
<pre>
|
301
301
|
<span class="ruby-comment cmt"># File rook/helper/fileutils.rb, line 87</span>
|
302
302
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">dest</span>, <span class="ruby-identifier">options</span>={})
|
@@ -307,11 +307,11 @@ ex2. copy all ‘lib/**/*.rb’ into ‘tmp/lib/**/*.rb’
|
|
307
307
|
</div>
|
308
308
|
</div>
|
309
309
|
|
310
|
-
<div id="method-
|
311
|
-
<a name="
|
310
|
+
<div id="method-M000009" class="method-detail">
|
311
|
+
<a name="M000009"></a>
|
312
312
|
|
313
313
|
<div class="method-heading">
|
314
|
-
<a href="#
|
314
|
+
<a href="#M000009" class="method-signature">
|
315
315
|
<span class="method-name">store_a</span><span class="method-args">(src, dest, options={})</span>
|
316
316
|
</a>
|
317
317
|
</div>
|
@@ -321,8 +321,8 @@ ex2. copy all ‘lib/**/*.rb’ into ‘tmp/lib/**/*.rb’
|
|
321
321
|
copy files to dest with keeping it’s filepath and file type
|
322
322
|
</p>
|
323
323
|
<p><a class="source-toggle" href="#"
|
324
|
-
onclick="toggleCode('
|
325
|
-
<div class="method-source-code" id="
|
324
|
+
onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
|
325
|
+
<div class="method-source-code" id="M000009-source">
|
326
326
|
<pre>
|
327
327
|
<span class="ruby-comment cmt"># File rook/helper/fileutils.rb, line 105</span>
|
328
328
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_a</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">dest</span>, <span class="ruby-identifier">options</span>={})
|
@@ -333,11 +333,11 @@ copy files to dest with keeping it’s filepath and file type
|
|
333
333
|
</div>
|
334
334
|
</div>
|
335
335
|
|
336
|
-
<div id="method-
|
337
|
-
<a name="
|
336
|
+
<div id="method-M000008" class="method-detail">
|
337
|
+
<a name="M000008"></a>
|
338
338
|
|
339
339
|
<div class="method-heading">
|
340
|
-
<a href="#
|
340
|
+
<a href="#M000008" class="method-signature">
|
341
341
|
<span class="method-name">store_p</span><span class="method-args">(src, dest, options={})</span>
|
342
342
|
</a>
|
343
343
|
</div>
|
@@ -347,8 +347,8 @@ copy files to dest with keeping it’s filepath and file type
|
|
347
347
|
copy files to dest with keeping it’s filepath and timestamp
|
348
348
|
</p>
|
349
349
|
<p><a class="source-toggle" href="#"
|
350
|
-
onclick="toggleCode('
|
351
|
-
<div class="method-source-code" id="
|
350
|
+
onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
|
351
|
+
<div class="method-source-code" id="M000008-source">
|
352
352
|
<pre>
|
353
353
|
<span class="ruby-comment cmt"># File rook/helper/fileutils.rb, line 96</span>
|
354
354
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_p</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">dest</span>, <span class="ruby-identifier">options</span>={})
|
@@ -359,11 +359,11 @@ copy files to dest with keeping it’s filepath and timestamp
|
|
359
359
|
</div>
|
360
360
|
</div>
|
361
361
|
|
362
|
-
<div id="method-
|
363
|
-
<a name="
|
362
|
+
<div id="method-M000013" class="method-detail">
|
363
|
+
<a name="M000013"></a>
|
364
364
|
|
365
365
|
<div class="method-heading">
|
366
|
-
<a href="#
|
366
|
+
<a href="#M000013" class="method-signature">
|
367
367
|
<span class="method-name">tar_cf</span><span class="method-args">(tarfilename, filenames, options={})</span>
|
368
368
|
</a>
|
369
369
|
</div>
|
@@ -382,8 +382,8 @@ ex1.
|
|
382
382
|
tar_cf 'foo.tar', Dir.glob('*.txt')
|
383
383
|
</pre>
|
384
384
|
<p><a class="source-toggle" href="#"
|
385
|
-
onclick="toggleCode('
|
386
|
-
<div class="method-source-code" id="
|
385
|
+
onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
|
386
|
+
<div class="method-source-code" id="M000013-source">
|
387
387
|
<pre>
|
388
388
|
<span class="ruby-comment cmt"># File rook/helper/fileutils.rb, line 229</span>
|
389
389
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tar_cf</span>(<span class="ruby-identifier">tarfilename</span>, <span class="ruby-identifier">filenames</span>, <span class="ruby-identifier">options</span>={})
|
@@ -394,11 +394,11 @@ ex1.
|
|
394
394
|
</div>
|
395
395
|
</div>
|
396
396
|
|
397
|
-
<div id="method-
|
398
|
-
<a name="
|
397
|
+
<div id="method-M000017" class="method-detail">
|
398
|
+
<a name="M000017"></a>
|
399
399
|
|
400
400
|
<div class="method-heading">
|
401
|
-
<a href="#
|
401
|
+
<a href="#M000017" class="method-signature">
|
402
402
|
<span class="method-name">tar_cjf</span><span class="method-args">(tarfilename, filenames, options={})</span>
|
403
403
|
</a>
|
404
404
|
</div>
|
@@ -417,8 +417,8 @@ ex1.
|
|
417
417
|
tar_cjf 'foo.tar.bz2', Dir.glob('*.txt')
|
418
418
|
</pre>
|
419
419
|
<p><a class="source-toggle" href="#"
|
420
|
-
onclick="toggleCode('
|
421
|
-
<div class="method-source-code" id="
|
420
|
+
onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
|
421
|
+
<div class="method-source-code" id="M000017-source">
|
422
422
|
<pre>
|
423
423
|
<span class="ruby-comment cmt"># File rook/helper/fileutils.rb, line 291</span>
|
424
424
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tar_cjf</span>(<span class="ruby-identifier">tarfilename</span>, <span class="ruby-identifier">filenames</span>, <span class="ruby-identifier">options</span>={})
|
@@ -431,11 +431,11 @@ ex1.
|
|
431
431
|
</div>
|
432
432
|
</div>
|
433
433
|
|
434
|
-
<div id="method-
|
435
|
-
<a name="
|
434
|
+
<div id="method-M000015" class="method-detail">
|
435
|
+
<a name="M000015"></a>
|
436
436
|
|
437
437
|
<div class="method-heading">
|
438
|
-
<a href="#
|
438
|
+
<a href="#M000015" class="method-signature">
|
439
439
|
<span class="method-name">tar_czf</span><span class="method-args">(tarfilename, filenames, options={})</span>
|
440
440
|
</a>
|
441
441
|
</div>
|
@@ -454,8 +454,8 @@ ex1.
|
|
454
454
|
tar_czf 'foo.tar.gz', Dir.glob('*.txt')
|
455
455
|
</pre>
|
456
456
|
<p><a class="source-toggle" href="#"
|
457
|
-
onclick="toggleCode('
|
458
|
-
<div class="method-source-code" id="
|
457
|
+
onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
|
458
|
+
<div class="method-source-code" id="M000015-source">
|
459
459
|
<pre>
|
460
460
|
<span class="ruby-comment cmt"># File rook/helper/fileutils.rb, line 259</span>
|
461
461
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tar_czf</span>(<span class="ruby-identifier">tarfilename</span>, <span class="ruby-identifier">filenames</span>, <span class="ruby-identifier">options</span>={})
|
@@ -467,11 +467,11 @@ ex1.
|
|
467
467
|
</div>
|
468
468
|
</div>
|
469
469
|
|
470
|
-
<div id="method-
|
471
|
-
<a name="
|
470
|
+
<div id="method-M000014" class="method-detail">
|
471
|
+
<a name="M000014"></a>
|
472
472
|
|
473
473
|
<div class="method-heading">
|
474
|
-
<a href="#
|
474
|
+
<a href="#M000014" class="method-signature">
|
475
475
|
<span class="method-name">tar_xf</span><span class="method-args">(tarfilename, filenames=[], options={})</span>
|
476
476
|
</a>
|
477
477
|
</div>
|
@@ -496,8 +496,8 @@ ex2.
|
|
496
496
|
tar_xf 'foo.tar', ['file1.txt', 'file2.txt']
|
497
497
|
</pre>
|
498
498
|
<p><a class="source-toggle" href="#"
|
499
|
-
onclick="toggleCode('
|
500
|
-
<div class="method-source-code" id="
|
499
|
+
onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
|
500
|
+
<div class="method-source-code" id="M000014-source">
|
501
501
|
<pre>
|
502
502
|
<span class="ruby-comment cmt"># File rook/helper/fileutils.rb, line 245</span>
|
503
503
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tar_xf</span>(<span class="ruby-identifier">tarfilename</span>, <span class="ruby-identifier">filenames</span>=[], <span class="ruby-identifier">options</span>={})
|
@@ -508,11 +508,11 @@ ex2.
|
|
508
508
|
</div>
|
509
509
|
</div>
|
510
510
|
|
511
|
-
<div id="method-
|
512
|
-
<a name="
|
511
|
+
<div id="method-M000018" class="method-detail">
|
512
|
+
<a name="M000018"></a>
|
513
513
|
|
514
514
|
<div class="method-heading">
|
515
|
-
<a href="#
|
515
|
+
<a href="#M000018" class="method-signature">
|
516
516
|
<span class="method-name">tar_xjf</span><span class="method-args">(tarfilename, filenames=[], options={})</span>
|
517
517
|
</a>
|
518
518
|
</div>
|
@@ -537,8 +537,8 @@ ex2.
|
|
537
537
|
tar_xjf 'foo.tar.bz2', ['file1.txt', 'file2.txt']
|
538
538
|
</pre>
|
539
539
|
<p><a class="source-toggle" href="#"
|
540
|
-
onclick="toggleCode('
|
541
|
-
<div class="method-source-code" id="
|
540
|
+
onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
|
541
|
+
<div class="method-source-code" id="M000018-source">
|
542
542
|
<pre>
|
543
543
|
<span class="ruby-comment cmt"># File rook/helper/fileutils.rb, line 309</span>
|
544
544
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tar_xjf</span>(<span class="ruby-identifier">tarfilename</span>, <span class="ruby-identifier">filenames</span>=[], <span class="ruby-identifier">options</span>={})
|
@@ -551,11 +551,11 @@ ex2.
|
|
551
551
|
</div>
|
552
552
|
</div>
|
553
553
|
|
554
|
-
<div id="method-
|
555
|
-
<a name="
|
554
|
+
<div id="method-M000016" class="method-detail">
|
555
|
+
<a name="M000016"></a>
|
556
556
|
|
557
557
|
<div class="method-heading">
|
558
|
-
<a href="#
|
558
|
+
<a href="#M000016" class="method-signature">
|
559
559
|
<span class="method-name">tar_xzf</span><span class="method-args">(tarfilename, filenames=[], options={})</span>
|
560
560
|
</a>
|
561
561
|
</div>
|
@@ -580,8 +580,8 @@ ex2.
|
|
580
580
|
tar_xzf 'foo.tar', ['file1.txt', 'file2.txt']
|
581
581
|
</pre>
|
582
582
|
<p><a class="source-toggle" href="#"
|
583
|
-
onclick="toggleCode('
|
584
|
-
<div class="method-source-code" id="
|
583
|
+
onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
|
584
|
+
<div class="method-source-code" id="M000016-source">
|
585
585
|
<pre>
|
586
586
|
<span class="ruby-comment cmt"># File rook/helper/fileutils.rb, line 276</span>
|
587
587
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tar_xzf</span>(<span class="ruby-identifier">tarfilename</span>, <span class="ruby-identifier">filenames</span>=[], <span class="ruby-identifier">options</span>={})
|
@@ -593,11 +593,11 @@ ex2.
|
|
593
593
|
</div>
|
594
594
|
</div>
|
595
595
|
|
596
|
-
<div id="method-
|
597
|
-
<a name="
|
596
|
+
<div id="method-M000012" class="method-detail">
|
597
|
+
<a name="M000012"></a>
|
598
598
|
|
599
599
|
<div class="method-heading">
|
600
|
-
<a href="#
|
600
|
+
<a href="#M000012" class="method-signature">
|
601
601
|
<span class="method-name">unzip</span><span class="method-args">(zipfilename, filenames=nil, options={})</span>
|
602
602
|
</a>
|
603
603
|
</div>
|
@@ -622,8 +622,8 @@ ex2.
|
|
622
622
|
unzip 'foo-1.1.zip', ['foo1.txt', 'foo2.txt']
|
623
623
|
</pre>
|
624
624
|
<p><a class="source-toggle" href="#"
|
625
|
-
onclick="toggleCode('
|
626
|
-
<div class="method-source-code" id="
|
625
|
+
onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
|
626
|
+
<div class="method-source-code" id="M000012-source">
|
627
627
|
<pre>
|
628
628
|
<span class="ruby-comment cmt"># File rook/helper/fileutils.rb, line 195</span>
|
629
629
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unzip</span>(<span class="ruby-identifier">zipfilename</span>, <span class="ruby-identifier">filenames</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">options</span>={})
|
@@ -654,11 +654,11 @@ ex2.
|
|
654
654
|
</div>
|
655
655
|
</div>
|
656
656
|
|
657
|
-
<div id="method-
|
658
|
-
<a name="
|
657
|
+
<div id="method-M000010" class="method-detail">
|
658
|
+
<a name="M000010"></a>
|
659
659
|
|
660
660
|
<div class="method-heading">
|
661
|
-
<a href="#
|
661
|
+
<a href="#M000010" class="method-signature">
|
662
662
|
<span class="method-name">zip</span><span class="method-args">(zipfilename, filenames, options={})</span>
|
663
663
|
</a>
|
664
664
|
</div>
|
@@ -683,8 +683,8 @@ ex2.
|
|
683
683
|
zip 'file.zip', Dir.glob('*.txt'), :basedir=>'path'
|
684
684
|
</pre>
|
685
685
|
<p><a class="source-toggle" href="#"
|
686
|
-
onclick="toggleCode('
|
687
|
-
<div class="method-source-code" id="
|
686
|
+
onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
|
687
|
+
<div class="method-source-code" id="M000010-source">
|
688
688
|
<pre>
|
689
689
|
<span class="ruby-comment cmt"># File rook/helper/fileutils.rb, line 149</span>
|
690
690
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">zip</span>(<span class="ruby-identifier">zipfilename</span>, <span class="ruby-identifier">filenames</span>, <span class="ruby-identifier">options</span>={})
|
@@ -713,11 +713,11 @@ ex2.
|
|
713
713
|
</div>
|
714
714
|
</div>
|
715
715
|
|
716
|
-
<div id="method-
|
717
|
-
<a name="
|
716
|
+
<div id="method-M000011" class="method-detail">
|
717
|
+
<a name="M000011"></a>
|
718
718
|
|
719
719
|
<div class="method-heading">
|
720
|
-
<a href="#
|
720
|
+
<a href="#M000011" class="method-signature">
|
721
721
|
<span class="method-name">zip_r</span><span class="method-args">(zipfilename, filenames, options={})</span>
|
722
722
|
</a>
|
723
723
|
</div>
|
@@ -730,8 +730,8 @@ create *.zip file with keeping filepath
|
|
730
730
|
requires ‘rubyzip’ library.
|
731
731
|
</p>
|
732
732
|
<p><a class="source-toggle" href="#"
|
733
|
-
onclick="toggleCode('
|
734
|
-
<div class="method-source-code" id="
|
733
|
+
onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
|
734
|
+
<div class="method-source-code" id="M000011-source">
|
735
735
|
<pre>
|
736
736
|
<span class="ruby-comment cmt"># File rook/helper/fileutils.rb, line 178</span>
|
737
737
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">zip_r</span>(<span class="ruby-identifier">zipfilename</span>, <span class="ruby-identifier">filenames</span>, <span class="ruby-identifier">options</span>={})
|