cft_smartcloud 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. data/README.rdoc +4 -0
  2. data/Rakefile +3 -3
  3. data/VERSION +1 -1
  4. data/bin/cft_smartcloud +37 -0
  5. data/cft_smartcloud.gemspec +88 -7
  6. data/lib/smartcloud.rb +12 -2
  7. data/lib/smartcloud_logger.rb +1 -1
  8. data/rdoc/classes/ConfigTable/BoolItem.html +172 -0
  9. data/rdoc/classes/ConfigTable/ExecItem.html +252 -0
  10. data/rdoc/classes/ConfigTable/Item.html +308 -0
  11. data/rdoc/classes/ConfigTable/MetaConfigEnvironment.html +445 -0
  12. data/rdoc/classes/ConfigTable/PackageSelectionItem.html +188 -0
  13. data/rdoc/classes/ConfigTable/PathItem.html +148 -0
  14. data/rdoc/classes/ConfigTable/ProgramItem.html +148 -0
  15. data/rdoc/classes/ConfigTable/SelectItem.html +175 -0
  16. data/rdoc/classes/ConfigTable.html +724 -0
  17. data/rdoc/classes/Enumerable.html +157 -0
  18. data/rdoc/classes/Errno/ENOTEMPTY.html +111 -0
  19. data/rdoc/classes/Errno.html +111 -0
  20. data/rdoc/classes/File.html +197 -0
  21. data/rdoc/classes/FileOperations.html +600 -0
  22. data/rdoc/classes/Hash.html +163 -0
  23. data/rdoc/classes/HookScriptAPI.html +413 -0
  24. data/rdoc/classes/IBMSmartCloud.html +1484 -0
  25. data/rdoc/classes/Installer/Shebang.html +245 -0
  26. data/rdoc/classes/Installer.html +1660 -0
  27. data/rdoc/classes/MIME/InvalidContentType.html +119 -0
  28. data/rdoc/classes/MIME/Type.html +1366 -0
  29. data/rdoc/classes/MIME/Types.html +643 -0
  30. data/rdoc/classes/MIME.html +124 -0
  31. data/rdoc/classes/MockSmartCloud.html +376 -0
  32. data/rdoc/classes/Net/HTTP.html +164 -0
  33. data/rdoc/classes/Net.html +122 -0
  34. data/rdoc/classes/RestClient/AbstractResponse.html +417 -0
  35. data/rdoc/classes/RestClient/Exception.html +305 -0
  36. data/rdoc/classes/RestClient/ExceptionWithResponse.html +119 -0
  37. data/rdoc/classes/RestClient/Exceptions.html +130 -0
  38. data/rdoc/classes/RestClient/MaxRedirectsReached.html +113 -0
  39. data/rdoc/classes/RestClient/Payload/Base.html +422 -0
  40. data/rdoc/classes/RestClient/Payload/Multipart.html +372 -0
  41. data/rdoc/classes/RestClient/Payload/Streamed.html +191 -0
  42. data/rdoc/classes/RestClient/Payload/UrlEncoded.html +202 -0
  43. data/rdoc/classes/RestClient/Payload.html +192 -0
  44. data/rdoc/classes/RestClient/RawResponse.html +236 -0
  45. data/rdoc/classes/RestClient/Redirect.html +168 -0
  46. data/rdoc/classes/RestClient/Request.html +950 -0
  47. data/rdoc/classes/RestClient/RequestFailed.html +178 -0
  48. data/rdoc/classes/RestClient/Resource.html +607 -0
  49. data/rdoc/classes/RestClient/Response.html +208 -0
  50. data/rdoc/classes/RestClient/ResponseForException.html +152 -0
  51. data/rdoc/classes/RestClient/SSLCertificateNotVerified.html +149 -0
  52. data/rdoc/classes/RestClient/ServerBrokeConnection.html +157 -0
  53. data/rdoc/classes/RestClient.html +737 -0
  54. data/rdoc/classes/SetupError.html +111 -0
  55. data/rdoc/classes/SmartcloudLogger.html +162 -0
  56. data/rdoc/classes/TestMIME.html +109 -0
  57. data/rdoc/classes/ToplevelInstaller.html +987 -0
  58. data/rdoc/classes/ToplevelInstallerMulti.html +593 -0
  59. data/rdoc/classes/XmlSimple/Cache.html +372 -0
  60. data/rdoc/classes/XmlSimple.html +475 -0
  61. data/rdoc/created.rid +1 -0
  62. data/rdoc/files/README_rdoc.html +198 -0
  63. data/rdoc/files/lib/hash_fix_rb.html +115 -0
  64. data/rdoc/files/lib/mime-types-1_16/lib/mime/types_rb.html +107 -0
  65. data/rdoc/files/lib/mime-types-1_16/setup_rb.html +157 -0
  66. data/rdoc/files/lib/mime-types-1_16/test/test_mime_type_rb.html +109 -0
  67. data/rdoc/files/lib/mime-types-1_16/test/test_mime_types_rb.html +109 -0
  68. data/rdoc/files/lib/mock_smartcloud_rb.html +115 -0
  69. data/rdoc/files/lib/rest-client-1_6_3/lib/rest-client_rb.html +107 -0
  70. data/rdoc/files/lib/rest-client-1_6_3/lib/rest_client_rb.html +108 -0
  71. data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/abstract_response_rb.html +108 -0
  72. data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/exceptions_rb.html +101 -0
  73. data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/net_http_ext_rb.html +113 -0
  74. data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/payload_rb.html +110 -0
  75. data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/raw_response_rb.html +101 -0
  76. data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/request_rb.html +110 -0
  77. data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/resource_rb.html +101 -0
  78. data/rdoc/files/lib/rest-client-1_6_3/lib/restclient/response_rb.html +101 -0
  79. data/rdoc/files/lib/rest-client-1_6_3/lib/restclient_rb.html +111 -0
  80. data/rdoc/files/lib/restclient_fix_rb.html +115 -0
  81. data/rdoc/files/lib/smartcloud_logger_rb.html +115 -0
  82. data/rdoc/files/lib/smartcloud_rb.html +143 -0
  83. data/rdoc/files/lib/xml-simple-1_0_12/lib/xmlsimple_rb.html +124 -0
  84. data/rdoc/fr_class_index.html +79 -0
  85. data/rdoc/fr_file_index.html +48 -0
  86. data/rdoc/fr_method_index.html +441 -0
  87. data/rdoc/index.html +26 -0
  88. data/rdoc/rdoc-style.css +208 -0
  89. metadata +90 -6
@@ -0,0 +1,600 @@
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>Module: FileOperations</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>Module</strong></td>
53
+ <td class="class-name-in-header">FileOperations</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/mime-types-1_16/setup_rb.html">
59
+ lib/mime-types-1.16/setup.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+ <div id="description">
76
+ <p>
77
+ This module requires: verbose?, no_harm?
78
+ </p>
79
+
80
+ </div>
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="#M000410">command</a>&nbsp;&nbsp;
90
+ <a href="#M000409">diff?</a>&nbsp;&nbsp;
91
+ <a href="#M000415">directories_of</a>&nbsp;&nbsp;
92
+ <a href="#M000413">extdir?</a>&nbsp;&nbsp;
93
+ <a href="#M000414">files_of</a>&nbsp;&nbsp;
94
+ <a href="#M000406">force_remove_file</a>&nbsp;&nbsp;
95
+ <a href="#M000408">install</a>&nbsp;&nbsp;
96
+ <a href="#M000412">make</a>&nbsp;&nbsp;
97
+ <a href="#M000400">mkdir_p</a>&nbsp;&nbsp;
98
+ <a href="#M000405">move_file</a>&nbsp;&nbsp;
99
+ <a href="#M000407">remove_file</a>&nbsp;&nbsp;
100
+ <a href="#M000403">remove_tree</a>&nbsp;&nbsp;
101
+ <a href="#M000404">remove_tree0</a>&nbsp;&nbsp;
102
+ <a href="#M000401">rm_f</a>&nbsp;&nbsp;
103
+ <a href="#M000402">rm_rf</a>&nbsp;&nbsp;
104
+ <a href="#M000411">ruby</a>&nbsp;&nbsp;
105
+ </div>
106
+ </div>
107
+
108
+ </div>
109
+
110
+
111
+ <!-- if includes -->
112
+
113
+ <div id="section">
114
+
115
+
116
+ <div id="constants-list">
117
+ <h3 class="section-bar">Constants</h3>
118
+
119
+ <div class="name-list">
120
+ <table summary="Constants">
121
+ <tr class="top-aligned-row context-row">
122
+ <td class="context-item-name">DIR_REJECT</td>
123
+ <td>=</td>
124
+ <td class="context-item-value">%w( . .. CVS SCCS RCS CVS.adm .svn )</td>
125
+ </tr>
126
+ </table>
127
+ </div>
128
+ </div>
129
+
130
+
131
+
132
+
133
+
134
+
135
+ <!-- if method_list -->
136
+ <div id="methods">
137
+ <h3 class="section-bar">Public Instance methods</h3>
138
+
139
+ <div id="method-M000410" class="method-detail">
140
+ <a name="M000410"></a>
141
+
142
+ <div class="method-heading">
143
+ <a href="#M000410" class="method-signature">
144
+ <span class="method-name">command</span><span class="method-args">(*args)</span>
145
+ </a>
146
+ </div>
147
+
148
+ <div class="method-description">
149
+ <p><a class="source-toggle" href="#"
150
+ onclick="toggleCode('M000410-source');return false;">[Source]</a></p>
151
+ <div class="method-source-code" id="M000410-source">
152
+ <pre>
153
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 653</span>
154
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">command</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
155
+ <span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">verbose?</span>
156
+ <span class="ruby-identifier">system</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">RuntimeError</span>,
157
+ <span class="ruby-node">&quot;system(#{args.map{|a| a.inspect }.join(' ')}) failed&quot;</span>
158
+ <span class="ruby-keyword kw">end</span>
159
+ </pre>
160
+ </div>
161
+ </div>
162
+ </div>
163
+
164
+ <div id="method-M000409" class="method-detail">
165
+ <a name="M000409"></a>
166
+
167
+ <div class="method-heading">
168
+ <a href="#M000409" class="method-signature">
169
+ <span class="method-name">diff?</span><span class="method-args">(new_content, path)</span>
170
+ </a>
171
+ </div>
172
+
173
+ <div class="method-description">
174
+ <p><a class="source-toggle" href="#"
175
+ onclick="toggleCode('M000409-source');return false;">[Source]</a></p>
176
+ <div class="method-source-code" id="M000409-source">
177
+ <pre>
178
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 648</span>
179
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">diff?</span>(<span class="ruby-identifier">new_content</span>, <span class="ruby-identifier">path</span>)
180
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">path</span>)
181
+ <span class="ruby-identifier">new_content</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">binread</span>(<span class="ruby-identifier">path</span>)
182
+ <span class="ruby-keyword kw">end</span>
183
+ </pre>
184
+ </div>
185
+ </div>
186
+ </div>
187
+
188
+ <div id="method-M000415" class="method-detail">
189
+ <a name="M000415"></a>
190
+
191
+ <div class="method-heading">
192
+ <a href="#M000415" class="method-signature">
193
+ <span class="method-name">directories_of</span><span class="method-args">(dir)</span>
194
+ </a>
195
+ </div>
196
+
197
+ <div class="method-description">
198
+ <p><a class="source-toggle" href="#"
199
+ onclick="toggleCode('M000415-source');return false;">[Source]</a></p>
200
+ <div class="method-source-code" id="M000415-source">
201
+ <pre>
202
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 679</span>
203
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">directories_of</span>(<span class="ruby-identifier">dir</span>)
204
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">dir</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span>
205
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">ent</span><span class="ruby-operator">|</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">dir?</span>(<span class="ruby-node">&quot;#{dir}/#{ent}&quot;</span>) } <span class="ruby-operator">-</span> <span class="ruby-constant">DIR_REJECT</span>
206
+ }
207
+ <span class="ruby-keyword kw">end</span>
208
+ </pre>
209
+ </div>
210
+ </div>
211
+ </div>
212
+
213
+ <div id="method-M000413" class="method-detail">
214
+ <a name="M000413"></a>
215
+
216
+ <div class="method-heading">
217
+ <a href="#M000413" class="method-signature">
218
+ <span class="method-name">extdir?</span><span class="method-args">(dir)</span>
219
+ </a>
220
+ </div>
221
+
222
+ <div class="method-description">
223
+ <p><a class="source-toggle" href="#"
224
+ onclick="toggleCode('M000413-source');return false;">[Source]</a></p>
225
+ <div class="method-source-code" id="M000413-source">
226
+ <pre>
227
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 667</span>
228
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">extdir?</span>(<span class="ruby-identifier">dir</span>)
229
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-node">&quot;#{dir}/MANIFEST&quot;</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-node">&quot;#{dir}/extconf.rb&quot;</span>)
230
+ <span class="ruby-keyword kw">end</span>
231
+ </pre>
232
+ </div>
233
+ </div>
234
+ </div>
235
+
236
+ <div id="method-M000414" class="method-detail">
237
+ <a name="M000414"></a>
238
+
239
+ <div class="method-heading">
240
+ <a href="#M000414" class="method-signature">
241
+ <span class="method-name">files_of</span><span class="method-args">(dir)</span>
242
+ </a>
243
+ </div>
244
+
245
+ <div class="method-description">
246
+ <p><a class="source-toggle" href="#"
247
+ onclick="toggleCode('M000414-source');return false;">[Source]</a></p>
248
+ <div class="method-source-code" id="M000414-source">
249
+ <pre>
250
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 671</span>
251
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">files_of</span>(<span class="ruby-identifier">dir</span>)
252
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">dir</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span>
253
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">ent</span><span class="ruby-operator">|</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-node">&quot;#{dir}/#{ent}&quot;</span>) }
254
+ }
255
+ <span class="ruby-keyword kw">end</span>
256
+ </pre>
257
+ </div>
258
+ </div>
259
+ </div>
260
+
261
+ <div id="method-M000406" class="method-detail">
262
+ <a name="M000406"></a>
263
+
264
+ <div class="method-heading">
265
+ <a href="#M000406" class="method-signature">
266
+ <span class="method-name">force_remove_file</span><span class="method-args">(path)</span>
267
+ </a>
268
+ </div>
269
+
270
+ <div class="method-description">
271
+ <p><a class="source-toggle" href="#"
272
+ onclick="toggleCode('M000406-source');return false;">[Source]</a></p>
273
+ <div class="method-source-code" id="M000406-source">
274
+ <pre>
275
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 610</span>
276
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">force_remove_file</span>(<span class="ruby-identifier">path</span>)
277
+ <span class="ruby-keyword kw">begin</span>
278
+ <span class="ruby-identifier">remove_file</span> <span class="ruby-identifier">path</span>
279
+ <span class="ruby-keyword kw">rescue</span>
280
+ <span class="ruby-keyword kw">end</span>
281
+ <span class="ruby-keyword kw">end</span>
282
+ </pre>
283
+ </div>
284
+ </div>
285
+ </div>
286
+
287
+ <div id="method-M000408" class="method-detail">
288
+ <a name="M000408"></a>
289
+
290
+ <div class="method-heading">
291
+ <a href="#M000408" class="method-signature">
292
+ <span class="method-name">install</span><span class="method-args">(from, dest, mode, prefix = nil)</span>
293
+ </a>
294
+ </div>
295
+
296
+ <div class="method-description">
297
+ <p><a class="source-toggle" href="#"
298
+ onclick="toggleCode('M000408-source');return false;">[Source]</a></p>
299
+ <div class="method-source-code" id="M000408-source">
300
+ <pre>
301
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 622</span>
302
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">install</span>(<span class="ruby-identifier">from</span>, <span class="ruby-identifier">dest</span>, <span class="ruby-identifier">mode</span>, <span class="ruby-identifier">prefix</span> = <span class="ruby-keyword kw">nil</span>)
303
+ <span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;install #{from} #{dest}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">verbose?</span>
304
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">no_harm?</span>
305
+
306
+ <span class="ruby-identifier">realdest</span> = <span class="ruby-identifier">prefix</span> <span class="ruby-value">? </span><span class="ruby-identifier">prefix</span> <span class="ruby-operator">+</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">dest</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">dest</span>
307
+ <span class="ruby-identifier">realdest</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">realdest</span>, <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">from</span>)) <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">dir?</span>(<span class="ruby-identifier">realdest</span>)
308
+ <span class="ruby-identifier">str</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">binread</span>(<span class="ruby-identifier">from</span>)
309
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">diff?</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">realdest</span>)
310
+ <span class="ruby-identifier">verbose_off</span> {
311
+ <span class="ruby-identifier">rm_f</span> <span class="ruby-identifier">realdest</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">realdest</span>)
312
+ }
313
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">realdest</span>, <span class="ruby-value str">'wb'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
314
+ <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span> <span class="ruby-identifier">str</span>
315
+ }
316
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">chmod</span> <span class="ruby-identifier">mode</span>, <span class="ruby-identifier">realdest</span>
317
+
318
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-node">&quot;#{objdir_root()}/InstalledFiles&quot;</span>, <span class="ruby-value str">'a'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
319
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prefix</span>
320
+ <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">realdest</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-identifier">prefix</span>, <span class="ruby-value str">''</span>)
321
+ <span class="ruby-keyword kw">else</span>
322
+ <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">realdest</span>
323
+ <span class="ruby-keyword kw">end</span>
324
+ }
325
+ <span class="ruby-keyword kw">end</span>
326
+ <span class="ruby-keyword kw">end</span>
327
+ </pre>
328
+ </div>
329
+ </div>
330
+ </div>
331
+
332
+ <div id="method-M000412" class="method-detail">
333
+ <a name="M000412"></a>
334
+
335
+ <div class="method-heading">
336
+ <a href="#M000412" class="method-signature">
337
+ <span class="method-name">make</span><span class="method-args">(task = nil)</span>
338
+ </a>
339
+ </div>
340
+
341
+ <div class="method-description">
342
+ <p><a class="source-toggle" href="#"
343
+ onclick="toggleCode('M000412-source');return false;">[Source]</a></p>
344
+ <div class="method-source-code" id="M000412-source">
345
+ <pre>
346
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 663</span>
347
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">make</span>(<span class="ruby-identifier">task</span> = <span class="ruby-keyword kw">nil</span>)
348
+ <span class="ruby-identifier">command</span>(<span class="ruby-operator">*</span>[<span class="ruby-identifier">config</span>(<span class="ruby-value str">'makeprog'</span>), <span class="ruby-identifier">task</span>].<span class="ruby-identifier">compact</span>)
349
+ <span class="ruby-keyword kw">end</span>
350
+ </pre>
351
+ </div>
352
+ </div>
353
+ </div>
354
+
355
+ <div id="method-M000400" class="method-detail">
356
+ <a name="M000400"></a>
357
+
358
+ <div class="method-heading">
359
+ <a href="#M000400" class="method-signature">
360
+ <span class="method-name">mkdir_p</span><span class="method-args">(dirname, prefix = nil)</span>
361
+ </a>
362
+ </div>
363
+
364
+ <div class="method-description">
365
+ <p><a class="source-toggle" href="#"
366
+ onclick="toggleCode('M000400-source');return false;">[Source]</a></p>
367
+ <div class="method-source-code" id="M000400-source">
368
+ <pre>
369
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 538</span>
370
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">dirname</span>, <span class="ruby-identifier">prefix</span> = <span class="ruby-keyword kw">nil</span>)
371
+ <span class="ruby-identifier">dirname</span> = <span class="ruby-identifier">prefix</span> <span class="ruby-operator">+</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">dirname</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prefix</span>
372
+ <span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;mkdir -p #{dirname}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">verbose?</span>
373
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">no_harm?</span>
374
+
375
+ <span class="ruby-comment cmt"># Does not check '/', it's too abnormal.</span>
376
+ <span class="ruby-identifier">dirs</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">dirname</span>).<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">%r&lt;(?=/)&gt;</span>)
377
+ <span class="ruby-keyword kw">if</span> <span class="ruby-regexp re">/\A[a-z]:\z/i</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">dirs</span>[<span class="ruby-value">0</span>]
378
+ <span class="ruby-identifier">disk</span> = <span class="ruby-identifier">dirs</span>.<span class="ruby-identifier">shift</span>
379
+ <span class="ruby-identifier">dirs</span>[<span class="ruby-value">0</span>] = <span class="ruby-identifier">disk</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">dirs</span>[<span class="ruby-value">0</span>]
380
+ <span class="ruby-keyword kw">end</span>
381
+ <span class="ruby-identifier">dirs</span>.<span class="ruby-identifier">each_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">idx</span><span class="ruby-operator">|</span>
382
+ <span class="ruby-identifier">path</span> = <span class="ruby-identifier">dirs</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-identifier">idx</span>].<span class="ruby-identifier">join</span>(<span class="ruby-value str">''</span>)
383
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">mkdir</span> <span class="ruby-identifier">path</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">dir?</span>(<span class="ruby-identifier">path</span>)
384
+ <span class="ruby-keyword kw">end</span>
385
+ <span class="ruby-keyword kw">end</span>
386
+ </pre>
387
+ </div>
388
+ </div>
389
+ </div>
390
+
391
+ <div id="method-M000405" class="method-detail">
392
+ <a name="M000405"></a>
393
+
394
+ <div class="method-heading">
395
+ <a href="#M000405" class="method-signature">
396
+ <span class="method-name">move_file</span><span class="method-args">(src, dest)</span>
397
+ </a>
398
+ </div>
399
+
400
+ <div class="method-description">
401
+ <p><a class="source-toggle" href="#"
402
+ onclick="toggleCode('M000405-source');return false;">[Source]</a></p>
403
+ <div class="method-source-code" id="M000405-source">
404
+ <pre>
405
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 597</span>
406
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">move_file</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">dest</span>)
407
+ <span class="ruby-identifier">force_remove_file</span> <span class="ruby-identifier">dest</span>
408
+ <span class="ruby-keyword kw">begin</span>
409
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">rename</span> <span class="ruby-identifier">src</span>, <span class="ruby-identifier">dest</span>
410
+ <span class="ruby-keyword kw">rescue</span>
411
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">dest</span>, <span class="ruby-value str">'wb'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
412
+ <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">binread</span>(<span class="ruby-identifier">src</span>)
413
+ }
414
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">chmod</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">stat</span>(<span class="ruby-identifier">src</span>).<span class="ruby-identifier">mode</span>, <span class="ruby-identifier">dest</span>
415
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">unlink</span> <span class="ruby-identifier">src</span>
416
+ <span class="ruby-keyword kw">end</span>
417
+ <span class="ruby-keyword kw">end</span>
418
+ </pre>
419
+ </div>
420
+ </div>
421
+ </div>
422
+
423
+ <div id="method-M000407" class="method-detail">
424
+ <a name="M000407"></a>
425
+
426
+ <div class="method-heading">
427
+ <a href="#M000407" class="method-signature">
428
+ <span class="method-name">remove_file</span><span class="method-args">(path)</span>
429
+ </a>
430
+ </div>
431
+
432
+ <div class="method-description">
433
+ <p><a class="source-toggle" href="#"
434
+ onclick="toggleCode('M000407-source');return false;">[Source]</a></p>
435
+ <div class="method-source-code" id="M000407-source">
436
+ <pre>
437
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 617</span>
438
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_file</span>(<span class="ruby-identifier">path</span>)
439
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">chmod</span> <span class="ruby-value">0777</span>, <span class="ruby-identifier">path</span>
440
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">unlink</span> <span class="ruby-identifier">path</span>
441
+ <span class="ruby-keyword kw">end</span>
442
+ </pre>
443
+ </div>
444
+ </div>
445
+ </div>
446
+
447
+ <div id="method-M000403" class="method-detail">
448
+ <a name="M000403"></a>
449
+
450
+ <div class="method-heading">
451
+ <a href="#M000403" class="method-signature">
452
+ <span class="method-name">remove_tree</span><span class="method-args">(path)</span>
453
+ </a>
454
+ </div>
455
+
456
+ <div class="method-description">
457
+ <p><a class="source-toggle" href="#"
458
+ onclick="toggleCode('M000403-source');return false;">[Source]</a></p>
459
+ <div class="method-source-code" id="M000403-source">
460
+ <pre>
461
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 567</span>
462
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_tree</span>(<span class="ruby-identifier">path</span>)
463
+ <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">symlink?</span>(<span class="ruby-identifier">path</span>)
464
+ <span class="ruby-identifier">remove_file</span> <span class="ruby-identifier">path</span>
465
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">dir?</span>(<span class="ruby-identifier">path</span>)
466
+ <span class="ruby-identifier">remove_tree0</span> <span class="ruby-identifier">path</span>
467
+ <span class="ruby-keyword kw">else</span>
468
+ <span class="ruby-identifier">force_remove_file</span> <span class="ruby-identifier">path</span>
469
+ <span class="ruby-keyword kw">end</span>
470
+ <span class="ruby-keyword kw">end</span>
471
+ </pre>
472
+ </div>
473
+ </div>
474
+ </div>
475
+
476
+ <div id="method-M000404" class="method-detail">
477
+ <a name="M000404"></a>
478
+
479
+ <div class="method-heading">
480
+ <a href="#M000404" class="method-signature">
481
+ <span class="method-name">remove_tree0</span><span class="method-args">(path)</span>
482
+ </a>
483
+ </div>
484
+
485
+ <div class="method-description">
486
+ <p><a class="source-toggle" href="#"
487
+ onclick="toggleCode('M000404-source');return false;">[Source]</a></p>
488
+ <div class="method-source-code" id="M000404-source">
489
+ <pre>
490
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 577</span>
491
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_tree0</span>(<span class="ruby-identifier">path</span>)
492
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">foreach</span>(<span class="ruby-identifier">path</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ent</span><span class="ruby-operator">|</span>
493
+ <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ent</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'.'</span>
494
+ <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ent</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'..'</span>
495
+ <span class="ruby-identifier">entpath</span> = <span class="ruby-node">&quot;#{path}/#{ent}&quot;</span>
496
+ <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">symlink?</span>(<span class="ruby-identifier">entpath</span>)
497
+ <span class="ruby-identifier">remove_file</span> <span class="ruby-identifier">entpath</span>
498
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">dir?</span>(<span class="ruby-identifier">entpath</span>)
499
+ <span class="ruby-identifier">remove_tree0</span> <span class="ruby-identifier">entpath</span>
500
+ <span class="ruby-keyword kw">else</span>
501
+ <span class="ruby-identifier">force_remove_file</span> <span class="ruby-identifier">entpath</span>
502
+ <span class="ruby-keyword kw">end</span>
503
+ <span class="ruby-keyword kw">end</span>
504
+ <span class="ruby-keyword kw">begin</span>
505
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">rmdir</span> <span class="ruby-identifier">path</span>
506
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOTEMPTY</span>
507
+ <span class="ruby-comment cmt"># directory may not be empty</span>
508
+ <span class="ruby-keyword kw">end</span>
509
+ <span class="ruby-keyword kw">end</span>
510
+ </pre>
511
+ </div>
512
+ </div>
513
+ </div>
514
+
515
+ <div id="method-M000401" class="method-detail">
516
+ <a name="M000401"></a>
517
+
518
+ <div class="method-heading">
519
+ <a href="#M000401" class="method-signature">
520
+ <span class="method-name">rm_f</span><span class="method-args">(path)</span>
521
+ </a>
522
+ </div>
523
+
524
+ <div class="method-description">
525
+ <p><a class="source-toggle" href="#"
526
+ onclick="toggleCode('M000401-source');return false;">[Source]</a></p>
527
+ <div class="method-source-code" id="M000401-source">
528
+ <pre>
529
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 555</span>
530
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rm_f</span>(<span class="ruby-identifier">path</span>)
531
+ <span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;rm -f #{path}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">verbose?</span>
532
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">no_harm?</span>
533
+ <span class="ruby-identifier">force_remove_file</span> <span class="ruby-identifier">path</span>
534
+ <span class="ruby-keyword kw">end</span>
535
+ </pre>
536
+ </div>
537
+ </div>
538
+ </div>
539
+
540
+ <div id="method-M000402" class="method-detail">
541
+ <a name="M000402"></a>
542
+
543
+ <div class="method-heading">
544
+ <a href="#M000402" class="method-signature">
545
+ <span class="method-name">rm_rf</span><span class="method-args">(path)</span>
546
+ </a>
547
+ </div>
548
+
549
+ <div class="method-description">
550
+ <p><a class="source-toggle" href="#"
551
+ onclick="toggleCode('M000402-source');return false;">[Source]</a></p>
552
+ <div class="method-source-code" id="M000402-source">
553
+ <pre>
554
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 561</span>
555
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rm_rf</span>(<span class="ruby-identifier">path</span>)
556
+ <span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;rm -rf #{path}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">verbose?</span>
557
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">no_harm?</span>
558
+ <span class="ruby-identifier">remove_tree</span> <span class="ruby-identifier">path</span>
559
+ <span class="ruby-keyword kw">end</span>
560
+ </pre>
561
+ </div>
562
+ </div>
563
+ </div>
564
+
565
+ <div id="method-M000411" class="method-detail">
566
+ <a name="M000411"></a>
567
+
568
+ <div class="method-heading">
569
+ <a href="#M000411" class="method-signature">
570
+ <span class="method-name">ruby</span><span class="method-args">(*args)</span>
571
+ </a>
572
+ </div>
573
+
574
+ <div class="method-description">
575
+ <p><a class="source-toggle" href="#"
576
+ onclick="toggleCode('M000411-source');return false;">[Source]</a></p>
577
+ <div class="method-source-code" id="M000411-source">
578
+ <pre>
579
+ <span class="ruby-comment cmt"># File lib/mime-types-1.16/setup.rb, line 659</span>
580
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ruby</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
581
+ <span class="ruby-identifier">command</span> <span class="ruby-identifier">config</span>(<span class="ruby-value str">'rubyprog'</span>), <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>
582
+ <span class="ruby-keyword kw">end</span>
583
+ </pre>
584
+ </div>
585
+ </div>
586
+ </div>
587
+
588
+
589
+ </div>
590
+
591
+
592
+ </div>
593
+
594
+
595
+ <div id="validator-badges">
596
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
597
+ </div>
598
+
599
+ </body>
600
+ </html>