bunchr 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,334 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: Bunchr::Utils
8
+
9
+ &mdash; Documentation by YARD 0.7.5
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ relpath = '..';
19
+ if (relpath != '') relpath += '/';
20
+ </script>
21
+
22
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
25
+
26
+
27
+ </head>
28
+ <body>
29
+ <script type="text/javascript" charset="utf-8">
30
+ if (window.top.frames.main) document.body.className = 'frames';
31
+ </script>
32
+
33
+ <div id="header">
34
+ <div id="menu">
35
+
36
+ <a href="../_index.html">Index (U)</a> &raquo;
37
+ <span class='title'><span class='object_link'><a href="../Bunchr.html" title="Bunchr (module)">Bunchr</a></span></span>
38
+ &raquo;
39
+ <span class="title">Utils</span>
40
+
41
+
42
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
+ </div>
44
+
45
+ <div id="search">
46
+
47
+ <a id="class_list_link" href="#">Class List</a>
48
+
49
+ <a id="method_list_link" href="#">Method List</a>
50
+
51
+ <a id="file_list_link" href="#">File List</a>
52
+
53
+ </div>
54
+ <div class="clear"></div>
55
+ </div>
56
+
57
+ <iframe id="search_frame"></iframe>
58
+
59
+ <div id="content"><h1>Module: Bunchr::Utils
60
+
61
+
62
+
63
+ </h1>
64
+
65
+ <dl class="box">
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+ <dt class="r1">Included in:</dt>
74
+ <dd class="r1"><span class='object_link'><a href="Packages.html" title="Bunchr::Packages (class)">Packages</a></span>, <span class='object_link'><a href="Software.html" title="Bunchr::Software (class)">Software</a></span></dd>
75
+
76
+
77
+
78
+ <dt class="r2 last">Defined in:</dt>
79
+ <dd class="r2 last">lib/bunchr/utils.rb</dd>
80
+
81
+ </dl>
82
+ <div class="clear"></div>
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+ <h2>
93
+ Instance Method Summary
94
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
95
+ </h2>
96
+
97
+ <ul class="summary">
98
+
99
+ <li class="public ">
100
+ <span class="summary_signature">
101
+
102
+ <a href="#logger-instance_method" title="#logger (instance method)">- (Object) <strong>logger</strong> </a>
103
+
104
+
105
+
106
+ </span>
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+ <span class="summary_desc"><div class='inline'><p>
116
+ handle to the top level logger.
117
+ </p>
118
+ </div></span>
119
+
120
+ </li>
121
+
122
+
123
+ <li class="public ">
124
+ <span class="summary_signature">
125
+
126
+ <a href="#ohai-instance_method" title="#ohai (instance method)">- (Object) <strong>ohai</strong> </a>
127
+
128
+
129
+
130
+ </span>
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+ <span class="summary_desc"><div class='inline'><p>
140
+ handle to the top level ohai for generic system information.
141
+ </p>
142
+ </div></span>
143
+
144
+ </li>
145
+
146
+
147
+ <li class="public ">
148
+ <span class="summary_signature">
149
+
150
+ <a href="#sh-instance_method" title="#sh (instance method)">- (Object) <strong>sh</strong>(cmd, env = {}, dir = nil) </a>
151
+
152
+
153
+
154
+ </span>
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+ <span class="summary_desc"><div class='inline'><p>
164
+ Execute a shell command, with optional environment.
165
+ </p>
166
+ </div></span>
167
+
168
+ </li>
169
+
170
+
171
+ </ul>
172
+
173
+
174
+
175
+
176
+ <div id="instance_method_details" class="method_details_list">
177
+ <h2>Instance Method Details</h2>
178
+
179
+
180
+ <div class="method_details first">
181
+ <p class="signature first" id="logger-instance_method">
182
+
183
+ - (<tt>Object</tt>) <strong>logger</strong>
184
+
185
+
186
+
187
+ </p><div class="docstring">
188
+ <div class="discussion">
189
+ <p>
190
+ handle to the top level logger
191
+ </p>
192
+
193
+
194
+ </div>
195
+ </div>
196
+ <div class="tags">
197
+
198
+
199
+ </div><table class="source_code">
200
+ <tr>
201
+ <td>
202
+ <pre class="lines">
203
+
204
+
205
+ 26
206
+ 27
207
+ 28</pre>
208
+ </td>
209
+ <td>
210
+ <pre class="code"><span class="info file"># File 'lib/bunchr/utils.rb', line 26</span>
211
+
212
+ <span class='kw'>def</span> <span class='id identifier rubyid_logger'>logger</span>
213
+ <span class='const'>Bunchr</span><span class='op'>::</span><span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_logger'>logger</span>
214
+ <span class='kw'>end</span></pre>
215
+ </td>
216
+ </tr>
217
+ </table>
218
+ </div>
219
+
220
+ <div class="method_details ">
221
+ <p class="signature " id="ohai-instance_method">
222
+
223
+ - (<tt>Object</tt>) <strong>ohai</strong>
224
+
225
+
226
+
227
+ </p><div class="docstring">
228
+ <div class="discussion">
229
+ <p>
230
+ handle to the top level ohai for generic system information
231
+ </p>
232
+
233
+
234
+ </div>
235
+ </div>
236
+ <div class="tags">
237
+
238
+
239
+ </div><table class="source_code">
240
+ <tr>
241
+ <td>
242
+ <pre class="lines">
243
+
244
+
245
+ 31
246
+ 32
247
+ 33</pre>
248
+ </td>
249
+ <td>
250
+ <pre class="code"><span class="info file"># File 'lib/bunchr/utils.rb', line 31</span>
251
+
252
+ <span class='kw'>def</span> <span class='id identifier rubyid_ohai'>ohai</span>
253
+ <span class='const'>Bunchr</span><span class='op'>::</span><span class='const'>Ohai</span><span class='period'>.</span><span class='id identifier rubyid_ohai'>ohai</span>
254
+ <span class='kw'>end</span></pre>
255
+ </td>
256
+ </tr>
257
+ </table>
258
+ </div>
259
+
260
+ <div class="method_details ">
261
+ <p class="signature " id="sh-instance_method">
262
+
263
+ - (<tt>Object</tt>) <strong>sh</strong>(cmd, env = {}, dir = nil)
264
+
265
+
266
+
267
+ </p><div class="docstring">
268
+ <div class="discussion">
269
+ <p>
270
+ Execute a shell command, with optional environment. stdout and stderr will
271
+ be sent to the logger if the command exits with non-zero status.
272
+ </p>
273
+
274
+
275
+ </div>
276
+ </div>
277
+ <div class="tags">
278
+
279
+
280
+ </div><table class="source_code">
281
+ <tr>
282
+ <td>
283
+ <pre class="lines">
284
+
285
+
286
+ 10
287
+ 11
288
+ 12
289
+ 13
290
+ 14
291
+ 15
292
+ 16
293
+ 17
294
+ 18
295
+ 19
296
+ 20
297
+ 21
298
+ 22
299
+ 23</pre>
300
+ </td>
301
+ <td>
302
+ <pre class="code"><span class="info file"># File 'lib/bunchr/utils.rb', line 10</span>
303
+
304
+ <span class='kw'>def</span> <span class='id identifier rubyid_sh'>sh</span><span class='lparen'>(</span><span class='id identifier rubyid_cmd'>cmd</span><span class='comma'>,</span> <span class='id identifier rubyid_env'>env</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_dir'>dir</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
305
+ <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Executing: [</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cmd'>cmd</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\s{2,}</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>]</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
306
+
307
+ <span class='id identifier rubyid_output'>output</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
308
+ <span class='id identifier rubyid_status'>status</span> <span class='op'>=</span> <span class='id identifier rubyid_systemu'>systemu</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cmd'>cmd</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
309
+ <span class='symbol'>:stdout</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_output'>output</span><span class='comma'>,</span>
310
+ <span class='symbol'>:stderr</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_output'>output</span><span class='comma'>,</span>
311
+ <span class='symbol'>:env</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_env'>env</span><span class='comma'>,</span>
312
+ <span class='symbol'>:cwd</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_dir'>dir</span><span class='rparen'>)</span>
313
+ <span class='kw'>if</span> <span class='id identifier rubyid_status'>status</span><span class='period'>.</span><span class='id identifier rubyid_exitstatus'>exitstatus</span> <span class='op'>&gt;</span> <span class='int'>0</span>
314
+ <span class='id identifier rubyid_logger'>logger</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_output'>output</span>
315
+ <span class='id identifier rubyid_fail'>fail</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Command failed with status (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_status'>status</span><span class='period'>.</span><span class='id identifier rubyid_exitstatus'>exitstatus</span><span class='rbrace'>}</span><span class='tstring_content'>): [</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cmd'>cmd</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\s{2,}</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>].</span><span class='tstring_end'>&quot;</span></span>
316
+ <span class='kw'>end</span>
317
+ <span class='kw'>end</span></pre>
318
+ </td>
319
+ </tr>
320
+ </table>
321
+ </div>
322
+
323
+ </div>
324
+
325
+ </div>
326
+
327
+ <div id="footer">
328
+ Generated on Wed Apr 18 17:18:48 2012 by
329
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
330
+ 0.7.5 (ruby-1.9.2).
331
+ </div>
332
+
333
+ </body>
334
+ </html>
data/doc/Bunchr.html ADDED
@@ -0,0 +1,124 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: Bunchr
8
+
9
+ &mdash; Documentation by YARD 0.7.5
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ relpath = '';
19
+ if (relpath != '') relpath += '/';
20
+ </script>
21
+
22
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
25
+
26
+
27
+ </head>
28
+ <body>
29
+ <script type="text/javascript" charset="utf-8">
30
+ if (window.top.frames.main) document.body.className = 'frames';
31
+ </script>
32
+
33
+ <div id="header">
34
+ <div id="menu">
35
+
36
+ <a href="_index.html">Index (B)</a> &raquo;
37
+
38
+
39
+ <span class="title">Bunchr</span>
40
+
41
+
42
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
+ </div>
44
+
45
+ <div id="search">
46
+
47
+ <a id="class_list_link" href="#">Class List</a>
48
+
49
+ <a id="method_list_link" href="#">Method List</a>
50
+
51
+ <a id="file_list_link" href="#">File List</a>
52
+
53
+ </div>
54
+ <div class="clear"></div>
55
+ </div>
56
+
57
+ <iframe id="search_frame"></iframe>
58
+
59
+ <div id="content"><h1>Module: Bunchr
60
+
61
+
62
+
63
+ </h1>
64
+
65
+ <dl class="box">
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+ <dt class="r1 last">Defined in:</dt>
75
+ <dd class="r1 last">lib/bunchr/ohai.rb<span class="defines">,<br />
76
+ lib/bunchr/utils.rb,<br /> lib/bunchr/logger.rb,<br /> lib/bunchr/version.rb,<br /> lib/bunchr/packages.rb,<br /> lib/bunchr/software.rb</span>
77
+ </dd>
78
+
79
+ </dl>
80
+ <div class="clear"></div>
81
+
82
+ <h2>Defined Under Namespace</h2>
83
+ <p class="children">
84
+
85
+
86
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Bunchr/Utils.html" title="Bunchr::Utils (module)">Utils</a></span>
87
+
88
+
89
+
90
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Bunchr/Logger.html" title="Bunchr::Logger (class)">Logger</a></span>, <span class='object_link'><a href="Bunchr/Ohai.html" title="Bunchr::Ohai (class)">Ohai</a></span>, <span class='object_link'><a href="Bunchr/Packages.html" title="Bunchr::Packages (class)">Packages</a></span>, <span class='object_link'><a href="Bunchr/Software.html" title="Bunchr::Software (class)">Software</a></span>
91
+
92
+
93
+ </p>
94
+
95
+ <h2>Constant Summary</h2>
96
+
97
+ <dl class="constants">
98
+
99
+ <dt id="VERSION-constant" class="">VERSION =
100
+
101
+ </dt>
102
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.1.1</span><span class='tstring_end'>'</span></span></pre></dd>
103
+
104
+ </dl>
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+ </div>
116
+
117
+ <div id="footer">
118
+ Generated on Wed Apr 18 17:18:48 2012 by
119
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
120
+ 0.7.5 (ruby-1.9.2).
121
+ </div>
122
+
123
+ </body>
124
+ </html>
data/doc/_index.html ADDED
@@ -0,0 +1,181 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Documentation by YARD 0.7.5
8
+
9
+ </title>
10
+
11
+ <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
12
+
13
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <script type="text/javascript" charset="utf-8">
16
+ relpath = '';
17
+ if (relpath != '') relpath += '/';
18
+ </script>
19
+
20
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
21
+
22
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
23
+
24
+
25
+ </head>
26
+ <body>
27
+ <script type="text/javascript" charset="utf-8">
28
+ if (window.top.frames.main) document.body.className = 'frames';
29
+ </script>
30
+
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+
35
+ <span class="title"></span>
36
+
37
+
38
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
39
+ </div>
40
+
41
+ <div id="search">
42
+
43
+ <a id="class_list_link" href="#">Class List</a>
44
+
45
+ <a id="method_list_link" href="#">Method List</a>
46
+
47
+ <a id="file_list_link" href="#">File List</a>
48
+
49
+ </div>
50
+ <div class="clear"></div>
51
+ </div>
52
+
53
+ <iframe id="search_frame"></iframe>
54
+
55
+ <div id="content"><h1 class="noborder title">Documentation by YARD 0.7.5</h1>
56
+ <div id="listing">
57
+ <h1 class="alphaindex">Alphabetic Index</h1>
58
+
59
+ <h2>File Listing</h2>
60
+ <ul id="files">
61
+
62
+
63
+ <li class="r1"><a href="index.html" title="README">README</a></li>
64
+
65
+
66
+ </ul>
67
+
68
+ <div class="clear"></div>
69
+ <h2>Namespace Listing A-Z</h2>
70
+
71
+
72
+
73
+
74
+ <table>
75
+ <tr>
76
+ <td valign='top' width="33%">
77
+
78
+
79
+ <ul id="alpha_B" class="alpha">
80
+ <li class="letter">B</li>
81
+ <ul>
82
+
83
+ <li>
84
+ <span class='object_link'><a href="Bunchr.html" title="Bunchr (module)">Bunchr</a></span>
85
+
86
+ </li>
87
+
88
+ </ul>
89
+ </ul>
90
+
91
+
92
+ <ul id="alpha_L" class="alpha">
93
+ <li class="letter">L</li>
94
+ <ul>
95
+
96
+ <li>
97
+ <span class='object_link'><a href="Bunchr/Logger.html" title="Bunchr::Logger (class)">Logger</a></span>
98
+
99
+ <small>(Bunchr)</small>
100
+
101
+ </li>
102
+
103
+ </ul>
104
+ </ul>
105
+
106
+
107
+ <ul id="alpha_O" class="alpha">
108
+ <li class="letter">O</li>
109
+ <ul>
110
+
111
+ <li>
112
+ <span class='object_link'><a href="Bunchr/Ohai.html" title="Bunchr::Ohai (class)">Ohai</a></span>
113
+
114
+ <small>(Bunchr)</small>
115
+
116
+ </li>
117
+
118
+ </ul>
119
+ </ul>
120
+
121
+
122
+ <ul id="alpha_P" class="alpha">
123
+ <li class="letter">P</li>
124
+ <ul>
125
+
126
+ <li>
127
+ <span class='object_link'><a href="Bunchr/Packages.html" title="Bunchr::Packages (class)">Packages</a></span>
128
+
129
+ <small>(Bunchr)</small>
130
+
131
+ </li>
132
+
133
+ </ul>
134
+ </ul>
135
+
136
+
137
+ <ul id="alpha_S" class="alpha">
138
+ <li class="letter">S</li>
139
+ <ul>
140
+
141
+ <li>
142
+ <span class='object_link'><a href="Bunchr/Software.html" title="Bunchr::Software (class)">Software</a></span>
143
+
144
+ <small>(Bunchr)</small>
145
+
146
+ </li>
147
+
148
+ </ul>
149
+ </ul>
150
+
151
+
152
+ <ul id="alpha_U" class="alpha">
153
+ <li class="letter">U</li>
154
+ <ul>
155
+
156
+ <li>
157
+ <span class='object_link'><a href="Bunchr/Utils.html" title="Bunchr::Utils (module)">Utils</a></span>
158
+
159
+ <small>(Bunchr)</small>
160
+
161
+ </li>
162
+
163
+ </ul>
164
+ </ul>
165
+
166
+ </td>
167
+ </tr>
168
+ </table>
169
+
170
+ </div>
171
+
172
+ </div>
173
+
174
+ <div id="footer">
175
+ Generated on Wed Apr 18 17:18:48 2012 by
176
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
177
+ 0.7.5 (ruby-1.9.2).
178
+ </div>
179
+
180
+ </body>
181
+ </html>