upstart-exporter 0.1.0 → 0.1.1
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.
- 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
|
@@ -0,0 +1,373 @@
|
|
|
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: Upstart::Exporter::Options::CommandLine
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.7.4
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
|
18
|
+
relpath = '../../..';
|
|
19
|
+
if (relpath != '') relpath += '/';
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
|
|
23
|
+
|
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</head>
|
|
28
|
+
<body>
|
|
29
|
+
<script type="text/javascript" charset="utf-8">
|
|
30
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<div id="header">
|
|
34
|
+
<div id="menu">
|
|
35
|
+
|
|
36
|
+
<a href="../../../_index.html">Index (C)</a> »
|
|
37
|
+
<span class='title'><span class='object_link'><a href="../../../Upstart.html" title="Upstart (module)">Upstart</a></span></span> » <span class='title'><span class='object_link'><a href="../../Exporter.html" title="Upstart::Exporter (class)">Exporter</a></span></span> » <span class='title'><span class='object_link'><a href="../Options.html" title="Upstart::Exporter::Options (module)">Options</a></span></span>
|
|
38
|
+
»
|
|
39
|
+
<span class="title">CommandLine</span>
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div id="search">
|
|
46
|
+
|
|
47
|
+
<a id="class_list_link" href="#">Class List</a>
|
|
48
|
+
|
|
49
|
+
<a id="method_list_link" href="#">Method List</a>
|
|
50
|
+
|
|
51
|
+
<a id="file_list_link" href="#">File List</a>
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<div class="clear"></div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<iframe id="search_frame"></iframe>
|
|
58
|
+
|
|
59
|
+
<div id="content"><h1>Class: Upstart::Exporter::Options::CommandLine
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
</h1>
|
|
64
|
+
|
|
65
|
+
<dl class="box">
|
|
66
|
+
|
|
67
|
+
<dt class="r1">Inherits:</dt>
|
|
68
|
+
<dd class="r1">
|
|
69
|
+
<span class="inheritName">Hash</span>
|
|
70
|
+
|
|
71
|
+
<ul class="fullTree">
|
|
72
|
+
<li>Object</li>
|
|
73
|
+
|
|
74
|
+
<li class="next">Hash</li>
|
|
75
|
+
|
|
76
|
+
<li class="next">Upstart::Exporter::Options::CommandLine</li>
|
|
77
|
+
|
|
78
|
+
</ul>
|
|
79
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
80
|
+
|
|
81
|
+
</dd>
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
<dt class="r2">Includes:</dt>
|
|
89
|
+
<dd class="r2"><span class='object_link'><a href="../Errors.html" title="Upstart::Exporter::Errors (module)">Errors</a></span></dd>
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
<dt class="r1 last">Defined in:</dt>
|
|
96
|
+
<dd class="r1 last">lib/upstart-exporter/options/command_line.rb</dd>
|
|
97
|
+
|
|
98
|
+
</dl>
|
|
99
|
+
<div class="clear"></div>
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
<h2>
|
|
117
|
+
Instance Method Summary
|
|
118
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
|
119
|
+
</h2>
|
|
120
|
+
|
|
121
|
+
<ul class="summary">
|
|
122
|
+
|
|
123
|
+
<li class="public ">
|
|
124
|
+
<span class="summary_signature">
|
|
125
|
+
|
|
126
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (CommandLine) <strong>initialize</strong>(command_line_args) </a>
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
</span>
|
|
131
|
+
|
|
132
|
+
<span class="note title constructor">constructor</span>
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
<span class="summary_desc"><div class='inline'><p>
|
|
142
|
+
A new instance of CommandLine.
|
|
143
|
+
</p>
|
|
144
|
+
</div></span>
|
|
145
|
+
|
|
146
|
+
</li>
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
<li class="public ">
|
|
150
|
+
<span class="summary_signature">
|
|
151
|
+
|
|
152
|
+
<a href="#process_appname-instance_method" title="#process_appname (instance method)">- (Object) <strong>process_appname</strong>(app_name) </a>
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
</span>
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
166
|
+
|
|
167
|
+
</li>
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
<li class="public ">
|
|
171
|
+
<span class="summary_signature">
|
|
172
|
+
|
|
173
|
+
<a href="#process_procfile-instance_method" title="#process_procfile (instance method)">- (Object) <strong>process_procfile</strong>(name) </a>
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
</span>
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
187
|
+
|
|
188
|
+
</li>
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
</ul>
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="../Errors.html" title="Upstart::Exporter::Errors (module)">Errors</a></span></h3>
|
|
203
|
+
<p class="inherited"><span class='object_link'><a href="../Errors.html#error-instance_method" title="Upstart::Exporter::Errors#error (method)">#error</a></span></p>
|
|
204
|
+
|
|
205
|
+
<div id="constructor_details" class="method_details_list">
|
|
206
|
+
<h2>Constructor Details</h2>
|
|
207
|
+
|
|
208
|
+
<div class="method_details first">
|
|
209
|
+
<p class="signature first" id="initialize-instance_method">
|
|
210
|
+
|
|
211
|
+
- (<tt><span class='object_link'><a href="" title="Upstart::Exporter::Options::CommandLine (class)">CommandLine</a></span></tt>) <strong>initialize</strong>(command_line_args)
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
</p><div class="docstring">
|
|
216
|
+
<div class="discussion">
|
|
217
|
+
<p>
|
|
218
|
+
A new instance of CommandLine
|
|
219
|
+
</p>
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
</div>
|
|
223
|
+
</div>
|
|
224
|
+
<div class="tags">
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
</div><table class="source_code">
|
|
228
|
+
<tr>
|
|
229
|
+
<td>
|
|
230
|
+
<pre class="lines">
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
5
|
|
234
|
+
6
|
|
235
|
+
7
|
|
236
|
+
8
|
|
237
|
+
9
|
|
238
|
+
10
|
|
239
|
+
11
|
|
240
|
+
12
|
|
241
|
+
13</pre>
|
|
242
|
+
</td>
|
|
243
|
+
<td>
|
|
244
|
+
<pre class="code"><span class="info file"># File 'lib/upstart-exporter/options/command_line.rb', line 5</span>
|
|
245
|
+
|
|
246
|
+
<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>
|
|
247
|
+
<span class='rubyid_super super kw'>super</span>
|
|
248
|
+
<span class='rubyid_self self kw'>self</span><span class='lbrack token'>[</span><span class='symbol val'>:commands</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_if if kw'>if</span> <span class='rubyid_command_line_args identifier id'>command_line_args</span><span class='lbrack token'>[</span><span class='symbol val'>:clear</span><span class='rbrack token'>]</span>
|
|
249
|
+
<span class='lbrace token'>{</span><span class='rbrace token'>}</span>
|
|
250
|
+
<span class='rubyid_else else kw'>else</span>
|
|
251
|
+
<span class='rubyid_process_procfile identifier id'>process_procfile</span><span class='lparen token'>(</span><span class='rubyid_command_line_args identifier id'>command_line_args</span><span class='lbrack token'>[</span><span class='symbol val'>:procfile</span><span class='rbrack token'>]</span><span class='rparen token'>)</span>
|
|
252
|
+
<span class='rubyid_end end kw'>end</span>
|
|
253
|
+
<span class='rubyid_self self kw'>self</span><span class='lbrack token'>[</span><span class='symbol val'>:app_name</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_process_appname identifier id'>process_appname</span><span class='lparen token'>(</span><span class='rubyid_command_line_args identifier id'>command_line_args</span><span class='lbrack token'>[</span><span class='symbol val'>:app_name</span><span class='rbrack token'>]</span><span class='rparen token'>)</span>
|
|
254
|
+
<span class='rubyid_end end kw'>end</span>
|
|
255
|
+
</pre>
|
|
256
|
+
</td>
|
|
257
|
+
</tr>
|
|
258
|
+
</table>
|
|
259
|
+
</div>
|
|
260
|
+
|
|
261
|
+
</div>
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
<div id="instance_method_details" class="method_details_list">
|
|
265
|
+
<h2>Instance Method Details</h2>
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
<div class="method_details first">
|
|
269
|
+
<p class="signature first" id="process_appname-instance_method">
|
|
270
|
+
|
|
271
|
+
- (<tt>Object</tt>) <strong>process_appname</strong>(app_name)
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
</p><table class="source_code">
|
|
276
|
+
<tr>
|
|
277
|
+
<td>
|
|
278
|
+
<pre class="lines">
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
36
|
|
282
|
+
37
|
|
283
|
+
38
|
|
284
|
+
39</pre>
|
|
285
|
+
</td>
|
|
286
|
+
<td>
|
|
287
|
+
<pre class="code"><span class="info file"># File 'lib/upstart-exporter/options/command_line.rb', line 36</span>
|
|
288
|
+
|
|
289
|
+
<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>
|
|
290
|
+
<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>
|
|
291
|
+
<span class='rubyid_app_name identifier id'>app_name</span>
|
|
292
|
+
<span class='rubyid_end end kw'>end</span>
|
|
293
|
+
</pre>
|
|
294
|
+
</td>
|
|
295
|
+
</tr>
|
|
296
|
+
</table>
|
|
297
|
+
</div>
|
|
298
|
+
|
|
299
|
+
<div class="method_details ">
|
|
300
|
+
<p class="signature " id="process_procfile-instance_method">
|
|
301
|
+
|
|
302
|
+
- (<tt>Object</tt>) <strong>process_procfile</strong>(name)
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
</p><table class="source_code">
|
|
307
|
+
<tr>
|
|
308
|
+
<td>
|
|
309
|
+
<pre class="lines">
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
15
|
|
313
|
+
16
|
|
314
|
+
17
|
|
315
|
+
18
|
|
316
|
+
19
|
|
317
|
+
20
|
|
318
|
+
21
|
|
319
|
+
22
|
|
320
|
+
23
|
|
321
|
+
24
|
|
322
|
+
25
|
|
323
|
+
26
|
|
324
|
+
27
|
|
325
|
+
28
|
|
326
|
+
29
|
|
327
|
+
30
|
|
328
|
+
31
|
|
329
|
+
32
|
|
330
|
+
33
|
|
331
|
+
34</pre>
|
|
332
|
+
</td>
|
|
333
|
+
<td>
|
|
334
|
+
<pre class="code"><span class="info file"># File 'lib/upstart-exporter/options/command_line.rb', line 15</span>
|
|
335
|
+
|
|
336
|
+
<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>
|
|
337
|
+
<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>
|
|
338
|
+
<span class='rubyid_commands identifier id'>commands</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span>
|
|
339
|
+
<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>
|
|
340
|
+
<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>
|
|
341
|
+
<span class='rubyid_line identifier id'>line</span><span class='dot token'>.</span><span class='rubyid_chomp! fid id'>chomp!</span>
|
|
342
|
+
<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>
|
|
343
|
+
<span class='rubyid_label identifier id'>label</span> <span class='assign token'>=</span> <span class='rubyid_$1 nth_ref id'>$1</span>
|
|
344
|
+
<span class='rubyid_command identifier id'>command</span> <span class='assign token'>=</span> <span class='rubyid_$2 nth_ref id'>$2</span>
|
|
345
|
+
<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>
|
|
346
|
+
<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>
|
|
347
|
+
<span class='comment val'># do nothing, comment</span>
|
|
348
|
+
<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>
|
|
349
|
+
<span class='comment val'># do nothing, empty</span>
|
|
350
|
+
<span class='rubyid_else else kw'>else</span>
|
|
351
|
+
<span class='rubyid_error identifier id'>error</span> <span class='string val'>"procfile lines should have the following format: 'some_label: command'"</span>
|
|
352
|
+
<span class='rubyid_end end kw'>end</span>
|
|
353
|
+
<span class='rubyid_end end kw'>end</span>
|
|
354
|
+
<span class='rubyid_commands identifier id'>commands</span>
|
|
355
|
+
<span class='rubyid_end end kw'>end</span>
|
|
356
|
+
</pre>
|
|
357
|
+
</td>
|
|
358
|
+
</tr>
|
|
359
|
+
</table>
|
|
360
|
+
</div>
|
|
361
|
+
|
|
362
|
+
</div>
|
|
363
|
+
|
|
364
|
+
</div>
|
|
365
|
+
|
|
366
|
+
<div id="footer">
|
|
367
|
+
Generated on Thu Dec 22 20:43:32 2011 by
|
|
368
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
369
|
+
0.7.4 (ruby-1.8.7).
|
|
370
|
+
</div>
|
|
371
|
+
|
|
372
|
+
</body>
|
|
373
|
+
</html>
|
|
@@ -0,0 +1,275 @@
|
|
|
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: Upstart::Exporter::Options::Global
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.7.4
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
|
18
|
+
relpath = '../../..';
|
|
19
|
+
if (relpath != '') relpath += '/';
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
|
|
23
|
+
|
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</head>
|
|
28
|
+
<body>
|
|
29
|
+
<script type="text/javascript" charset="utf-8">
|
|
30
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<div id="header">
|
|
34
|
+
<div id="menu">
|
|
35
|
+
|
|
36
|
+
<a href="../../../_index.html">Index (G)</a> »
|
|
37
|
+
<span class='title'><span class='object_link'><a href="../../../Upstart.html" title="Upstart (module)">Upstart</a></span></span> » <span class='title'><span class='object_link'><a href="../../Exporter.html" title="Upstart::Exporter (class)">Exporter</a></span></span> » <span class='title'><span class='object_link'><a href="../Options.html" title="Upstart::Exporter::Options (module)">Options</a></span></span>
|
|
38
|
+
»
|
|
39
|
+
<span class="title">Global</span>
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div id="search">
|
|
46
|
+
|
|
47
|
+
<a id="class_list_link" href="#">Class List</a>
|
|
48
|
+
|
|
49
|
+
<a id="method_list_link" href="#">Method List</a>
|
|
50
|
+
|
|
51
|
+
<a id="file_list_link" href="#">File List</a>
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<div class="clear"></div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<iframe id="search_frame"></iframe>
|
|
58
|
+
|
|
59
|
+
<div id="content"><h1>Class: Upstart::Exporter::Options::Global
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
</h1>
|
|
64
|
+
|
|
65
|
+
<dl class="box">
|
|
66
|
+
|
|
67
|
+
<dt class="r1">Inherits:</dt>
|
|
68
|
+
<dd class="r1">
|
|
69
|
+
<span class="inheritName">Hash</span>
|
|
70
|
+
|
|
71
|
+
<ul class="fullTree">
|
|
72
|
+
<li>Object</li>
|
|
73
|
+
|
|
74
|
+
<li class="next">Hash</li>
|
|
75
|
+
|
|
76
|
+
<li class="next">Upstart::Exporter::Options::Global</li>
|
|
77
|
+
|
|
78
|
+
</ul>
|
|
79
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
80
|
+
|
|
81
|
+
</dd>
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
<dt class="r2">Includes:</dt>
|
|
89
|
+
<dd class="r2"><span class='object_link'><a href="../Errors.html" title="Upstart::Exporter::Errors (module)">Errors</a></span></dd>
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
<dt class="r1 last">Defined in:</dt>
|
|
96
|
+
<dd class="r1 last">lib/upstart-exporter/options/global.rb</dd>
|
|
97
|
+
|
|
98
|
+
</dl>
|
|
99
|
+
<div class="clear"></div>
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
<h2>Constant Summary</h2>
|
|
103
|
+
|
|
104
|
+
<dl class="constants">
|
|
105
|
+
|
|
106
|
+
<dt id="DEFAULTS-constant" class="">DEFAULTS =
|
|
107
|
+
|
|
108
|
+
</dt>
|
|
109
|
+
<dd><pre class="code"><span class='lbrace token'>{</span>
|
|
110
|
+
<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>
|
|
111
|
+
<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>
|
|
112
|
+
<span class='string val'>'run_user'</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>'service'</span><span class='comma token'>,</span>
|
|
113
|
+
<span class='string val'>'prefix'</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>'fb-'</span>
|
|
114
|
+
<span class='rbrace token'>}</span>
|
|
115
|
+
</pre></dd>
|
|
116
|
+
|
|
117
|
+
<dt id="CONF-constant" class="">CONF =
|
|
118
|
+
|
|
119
|
+
</dt>
|
|
120
|
+
<dd><pre class="code"><span class='string val'>'/etc/upstart-exporter.yaml'</span>
|
|
121
|
+
</pre></dd>
|
|
122
|
+
|
|
123
|
+
</dl>
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
<h2>
|
|
141
|
+
Instance Method Summary
|
|
142
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
|
143
|
+
</h2>
|
|
144
|
+
|
|
145
|
+
<ul class="summary">
|
|
146
|
+
|
|
147
|
+
<li class="public ">
|
|
148
|
+
<span class="summary_signature">
|
|
149
|
+
|
|
150
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Global) <strong>initialize</strong> </a>
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
</span>
|
|
155
|
+
|
|
156
|
+
<span class="note title constructor">constructor</span>
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
<span class="summary_desc"><div class='inline'><p>
|
|
166
|
+
A new instance of Global.
|
|
167
|
+
</p>
|
|
168
|
+
</div></span>
|
|
169
|
+
|
|
170
|
+
</li>
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
</ul>
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="../Errors.html" title="Upstart::Exporter::Errors (module)">Errors</a></span></h3>
|
|
185
|
+
<p class="inherited"><span class='object_link'><a href="../Errors.html#error-instance_method" title="Upstart::Exporter::Errors#error (method)">#error</a></span></p>
|
|
186
|
+
|
|
187
|
+
<div id="constructor_details" class="method_details_list">
|
|
188
|
+
<h2>Constructor Details</h2>
|
|
189
|
+
|
|
190
|
+
<div class="method_details first">
|
|
191
|
+
<p class="signature first" id="initialize-instance_method">
|
|
192
|
+
|
|
193
|
+
- (<tt><span class='object_link'><a href="" title="Upstart::Exporter::Options::Global (class)">Global</a></span></tt>) <strong>initialize</strong>
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
</p><div class="docstring">
|
|
198
|
+
<div class="discussion">
|
|
199
|
+
<p>
|
|
200
|
+
A new instance of Global
|
|
201
|
+
</p>
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
</div>
|
|
205
|
+
</div>
|
|
206
|
+
<div class="tags">
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
</div><table class="source_code">
|
|
210
|
+
<tr>
|
|
211
|
+
<td>
|
|
212
|
+
<pre class="lines">
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
14
|
|
216
|
+
15
|
|
217
|
+
16
|
|
218
|
+
17
|
|
219
|
+
18
|
|
220
|
+
19
|
|
221
|
+
20
|
|
222
|
+
21
|
|
223
|
+
22
|
|
224
|
+
23
|
|
225
|
+
24
|
|
226
|
+
25
|
|
227
|
+
26
|
|
228
|
+
27
|
|
229
|
+
28
|
|
230
|
+
29
|
|
231
|
+
30
|
|
232
|
+
31
|
|
233
|
+
32</pre>
|
|
234
|
+
</td>
|
|
235
|
+
<td>
|
|
236
|
+
<pre class="code"><span class="info file"># File 'lib/upstart-exporter/options/global.rb', line 14</span>
|
|
237
|
+
|
|
238
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span>
|
|
239
|
+
<span class='rubyid_super super kw'>super</span>
|
|
240
|
+
<span class='rubyid_config identifier id'>config</span> <span class='assign token'>=</span> <span class='rubyid_if if 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_CONF constant id'>CONF</span><span class='rparen token'>)</span>
|
|
241
|
+
<span class='rubyid_YAML constant id'>YAML</span><span class='colon2 op'>::</span><span class='rubyid_load identifier id'>load</span><span class='lparen 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_CONF constant id'>CONF</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
|
242
|
+
<span class='rubyid_else else kw'>else</span>
|
|
243
|
+
<span class='rubyid_$stderr gvar id'>$stderr</span><span class='dot token'>.</span><span class='rubyid_puts identifier id'>puts</span> <span class='dstring node'>"#{CONF} not found"</span>
|
|
244
|
+
<span class='lbrace token'>{</span><span class='rbrace token'>}</span>
|
|
245
|
+
<span class='rubyid_end end kw'>end</span>
|
|
246
|
+
<span class='rubyid_error identifier id'>error</span> <span class='dstring node'>"#{CONF} is not a valid YAML config"</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='rubyid_Hash constant id'>Hash</span><span class='rparen token'>)</span>
|
|
247
|
+
<span class='dstring node'>%w{helper_dir upstart_dir run_user prefix}</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_param identifier id'>param</span><span class='bitor op'>|</span>
|
|
248
|
+
<span class='rubyid_value identifier id'>value</span> <span class='assign token'>=</span> <span class='rubyid_if if kw'>if</span> <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>
|
|
249
|
+
<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>
|
|
250
|
+
<span class='rubyid_else else kw'>else</span>
|
|
251
|
+
<span class='rubyid_$stderr gvar 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>
|
|
252
|
+
<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>
|
|
253
|
+
<span class='rubyid_end end kw'>end</span>
|
|
254
|
+
<span class='rubyid_self self kw'>self</span><span class='lbrack token'>[</span><span class='rubyid_param identifier id'>param</span><span class='dot token'>.</span><span class='rubyid_to_sym identifier id'>to_sym</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_value identifier id'>value</span>
|
|
255
|
+
<span class='rubyid_end end kw'>end</span>
|
|
256
|
+
<span class='rubyid_end end kw'>end</span>
|
|
257
|
+
</pre>
|
|
258
|
+
</td>
|
|
259
|
+
</tr>
|
|
260
|
+
</table>
|
|
261
|
+
</div>
|
|
262
|
+
|
|
263
|
+
</div>
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
</div>
|
|
267
|
+
|
|
268
|
+
<div id="footer">
|
|
269
|
+
Generated on Thu Dec 22 20:43:31 2011 by
|
|
270
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
271
|
+
0.7.4 (ruby-1.8.7).
|
|
272
|
+
</div>
|
|
273
|
+
|
|
274
|
+
</body>
|
|
275
|
+
</html>
|