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,288 @@
|
|
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::Habitat::Promote
|
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::Habitat::Promote";
|
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 (P)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../Litterbox.html" title="Litterbox (module)">Litterbox</a></span></span> » <span class='title'><span class='object_link'><a href="../Habitat.html" title="Litterbox::Habitat (module)">Habitat</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Promote</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::Habitat::Promote
|
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::Habitat::Promote</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/habitat/promote.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>Habitat upload</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<h2>
|
122
|
+
Instance Method Summary
|
123
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
124
|
+
</h2>
|
125
|
+
|
126
|
+
<ul class="summary">
|
127
|
+
|
128
|
+
<li class="public ">
|
129
|
+
<span class="summary_signature">
|
130
|
+
|
131
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(pkg_ident, channel, auth) ⇒ Promote </a>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
</span>
|
136
|
+
|
137
|
+
|
138
|
+
<span class="note title constructor">constructor</span>
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
<span class="summary_desc"><div class='inline'>
|
148
|
+
<p>A new instance of Promote.</p>
|
149
|
+
</div></span>
|
150
|
+
|
151
|
+
</li>
|
152
|
+
|
153
|
+
|
154
|
+
<li class="public ">
|
155
|
+
<span class="summary_signature">
|
156
|
+
|
157
|
+
<a href="#promote-instance_method" title="#promote (instance method)">#<strong>promote</strong>(pkg_ident = @pkg_ident, channel = @channel, auth = @auth) ⇒ Object </a>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
</span>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
172
|
+
|
173
|
+
</li>
|
174
|
+
|
175
|
+
|
176
|
+
</ul>
|
177
|
+
|
178
|
+
|
179
|
+
<div id="constructor_details" class="method_details_list">
|
180
|
+
<h2>Constructor Details</h2>
|
181
|
+
|
182
|
+
<div class="method_details first">
|
183
|
+
<h3 class="signature first" id="initialize-instance_method">
|
184
|
+
|
185
|
+
#<strong>initialize</strong>(pkg_ident, channel, auth) ⇒ <tt><span class='object_link'><a href="" title="Litterbox::Habitat::Promote (class)">Promote</a></span></tt>
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
</h3><div class="docstring">
|
192
|
+
<div class="discussion">
|
193
|
+
|
194
|
+
<p>Returns a new instance of Promote</p>
|
195
|
+
|
196
|
+
|
197
|
+
</div>
|
198
|
+
</div>
|
199
|
+
<div class="tags">
|
200
|
+
|
201
|
+
|
202
|
+
</div><table class="source_code">
|
203
|
+
<tr>
|
204
|
+
<td>
|
205
|
+
<pre class="lines">
|
206
|
+
|
207
|
+
|
208
|
+
7
|
209
|
+
8
|
210
|
+
9
|
211
|
+
10
|
212
|
+
11</pre>
|
213
|
+
</td>
|
214
|
+
<td>
|
215
|
+
<pre class="code"><span class="info file"># File 'lib/litterbox/habitat/promote.rb', line 7</span>
|
216
|
+
|
217
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_pkg_ident'>pkg_ident</span><span class='comma'>,</span> <span class='id identifier rubyid_channel'>channel</span><span class='comma'>,</span> <span class='id identifier rubyid_auth'>auth</span><span class='rparen'>)</span>
|
218
|
+
<span class='ivar'>@pkg_ident</span> <span class='op'>=</span> <span class='id identifier rubyid_pkg_ident'>pkg_ident</span>
|
219
|
+
<span class='ivar'>@channel</span> <span class='op'>=</span> <span class='id identifier rubyid_channel'>channel</span>
|
220
|
+
<span class='ivar'>@auth</span> <span class='op'>=</span> <span class='id identifier rubyid_auth'>auth</span>
|
221
|
+
<span class='kw'>end</span></pre>
|
222
|
+
</td>
|
223
|
+
</tr>
|
224
|
+
</table>
|
225
|
+
</div>
|
226
|
+
|
227
|
+
</div>
|
228
|
+
|
229
|
+
|
230
|
+
<div id="instance_method_details" class="method_details_list">
|
231
|
+
<h2>Instance Method Details</h2>
|
232
|
+
|
233
|
+
|
234
|
+
<div class="method_details first">
|
235
|
+
<h3 class="signature first" id="promote-instance_method">
|
236
|
+
|
237
|
+
#<strong>promote</strong>(pkg_ident = @pkg_ident, channel = @channel, auth = @auth) ⇒ <tt>Object</tt>
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
</h3><table class="source_code">
|
244
|
+
<tr>
|
245
|
+
<td>
|
246
|
+
<pre class="lines">
|
247
|
+
|
248
|
+
|
249
|
+
13
|
250
|
+
14
|
251
|
+
15
|
252
|
+
16
|
253
|
+
17
|
254
|
+
18
|
255
|
+
19
|
256
|
+
20
|
257
|
+
21</pre>
|
258
|
+
</td>
|
259
|
+
<td>
|
260
|
+
<pre class="code"><span class="info file"># File 'lib/litterbox/habitat/promote.rb', line 13</span>
|
261
|
+
|
262
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_promote'>promote</span><span class='lparen'>(</span><span class='id identifier rubyid_pkg_ident'>pkg_ident</span> <span class='op'>=</span> <span class='ivar'>@pkg_ident</span><span class='comma'>,</span> <span class='id identifier rubyid_channel'>channel</span> <span class='op'>=</span> <span class='ivar'>@channel</span><span class='comma'>,</span> <span class='id identifier rubyid_auth'>auth</span> <span class='op'>=</span> <span class='ivar'>@auth</span><span class='rparen'>)</span>
|
263
|
+
<span class='id identifier rubyid_command'>command</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>hab pkg promote </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_pkg_ident'>pkg_ident</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_channel'>channel</span><span class='embexpr_end'>}</span><span class='tstring_content'> -z </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_auth'>auth</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
264
|
+
<span class='const'>Open3</span><span class='period'>.</span><span class='id identifier rubyid_popen3'>popen3</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</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__'>_</span><span class='comma'>,</span> <span class='id identifier rubyid_thr'>thr</span><span class='op'>|</span>
|
265
|
+
<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_out'>out</span><span class='period'>.</span><span class='id identifier rubyid_gets'>gets</span><span class='rparen'>)</span>
|
266
|
+
<span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='id identifier rubyid_line'>line</span><span class='rparen'>)</span>
|
267
|
+
<span class='kw'>end</span>
|
268
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_thr'>thr</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span>
|
269
|
+
<span class='kw'>end</span>
|
270
|
+
<span class='kw'>end</span></pre>
|
271
|
+
</td>
|
272
|
+
</tr>
|
273
|
+
</table>
|
274
|
+
</div>
|
275
|
+
|
276
|
+
</div>
|
277
|
+
|
278
|
+
</div>
|
279
|
+
|
280
|
+
<div id="footer">
|
281
|
+
Generated on Wed May 2 10:27:51 2018 by
|
282
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
283
|
+
0.9.12 (ruby-2.5.0).
|
284
|
+
</div>
|
285
|
+
|
286
|
+
</div>
|
287
|
+
</body>
|
288
|
+
</html>
|
@@ -0,0 +1,292 @@
|
|
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::Habitat::Upload
|
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::Habitat::Upload";
|
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 (U)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../Litterbox.html" title="Litterbox (module)">Litterbox</a></span></span> » <span class='title'><span class='object_link'><a href="../Habitat.html" title="Litterbox::Habitat (module)">Habitat</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Upload</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::Habitat::Upload
|
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::Habitat::Upload</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/habitat/upload.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>Habitat upload</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<h2>
|
122
|
+
Instance Method Summary
|
123
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
124
|
+
</h2>
|
125
|
+
|
126
|
+
<ul class="summary">
|
127
|
+
|
128
|
+
<li class="public ">
|
129
|
+
<span class="summary_signature">
|
130
|
+
|
131
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(pkg, auth) ⇒ Upload </a>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
</span>
|
136
|
+
|
137
|
+
|
138
|
+
<span class="note title constructor">constructor</span>
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
<span class="summary_desc"><div class='inline'>
|
148
|
+
<p>A new instance of Upload.</p>
|
149
|
+
</div></span>
|
150
|
+
|
151
|
+
</li>
|
152
|
+
|
153
|
+
|
154
|
+
<li class="public ">
|
155
|
+
<span class="summary_signature">
|
156
|
+
|
157
|
+
<a href="#upload-instance_method" title="#upload (instance method)">#<strong>upload</strong>(pkg = @pkg, auth = @auth) ⇒ Object </a>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
</span>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
172
|
+
|
173
|
+
</li>
|
174
|
+
|
175
|
+
|
176
|
+
</ul>
|
177
|
+
|
178
|
+
|
179
|
+
<div id="constructor_details" class="method_details_list">
|
180
|
+
<h2>Constructor Details</h2>
|
181
|
+
|
182
|
+
<div class="method_details first">
|
183
|
+
<h3 class="signature first" id="initialize-instance_method">
|
184
|
+
|
185
|
+
#<strong>initialize</strong>(pkg, auth) ⇒ <tt><span class='object_link'><a href="" title="Litterbox::Habitat::Upload (class)">Upload</a></span></tt>
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
</h3><div class="docstring">
|
192
|
+
<div class="discussion">
|
193
|
+
|
194
|
+
<p>Returns a new instance of Upload</p>
|
195
|
+
|
196
|
+
|
197
|
+
</div>
|
198
|
+
</div>
|
199
|
+
<div class="tags">
|
200
|
+
|
201
|
+
|
202
|
+
</div><table class="source_code">
|
203
|
+
<tr>
|
204
|
+
<td>
|
205
|
+
<pre class="lines">
|
206
|
+
|
207
|
+
|
208
|
+
7
|
209
|
+
8
|
210
|
+
9
|
211
|
+
10</pre>
|
212
|
+
</td>
|
213
|
+
<td>
|
214
|
+
<pre class="code"><span class="info file"># File 'lib/litterbox/habitat/upload.rb', line 7</span>
|
215
|
+
|
216
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_pkg'>pkg</span><span class='comma'>,</span> <span class='id identifier rubyid_auth'>auth</span><span class='rparen'>)</span>
|
217
|
+
<span class='ivar'>@pkg</span> <span class='op'>=</span> <span class='id identifier rubyid_pkg'>pkg</span>
|
218
|
+
<span class='ivar'>@auth</span> <span class='op'>=</span> <span class='id identifier rubyid_auth'>auth</span>
|
219
|
+
<span class='kw'>end</span></pre>
|
220
|
+
</td>
|
221
|
+
</tr>
|
222
|
+
</table>
|
223
|
+
</div>
|
224
|
+
|
225
|
+
</div>
|
226
|
+
|
227
|
+
|
228
|
+
<div id="instance_method_details" class="method_details_list">
|
229
|
+
<h2>Instance Method Details</h2>
|
230
|
+
|
231
|
+
|
232
|
+
<div class="method_details first">
|
233
|
+
<h3 class="signature first" id="upload-instance_method">
|
234
|
+
|
235
|
+
#<strong>upload</strong>(pkg = @pkg, auth = @auth) ⇒ <tt>Object</tt>
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
</h3><table class="source_code">
|
242
|
+
<tr>
|
243
|
+
<td>
|
244
|
+
<pre class="lines">
|
245
|
+
|
246
|
+
|
247
|
+
12
|
248
|
+
13
|
249
|
+
14
|
250
|
+
15
|
251
|
+
16
|
252
|
+
17
|
253
|
+
18
|
254
|
+
19
|
255
|
+
20
|
256
|
+
21
|
257
|
+
22
|
258
|
+
23</pre>
|
259
|
+
</td>
|
260
|
+
<td>
|
261
|
+
<pre class="code"><span class="info file"># File 'lib/litterbox/habitat/upload.rb', line 12</span>
|
262
|
+
|
263
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_upload'>upload</span><span class='lparen'>(</span><span class='id identifier rubyid_pkg'>pkg</span> <span class='op'>=</span> <span class='ivar'>@pkg</span><span class='comma'>,</span> <span class='id identifier rubyid_auth'>auth</span> <span class='op'>=</span> <span class='ivar'>@auth</span><span class='rparen'>)</span>
|
264
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>file artifact not found</span><span class='tstring_end'>'</span></span> <span class='kw'>unless</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exist?'>exist?</span><span class='lparen'>(</span><span class='id identifier rubyid_pkg'>pkg</span><span class='rparen'>)</span>
|
265
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>must pass auth token</span><span class='tstring_end'>'</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_auth'>auth</span>
|
266
|
+
<span class='id identifier rubyid_cmd'>cmd</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>hab pkg upload </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_pkg'>pkg</span><span class='embexpr_end'>}</span><span class='tstring_content'> -z </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_auth'>auth</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
267
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_cmd'>cmd</span>
|
268
|
+
<span class='const'>Open3</span><span class='period'>.</span><span class='id identifier rubyid_popen3'>popen3</span><span class='lparen'>(</span><span class='id identifier rubyid_cmd'>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__'>_</span><span class='comma'>,</span> <span class='id identifier rubyid_thr'>thr</span><span class='op'>|</span>
|
269
|
+
<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_out'>out</span><span class='period'>.</span><span class='id identifier rubyid_gets'>gets</span><span class='rparen'>)</span>
|
270
|
+
<span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='id identifier rubyid_line'>line</span><span class='rparen'>)</span>
|
271
|
+
<span class='kw'>end</span>
|
272
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_thr'>thr</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span>
|
273
|
+
<span class='kw'>end</span>
|
274
|
+
<span class='kw'>end</span></pre>
|
275
|
+
</td>
|
276
|
+
</tr>
|
277
|
+
</table>
|
278
|
+
</div>
|
279
|
+
|
280
|
+
</div>
|
281
|
+
|
282
|
+
</div>
|
283
|
+
|
284
|
+
<div id="footer">
|
285
|
+
Generated on Wed May 2 10:27:51 2018 by
|
286
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
287
|
+
0.9.12 (ruby-2.5.0).
|
288
|
+
</div>
|
289
|
+
|
290
|
+
</div>
|
291
|
+
</body>
|
292
|
+
</html>
|