upstart-exporter 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardoc/checksums +6 -2
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/README.md +3 -1
- data/doc/Upstart/Exporter/Error.html +116 -0
- data/doc/Upstart/Exporter/Errors.html +189 -0
- data/doc/Upstart/Exporter/Options/CommandLine.html +373 -0
- data/doc/Upstart/Exporter/Options/Global.html +275 -0
- data/doc/Upstart/Exporter/Options.html +108 -0
- data/doc/Upstart/Exporter/Templates.html +303 -0
- data/doc/Upstart/Exporter.html +150 -1123
- data/doc/Upstart.html +3 -3
- data/doc/_index.html +70 -3
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +17 -15
- data/doc/index.html +17 -15
- data/doc/method_list.html +18 -82
- data/doc/top-level-namespace.html +1 -1
- data/lib/upstart-exporter/version.rb +1 -1
- metadata +9 -3
data/doc/Upstart/Exporter.html
CHANGED
@@ -83,140 +83,66 @@
|
|
83
83
|
|
84
84
|
|
85
85
|
|
86
|
+
<dt class="r2">Includes:</dt>
|
87
|
+
<dd class="r2"><span class='object_link'><a href="Exporter/Errors.html" title="Upstart::Exporter::Errors (module)">Errors</a></span></dd>
|
88
|
+
|
89
|
+
|
86
90
|
|
87
91
|
|
88
92
|
|
89
|
-
<dt class="
|
90
|
-
<dd class="
|
91
|
-
lib/upstart-exporter/version.rb</span>
|
93
|
+
<dt class="r1 last">Defined in:</dt>
|
94
|
+
<dd class="r1 last">lib/upstart-exporter.rb<span class="defines">,<br />
|
95
|
+
lib/upstart-exporter/version.rb,<br /> lib/upstart-exporter/templates.rb</span>
|
92
96
|
</dd>
|
93
97
|
|
94
98
|
</dl>
|
95
99
|
<div class="clear"></div>
|
96
100
|
|
101
|
+
<h2>Defined Under Namespace</h2>
|
102
|
+
<p class="children">
|
103
|
+
|
104
|
+
|
105
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Exporter/Errors.html" title="Upstart::Exporter::Errors (module)">Errors</a></span>, <span class='object_link'><a href="Exporter/Options.html" title="Upstart::Exporter::Options (module)">Options</a></span>
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Exporter/Error.html" title="Upstart::Exporter::Error (class)">Error</a></span>, <span class='object_link'><a href="Exporter/Templates.html" title="Upstart::Exporter::Templates (class)">Templates</a></span>
|
110
|
+
|
111
|
+
|
112
|
+
</p>
|
97
113
|
|
98
114
|
<h2>Constant Summary</h2>
|
99
115
|
|
100
116
|
<dl class="constants">
|
101
117
|
|
102
|
-
<dt id="DEFAULTS-constant" class="">DEFAULTS =
|
103
|
-
|
104
|
-
</dt>
|
105
|
-
<dd><pre class="code"><span class='lbrace token'>{</span>
|
106
|
-
<span class='string val'>'helper_dir'</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>'/var/local/upstart_helpers/'</span><span class='comma token'>,</span>
|
107
|
-
<span class='string val'>'upstart_dir'</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>'/etc/init/'</span><span class='comma token'>,</span>
|
108
|
-
<span class='string val'>'run_user'</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>'service'</span>
|
109
|
-
<span class='rbrace token'>}</span>
|
110
|
-
</pre></dd>
|
111
|
-
|
112
|
-
<dt id="CONF-constant" class="">CONF =
|
113
|
-
|
114
|
-
</dt>
|
115
|
-
<dd><pre class="code"><span class='string val'>'/etc/upstart-exporter.yaml'</span>
|
116
|
-
</pre></dd>
|
117
|
-
|
118
|
-
<dt id="HELPER_TPL-constant" class="">HELPER_TPL =
|
119
|
-
|
120
|
-
</dt>
|
121
|
-
<dd><pre class="code"><span class='string val'>"#!/bin/sh\n%s\n"</span>
|
122
|
-
</pre></dd>
|
123
|
-
|
124
|
-
<dt id="APP_TPL-constant" class="">APP_TPL =
|
125
|
-
|
126
|
-
</dt>
|
127
|
-
<dd><pre class="code"><span class='string val'>"pre-start script\n\nbash << \"EOF\"\nmkdir -p /var/log/%s\nchown -R %s /var/log/%s\nEOF\n\nend script\n"</span>
|
128
|
-
</pre></dd>
|
129
|
-
|
130
|
-
<dt id="COMMAND_TPL-constant" class="">COMMAND_TPL =
|
131
|
-
|
132
|
-
</dt>
|
133
|
-
<dd><pre class="code"><span class='string val'>"start on starting %s\nstop on stopping %s\n"</span>
|
134
|
-
</pre></dd>
|
135
|
-
|
136
|
-
<dt id="COMMAND_REAL_TPL-constant" class="">COMMAND_REAL_TPL =
|
137
|
-
|
138
|
-
</dt>
|
139
|
-
<dd><pre class="code"><span class='string val'>"start on starting %s\nstop on stopping %s\nrespawn\n\nexec sudo -u %s /bin/sh %s >> /var/log/%s/%s.log 2>&1\n"</span>
|
140
|
-
</pre></dd>
|
141
|
-
|
142
118
|
<dt id="VERSION-constant" class="">VERSION =
|
143
119
|
|
144
120
|
</dt>
|
145
|
-
<dd><pre class="code"><span class='string val'>"0.0
|
121
|
+
<dd><pre class="code"><span class='string val'>"0.1.0"</span>
|
146
122
|
</pre></dd>
|
147
123
|
|
148
124
|
</dl>
|
149
125
|
|
150
126
|
|
151
127
|
|
152
|
-
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
153
|
-
<ul class="summary">
|
154
|
-
|
155
|
-
<li class="public ">
|
156
|
-
<span class="summary_signature">
|
157
|
-
|
158
|
-
<a href="#helper_dir-instance_method" title="#helper_dir (instance method)">- (Object) <strong>helper_dir</strong> </a>
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
</span>
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
<span class="summary_desc"><div class='inline'><p>
|
175
|
-
Returns the value of attribute helper_dir.
|
176
|
-
</p>
|
177
|
-
</div></span>
|
178
|
-
|
179
|
-
</li>
|
180
|
-
|
181
|
-
|
182
|
-
<li class="public ">
|
183
|
-
<span class="summary_signature">
|
184
|
-
|
185
|
-
<a href="#run_user-instance_method" title="#run_user (instance method)">- (Object) <strong>run_user</strong> </a>
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
</span>
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
128
|
|
196
129
|
|
197
130
|
|
198
131
|
|
199
|
-
|
200
|
-
|
201
|
-
<span class="summary_desc"><div class='inline'><p>
|
202
|
-
Returns the value of attribute run_user.
|
203
|
-
</p>
|
204
|
-
</div></span>
|
205
|
-
|
206
|
-
</li>
|
207
|
-
|
132
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
133
|
+
<ul class="summary">
|
208
134
|
|
209
135
|
<li class="public ">
|
210
136
|
<span class="summary_signature">
|
211
137
|
|
212
|
-
<a href="#
|
138
|
+
<a href="#options-instance_method" title="#options (instance method)">- (Object) <strong>options</strong> </a>
|
213
139
|
|
214
140
|
|
215
141
|
|
216
142
|
</span>
|
217
143
|
|
218
144
|
|
219
|
-
|
145
|
+
<span class="note title readonly">readonly</span>
|
220
146
|
|
221
147
|
|
222
148
|
|
@@ -226,7 +152,7 @@ Returns the value of attribute run_user.
|
|
226
152
|
|
227
153
|
|
228
154
|
<span class="summary_desc"><div class='inline'><p>
|
229
|
-
Returns the value of attribute
|
155
|
+
Returns the value of attribute options.
|
230
156
|
</p>
|
231
157
|
</div></span>
|
232
158
|
|
@@ -237,6 +163,9 @@ Returns the value of attribute upstart_dir.
|
|
237
163
|
|
238
164
|
|
239
165
|
|
166
|
+
|
167
|
+
|
168
|
+
|
240
169
|
|
241
170
|
|
242
171
|
<h2>
|
@@ -249,7 +178,7 @@ Returns the value of attribute upstart_dir.
|
|
249
178
|
<li class="public ">
|
250
179
|
<span class="summary_signature">
|
251
180
|
|
252
|
-
<a href="#
|
181
|
+
<a href="#clear-instance_method" title="#clear (instance method)">- (Object) <strong>clear</strong> </a>
|
253
182
|
|
254
183
|
|
255
184
|
|
@@ -270,7 +199,7 @@ Returns the value of attribute upstart_dir.
|
|
270
199
|
<li class="public ">
|
271
200
|
<span class="summary_signature">
|
272
201
|
|
273
|
-
<a href="#
|
202
|
+
<a href="#export-instance_method" title="#export (instance method)">- (Object) <strong>export</strong> </a>
|
274
203
|
|
275
204
|
|
276
205
|
|
@@ -291,12 +220,14 @@ Returns the value of attribute upstart_dir.
|
|
291
220
|
<li class="public ">
|
292
221
|
<span class="summary_signature">
|
293
222
|
|
294
|
-
<a href="#
|
223
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Exporter) <strong>initialize</strong>(command_line_args) </a>
|
295
224
|
|
296
225
|
|
297
226
|
|
298
227
|
</span>
|
299
228
|
|
229
|
+
<span class="note title constructor">constructor</span>
|
230
|
+
|
300
231
|
|
301
232
|
|
302
233
|
|
@@ -304,1006 +235,139 @@ Returns the value of attribute upstart_dir.
|
|
304
235
|
|
305
236
|
|
306
237
|
|
307
|
-
<span class="summary_desc"><div class='inline'
|
238
|
+
<span class="summary_desc"><div class='inline'><p>
|
239
|
+
A new instance of Exporter.
|
240
|
+
</p>
|
241
|
+
</div></span>
|
308
242
|
|
309
243
|
</li>
|
310
244
|
|
311
245
|
|
312
|
-
|
313
|
-
<span class="summary_signature">
|
314
|
-
|
315
|
-
<a href="#error-instance_method" title="#error (instance method)">- (Object) <strong>error</strong>(msg) </a>
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
</span>
|
320
|
-
|
321
|
-
|
322
|
-
|
246
|
+
</ul>
|
323
247
|
|
248
|
+
|
249
|
+
|
324
250
|
|
325
251
|
|
326
|
-
|
327
252
|
|
328
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
329
253
|
|
330
|
-
</li>
|
331
|
-
|
332
|
-
|
333
|
-
<li class="public ">
|
334
|
-
<span class="summary_signature">
|
335
|
-
|
336
|
-
<a href="#export-instance_method" title="#export (instance method)">- (Object) <strong>export</strong> </a>
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
</span>
|
341
254
|
|
342
255
|
|
343
256
|
|
257
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="Exporter/Errors.html" title="Upstart::Exporter::Errors (module)">Errors</a></span></h3>
|
258
|
+
<p class="inherited"><span class='object_link'><a href="Exporter/Errors.html#error-instance_method" title="Upstart::Exporter::Errors#error (method)">#error</a></span></p>
|
259
|
+
<div id="constructor_details" class="method_details_list">
|
260
|
+
<h2>Constructor Details</h2>
|
344
261
|
|
262
|
+
<div class="method_details first">
|
263
|
+
<p class="signature first" id="initialize-instance_method">
|
345
264
|
|
265
|
+
- (<tt><span class='object_link'><a href="" title="Upstart::Exporter (class)">Exporter</a></span></tt>) <strong>initialize</strong>(command_line_args)
|
346
266
|
|
347
267
|
|
348
268
|
|
349
|
-
|
350
|
-
|
351
|
-
|
269
|
+
</p><div class="docstring">
|
270
|
+
<div class="discussion">
|
271
|
+
<p>
|
272
|
+
A new instance of Exporter
|
273
|
+
</p>
|
352
274
|
|
353
|
-
|
354
|
-
<li class="public ">
|
355
|
-
<span class="summary_signature">
|
356
|
-
|
357
|
-
<a href="#export_app-instance_method" title="#export_app (instance method)">- (Object) <strong>export_app</strong> </a>
|
358
|
-
|
359
275
|
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
276
|
+
</div>
|
277
|
+
</div>
|
278
|
+
<div class="tags">
|
367
279
|
|
368
280
|
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
281
|
+
</div><table class="source_code">
|
282
|
+
<tr>
|
283
|
+
<td>
|
284
|
+
<pre class="lines">
|
373
285
|
|
374
|
-
|
375
|
-
<li class="public ">
|
376
|
-
<span class="summary_signature">
|
377
|
-
|
378
|
-
<a href="#export_cmd_helper-instance_method" title="#export_cmd_helper (instance method)">- (Object) <strong>export_cmd_helper</strong>(cmd_name, cmd) </a>
|
379
|
-
|
380
286
|
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
287
|
+
13
|
288
|
+
14
|
289
|
+
15
|
290
|
+
16
|
291
|
+
17
|
292
|
+
18</pre>
|
293
|
+
</td>
|
294
|
+
<td>
|
295
|
+
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 13</span>
|
389
296
|
|
297
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_command_line_args identifier id'>command_line_args</span><span class='rparen token'>)</span>
|
298
|
+
<span class='rubyid_global_options identifier id'>global_options</span> <span class='assign token'>=</span> <span class='rubyid_Options constant id'>Options</span><span class='colon2 op'>::</span><span class='rubyid_Global constant id'>Global</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span>
|
299
|
+
<span class='rubyid_command_line_options identifier id'>command_line_options</span> <span class='assign token'>=</span> <span class='rubyid_Options constant id'>Options</span><span class='colon2 op'>::</span><span class='rubyid_CommandLine constant id'>CommandLine</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_command_line_args identifier id'>command_line_args</span><span class='rparen token'>)</span>
|
300
|
+
<span class='rubyid_@options ivar id'>@options</span> <span class='assign token'>=</span> <span class='rubyid_global_options identifier id'>global_options</span><span class='dot token'>.</span><span class='rubyid_merge identifier id'>merge</span><span class='lparen token'>(</span><span class='rubyid_command_line_options identifier id'>command_line_options</span><span class='rparen token'>)</span>
|
301
|
+
<span class='rubyid_ensure_dirs identifier id'>ensure_dirs</span>
|
302
|
+
<span class='rubyid_end end kw'>end</span>
|
303
|
+
</pre>
|
304
|
+
</td>
|
305
|
+
</tr>
|
306
|
+
</table>
|
307
|
+
</div>
|
390
308
|
|
391
|
-
|
392
|
-
|
393
|
-
</li>
|
394
|
-
|
395
|
-
|
396
|
-
<li class="public ">
|
397
|
-
<span class="summary_signature">
|
398
|
-
|
399
|
-
<a href="#export_cmd_upstart_confs-instance_method" title="#export_cmd_upstart_confs (instance method)">- (Object) <strong>export_cmd_upstart_confs</strong>(cmd_name) </a>
|
400
|
-
|
309
|
+
</div>
|
401
310
|
|
311
|
+
<div id="instance_attr_details" class="attr_details">
|
312
|
+
<h2>Instance Attribute Details</h2>
|
402
313
|
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
314
|
+
|
315
|
+
<span id=""></span>
|
316
|
+
<span id="options-instance_method"></span>
|
317
|
+
<div class="method_details first">
|
318
|
+
<p class="signature first" id="options-instance_method">
|
408
319
|
|
320
|
+
- (<tt>Object</tt>) <strong>options</strong> <span class="extras">(readonly)</span>
|
409
321
|
|
410
322
|
|
411
323
|
|
412
|
-
|
413
|
-
|
414
|
-
|
324
|
+
</p><div class="docstring">
|
325
|
+
<div class="discussion">
|
326
|
+
<p>
|
327
|
+
Returns the value of attribute options
|
328
|
+
</p>
|
415
329
|
|
416
|
-
|
417
|
-
<li class="public ">
|
418
|
-
<span class="summary_signature">
|
419
|
-
|
420
|
-
<a href="#export_command-instance_method" title="#export_command (instance method)">- (Object) <strong>export_command</strong>(cmd_name, cmd) </a>
|
421
|
-
|
422
330
|
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
331
|
+
</div>
|
332
|
+
</div>
|
333
|
+
<div class="tags">
|
430
334
|
|
431
335
|
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
336
|
+
</div><table class="source_code">
|
337
|
+
<tr>
|
338
|
+
<td>
|
339
|
+
<pre class="lines">
|
436
340
|
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
341
|
+
|
342
|
+
11
|
343
|
+
12
|
344
|
+
13</pre>
|
345
|
+
</td>
|
346
|
+
<td>
|
347
|
+
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 11</span>
|
348
|
+
|
349
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_options identifier id'>options</span>
|
350
|
+
<span class='rubyid_@options ivar id'>@options</span>
|
351
|
+
<span class='rubyid_end end kw'>end</span>
|
352
|
+
</pre>
|
353
|
+
</td>
|
354
|
+
</tr>
|
355
|
+
</table>
|
356
|
+
</div>
|
442
357
|
|
358
|
+
</div>
|
443
359
|
|
360
|
+
|
361
|
+
<div id="instance_method_details" class="method_details_list">
|
362
|
+
<h2>Instance Method Details</h2>
|
444
363
|
|
445
|
-
|
446
|
-
|
447
|
-
|
364
|
+
|
365
|
+
<div class="method_details first">
|
366
|
+
<p class="signature first" id="clear-instance_method">
|
448
367
|
|
368
|
+
- (<tt>Object</tt>) <strong>clear</strong>
|
449
369
|
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
455
|
-
|
456
|
-
</li>
|
457
|
-
|
458
|
-
|
459
|
-
<li class="public ">
|
460
|
-
<span class="summary_signature">
|
461
|
-
|
462
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Exporter) <strong>initialize</strong>(options) </a>
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
</span>
|
467
|
-
|
468
|
-
<span class="note title constructor">constructor</span>
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
<span class="summary_desc"><div class='inline'><p>
|
478
|
-
A new instance of Exporter.
|
479
|
-
</p>
|
480
|
-
</div></span>
|
481
|
-
|
482
|
-
</li>
|
483
|
-
|
484
|
-
|
485
|
-
<li class="public ">
|
486
|
-
<span class="summary_signature">
|
487
|
-
|
488
|
-
<a href="#process_appname-instance_method" title="#process_appname (instance method)">- (Object) <strong>process_appname</strong>(app_name) </a>
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
</span>
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
502
|
-
|
503
|
-
</li>
|
504
|
-
|
505
|
-
|
506
|
-
<li class="public ">
|
507
|
-
<span class="summary_signature">
|
508
|
-
|
509
|
-
<a href="#process_opts-instance_method" title="#process_opts (instance method)">- (Object) <strong>process_opts</strong>(options) </a>
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
</span>
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
523
|
-
|
524
|
-
</li>
|
525
|
-
|
526
|
-
|
527
|
-
<li class="public ">
|
528
|
-
<span class="summary_signature">
|
529
|
-
|
530
|
-
<a href="#process_procfile-instance_method" title="#process_procfile (instance method)">- (Object) <strong>process_procfile</strong>(name) </a>
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
</span>
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
544
|
-
|
545
|
-
</li>
|
546
|
-
|
547
|
-
|
548
|
-
<li class="public ">
|
549
|
-
<span class="summary_signature">
|
550
|
-
|
551
|
-
<a href="#read_global_opts-instance_method" title="#read_global_opts (instance method)">- (Object) <strong>read_global_opts</strong> </a>
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
</span>
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
565
|
-
|
566
|
-
</li>
|
567
|
-
|
568
|
-
|
569
|
-
<li class="public ">
|
570
|
-
<span class="summary_signature">
|
571
|
-
|
572
|
-
<a href="#upstart_cmd_conf-instance_method" title="#upstart_cmd_conf (instance method)">- (Object) <strong>upstart_cmd_conf</strong>(cmd_name) </a>
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
</span>
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
586
|
-
|
587
|
-
</li>
|
588
|
-
|
589
|
-
|
590
|
-
<li class="public ">
|
591
|
-
<span class="summary_signature">
|
592
|
-
|
593
|
-
<a href="#upstart_conf-instance_method" title="#upstart_conf (instance method)">- (Object) <strong>upstart_conf</strong> </a>
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
</span>
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
607
|
-
|
608
|
-
</li>
|
609
|
-
|
610
|
-
|
611
|
-
</ul>
|
612
|
-
|
613
|
-
|
614
|
-
<div id="constructor_details" class="method_details_list">
|
615
|
-
<h2>Constructor Details</h2>
|
616
|
-
|
617
|
-
<div class="method_details first">
|
618
|
-
<p class="signature first" id="initialize-instance_method">
|
619
|
-
|
620
|
-
- (<tt><span class='object_link'><a href="" title="Upstart::Exporter (class)">Exporter</a></span></tt>) <strong>initialize</strong>(options)
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
</p><div class="docstring">
|
625
|
-
<div class="discussion">
|
626
|
-
<p>
|
627
|
-
A new instance of Exporter
|
628
|
-
</p>
|
629
|
-
|
630
|
-
|
631
|
-
</div>
|
632
|
-
</div>
|
633
|
-
<div class="tags">
|
634
|
-
|
635
|
-
|
636
|
-
</div><table class="source_code">
|
637
|
-
<tr>
|
638
|
-
<td>
|
639
|
-
<pre class="lines">
|
640
|
-
|
641
|
-
|
642
|
-
16
|
643
|
-
17
|
644
|
-
18
|
645
|
-
19
|
646
|
-
20
|
647
|
-
21</pre>
|
648
|
-
</td>
|
649
|
-
<td>
|
650
|
-
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 16</span>
|
651
|
-
|
652
|
-
<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_options identifier id'>options</span><span class='rparen token'>)</span>
|
653
|
-
<span class='rubyid_process_opts identifier id'>process_opts</span><span class='lparen token'>(</span><span class='rubyid_options identifier id'>options</span><span class='rparen token'>)</span>
|
654
|
-
<span class='rubyid_read_global_opts identifier id'>read_global_opts</span>
|
655
|
-
<span class='rubyid_check_dir identifier id'>check_dir</span><span class='lparen token'>(</span><span class='rubyid_@helper_dir ivar id'>@helper_dir</span><span class='rparen token'>)</span>
|
656
|
-
<span class='rubyid_check_dir identifier id'>check_dir</span><span class='lparen token'>(</span><span class='rubyid_@upstart_dir ivar id'>@upstart_dir</span><span class='rparen token'>)</span>
|
657
|
-
<span class='rubyid_end end kw'>end</span>
|
658
|
-
</pre>
|
659
|
-
</td>
|
660
|
-
</tr>
|
661
|
-
</table>
|
662
|
-
</div>
|
663
|
-
|
664
|
-
</div>
|
665
|
-
|
666
|
-
<div id="instance_attr_details" class="attr_details">
|
667
|
-
<h2>Instance Attribute Details</h2>
|
668
|
-
|
669
|
-
|
670
|
-
<span id="helper_dir=-instance_method"></span>
|
671
|
-
<span id="helper_dir-instance_method"></span>
|
672
|
-
<div class="method_details first">
|
673
|
-
<p class="signature first" id="helper_dir-instance_method">
|
674
|
-
|
675
|
-
- (<tt>Object</tt>) <strong>helper_dir</strong>
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
</p><div class="docstring">
|
680
|
-
<div class="discussion">
|
681
|
-
<p>
|
682
|
-
Returns the value of attribute helper_dir
|
683
|
-
</p>
|
684
|
-
|
685
|
-
|
686
|
-
</div>
|
687
|
-
</div>
|
688
|
-
<div class="tags">
|
689
|
-
|
690
|
-
|
691
|
-
</div><table class="source_code">
|
692
|
-
<tr>
|
693
|
-
<td>
|
694
|
-
<pre class="lines">
|
695
|
-
|
696
|
-
|
697
|
-
14
|
698
|
-
15
|
699
|
-
16</pre>
|
700
|
-
</td>
|
701
|
-
<td>
|
702
|
-
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 14</span>
|
703
|
-
|
704
|
-
<span class='rubyid_def def kw'>def</span> <span class='rubyid_helper_dir identifier id'>helper_dir</span>
|
705
|
-
<span class='rubyid_@helper_dir ivar id'>@helper_dir</span>
|
706
|
-
<span class='rubyid_end end kw'>end</span>
|
707
|
-
</pre>
|
708
|
-
</td>
|
709
|
-
</tr>
|
710
|
-
</table>
|
711
|
-
</div>
|
712
|
-
|
713
|
-
|
714
|
-
<span id="run_user=-instance_method"></span>
|
715
|
-
<span id="run_user-instance_method"></span>
|
716
|
-
<div class="method_details ">
|
717
|
-
<p class="signature " id="run_user-instance_method">
|
718
|
-
|
719
|
-
- (<tt>Object</tt>) <strong>run_user</strong>
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
</p><div class="docstring">
|
724
|
-
<div class="discussion">
|
725
|
-
<p>
|
726
|
-
Returns the value of attribute run_user
|
727
|
-
</p>
|
728
|
-
|
729
|
-
|
730
|
-
</div>
|
731
|
-
</div>
|
732
|
-
<div class="tags">
|
733
|
-
|
734
|
-
|
735
|
-
</div><table class="source_code">
|
736
|
-
<tr>
|
737
|
-
<td>
|
738
|
-
<pre class="lines">
|
739
|
-
|
740
|
-
|
741
|
-
14
|
742
|
-
15
|
743
|
-
16</pre>
|
744
|
-
</td>
|
745
|
-
<td>
|
746
|
-
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 14</span>
|
747
|
-
|
748
|
-
<span class='rubyid_def def kw'>def</span> <span class='rubyid_run_user identifier id'>run_user</span>
|
749
|
-
<span class='rubyid_@run_user ivar id'>@run_user</span>
|
750
|
-
<span class='rubyid_end end kw'>end</span>
|
751
|
-
</pre>
|
752
|
-
</td>
|
753
|
-
</tr>
|
754
|
-
</table>
|
755
|
-
</div>
|
756
|
-
|
757
|
-
|
758
|
-
<span id="upstart_dir=-instance_method"></span>
|
759
|
-
<span id="upstart_dir-instance_method"></span>
|
760
|
-
<div class="method_details ">
|
761
|
-
<p class="signature " id="upstart_dir-instance_method">
|
762
|
-
|
763
|
-
- (<tt>Object</tt>) <strong>upstart_dir</strong>
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
</p><div class="docstring">
|
768
|
-
<div class="discussion">
|
769
|
-
<p>
|
770
|
-
Returns the value of attribute upstart_dir
|
771
|
-
</p>
|
772
|
-
|
773
|
-
|
774
|
-
</div>
|
775
|
-
</div>
|
776
|
-
<div class="tags">
|
777
|
-
|
778
|
-
|
779
|
-
</div><table class="source_code">
|
780
|
-
<tr>
|
781
|
-
<td>
|
782
|
-
<pre class="lines">
|
783
|
-
|
784
|
-
|
785
|
-
14
|
786
|
-
15
|
787
|
-
16</pre>
|
788
|
-
</td>
|
789
|
-
<td>
|
790
|
-
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 14</span>
|
791
|
-
|
792
|
-
<span class='rubyid_def def kw'>def</span> <span class='rubyid_upstart_dir identifier id'>upstart_dir</span>
|
793
|
-
<span class='rubyid_@upstart_dir ivar id'>@upstart_dir</span>
|
794
|
-
<span class='rubyid_end end kw'>end</span>
|
795
|
-
</pre>
|
796
|
-
</td>
|
797
|
-
</tr>
|
798
|
-
</table>
|
799
|
-
</div>
|
800
|
-
|
801
|
-
</div>
|
802
|
-
|
803
|
-
|
804
|
-
<div id="instance_method_details" class="method_details_list">
|
805
|
-
<h2>Instance Method Details</h2>
|
806
|
-
|
807
|
-
|
808
|
-
<div class="method_details first">
|
809
|
-
<p class="signature first" id="app_cmd-instance_method">
|
810
|
-
|
811
|
-
- (<tt>Object</tt>) <strong>app_cmd</strong>(cmd_name)
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
</p><table class="source_code">
|
816
|
-
<tr>
|
817
|
-
<td>
|
818
|
-
<pre class="lines">
|
819
|
-
|
820
|
-
|
821
|
-
126
|
822
|
-
127
|
823
|
-
128</pre>
|
824
|
-
</td>
|
825
|
-
<td>
|
826
|
-
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 126</span>
|
827
|
-
|
828
|
-
<span class='rubyid_def def kw'>def</span> <span class='rubyid_app_cmd identifier id'>app_cmd</span><span class='lparen token'>(</span><span class='rubyid_cmd_name identifier id'>cmd_name</span><span class='rparen token'>)</span>
|
829
|
-
<span class='dstring node'>"#{@app_name}-#{cmd_name}"</span>
|
830
|
-
<span class='rubyid_end end kw'>end</span>
|
831
|
-
</pre>
|
832
|
-
</td>
|
833
|
-
</tr>
|
834
|
-
</table>
|
835
|
-
</div>
|
836
|
-
|
837
|
-
<div class="method_details ">
|
838
|
-
<p class="signature " id="check_dir-instance_method">
|
839
|
-
|
840
|
-
- (<tt>Object</tt>) <strong>check_dir</strong>(dir)
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
</p><table class="source_code">
|
845
|
-
<tr>
|
846
|
-
<td>
|
847
|
-
<pre class="lines">
|
848
|
-
|
849
|
-
|
850
|
-
75
|
851
|
-
76
|
852
|
-
77
|
853
|
-
78</pre>
|
854
|
-
</td>
|
855
|
-
<td>
|
856
|
-
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 75</span>
|
857
|
-
|
858
|
-
<span class='rubyid_def def kw'>def</span> <span class='rubyid_check_dir identifier id'>check_dir</span><span class='lparen token'>(</span><span class='rubyid_dir identifier id'>dir</span><span class='rparen token'>)</span>
|
859
|
-
<span class='rubyid_FileUtils constant id'>FileUtils</span><span class='dot token'>.</span><span class='rubyid_mkdir_p identifier id'>mkdir_p</span><span class='lparen token'>(</span><span class='rubyid_dir identifier id'>dir</span><span class='rparen token'>)</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_FileTest constant id'>FileTest</span><span class='dot token'>.</span><span class='rubyid_directory? fid id'>directory?</span><span class='lparen token'>(</span><span class='rubyid_dir identifier id'>dir</span><span class='rparen token'>)</span>
|
860
|
-
<span class='rubyid_error identifier id'>error</span> <span class='dstring node'>"Path #{dir} does not exist"</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_FileTest constant id'>FileTest</span><span class='dot token'>.</span><span class='rubyid_directory? fid id'>directory?</span><span class='lparen token'>(</span><span class='rubyid_dir identifier id'>dir</span><span class='rparen token'>)</span>
|
861
|
-
<span class='rubyid_end end kw'>end</span>
|
862
|
-
</pre>
|
863
|
-
</td>
|
864
|
-
</tr>
|
865
|
-
</table>
|
866
|
-
</div>
|
867
|
-
|
868
|
-
<div class="method_details ">
|
869
|
-
<p class="signature " id="clear-instance_method">
|
870
|
-
|
871
|
-
- (<tt>Object</tt>) <strong>clear</strong>
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
</p><table class="source_code">
|
876
|
-
<tr>
|
877
|
-
<td>
|
878
|
-
<pre class="lines">
|
879
|
-
|
880
|
-
|
881
|
-
138
|
882
|
-
139
|
883
|
-
140
|
884
|
-
141
|
885
|
-
142
|
886
|
-
143
|
887
|
-
144
|
888
|
-
145
|
889
|
-
146</pre>
|
890
|
-
</td>
|
891
|
-
<td>
|
892
|
-
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 138</span>
|
893
|
-
|
894
|
-
<span class='rubyid_def def kw'>def</span> <span class='rubyid_clear identifier id'>clear</span>
|
895
|
-
<span class='rubyid_FileUtils constant id'>FileUtils</span><span class='dot token'>.</span><span class='rubyid_rm identifier id'>rm</span><span class='lparen token'>(</span><span class='rubyid_upstart_conf identifier id'>upstart_conf</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_FileTest constant id'>FileTest</span><span class='dot token'>.</span><span class='rubyid_file? fid id'>file?</span><span class='lparen token'>(</span><span class='rubyid_upstart_conf identifier id'>upstart_conf</span><span class='rparen token'>)</span>
|
896
|
-
<span class='rubyid_Dir constant id'>Dir</span><span class='lbrack token'>[</span><span class='rubyid_upstart_cmd_conf identifier id'>upstart_cmd_conf</span><span class='lparen token'>(</span><span class='string val'>'*'</span><span class='rparen token'>)</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_f identifier id'>f</span><span class='bitor op'>|</span>
|
897
|
-
<span class='rubyid_FileUtils constant id'>FileUtils</span><span class='dot token'>.</span><span class='rubyid_rm identifier id'>rm</span><span class='lparen token'>(</span><span class='rubyid_f identifier id'>f</span><span class='rparen token'>)</span>
|
898
|
-
<span class='rubyid_end end kw'>end</span>
|
899
|
-
<span class='rubyid_Dir constant id'>Dir</span><span class='lbrack token'>[</span><span class='rubyid_helper_cmd_conf identifier id'>helper_cmd_conf</span><span class='lparen token'>(</span><span class='string val'>'*'</span><span class='rparen token'>)</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_f identifier id'>f</span><span class='bitor op'>|</span>
|
900
|
-
<span class='rubyid_FileUtils constant id'>FileUtils</span><span class='dot token'>.</span><span class='rubyid_rm identifier id'>rm</span><span class='lparen token'>(</span><span class='rubyid_f identifier id'>f</span><span class='rparen token'>)</span>
|
901
|
-
<span class='rubyid_end end kw'>end</span>
|
902
|
-
<span class='rubyid_end end kw'>end</span>
|
903
|
-
</pre>
|
904
|
-
</td>
|
905
|
-
</tr>
|
906
|
-
</table>
|
907
|
-
</div>
|
908
|
-
|
909
|
-
<div class="method_details ">
|
910
|
-
<p class="signature " id="error-instance_method">
|
911
|
-
|
912
|
-
- (<tt>Object</tt>) <strong>error</strong>(msg)
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
</p><div class="docstring">
|
917
|
-
<div class="discussion">
|
918
|
-
|
919
|
-
|
920
|
-
</div>
|
921
|
-
</div>
|
922
|
-
<div class="tags">
|
923
|
-
|
924
|
-
<h3>Raises:</h3>
|
925
|
-
<ul class="raise">
|
926
|
-
|
927
|
-
<li>
|
928
|
-
|
929
|
-
|
930
|
-
<span class='type'>(<tt><span class='object_link'><a href="ExportError.html" title="Upstart::ExportError (class)">Upstart::ExportError</a></span></tt>)</span>
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
</li>
|
935
|
-
|
936
|
-
</ul>
|
937
|
-
|
938
|
-
</div><table class="source_code">
|
939
|
-
<tr>
|
940
|
-
<td>
|
941
|
-
<pre class="lines">
|
942
|
-
|
943
|
-
|
944
|
-
179
|
945
|
-
180
|
946
|
-
181</pre>
|
947
|
-
</td>
|
948
|
-
<td>
|
949
|
-
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 179</span>
|
950
|
-
|
951
|
-
<span class='rubyid_def def kw'>def</span> <span class='rubyid_error identifier id'>error</span><span class='lparen token'>(</span><span class='rubyid_msg identifier id'>msg</span><span class='rparen token'>)</span>
|
952
|
-
<span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_Upstart constant id'>Upstart</span><span class='colon2 op'>::</span><span class='rubyid_ExportError constant id'>ExportError</span><span class='comma token'>,</span> <span class='rubyid_msg identifier id'>msg</span>
|
953
|
-
<span class='rubyid_end end kw'>end</span>
|
954
|
-
</pre>
|
955
|
-
</td>
|
956
|
-
</tr>
|
957
|
-
</table>
|
958
|
-
</div>
|
959
|
-
|
960
|
-
<div class="method_details ">
|
961
|
-
<p class="signature " id="export-instance_method">
|
962
|
-
|
963
|
-
- (<tt>Object</tt>) <strong>export</strong>
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
</p><table class="source_code">
|
968
|
-
<tr>
|
969
|
-
<td>
|
970
|
-
<pre class="lines">
|
971
|
-
|
972
|
-
|
973
|
-
80
|
974
|
-
81
|
975
|
-
82
|
976
|
-
83
|
977
|
-
84
|
978
|
-
85
|
979
|
-
86</pre>
|
980
|
-
</td>
|
981
|
-
<td>
|
982
|
-
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 80</span>
|
983
|
-
|
984
|
-
<span class='rubyid_def def kw'>def</span> <span class='rubyid_export identifier id'>export</span>
|
985
|
-
<span class='rubyid_clear identifier id'>clear</span>
|
986
|
-
<span class='rubyid_export_app identifier id'>export_app</span>
|
987
|
-
<span class='rubyid_@commands ivar id'>@commands</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_cmd_name identifier id'>cmd_name</span><span class='comma token'>,</span> <span class='rubyid_cmd identifier id'>cmd</span><span class='bitor op'>|</span>
|
988
|
-
<span class='rubyid_export_command identifier id'>export_command</span><span class='lparen token'>(</span><span class='rubyid_cmd_name identifier id'>cmd_name</span><span class='comma token'>,</span> <span class='rubyid_cmd identifier id'>cmd</span><span class='rparen token'>)</span>
|
989
|
-
<span class='rubyid_end end kw'>end</span>
|
990
|
-
<span class='rubyid_end end kw'>end</span>
|
991
|
-
</pre>
|
992
|
-
</td>
|
993
|
-
</tr>
|
994
|
-
</table>
|
995
|
-
</div>
|
996
|
-
|
997
|
-
<div class="method_details ">
|
998
|
-
<p class="signature " id="export_app-instance_method">
|
999
|
-
|
1000
|
-
- (<tt>Object</tt>) <strong>export_app</strong>
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
</p><table class="source_code">
|
1005
|
-
<tr>
|
1006
|
-
<td>
|
1007
|
-
<pre class="lines">
|
1008
|
-
|
1009
|
-
|
1010
|
-
148
|
1011
|
-
149
|
1012
|
-
150
|
1013
|
-
151
|
1014
|
-
152
|
1015
|
-
153</pre>
|
1016
|
-
</td>
|
1017
|
-
<td>
|
1018
|
-
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 148</span>
|
1019
|
-
|
1020
|
-
<span class='rubyid_def def kw'>def</span> <span class='rubyid_export_app identifier id'>export_app</span>
|
1021
|
-
<span class='rubyid_app_conf identifier id'>app_conf</span> <span class='assign token'>=</span> <span class='rubyid_APP_TPL constant id'>APP_TPL</span> <span class='mod op'>%</span> <span class='lbrack token'>[</span><span class='rubyid_@app_name ivar id'>@app_name</span><span class='comma token'>,</span> <span class='rubyid_@run_user ivar id'>@run_user</span><span class='comma token'>,</span> <span class='rubyid_@app_name ivar id'>@app_name</span><span class='rbrack token'>]</span>
|
1022
|
-
<span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_open identifier id'>open</span><span class='lparen token'>(</span><span class='rubyid_upstart_conf identifier id'>upstart_conf</span><span class='comma token'>,</span> <span class='string val'>'w'</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_f identifier id'>f</span><span class='bitor op'>|</span>
|
1023
|
-
<span class='rubyid_f identifier id'>f</span><span class='dot token'>.</span><span class='rubyid_write identifier id'>write</span><span class='lparen token'>(</span><span class='rubyid_app_conf identifier id'>app_conf</span><span class='rparen token'>)</span>
|
1024
|
-
<span class='rubyid_end end kw'>end</span>
|
1025
|
-
<span class='rubyid_end end kw'>end</span>
|
1026
|
-
</pre>
|
1027
|
-
</td>
|
1028
|
-
</tr>
|
1029
|
-
</table>
|
1030
|
-
</div>
|
1031
|
-
|
1032
|
-
<div class="method_details ">
|
1033
|
-
<p class="signature " id="export_cmd_helper-instance_method">
|
1034
|
-
|
1035
|
-
- (<tt>Object</tt>) <strong>export_cmd_helper</strong>(cmd_name, cmd)
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
</p><table class="source_code">
|
1040
|
-
<tr>
|
1041
|
-
<td>
|
1042
|
-
<pre class="lines">
|
1043
|
-
|
1044
|
-
|
1045
|
-
155
|
1046
|
-
156
|
1047
|
-
157
|
1048
|
-
158
|
1049
|
-
159
|
1050
|
-
160</pre>
|
1051
|
-
</td>
|
1052
|
-
<td>
|
1053
|
-
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 155</span>
|
1054
|
-
|
1055
|
-
<span class='rubyid_def def kw'>def</span> <span class='rubyid_export_cmd_helper identifier id'>export_cmd_helper</span><span class='lparen token'>(</span><span class='rubyid_cmd_name identifier id'>cmd_name</span><span class='comma token'>,</span> <span class='rubyid_cmd identifier id'>cmd</span><span class='rparen token'>)</span>
|
1056
|
-
<span class='rubyid_helper_script_cont identifier id'>helper_script_cont</span> <span class='assign token'>=</span> <span class='rubyid_HELPER_TPL constant id'>HELPER_TPL</span> <span class='mod op'>%</span> <span class='lbrack token'>[</span><span class='rubyid_cmd identifier id'>cmd</span><span class='rbrack token'>]</span>
|
1057
|
-
<span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_open identifier id'>open</span><span class='lparen token'>(</span><span class='rubyid_helper_cmd_conf identifier id'>helper_cmd_conf</span><span class='lparen token'>(</span><span class='rubyid_cmd_name identifier id'>cmd_name</span><span class='rparen token'>)</span><span class='comma token'>,</span> <span class='string val'>'w'</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_f identifier id'>f</span><span class='bitor op'>|</span>
|
1058
|
-
<span class='rubyid_f identifier id'>f</span><span class='dot token'>.</span><span class='rubyid_write identifier id'>write</span><span class='lparen token'>(</span><span class='rubyid_helper_script_cont identifier id'>helper_script_cont</span><span class='rparen token'>)</span>
|
1059
|
-
<span class='rubyid_end end kw'>end</span>
|
1060
|
-
<span class='rubyid_end end kw'>end</span>
|
1061
|
-
</pre>
|
1062
|
-
</td>
|
1063
|
-
</tr>
|
1064
|
-
</table>
|
1065
|
-
</div>
|
1066
|
-
|
1067
|
-
<div class="method_details ">
|
1068
|
-
<p class="signature " id="export_cmd_upstart_confs-instance_method">
|
1069
|
-
|
1070
|
-
- (<tt>Object</tt>) <strong>export_cmd_upstart_confs</strong>(cmd_name)
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
</p><table class="source_code">
|
1075
|
-
<tr>
|
1076
|
-
<td>
|
1077
|
-
<pre class="lines">
|
1078
|
-
|
1079
|
-
|
1080
|
-
162
|
1081
|
-
163
|
1082
|
-
164
|
1083
|
-
165
|
1084
|
-
166
|
1085
|
-
167
|
1086
|
-
168
|
1087
|
-
169
|
1088
|
-
170
|
1089
|
-
171
|
1090
|
-
172</pre>
|
1091
|
-
</td>
|
1092
|
-
<td>
|
1093
|
-
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 162</span>
|
1094
|
-
|
1095
|
-
<span class='rubyid_def def kw'>def</span> <span class='rubyid_export_cmd_upstart_confs identifier id'>export_cmd_upstart_confs</span><span class='lparen token'>(</span><span class='rubyid_cmd_name identifier id'>cmd_name</span><span class='rparen token'>)</span>
|
1096
|
-
<span class='rubyid_cmd_upstart_conf_content identifier id'>cmd_upstart_conf_content</span> <span class='assign token'>=</span> <span class='rubyid_COMMAND_TPL constant id'>COMMAND_TPL</span> <span class='mod op'>%</span> <span class='lbrack token'>[</span><span class='rubyid_@app_name ivar id'>@app_name</span><span class='comma token'>,</span> <span class='rubyid_@app_name ivar id'>@app_name</span><span class='rbrack token'>]</span>
|
1097
|
-
<span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_open identifier id'>open</span><span class='lparen token'>(</span><span class='rubyid_upstart_cmd_conf identifier id'>upstart_cmd_conf</span><span class='lparen token'>(</span><span class='rubyid_cmd_name identifier id'>cmd_name</span><span class='rparen token'>)</span><span class='comma token'>,</span> <span class='string val'>'w'</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_f identifier id'>f</span><span class='bitor op'>|</span>
|
1098
|
-
<span class='rubyid_f identifier id'>f</span><span class='dot token'>.</span><span class='rubyid_write identifier id'>write</span><span class='lparen token'>(</span><span class='rubyid_cmd_upstart_conf_content identifier id'>cmd_upstart_conf_content</span><span class='rparen token'>)</span>
|
1099
|
-
<span class='rubyid_end end kw'>end</span>
|
1100
|
-
|
1101
|
-
<span class='rubyid_cmd_upstart_conf_content_real identifier id'>cmd_upstart_conf_content_real</span> <span class='assign token'>=</span> <span class='rubyid_COMMAND_REAL_TPL constant id'>COMMAND_REAL_TPL</span> <span class='mod op'>%</span> <span class='lbrack token'>[</span><span class='rubyid_app_cmd identifier id'>app_cmd</span><span class='lparen token'>(</span><span class='rubyid_cmd_name identifier id'>cmd_name</span><span class='rparen token'>)</span><span class='comma token'>,</span> <span class='rubyid_app_cmd identifier id'>app_cmd</span><span class='lparen token'>(</span><span class='rubyid_cmd_name identifier id'>cmd_name</span><span class='rparen token'>)</span><span class='comma token'>,</span> <span class='rubyid_@run_user ivar id'>@run_user</span><span class='comma token'>,</span> <span class='rubyid_helper_cmd_conf identifier id'>helper_cmd_conf</span><span class='lparen token'>(</span><span class='rubyid_cmd_name identifier id'>cmd_name</span><span class='rparen token'>)</span><span class='comma token'>,</span> <span class='rubyid_@app_name ivar id'>@app_name</span><span class='comma token'>,</span> <span class='rubyid_cmd_name identifier id'>cmd_name</span><span class='rbrack token'>]</span>
|
1102
|
-
<span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_open identifier id'>open</span><span class='lparen token'>(</span><span class='rubyid_upstart_cmd_conf identifier id'>upstart_cmd_conf</span><span class='lparen token'>(</span><span class='rubyid_cmd_name identifier id'>cmd_name</span> <span class='plus op'>+</span> <span class='string val'>'-real'</span><span class='rparen token'>)</span><span class='comma token'>,</span> <span class='string val'>'w'</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_f identifier id'>f</span><span class='bitor op'>|</span>
|
1103
|
-
<span class='rubyid_f identifier id'>f</span><span class='dot token'>.</span><span class='rubyid_write identifier id'>write</span><span class='lparen token'>(</span><span class='rubyid_cmd_upstart_conf_content_real identifier id'>cmd_upstart_conf_content_real</span><span class='rparen token'>)</span>
|
1104
|
-
<span class='rubyid_end end kw'>end</span>
|
1105
|
-
<span class='rubyid_end end kw'>end</span>
|
1106
|
-
</pre>
|
1107
|
-
</td>
|
1108
|
-
</tr>
|
1109
|
-
</table>
|
1110
|
-
</div>
|
1111
|
-
|
1112
|
-
<div class="method_details ">
|
1113
|
-
<p class="signature " id="export_command-instance_method">
|
1114
|
-
|
1115
|
-
- (<tt>Object</tt>) <strong>export_command</strong>(cmd_name, cmd)
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
</p><table class="source_code">
|
1120
|
-
<tr>
|
1121
|
-
<td>
|
1122
|
-
<pre class="lines">
|
1123
|
-
|
1124
|
-
|
1125
|
-
174
|
1126
|
-
175
|
1127
|
-
176
|
1128
|
-
177</pre>
|
1129
|
-
</td>
|
1130
|
-
<td>
|
1131
|
-
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 174</span>
|
1132
|
-
|
1133
|
-
<span class='rubyid_def def kw'>def</span> <span class='rubyid_export_command identifier id'>export_command</span><span class='lparen token'>(</span><span class='rubyid_cmd_name identifier id'>cmd_name</span><span class='comma token'>,</span> <span class='rubyid_cmd identifier id'>cmd</span><span class='rparen token'>)</span>
|
1134
|
-
<span class='rubyid_export_cmd_helper identifier id'>export_cmd_helper</span><span class='lparen token'>(</span><span class='rubyid_cmd_name identifier id'>cmd_name</span><span class='comma token'>,</span> <span class='rubyid_cmd identifier id'>cmd</span><span class='rparen token'>)</span>
|
1135
|
-
<span class='rubyid_export_cmd_upstart_confs identifier id'>export_cmd_upstart_confs</span><span class='lparen token'>(</span><span class='rubyid_cmd_name identifier id'>cmd_name</span><span class='rparen token'>)</span>
|
1136
|
-
<span class='rubyid_end end kw'>end</span>
|
1137
|
-
</pre>
|
1138
|
-
</td>
|
1139
|
-
</tr>
|
1140
|
-
</table>
|
1141
|
-
</div>
|
1142
|
-
|
1143
|
-
<div class="method_details ">
|
1144
|
-
<p class="signature " id="helper_cmd_conf-instance_method">
|
1145
|
-
|
1146
|
-
- (<tt>Object</tt>) <strong>helper_cmd_conf</strong>(cmd_name)
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
</p><table class="source_code">
|
1151
|
-
<tr>
|
1152
|
-
<td>
|
1153
|
-
<pre class="lines">
|
1154
|
-
|
1155
|
-
|
1156
|
-
134
|
1157
|
-
135
|
1158
|
-
136</pre>
|
1159
|
-
</td>
|
1160
|
-
<td>
|
1161
|
-
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 134</span>
|
1162
|
-
|
1163
|
-
<span class='rubyid_def def kw'>def</span> <span class='rubyid_helper_cmd_conf identifier id'>helper_cmd_conf</span><span class='lparen token'>(</span><span class='rubyid_cmd_name identifier id'>cmd_name</span><span class='rparen token'>)</span>
|
1164
|
-
<span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_join identifier id'>join</span><span class='lparen token'>(</span><span class='rubyid_@helper_dir ivar id'>@helper_dir</span><span class='comma token'>,</span> <span class='dstring node'>"#{app_cmd(cmd_name)}.sh"</span><span class='rparen token'>)</span>
|
1165
|
-
<span class='rubyid_end end kw'>end</span>
|
1166
|
-
</pre>
|
1167
|
-
</td>
|
1168
|
-
</tr>
|
1169
|
-
</table>
|
1170
|
-
</div>
|
1171
|
-
|
1172
|
-
<div class="method_details ">
|
1173
|
-
<p class="signature " id="process_appname-instance_method">
|
1174
|
-
|
1175
|
-
- (<tt>Object</tt>) <strong>process_appname</strong>(app_name)
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
</p><table class="source_code">
|
1180
|
-
<tr>
|
1181
|
-
<td>
|
1182
|
-
<pre class="lines">
|
1183
|
-
|
1184
|
-
|
1185
|
-
70
|
1186
|
-
71
|
1187
|
-
72
|
1188
|
-
73</pre>
|
1189
|
-
</td>
|
1190
|
-
<td>
|
1191
|
-
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 70</span>
|
1192
|
-
|
1193
|
-
<span class='rubyid_def def kw'>def</span> <span class='rubyid_process_appname identifier id'>process_appname</span><span class='lparen token'>(</span><span class='rubyid_app_name identifier id'>app_name</span><span class='rparen token'>)</span>
|
1194
|
-
<span class='rubyid_error identifier id'>error</span> <span class='dstring node'>"Application name should contain only letters (and underscore) and be nonempty, so #{app_name.inspect} is not suitable"</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_app_name identifier id'>app_name</span> <span class='match op'>=~</span> <span class='regexp val'>/^\w+$/</span>
|
1195
|
-
<span class='rubyid_@app_name ivar id'>@app_name</span> <span class='assign token'>=</span> <span class='dstring node'>"fb-#{app_name}"</span>
|
1196
|
-
<span class='rubyid_end end kw'>end</span>
|
1197
|
-
</pre>
|
1198
|
-
</td>
|
1199
|
-
</tr>
|
1200
|
-
</table>
|
1201
|
-
</div>
|
1202
|
-
|
1203
|
-
<div class="method_details ">
|
1204
|
-
<p class="signature " id="process_opts-instance_method">
|
1205
|
-
|
1206
|
-
- (<tt>Object</tt>) <strong>process_opts</strong>(options)
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
</p><table class="source_code">
|
1211
|
-
<tr>
|
1212
|
-
<td>
|
1213
|
-
<pre class="lines">
|
1214
|
-
|
1215
|
-
|
1216
|
-
42
|
1217
|
-
43
|
1218
|
-
44
|
1219
|
-
45
|
1220
|
-
46
|
1221
|
-
47
|
1222
|
-
48
|
1223
|
-
49</pre>
|
1224
|
-
</td>
|
1225
|
-
<td>
|
1226
|
-
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 42</span>
|
1227
|
-
|
1228
|
-
<span class='rubyid_def def kw'>def</span> <span class='rubyid_process_opts identifier id'>process_opts</span><span class='lparen token'>(</span><span class='rubyid_options identifier id'>options</span><span class='rparen token'>)</span>
|
1229
|
-
<span class='rubyid_@commands ivar id'>@commands</span> <span class='assign token'>=</span> <span class='rubyid_if if kw'>if</span> <span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:clear</span><span class='rbrack token'>]</span>
|
1230
|
-
<span class='lbrace token'>{</span><span class='rbrace token'>}</span>
|
1231
|
-
<span class='rubyid_else else kw'>else</span>
|
1232
|
-
<span class='rubyid_process_procfile identifier id'>process_procfile</span><span class='lparen token'>(</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:procfile</span><span class='rbrack token'>]</span><span class='rparen token'>)</span>
|
1233
|
-
<span class='rubyid_end end kw'>end</span>
|
1234
|
-
<span class='rubyid_process_appname identifier id'>process_appname</span><span class='lparen token'>(</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:app_name</span><span class='rbrack token'>]</span><span class='rparen token'>)</span>
|
1235
|
-
<span class='rubyid_end end kw'>end</span>
|
1236
|
-
</pre>
|
1237
|
-
</td>
|
1238
|
-
</tr>
|
1239
|
-
</table>
|
1240
|
-
</div>
|
1241
|
-
|
1242
|
-
<div class="method_details ">
|
1243
|
-
<p class="signature " id="process_procfile-instance_method">
|
1244
|
-
|
1245
|
-
- (<tt>Object</tt>) <strong>process_procfile</strong>(name)
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
</p><table class="source_code">
|
1250
|
-
<tr>
|
1251
|
-
<td>
|
1252
|
-
<pre class="lines">
|
1253
|
-
|
1254
|
-
|
1255
|
-
51
|
1256
|
-
52
|
1257
|
-
53
|
1258
|
-
54
|
1259
|
-
55
|
1260
|
-
56
|
1261
|
-
57
|
1262
|
-
58
|
1263
|
-
59
|
1264
|
-
60
|
1265
|
-
61
|
1266
|
-
62
|
1267
|
-
63
|
1268
|
-
64
|
1269
|
-
65
|
1270
|
-
66
|
1271
|
-
67
|
1272
|
-
68</pre>
|
1273
|
-
</td>
|
1274
|
-
<td>
|
1275
|
-
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 51</span>
|
1276
|
-
|
1277
|
-
<span class='rubyid_def def kw'>def</span> <span class='rubyid_process_procfile identifier id'>process_procfile</span><span class='lparen token'>(</span><span class='rubyid_name identifier id'>name</span><span class='rparen token'>)</span>
|
1278
|
-
<span class='rubyid_error identifier id'>error</span> <span class='dstring node'>"#{name} is not a readable file"</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_FileTest constant id'>FileTest</span><span class='dot token'>.</span><span class='rubyid_file? fid id'>file?</span><span class='lparen token'>(</span><span class='rubyid_name identifier id'>name</span><span class='rparen token'>)</span>
|
1279
|
-
<span class='rubyid_commands identifier id'>commands</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span>
|
1280
|
-
<span class='rubyid_content identifier id'>content</span> <span class='assign token'>=</span> <span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_read identifier id'>read</span><span class='lparen token'>(</span><span class='rubyid_name identifier id'>name</span><span class='rparen token'>)</span>
|
1281
|
-
<span class='rubyid_content identifier id'>content</span><span class='dot token'>.</span><span class='rubyid_lines identifier id'>lines</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_line identifier id'>line</span><span class='bitor op'>|</span>
|
1282
|
-
<span class='rubyid_line identifier id'>line</span><span class='dot token'>.</span><span class='rubyid_chomp! fid id'>chomp!</span>
|
1283
|
-
<span class='rubyid_if if kw'>if</span> <span class='rubyid_line identifier id'>line</span> <span class='match op'>=~</span> <span class='regexp val'>/^(\w+?):(.*)$/</span>
|
1284
|
-
<span class='rubyid_label identifier id'>label</span> <span class='assign token'>=</span> <span class='rubyid_$1 nth_ref id'>$1</span>
|
1285
|
-
<span class='rubyid_command identifier id'>command</span> <span class='assign token'>=</span> <span class='rubyid_$2 nth_ref id'>$2</span>
|
1286
|
-
<span class='rubyid_commands identifier id'>commands</span><span class='lbrack token'>[</span><span class='rubyid_label identifier id'>label</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_command identifier id'>command</span>
|
1287
|
-
<span class='rubyid_elsif elsif kw'>elsif</span> <span class='rubyid_line identifier id'>line</span> <span class='match op'>=~</span> <span class='regexp val'>/^\s*$/</span>
|
1288
|
-
<span class='comment val'># do nothing</span>
|
1289
|
-
<span class='rubyid_else else kw'>else</span>
|
1290
|
-
<span class='rubyid_error identifier id'>error</span> <span class='string val'>"procfile lines should have the following format: 'some_label: command'"</span>
|
1291
|
-
<span class='rubyid_end end kw'>end</span>
|
1292
|
-
<span class='rubyid_end end kw'>end</span>
|
1293
|
-
<span class='rubyid_commands identifier id'>commands</span>
|
1294
|
-
<span class='rubyid_end end kw'>end</span>
|
1295
|
-
</pre>
|
1296
|
-
</td>
|
1297
|
-
</tr>
|
1298
|
-
</table>
|
1299
|
-
</div>
|
1300
|
-
|
1301
|
-
<div class="method_details ">
|
1302
|
-
<p class="signature " id="read_global_opts-instance_method">
|
1303
|
-
|
1304
|
-
- (<tt>Object</tt>) <strong>read_global_opts</strong>
|
1305
|
-
|
1306
|
-
|
370
|
+
|
1307
371
|
|
1308
372
|
</p><table class="source_code">
|
1309
373
|
<tr>
|
@@ -1311,10 +375,6 @@ Returns the value of attribute upstart_dir
|
|
1311
375
|
<pre class="lines">
|
1312
376
|
|
1313
377
|
|
1314
|
-
24
|
1315
|
-
25
|
1316
|
-
26
|
1317
|
-
27
|
1318
378
|
28
|
1319
379
|
29
|
1320
380
|
30
|
@@ -1323,30 +383,18 @@ Returns the value of attribute upstart_dir
|
|
1323
383
|
33
|
1324
384
|
34
|
1325
385
|
35
|
1326
|
-
36
|
1327
|
-
37
|
1328
|
-
38
|
1329
|
-
39
|
1330
|
-
40</pre>
|
386
|
+
36</pre>
|
1331
387
|
</td>
|
1332
388
|
<td>
|
1333
|
-
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line
|
389
|
+
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 28</span>
|
1334
390
|
|
1335
|
-
<span class='rubyid_def def kw'>def</span> <span class='
|
1336
|
-
<span class='
|
1337
|
-
|
1338
|
-
|
1339
|
-
<span class='rubyid_STDERR constant id'>STDERR</span><span class='dot token'>.</span><span class='rubyid_puts identifier id'>puts</span> <span class='dstring node'>"#{CONF} not found"</span>
|
1340
|
-
<span class='lbrace token'>{</span><span class='rbrace token'>}</span>
|
391
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_clear identifier id'>clear</span>
|
392
|
+
<span class='rubyid_FileUtils constant id'>FileUtils</span><span class='dot token'>.</span><span class='rubyid_rm identifier id'>rm</span><span class='lparen token'>(</span><span class='rubyid_upstart_conf identifier id'>upstart_conf</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_FileTest constant id'>FileTest</span><span class='dot token'>.</span><span class='rubyid_file? fid id'>file?</span><span class='lparen token'>(</span><span class='rubyid_upstart_conf identifier id'>upstart_conf</span><span class='rparen token'>)</span>
|
393
|
+
<span class='rubyid_Dir constant id'>Dir</span><span class='lbrack token'>[</span><span class='rubyid_upstart_cmd_conf identifier id'>upstart_cmd_conf</span><span class='lparen token'>(</span><span class='string val'>'*'</span><span class='rparen token'>)</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_f identifier id'>f</span><span class='bitor op'>|</span>
|
394
|
+
<span class='rubyid_FileUtils constant id'>FileUtils</span><span class='dot token'>.</span><span class='rubyid_rm identifier id'>rm</span><span class='lparen token'>(</span><span class='rubyid_f identifier id'>f</span><span class='rparen token'>)</span>
|
1341
395
|
<span class='rubyid_end end kw'>end</span>
|
1342
|
-
<span class='
|
1343
|
-
<span class='
|
1344
|
-
<span class='rubyid_config identifier id'>config</span><span class='lbrack token'>[</span><span class='rubyid_param identifier id'>param</span><span class='rbrack token'>]</span>
|
1345
|
-
<span class='rubyid_else else kw'>else</span>
|
1346
|
-
<span class='rubyid_STDERR constant id'>STDERR</span><span class='dot token'>.</span><span class='rubyid_puts identifier id'>puts</span> <span class='dstring node'>"Param #{param} is not set, taking default value #{DEFAULTS[param]}"</span>
|
1347
|
-
<span class='rubyid_DEFAULTS constant id'>DEFAULTS</span><span class='lbrack token'>[</span><span class='rubyid_param identifier id'>param</span><span class='rbrack token'>]</span>
|
1348
|
-
<span class='rubyid_end end kw'>end</span>
|
1349
|
-
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_send identifier id'>send</span> <span class='dstring node'>"#{param}="</span><span class='comma token'>,</span> <span class='rubyid_value identifier id'>value</span>
|
396
|
+
<span class='rubyid_Dir constant id'>Dir</span><span class='lbrack token'>[</span><span class='rubyid_helper_cmd_conf identifier id'>helper_cmd_conf</span><span class='lparen token'>(</span><span class='string val'>'*'</span><span class='rparen token'>)</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_f identifier id'>f</span><span class='bitor op'>|</span>
|
397
|
+
<span class='rubyid_FileUtils constant id'>FileUtils</span><span class='dot token'>.</span><span class='rubyid_rm identifier id'>rm</span><span class='lparen token'>(</span><span class='rubyid_f identifier id'>f</span><span class='rparen token'>)</span>
|
1350
398
|
<span class='rubyid_end end kw'>end</span>
|
1351
399
|
<span class='rubyid_end end kw'>end</span>
|
1352
400
|
</pre>
|
@@ -1356,38 +404,9 @@ Returns the value of attribute upstart_dir
|
|
1356
404
|
</div>
|
1357
405
|
|
1358
406
|
<div class="method_details ">
|
1359
|
-
<p class="signature " id="
|
1360
|
-
|
1361
|
-
- (<tt>Object</tt>) <strong>upstart_cmd_conf</strong>(cmd_name)
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
</p><table class="source_code">
|
1366
|
-
<tr>
|
1367
|
-
<td>
|
1368
|
-
<pre class="lines">
|
1369
|
-
|
1370
|
-
|
1371
|
-
130
|
1372
|
-
131
|
1373
|
-
132</pre>
|
1374
|
-
</td>
|
1375
|
-
<td>
|
1376
|
-
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 130</span>
|
1377
|
-
|
1378
|
-
<span class='rubyid_def def kw'>def</span> <span class='rubyid_upstart_cmd_conf identifier id'>upstart_cmd_conf</span><span class='lparen token'>(</span><span class='rubyid_cmd_name identifier id'>cmd_name</span><span class='rparen token'>)</span>
|
1379
|
-
<span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_join identifier id'>join</span><span class='lparen token'>(</span><span class='rubyid_@upstart_dir ivar id'>@upstart_dir</span><span class='comma token'>,</span> <span class='dstring node'>"#{app_cmd(cmd_name)}.conf"</span><span class='rparen token'>)</span>
|
1380
|
-
<span class='rubyid_end end kw'>end</span>
|
1381
|
-
</pre>
|
1382
|
-
</td>
|
1383
|
-
</tr>
|
1384
|
-
</table>
|
1385
|
-
</div>
|
1386
|
-
|
1387
|
-
<div class="method_details ">
|
1388
|
-
<p class="signature " id="upstart_conf-instance_method">
|
407
|
+
<p class="signature " id="export-instance_method">
|
1389
408
|
|
1390
|
-
- (<tt>Object</tt>) <strong>
|
409
|
+
- (<tt>Object</tt>) <strong>export</strong>
|
1391
410
|
|
1392
411
|
|
1393
412
|
|
@@ -1397,15 +416,23 @@ Returns the value of attribute upstart_dir
|
|
1397
416
|
<pre class="lines">
|
1398
417
|
|
1399
418
|
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
419
|
+
20
|
420
|
+
21
|
421
|
+
22
|
422
|
+
23
|
423
|
+
24
|
424
|
+
25
|
425
|
+
26</pre>
|
1403
426
|
</td>
|
1404
427
|
<td>
|
1405
|
-
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line
|
428
|
+
<pre class="code"><span class="info file"># File 'lib/upstart-exporter.rb', line 20</span>
|
1406
429
|
|
1407
|
-
<span class='rubyid_def def kw'>def</span> <span class='
|
1408
|
-
<span class='
|
430
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_export identifier id'>export</span>
|
431
|
+
<span class='rubyid_clear identifier id'>clear</span>
|
432
|
+
<span class='rubyid_export_app identifier id'>export_app</span>
|
433
|
+
<span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:commands</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_cmd_name identifier id'>cmd_name</span><span class='comma token'>,</span> <span class='rubyid_cmd identifier id'>cmd</span><span class='bitor op'>|</span>
|
434
|
+
<span class='rubyid_export_command identifier id'>export_command</span><span class='lparen token'>(</span><span class='rubyid_cmd_name identifier id'>cmd_name</span><span class='comma token'>,</span> <span class='rubyid_cmd identifier id'>cmd</span><span class='rparen token'>)</span>
|
435
|
+
<span class='rubyid_end end kw'>end</span>
|
1409
436
|
<span class='rubyid_end end kw'>end</span>
|
1410
437
|
</pre>
|
1411
438
|
</td>
|
@@ -1418,7 +445,7 @@ Returns the value of attribute upstart_dir
|
|
1418
445
|
</div>
|
1419
446
|
|
1420
447
|
<div id="footer">
|
1421
|
-
Generated on Thu Dec
|
448
|
+
Generated on Thu Dec 22 20:43:32 2011 by
|
1422
449
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1423
450
|
0.7.4 (ruby-1.8.7).
|
1424
451
|
</div>
|