elevage 0.1.0

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.
Files changed (74) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +21 -0
  4. data/.rubocop.yml +8 -0
  5. data/.ruby-version +1 -0
  6. data/.simplecov +8 -0
  7. data/.travis.yml +3 -0
  8. data/.yardoc/checksums +12 -0
  9. data/.yardoc/object_types +0 -0
  10. data/.yardoc/objects/root.dat +0 -0
  11. data/.yardoc/proxy_types +0 -0
  12. data/Gemfile +4 -0
  13. data/Guardfile +10 -0
  14. data/LICENSE.txt +203 -0
  15. data/README.md +112 -0
  16. data/Rakefile +20 -0
  17. data/bin/elevage +4 -0
  18. data/coverage/.resultset.json.lock +0 -0
  19. data/doc/Elevage/Build.html +435 -0
  20. data/doc/Elevage/CLI.html +282 -0
  21. data/doc/Elevage/Environment.html +950 -0
  22. data/doc/Elevage/Generate.html +346 -0
  23. data/doc/Elevage/Health.html +359 -0
  24. data/doc/Elevage/New.html +411 -0
  25. data/doc/Elevage/Platform.html +1119 -0
  26. data/doc/Elevage/Provisioner.html +804 -0
  27. data/doc/Elevage/ProvisionerRunQueue.html +765 -0
  28. data/doc/Elevage/Runner.html +319 -0
  29. data/doc/Elevage.html +501 -0
  30. data/doc/_index.html +239 -0
  31. data/doc/class_list.html +58 -0
  32. data/doc/css/common.css +1 -0
  33. data/doc/css/full_list.css +57 -0
  34. data/doc/css/style.css +339 -0
  35. data/doc/file.README.html +187 -0
  36. data/doc/file_list.html +60 -0
  37. data/doc/frames.html +26 -0
  38. data/doc/index.html +187 -0
  39. data/doc/js/app.js +219 -0
  40. data/doc/js/full_list.js +181 -0
  41. data/doc/js/jquery.js +4 -0
  42. data/doc/method_list.html +369 -0
  43. data/doc/top-level-namespace.html +112 -0
  44. data/elevage.gemspec +39 -0
  45. data/features/archive +314 -0
  46. data/features/build.feature +237 -0
  47. data/features/elevage.feature +24 -0
  48. data/features/generate.feature +235 -0
  49. data/features/health_env_failure.feature +292 -0
  50. data/features/health_failure.feature +291 -0
  51. data/features/health_success.feature +279 -0
  52. data/features/list.feature +315 -0
  53. data/features/new.feature +68 -0
  54. data/features/step_definitions/elevage_steps.rb +27 -0
  55. data/features/support/env.rb +9 -0
  56. data/lib/elevage/build.rb +109 -0
  57. data/lib/elevage/constants.rb +113 -0
  58. data/lib/elevage/environment.rb +223 -0
  59. data/lib/elevage/generate.rb +48 -0
  60. data/lib/elevage/health.rb +27 -0
  61. data/lib/elevage/new.rb +30 -0
  62. data/lib/elevage/platform.rb +105 -0
  63. data/lib/elevage/provisioner.rb +169 -0
  64. data/lib/elevage/provisionerrunqueue.rb +114 -0
  65. data/lib/elevage/runner.rb +39 -0
  66. data/lib/elevage/templates/compute.yml.tt +18 -0
  67. data/lib/elevage/templates/environment.yml.tt +20 -0
  68. data/lib/elevage/templates/network.yml.tt +16 -0
  69. data/lib/elevage/templates/platform.yml.tt +110 -0
  70. data/lib/elevage/templates/vcenter.yml.tt +77 -0
  71. data/lib/elevage/version.rb +4 -0
  72. data/lib/elevage.rb +45 -0
  73. data/spec/spec_helper.rb +4 -0
  74. metadata +357 -0
@@ -0,0 +1,319 @@
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: Elevage::Runner
8
+
9
+ &mdash; Documentation by YARD 0.8.7.6
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!Elevage/Runner.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (R)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Elevage.html" title="Elevage (module)">Elevage</a></span></span>
36
+ &raquo;
37
+ <span class="title">Runner</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: Elevage::Runner
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Elevage::Runner</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <dt class="r2 last">Defined in:</dt>
97
+ <dd class="r2 last">lib/elevage/runner.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>wrapper to assist aruba in single process execution</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div>
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+ <h2>
122
+ Instance Method Summary
123
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
124
+ </h2>
125
+
126
+ <ul class="summary">
127
+
128
+ <li class="public ">
129
+ <span class="summary_signature">
130
+
131
+ <a href="#execute%21-instance_method" title="#execute! (instance method)">- (Object) <strong>execute!</strong> </a>
132
+
133
+
134
+
135
+ </span>
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ <span class="summary_desc"><div class='inline'></div></span>
146
+
147
+ </li>
148
+
149
+
150
+ <li class="public ">
151
+ <span class="summary_signature">
152
+
153
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Runner) <strong>initialize</strong>(argv, stdin = STDIN, stdout = STDOUT, stderr = STDERR, kernel = Kernel) </a>
154
+
155
+
156
+
157
+ </span>
158
+
159
+
160
+ <span class="note title constructor">constructor</span>
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+ <span class="summary_desc"><div class='inline'>
170
+ <p>Allow everything fun to be injected from the outside while defaulting to
171
+ normal implementations.</p>
172
+ </div></span>
173
+
174
+ </li>
175
+
176
+
177
+ </ul>
178
+
179
+
180
+ <div id="constructor_details" class="method_details_list">
181
+ <h2>Constructor Details</h2>
182
+
183
+ <div class="method_details first">
184
+ <h3 class="signature first" id="initialize-instance_method">
185
+
186
+ - (<tt><span class='object_link'><a href="" title="Elevage::Runner (class)">Runner</a></span></tt>) <strong>initialize</strong>(argv, stdin = STDIN, stdout = STDOUT, stderr = STDERR, kernel = Kernel)
187
+
188
+
189
+
190
+
191
+
192
+ </h3><div class="docstring">
193
+ <div class="discussion">
194
+
195
+ <p>Allow everything fun to be injected from the outside while defaulting to
196
+ normal implementations.</p>
197
+
198
+
199
+ </div>
200
+ </div>
201
+ <div class="tags">
202
+
203
+
204
+ </div><table class="source_code">
205
+ <tr>
206
+ <td>
207
+ <pre class="lines">
208
+
209
+
210
+ 7
211
+ 8
212
+ 9</pre>
213
+ </td>
214
+ <td>
215
+ <pre class="code"><span class="info file"># File 'lib/elevage/runner.rb', line 7</span>
216
+
217
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_argv'>argv</span><span class='comma'>,</span> <span class='id identifier rubyid_stdin'>stdin</span> <span class='op'>=</span> <span class='const'>STDIN</span><span class='comma'>,</span> <span class='id identifier rubyid_stdout'>stdout</span> <span class='op'>=</span> <span class='const'>STDOUT</span><span class='comma'>,</span> <span class='id identifier rubyid_stderr'>stderr</span> <span class='op'>=</span> <span class='const'>STDERR</span><span class='comma'>,</span> <span class='id identifier rubyid_kernel'>kernel</span> <span class='op'>=</span> <span class='const'>Kernel</span><span class='rparen'>)</span>
218
+ <span class='ivar'>@argv</span><span class='comma'>,</span> <span class='ivar'>@stdin</span><span class='comma'>,</span> <span class='ivar'>@stdout</span><span class='comma'>,</span> <span class='ivar'>@stderr</span><span class='comma'>,</span> <span class='ivar'>@kernel</span> <span class='op'>=</span> <span class='id identifier rubyid_argv'>argv</span><span class='comma'>,</span> <span class='id identifier rubyid_stdin'>stdin</span><span class='comma'>,</span> <span class='id identifier rubyid_stdout'>stdout</span><span class='comma'>,</span> <span class='id identifier rubyid_stderr'>stderr</span><span class='comma'>,</span> <span class='id identifier rubyid_kernel'>kernel</span>
219
+ <span class='kw'>end</span></pre>
220
+ </td>
221
+ </tr>
222
+ </table>
223
+ </div>
224
+
225
+ </div>
226
+
227
+
228
+ <div id="instance_method_details" class="method_details_list">
229
+ <h2>Instance Method Details</h2>
230
+
231
+
232
+ <div class="method_details first">
233
+ <h3 class="signature first" id="execute!-instance_method">
234
+
235
+ - (<tt>Object</tt>) <strong>execute!</strong>
236
+
237
+
238
+
239
+
240
+
241
+ </h3><table class="source_code">
242
+ <tr>
243
+ <td>
244
+ <pre class="lines">
245
+
246
+
247
+ 11
248
+ 12
249
+ 13
250
+ 14
251
+ 15
252
+ 16
253
+ 17
254
+ 18
255
+ 19
256
+ 20
257
+ 21
258
+ 22
259
+ 23
260
+ 24
261
+ 25
262
+ 26
263
+ 27
264
+ 28
265
+ 29
266
+ 30
267
+ 31
268
+ 32
269
+ 33
270
+ 34
271
+ 35
272
+ 36</pre>
273
+ </td>
274
+ <td>
275
+ <pre class="code"><span class="info file"># File 'lib/elevage/runner.rb', line 11</span>
276
+
277
+ <span class='kw'>def</span> <span class='id identifier rubyid_execute!'>execute!</span>
278
+ <span class='id identifier rubyid_exit_code'>exit_code</span> <span class='op'>=</span> <span class='kw'>begin</span>
279
+ <span class='comment'># Thor accesses these streams directly rather than letting them be injected, so we replace them...
280
+ </span> <span class='gvar'>$stderr</span> <span class='op'>=</span> <span class='ivar'>@stderr</span>
281
+ <span class='gvar'>$stdin</span> <span class='op'>=</span> <span class='ivar'>@stdin</span>
282
+ <span class='gvar'>$stdout</span> <span class='op'>=</span> <span class='ivar'>@stdout</span>
283
+
284
+ <span class='const'>Elevage</span><span class='op'>::</span><span class='const'>CLI</span><span class='period'>.</span><span class='id identifier rubyid_start'>start</span><span class='lparen'>(</span><span class='ivar'>@argv</span><span class='rparen'>)</span>
285
+
286
+ <span class='comment'># Thor::Base#start does not have a return value, assume success if no exception is raised.
287
+ </span> <span class='int'>0</span>
288
+ <span class='kw'>rescue</span> <span class='const'>StandardError</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
289
+ <span class='comment'># The ruby interpreter would pipe this to STDERR and exit 1 in the case of an unhandled exception
290
+ </span> <span class='id identifier rubyid_b'>b</span> <span class='op'>=</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_backtrace'>backtrace</span>
291
+ <span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_unshift'>unshift</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_shift'>shift</span><span class='embexpr_end'>}</span><span class='tstring_content'>: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='embexpr_end'>}</span><span class='tstring_content'> (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
292
+ <span class='ivar'>@stderr</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_s'>s</span><span class='op'>|</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\tfrom </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_s'>s</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
293
+ <span class='int'>1</span>
294
+ <span class='kw'>ensure</span>
295
+ <span class='comment'># put them back.
296
+ </span> <span class='gvar'>$stderr</span> <span class='op'>=</span> <span class='const'>STDERR</span>
297
+ <span class='gvar'>$stdin</span> <span class='op'>=</span> <span class='const'>STDIN</span>
298
+ <span class='gvar'>$stdout</span> <span class='op'>=</span> <span class='const'>STDOUT</span>
299
+ <span class='kw'>end</span>
300
+ <span class='comment'># Proxy exit code back to the injected kernel.
301
+ </span> <span class='ivar'>@kernel</span><span class='period'>.</span><span class='id identifier rubyid_exit'>exit</span><span class='lparen'>(</span><span class='id identifier rubyid_exit_code'>exit_code</span><span class='rparen'>)</span>
302
+ <span class='kw'>end</span></pre>
303
+ </td>
304
+ </tr>
305
+ </table>
306
+ </div>
307
+
308
+ </div>
309
+
310
+ </div>
311
+
312
+ <div id="footer">
313
+ Generated on Tue Nov 11 17:39:23 2014 by
314
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
315
+ 0.8.7.6 (ruby-2.1.2).
316
+ </div>
317
+
318
+ </body>
319
+ </html>