litterbox 0.1.0 → 0.1.5
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.
- checksums.yaml +4 -4
- data/.gitignore +2 -3
- data/.rubocop.yml +8 -1
- data/.travis.yml +7 -1
- data/Gemfile.lock +3 -1
- data/README.md +7 -1
- data/Rakefile +6 -0
- data/bin/litterbox +1 -1
- data/docs/Litterbox/CLI.html +354 -0
- data/docs/Litterbox/Command.html +520 -0
- data/docs/Litterbox/Habitat/Build.html +280 -0
- data/docs/Litterbox/Habitat/Export.html +286 -0
- data/docs/Litterbox/Habitat/Package.html +570 -0
- data/docs/Litterbox/Habitat/Promote.html +288 -0
- data/docs/Litterbox/Habitat/Upload.html +292 -0
- data/docs/Litterbox/Habitat.html +128 -0
- data/docs/Litterbox/LastBuild.html +781 -0
- data/docs/Litterbox.html +225 -0
- data/docs/_index.html +218 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +499 -0
- data/docs/file.README.html +159 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +159 -0
- data/docs/js/app.js +248 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +315 -0
- data/docs/top-level-namespace.html +110 -0
- data/exe/litterbox +5 -0
- data/lib/litterbox/command.rb +38 -0
- data/lib/litterbox/habitat/package.rb +47 -0
- data/lib/litterbox/habitat/upload.rb +4 -1
- data/lib/litterbox/habitat.rb +1 -0
- data/lib/litterbox/version.rb +1 -1
- data/lib/litterbox.rb +8 -8
- data/litterbox.gemspec +1 -0
- metadata +43 -2
@@ -0,0 +1,520 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: Litterbox::Command
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.12
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "Litterbox::Command";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (C)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../Litterbox.html" title="Litterbox (module)">Litterbox</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Command</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: Litterbox::Command
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Object</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">Litterbox::Command</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<dl>
|
96
|
+
<dt>Defined in:</dt>
|
97
|
+
<dd>lib/litterbox/command.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>CLI Command operations</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
118
|
+
<ul class="summary">
|
119
|
+
|
120
|
+
<li class="public ">
|
121
|
+
<span class="summary_signature">
|
122
|
+
|
123
|
+
<a href="#process-instance_method" title="#process (instance method)">#<strong>process</strong> ⇒ Object </a>
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
</span>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
<span class="summary_desc"><div class='inline'>
|
141
|
+
<p>Returns the value of attribute process.</p>
|
142
|
+
</div></span>
|
143
|
+
|
144
|
+
</li>
|
145
|
+
|
146
|
+
|
147
|
+
<li class="public ">
|
148
|
+
<span class="summary_signature">
|
149
|
+
|
150
|
+
<a href="#stderr-instance_method" title="#stderr (instance method)">#<strong>stderr</strong> ⇒ Object </a>
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
</span>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
<span class="summary_desc"><div class='inline'>
|
168
|
+
<p>Returns the value of attribute stderr.</p>
|
169
|
+
</div></span>
|
170
|
+
|
171
|
+
</li>
|
172
|
+
|
173
|
+
|
174
|
+
<li class="public ">
|
175
|
+
<span class="summary_signature">
|
176
|
+
|
177
|
+
<a href="#stdout-instance_method" title="#stdout (instance method)">#<strong>stdout</strong> ⇒ Object </a>
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
</span>
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
<span class="summary_desc"><div class='inline'>
|
195
|
+
<p>Returns the value of attribute stdout.</p>
|
196
|
+
</div></span>
|
197
|
+
|
198
|
+
</li>
|
199
|
+
|
200
|
+
|
201
|
+
</ul>
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
<h2>
|
208
|
+
Instance Method Summary
|
209
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
210
|
+
</h2>
|
211
|
+
|
212
|
+
<ul class="summary">
|
213
|
+
|
214
|
+
<li class="public ">
|
215
|
+
<span class="summary_signature">
|
216
|
+
|
217
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(cmd) ⇒ Command </a>
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
</span>
|
222
|
+
|
223
|
+
|
224
|
+
<span class="note title constructor">constructor</span>
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
<span class="summary_desc"><div class='inline'>
|
234
|
+
<p>A new instance of Command.</p>
|
235
|
+
</div></span>
|
236
|
+
|
237
|
+
</li>
|
238
|
+
|
239
|
+
|
240
|
+
<li class="public ">
|
241
|
+
<span class="summary_signature">
|
242
|
+
|
243
|
+
<a href="#run_command-instance_method" title="#run_command (instance method)">#<strong>run_command</strong> ⇒ Object </a>
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
</span>
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
258
|
+
|
259
|
+
</li>
|
260
|
+
|
261
|
+
|
262
|
+
</ul>
|
263
|
+
|
264
|
+
|
265
|
+
<div id="constructor_details" class="method_details_list">
|
266
|
+
<h2>Constructor Details</h2>
|
267
|
+
|
268
|
+
<div class="method_details first">
|
269
|
+
<h3 class="signature first" id="initialize-instance_method">
|
270
|
+
|
271
|
+
#<strong>initialize</strong>(cmd) ⇒ <tt><span class='object_link'><a href="" title="Litterbox::Command (class)">Command</a></span></tt>
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
</h3><div class="docstring">
|
278
|
+
<div class="discussion">
|
279
|
+
|
280
|
+
<p>Returns a new instance of Command</p>
|
281
|
+
|
282
|
+
|
283
|
+
</div>
|
284
|
+
</div>
|
285
|
+
<div class="tags">
|
286
|
+
|
287
|
+
|
288
|
+
</div><table class="source_code">
|
289
|
+
<tr>
|
290
|
+
<td>
|
291
|
+
<pre class="lines">
|
292
|
+
|
293
|
+
|
294
|
+
5
|
295
|
+
6
|
296
|
+
7
|
297
|
+
8
|
298
|
+
9
|
299
|
+
10</pre>
|
300
|
+
</td>
|
301
|
+
<td>
|
302
|
+
<pre class="code"><span class="info file"># File 'lib/litterbox/command.rb', line 5</span>
|
303
|
+
|
304
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_cmd'>cmd</span><span class='rparen'>)</span>
|
305
|
+
<span class='ivar'>@cmd</span> <span class='op'>=</span> <span class='id identifier rubyid_cmd'>cmd</span>
|
306
|
+
<span class='ivar'>@cmd</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>sudo </span><span class='embexpr_beg'>#{</span><span class='ivar'>@cmd</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>USE_SUDO</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
307
|
+
<span class='ivar'>@stdout</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
308
|
+
<span class='ivar'>@stderr</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
309
|
+
<span class='kw'>end</span></pre>
|
310
|
+
</td>
|
311
|
+
</tr>
|
312
|
+
</table>
|
313
|
+
</div>
|
314
|
+
|
315
|
+
</div>
|
316
|
+
|
317
|
+
<div id="instance_attr_details" class="attr_details">
|
318
|
+
<h2>Instance Attribute Details</h2>
|
319
|
+
|
320
|
+
|
321
|
+
<span id="process=-instance_method"></span>
|
322
|
+
<div class="method_details first">
|
323
|
+
<h3 class="signature first" id="process-instance_method">
|
324
|
+
|
325
|
+
#<strong>process</strong> ⇒ <tt>Object</tt>
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
</h3><div class="docstring">
|
332
|
+
<div class="discussion">
|
333
|
+
|
334
|
+
<p>Returns the value of attribute process</p>
|
335
|
+
|
336
|
+
|
337
|
+
</div>
|
338
|
+
</div>
|
339
|
+
<div class="tags">
|
340
|
+
|
341
|
+
|
342
|
+
</div><table class="source_code">
|
343
|
+
<tr>
|
344
|
+
<td>
|
345
|
+
<pre class="lines">
|
346
|
+
|
347
|
+
|
348
|
+
4
|
349
|
+
5
|
350
|
+
6</pre>
|
351
|
+
</td>
|
352
|
+
<td>
|
353
|
+
<pre class="code"><span class="info file"># File 'lib/litterbox/command.rb', line 4</span>
|
354
|
+
|
355
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_process'>process</span>
|
356
|
+
<span class='ivar'>@process</span>
|
357
|
+
<span class='kw'>end</span></pre>
|
358
|
+
</td>
|
359
|
+
</tr>
|
360
|
+
</table>
|
361
|
+
</div>
|
362
|
+
|
363
|
+
|
364
|
+
<span id="stderr=-instance_method"></span>
|
365
|
+
<div class="method_details ">
|
366
|
+
<h3 class="signature " id="stderr-instance_method">
|
367
|
+
|
368
|
+
#<strong>stderr</strong> ⇒ <tt>Object</tt>
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
</h3><div class="docstring">
|
375
|
+
<div class="discussion">
|
376
|
+
|
377
|
+
<p>Returns the value of attribute stderr</p>
|
378
|
+
|
379
|
+
|
380
|
+
</div>
|
381
|
+
</div>
|
382
|
+
<div class="tags">
|
383
|
+
|
384
|
+
|
385
|
+
</div><table class="source_code">
|
386
|
+
<tr>
|
387
|
+
<td>
|
388
|
+
<pre class="lines">
|
389
|
+
|
390
|
+
|
391
|
+
4
|
392
|
+
5
|
393
|
+
6</pre>
|
394
|
+
</td>
|
395
|
+
<td>
|
396
|
+
<pre class="code"><span class="info file"># File 'lib/litterbox/command.rb', line 4</span>
|
397
|
+
|
398
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_stderr'>stderr</span>
|
399
|
+
<span class='ivar'>@stderr</span>
|
400
|
+
<span class='kw'>end</span></pre>
|
401
|
+
</td>
|
402
|
+
</tr>
|
403
|
+
</table>
|
404
|
+
</div>
|
405
|
+
|
406
|
+
|
407
|
+
<span id="stdout=-instance_method"></span>
|
408
|
+
<div class="method_details ">
|
409
|
+
<h3 class="signature " id="stdout-instance_method">
|
410
|
+
|
411
|
+
#<strong>stdout</strong> ⇒ <tt>Object</tt>
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
</h3><div class="docstring">
|
418
|
+
<div class="discussion">
|
419
|
+
|
420
|
+
<p>Returns the value of attribute stdout</p>
|
421
|
+
|
422
|
+
|
423
|
+
</div>
|
424
|
+
</div>
|
425
|
+
<div class="tags">
|
426
|
+
|
427
|
+
|
428
|
+
</div><table class="source_code">
|
429
|
+
<tr>
|
430
|
+
<td>
|
431
|
+
<pre class="lines">
|
432
|
+
|
433
|
+
|
434
|
+
4
|
435
|
+
5
|
436
|
+
6</pre>
|
437
|
+
</td>
|
438
|
+
<td>
|
439
|
+
<pre class="code"><span class="info file"># File 'lib/litterbox/command.rb', line 4</span>
|
440
|
+
|
441
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_stdout'>stdout</span>
|
442
|
+
<span class='ivar'>@stdout</span>
|
443
|
+
<span class='kw'>end</span></pre>
|
444
|
+
</td>
|
445
|
+
</tr>
|
446
|
+
</table>
|
447
|
+
</div>
|
448
|
+
|
449
|
+
</div>
|
450
|
+
|
451
|
+
|
452
|
+
<div id="instance_method_details" class="method_details_list">
|
453
|
+
<h2>Instance Method Details</h2>
|
454
|
+
|
455
|
+
|
456
|
+
<div class="method_details first">
|
457
|
+
<h3 class="signature first" id="run_command-instance_method">
|
458
|
+
|
459
|
+
#<strong>run_command</strong> ⇒ <tt>Object</tt>
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
</h3><table class="source_code">
|
466
|
+
<tr>
|
467
|
+
<td>
|
468
|
+
<pre class="lines">
|
469
|
+
|
470
|
+
|
471
|
+
12
|
472
|
+
13
|
473
|
+
14
|
474
|
+
15
|
475
|
+
16
|
476
|
+
17
|
477
|
+
18
|
478
|
+
19
|
479
|
+
20
|
480
|
+
21
|
481
|
+
22
|
482
|
+
23
|
483
|
+
24
|
484
|
+
25</pre>
|
485
|
+
</td>
|
486
|
+
<td>
|
487
|
+
<pre class="code"><span class="info file"># File 'lib/litterbox/command.rb', line 12</span>
|
488
|
+
|
489
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_run_command'>run_command</span>
|
490
|
+
<span class='const'>Open3</span><span class='period'>.</span><span class='id identifier rubyid_popen3'>popen3</span><span class='lparen'>(</span><span class='ivar'>@cmd</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid__'>_</span><span class='comma'>,</span> <span class='id identifier rubyid_out'>out</span><span class='comma'>,</span> <span class='id identifier rubyid_err'>err</span><span class='comma'>,</span> <span class='id identifier rubyid_thr'>thr</span><span class='op'>|</span>
|
491
|
+
<span class='kw'>while</span> <span class='lparen'>(</span><span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='id identifier rubyid_err'>err</span><span class='period'>.</span><span class='id identifier rubyid_gets'>gets</span><span class='rparen'>)</span>
|
492
|
+
<span class='ivar'>@stderr</span> <span class='op'><<</span> <span class='id identifier rubyid_line'>line</span> <span class='kw'>unless</span> <span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
493
|
+
<span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='id identifier rubyid_line'>line</span><span class='rparen'>)</span>
|
494
|
+
<span class='kw'>end</span>
|
495
|
+
<span class='kw'>while</span> <span class='lparen'>(</span><span class='id identifier rubyid_lines'>lines</span> <span class='op'>=</span> <span class='id identifier rubyid_out'>out</span><span class='period'>.</span><span class='id identifier rubyid_gets'>gets</span><span class='rparen'>)</span>
|
496
|
+
<span class='ivar'>@stdout</span> <span class='op'><<</span> <span class='id identifier rubyid_lines'>lines</span> <span class='kw'>unless</span> <span class='id identifier rubyid_lines'>lines</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
497
|
+
<span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='id identifier rubyid_lines'>lines</span><span class='rparen'>)</span>
|
498
|
+
<span class='kw'>end</span>
|
499
|
+
<span class='ivar'>@process</span> <span class='op'>=</span> <span class='id identifier rubyid_thr'>thr</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span>
|
500
|
+
<span class='kw'>return</span> <span class='ivar'>@stdout</span><span class='comma'>,</span> <span class='ivar'>@stderr</span><span class='comma'>,</span> <span class='ivar'>@process</span>
|
501
|
+
<span class='kw'>end</span>
|
502
|
+
<span class='kw'>end</span></pre>
|
503
|
+
</td>
|
504
|
+
</tr>
|
505
|
+
</table>
|
506
|
+
</div>
|
507
|
+
|
508
|
+
</div>
|
509
|
+
|
510
|
+
</div>
|
511
|
+
|
512
|
+
<div id="footer">
|
513
|
+
Generated on Wed May 2 10:27:51 2018 by
|
514
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
515
|
+
0.9.12 (ruby-2.5.0).
|
516
|
+
</div>
|
517
|
+
|
518
|
+
</div>
|
519
|
+
</body>
|
520
|
+
</html>
|