putenv 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,203 @@
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
+ Class: Putenv::CLI
8
+
9
+ &mdash; Documentation by YARD 0.8.7.6
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
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!Putenv/CLI.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (C)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Putenv.html" title="Putenv (module)">Putenv</a></span></span>
36
+ &raquo;
37
+ <span class="title">CLI</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Putenv::CLI
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Thor</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Thor</li>
82
+
83
+ <li class="next">Putenv::CLI</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dt class="r2 last">Defined in:</dt>
99
+ <dd class="r2 last">lib/putenv.rb</dd>
100
+
101
+ </dl>
102
+ <div class="clear"></div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>Start of main CLI</p>
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+
115
+ </div>
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <h2>
124
+ Instance Method Summary
125
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
126
+ </h2>
127
+
128
+ <ul class="summary">
129
+
130
+ <li class="public ">
131
+ <span class="summary_signature">
132
+
133
+ <a href="#version-instance_method" title="#version (instance method)">- (Object) <strong>version</strong> </a>
134
+
135
+
136
+
137
+ </span>
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+ <span class="summary_desc"><div class='inline'></div></span>
148
+
149
+ </li>
150
+
151
+
152
+ </ul>
153
+
154
+
155
+
156
+
157
+
158
+ <div id="instance_method_details" class="method_details_list">
159
+ <h2>Instance Method Details</h2>
160
+
161
+
162
+ <div class="method_details first">
163
+ <h3 class="signature first" id="version-instance_method">
164
+
165
+ - (<tt>Object</tt>) <strong>version</strong>
166
+
167
+
168
+
169
+
170
+
171
+ </h3><table class="source_code">
172
+ <tr>
173
+ <td>
174
+ <pre class="lines">
175
+
176
+
177
+ 13
178
+ 14
179
+ 15</pre>
180
+ </td>
181
+ <td>
182
+ <pre class="code"><span class="info file"># File 'lib/putenv.rb', line 13</span>
183
+
184
+ <span class='kw'>def</span> <span class='id identifier rubyid_version'>version</span>
185
+ <span class='id identifier rubyid_puts'>puts</span> <span class='const'>VERSION</span>
186
+ <span class='kw'>end</span></pre>
187
+ </td>
188
+ </tr>
189
+ </table>
190
+ </div>
191
+
192
+ </div>
193
+
194
+ </div>
195
+
196
+ <div id="footer">
197
+ Generated on Wed Dec 10 17:28:23 2014 by
198
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
199
+ 0.8.7.6 (ruby-2.1.5).
200
+ </div>
201
+
202
+ </body>
203
+ </html>
@@ -0,0 +1,332 @@
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
+ Class: Putenv::Runner
8
+
9
+ &mdash; Documentation by YARD 0.8.7.6
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
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!Putenv/Runner.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (R)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Putenv.html" title="Putenv (module)">Putenv</a></span></span>
36
+ &raquo;
37
+ <span class="title">Runner</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Putenv::Runner
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Putenv::Runner</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <dt class="r2 last">Defined in:</dt>
97
+ <dd class="r2 last">lib/putenv/runner.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>wrapper to assist aruba in single process execution</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="#execute%21-instance_method" title="#execute! (instance method)">- (Object) <strong>execute!</strong> </a>
132
+
133
+
134
+
135
+ </span>
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ <span class="summary_desc"><div class='inline'>
146
+ <p>rubocop:disable MethodLength.</p>
147
+ </div></span>
148
+
149
+ </li>
150
+
151
+
152
+ <li class="public ">
153
+ <span class="summary_signature">
154
+
155
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Runner) <strong>initialize</strong>(argv, stdin = STDIN, stdout = STDOUT, stderr = STDERR, kernel = Kernel) </a>
156
+
157
+
158
+
159
+ </span>
160
+
161
+
162
+ <span class="note title constructor">constructor</span>
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ <span class="summary_desc"><div class='inline'>
172
+ <p>rubocop:disable LineLength.</p>
173
+ </div></span>
174
+
175
+ </li>
176
+
177
+
178
+ </ul>
179
+
180
+
181
+ <div id="constructor_details" class="method_details_list">
182
+ <h2>Constructor Details</h2>
183
+
184
+ <div class="method_details first">
185
+ <h3 class="signature first" id="initialize-instance_method">
186
+
187
+ - (<tt><span class='object_link'><a href="" title="Putenv::Runner (class)">Runner</a></span></tt>) <strong>initialize</strong>(argv, stdin = STDIN, stdout = STDOUT, stderr = STDERR, kernel = Kernel)
188
+
189
+
190
+
191
+
192
+
193
+ </h3><div class="docstring">
194
+ <div class="discussion">
195
+
196
+ <p>rubocop:disable LineLength</p>
197
+
198
+
199
+ </div>
200
+ </div>
201
+ <div class="tags">
202
+
203
+
204
+ </div><table class="source_code">
205
+ <tr>
206
+ <td>
207
+ <pre class="lines">
208
+
209
+
210
+ 7
211
+ 8
212
+ 9</pre>
213
+ </td>
214
+ <td>
215
+ <pre class="code"><span class="info file"># File 'lib/putenv/runner.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_argv'>argv</span><span class='comma'>,</span> <span class='id identifier rubyid_stdin'>stdin</span> <span class='op'>=</span> <span class='const'>STDIN</span><span class='comma'>,</span> <span class='id identifier rubyid_stdout'>stdout</span> <span class='op'>=</span> <span class='const'>STDOUT</span><span class='comma'>,</span> <span class='id identifier rubyid_stderr'>stderr</span> <span class='op'>=</span> <span class='const'>STDERR</span><span class='comma'>,</span> <span class='id identifier rubyid_kernel'>kernel</span> <span class='op'>=</span> <span class='const'>Kernel</span><span class='rparen'>)</span>
218
+ <span class='ivar'>@argv</span><span class='comma'>,</span> <span class='ivar'>@stdin</span><span class='comma'>,</span> <span class='ivar'>@stdout</span><span class='comma'>,</span> <span class='ivar'>@stderr</span><span class='comma'>,</span> <span class='ivar'>@kernel</span> <span class='op'>=</span> <span class='id identifier rubyid_argv'>argv</span><span class='comma'>,</span> <span class='id identifier rubyid_stdin'>stdin</span><span class='comma'>,</span> <span class='id identifier rubyid_stdout'>stdout</span><span class='comma'>,</span> <span class='id identifier rubyid_stderr'>stderr</span><span class='comma'>,</span> <span class='id identifier rubyid_kernel'>kernel</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="execute!-instance_method">
234
+
235
+ - (<tt>Object</tt>) <strong>execute!</strong>
236
+
237
+
238
+
239
+
240
+
241
+ </h3><div class="docstring">
242
+ <div class="discussion">
243
+
244
+ <p>rubocop:disable MethodLength</p>
245
+
246
+
247
+ </div>
248
+ </div>
249
+ <div class="tags">
250
+
251
+
252
+ </div><table class="source_code">
253
+ <tr>
254
+ <td>
255
+ <pre class="lines">
256
+
257
+
258
+ 13
259
+ 14
260
+ 15
261
+ 16
262
+ 17
263
+ 18
264
+ 19
265
+ 20
266
+ 21
267
+ 22
268
+ 23
269
+ 24
270
+ 25
271
+ 26
272
+ 27
273
+ 28
274
+ 29
275
+ 30
276
+ 31
277
+ 32
278
+ 33
279
+ 34
280
+ 35
281
+ 36
282
+ 37
283
+ 38
284
+ 39</pre>
285
+ </td>
286
+ <td>
287
+ <pre class="code"><span class="info file"># File 'lib/putenv/runner.rb', line 13</span>
288
+
289
+ <span class='kw'>def</span> <span class='id identifier rubyid_execute!'>execute!</span>
290
+ <span class='id identifier rubyid_exit_code'>exit_code</span> <span class='op'>=</span> <span class='kw'>begin</span>
291
+ <span class='gvar'>$stderr</span> <span class='op'>=</span> <span class='ivar'>@stderr</span>
292
+ <span class='gvar'>$stdin</span> <span class='op'>=</span> <span class='ivar'>@stdin</span>
293
+ <span class='gvar'>$stdout</span> <span class='op'>=</span> <span class='ivar'>@stdout</span>
294
+
295
+ <span class='const'>Putenv</span><span class='op'>::</span><span class='const'>CLI</span><span class='period'>.</span><span class='id identifier rubyid_start'>start</span><span class='lparen'>(</span><span class='ivar'>@argv</span><span class='rparen'>)</span>
296
+
297
+ <span class='comment'># Thor::Base#start does not have a return value
298
+ </span> <span class='comment'># assume success if no exception is raised.
299
+ </span> <span class='int'>0</span>
300
+ <span class='kw'>rescue</span> <span class='const'>StandardError</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_err'>err</span>
301
+ <span class='comment'># The ruby interpreter would pipe this to STDERR and
302
+ </span> <span class='comment'># exit 1 in the case of an unhandled exception
303
+ </span> <span class='id identifier rubyid_b'>b</span> <span class='op'>=</span> <span class='id identifier rubyid_err'>err</span><span class='period'>.</span><span class='id identifier rubyid_backtrace'>backtrace</span>
304
+ <span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_unshift'>unshift</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_shift'>shift</span><span class='embexpr_end'>}</span><span class='tstring_content'>: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_err'>err</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='embexpr_end'>}</span><span class='tstring_content'> (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_err'>err</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
305
+ <span class='ivar'>@stderr</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_s'>s</span><span class='op'>|</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\tfrom </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_s'>s</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
306
+ <span class='int'>1</span>
307
+ <span class='kw'>ensure</span>
308
+ <span class='comment'># put them back.
309
+ </span> <span class='gvar'>$stderr</span> <span class='op'>=</span> <span class='const'>STDERR</span>
310
+ <span class='gvar'>$stdin</span> <span class='op'>=</span> <span class='const'>STDIN</span>
311
+ <span class='gvar'>$stdout</span> <span class='op'>=</span> <span class='const'>STDOUT</span>
312
+ <span class='kw'>end</span>
313
+ <span class='comment'># Proxy exit code back to the injected kernel.
314
+ </span> <span class='ivar'>@kernel</span><span class='period'>.</span><span class='id identifier rubyid_exit'>exit</span><span class='lparen'>(</span><span class='id identifier rubyid_exit_code'>exit_code</span><span class='rparen'>)</span>
315
+ <span class='kw'>end</span></pre>
316
+ </td>
317
+ </tr>
318
+ </table>
319
+ </div>
320
+
321
+ </div>
322
+
323
+ </div>
324
+
325
+ <div id="footer">
326
+ Generated on Wed Dec 10 17:28:23 2014 by
327
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
328
+ 0.8.7.6 (ruby-2.1.5).
329
+ </div>
330
+
331
+ </body>
332
+ </html>