humidifier-reservoir 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d67843dcb94c3bd8226140a795e0141014f7c6a0
4
- data.tar.gz: d366451dcdf10b424e9f1bbfa1c8f4aefa086b51
3
+ metadata.gz: 47a3a1d0b151d01f5a11901602a0c28275d484b2
4
+ data.tar.gz: d722dd839352efd30c0e30598bd37e1031738f29
5
5
  SHA512:
6
- metadata.gz: 60029c1f9bd23de522e348f891c9cf4712f0cfb78f3ae568d6b79199bfc3d1767567d927182e0a67fd2464aa4f594b2a5a77ea64283c06363b929486731ff06f
7
- data.tar.gz: 129376d5c9107961e606860d52c5a09a7e4cdd268ac6a5422ac6e23e746781dcd6472ec38042d95f4cc8459a6f064616aacee16c08d53bcd8760d0f1e3f6c80a
6
+ metadata.gz: 9ad8368e36499450f92bd6de1cee04c47471b7924e0627b8daefe76bf1db40886d91ef8f270c2b301dc6aaed52b0322eb0b839d402c65305f8ac78d4b1218666
7
+ data.tar.gz: 80bb3fe9fb7c78b1854ff216eae3a7ca7fb0446a5b7ef4fb307d10b947956d1198a1208ec582e48050de6c7e5671bd934ba59b98620213718e89420f8d67d2e6
@@ -1,17 +1,9 @@
1
1
  AllCops:
2
2
  DisplayCopNames: true
3
3
  DisplayStyleGuide: true
4
- TargetRubyVersion: 2.1
4
+ TargetRubyVersion: 2.4
5
5
  Exclude:
6
6
  - 'vendor/**/*'
7
7
 
8
- Layout/IndentHeredoc:
8
+ Style/FrozenStringLiteralComment:
9
9
  Enabled: false
10
-
11
- Metrics/LineLength:
12
- Max: 100
13
-
14
- Style/PercentLiteralDelimiters:
15
- PreferredDelimiters:
16
- default: '[]'
17
- '%r': '{}'
data/README.md CHANGED
@@ -24,9 +24,9 @@ Or install it yourself as:
24
24
 
25
25
  ## Usage
26
26
 
27
- ### CLI
27
+ ### Getting started
28
28
 
29
- `Reservoir` is meant to be run as a CLI tool. First, build a ruby script that executes the `Humidifier::Reservoir::CLI` class, like so:
29
+ `Reservoir` is meant to be run as a CLI tool. First, build a ruby script (for example `bin/reservoir`) that executes the `Humidifier::Reservoir::CLI` class, like so:
30
30
 
31
31
  ```ruby
32
32
  #!/usr/bin/env ruby
@@ -107,12 +107,35 @@ AdminUser:
107
107
  group: admin
108
108
  ```
109
109
 
110
- ### Deployment
110
+ ### Using the CLI
111
111
 
112
112
  Now that you've configured your CLI, your resources, and your mappers, you can use the CLI to display, validate, and deploy your infrastructure to CloudFormation. Run your script without any arguments to get the help message and explanations for each command.
113
113
 
114
114
  Each command has an `--aws-profile` (or `-p`) option for specifying which profile to authenticate against when querying AWS. You should ensure that this profile has the correct permissions for creating whatever resources are going to part of your stack. You can also rely on the `AWS_*` environment variables, or the EC2 instance profile if you're deploying from an instance. For more information, see the [AWS docs](http://docs.aws.amazon.com/sdkforruby/api/) under the "Configuration" section.
115
115
 
116
+ Below are the list of commands and some of their options.
117
+
118
+ #### `change [?stack]`
119
+
120
+ Creates a change set for either the specified stack or all stacks in the repo. The change set represents the changes between what is currently deployed versus
121
+ the resources represented by the configuration.
122
+
123
+ #### `deploy [?stack]`
124
+
125
+ Creates or updates (depending on if the stack already exists) one or all stacks in the repo.
126
+
127
+ #### `display [stack] [?pattern]`
128
+
129
+ Displays the specified stack in JSON format on the command line. If you optionally pass a pattern argument, it will filter the resources down to just ones whose names match the given pattern.
130
+
131
+ #### `upload [?stack]`
132
+
133
+ Upload one or all stacks in the repo to S3 for reference later. Note that this must be combined with the `humidifier` `s3_bucket` configuration option.
134
+
135
+ #### `validate [?stack]`
136
+
137
+ Validate that one or all stacks in the repo are properly configured and using values that CloudFormation understands.
138
+
116
139
  #### --prefix
117
140
 
118
141
  The `deploy` command also allows a `--prefix` command line argument that will override the default prefix (if one is configured) for the stack that is being deployed. This is especially useful when you're deploying multiple copies of the same stack (for instance, multiple autoscaling groups) that have different purposes or semantically mean newer versions of resources.
@@ -107,9 +107,9 @@
107
107
  </div>
108
108
 
109
109
  <div id="footer">
110
- Generated on Wed Nov 8 13:26:15 2017 by
110
+ Generated on Tue Dec 5 14:49:51 2017 by
111
111
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
112
- 0.9.9 (ruby-2.4.2).
112
+ 0.9.12 (ruby-2.4.2).
113
113
  </div>
114
114
 
115
115
  </div>
@@ -124,7 +124,7 @@
124
124
 
125
125
  </div>
126
126
  </dt>
127
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>0.2.0</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
127
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>0.2.3</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
128
128
 
129
129
  </dl>
130
130
 
@@ -490,9 +490,9 @@
490
490
  </div>
491
491
 
492
492
  <div id="footer">
493
- Generated on Wed Nov 8 13:26:15 2017 by
493
+ Generated on Tue Dec 5 14:49:51 2017 by
494
494
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
495
- 0.9.9 (ruby-2.4.2).
495
+ 0.9.12 (ruby-2.4.2).
496
496
  </div>
497
497
 
498
498
  </div>
@@ -457,13 +457,15 @@ logical name for the resource, and the user-specified attributes.</p>
457
457
  61
458
458
  62
459
459
  63
460
- 64</pre>
460
+ 64
461
+ 65</pre>
461
462
  </td>
462
463
  <td>
463
464
  <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/base_mapper.rb', line 52</span>
464
465
 
465
466
  <span class='kw'>def</span> <span class='id identifier rubyid_resource_for'>resource_for</span><span class='lparen'>(</span><span class='id identifier rubyid_clazz'>clazz</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span>
466
- <span class='id identifier rubyid_mapped'>mapped</span> <span class='op'>=</span> <span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:attribute_defaults</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_attribute_defaults'>attribute_defaults</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
467
+ <span class='id identifier rubyid_mapped'>mapped</span> <span class='op'>=</span>
468
+ <span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:attribute_defaults</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_attribute_defaults'>attribute_defaults</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
467
469
 
468
470
  <span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
469
471
  <span class='id identifier rubyid_mapped'>mapped</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_mapped_from'>mapped_from</span><span class='lparen'>(</span><span class='id identifier rubyid_clazz'>clazz</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span><span class='rparen'>)</span>
@@ -485,9 +487,9 @@ logical name for the resource, and the user-specified attributes.</p>
485
487
  </div>
486
488
 
487
489
  <div id="footer">
488
- Generated on Wed Nov 8 13:26:16 2017 by
490
+ Generated on Tue Dec 5 14:49:52 2017 by
489
491
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
490
- 0.9.9 (ruby-2.4.2).
492
+ 0.9.12 (ruby-2.4.2).
491
493
  </div>
492
494
 
493
495
  </div>
@@ -189,6 +189,28 @@ about.</p>
189
189
 
190
190
 
191
191
 
192
+ <span class="summary_desc"><div class='inline'></div></span>
193
+
194
+ </li>
195
+
196
+
197
+ <li class="public ">
198
+ <span class="summary_signature">
199
+
200
+ <a href="#upload-instance_method" title="#upload (instance method)">#<strong>upload</strong>(name = nil) &#x21d2; Object </a>
201
+
202
+
203
+
204
+ </span>
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
192
214
  <span class="summary_desc"><div class='inline'></div></span>
193
215
 
194
216
  </li>
@@ -241,7 +263,6 @@ about.</p>
241
263
  <pre class="lines">
242
264
 
243
265
 
244
- 12
245
266
  13
246
267
  14
247
268
  15
@@ -250,10 +271,11 @@ about.</p>
250
271
  18
251
272
  19
252
273
  20
253
- 21</pre>
274
+ 21
275
+ 22</pre>
254
276
  </td>
255
277
  <td>
256
- <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/cli.rb', line 12</span>
278
+ <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/cli.rb', line 13</span>
257
279
 
258
280
  <span class='kw'>def</span> <span class='id identifier rubyid_change'>change</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
259
281
  <span class='id identifier rubyid_stack_names'>stack_names</span> <span class='op'>=</span> <span class='id identifier rubyid_stack_names_from'>stack_names_from</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
@@ -285,8 +307,6 @@ about.</p>
285
307
  <pre class="lines">
286
308
 
287
309
 
288
- 26
289
- 27
290
310
  28
291
311
  29
292
312
  30
@@ -294,10 +314,12 @@ about.</p>
294
314
  32
295
315
  33
296
316
  34
297
- 35</pre>
317
+ 35
318
+ 36
319
+ 37</pre>
298
320
  </td>
299
321
  <td>
300
- <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/cli.rb', line 26</span>
322
+ <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/cli.rb', line 28</span>
301
323
 
302
324
  <span class='kw'>def</span> <span class='id identifier rubyid_deploy'>deploy</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
303
325
  <span class='id identifier rubyid_stack_names'>stack_names</span> <span class='op'>=</span> <span class='id identifier rubyid_stack_names_from'>stack_names_from</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
@@ -329,12 +351,12 @@ about.</p>
329
351
  <pre class="lines">
330
352
 
331
353
 
332
- 38
333
- 39
334
- 40</pre>
354
+ 41
355
+ 42
356
+ 43</pre>
335
357
  </td>
336
358
  <td>
337
- <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/cli.rb', line 38</span>
359
+ <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/cli.rb', line 41</span>
338
360
 
339
361
  <span class='kw'>def</span> <span class='id identifier rubyid_display'>display</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_pattern'>pattern</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
340
362
  <span class='id identifier rubyid_puts'>puts</span> <span class='const'><span class='object_link'><a href="Stack.html" title="Humidifier::Reservoir::Stack (class)">Stack</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Stack.html#initialize-instance_method" title="Humidifier::Reservoir::Stack#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='label'>pattern:</span> <span class='id identifier rubyid_pattern'>pattern</span> <span class='op'>&amp;&amp;</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_pattern'>pattern</span><span class='embexpr_end'>}</span><span class='regexp_end'>/i</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_cf'><span class='object_link'><a href="Stack.html#to_cf-instance_method" title="Humidifier::Reservoir::Stack#to_cf (method)">to_cf</a></span></span>
@@ -345,9 +367,9 @@ about.</p>
345
367
  </div>
346
368
 
347
369
  <div class="method_details ">
348
- <h3 class="signature " id="validate-instance_method">
370
+ <h3 class="signature " id="upload-instance_method">
349
371
 
350
- #<strong>validate</strong>(name = nil) &#x21d2; <tt>Object</tt>
372
+ #<strong>upload</strong>(name = nil) &#x21d2; <tt>Object</tt>
351
373
 
352
374
 
353
375
 
@@ -359,23 +381,77 @@ about.</p>
359
381
  <pre class="lines">
360
382
 
361
383
 
362
- 43
363
- 44
364
- 45
365
384
  46
366
385
  47
367
386
  48
368
- 49</pre>
387
+ 49
388
+ 50
389
+ 51
390
+ 52
391
+ 53
392
+ 54
393
+ 55</pre>
369
394
  </td>
370
395
  <td>
371
- <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/cli.rb', line 43</span>
396
+ <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/cli.rb', line 46</span>
397
+
398
+ <span class='kw'>def</span> <span class='id identifier rubyid_upload'>upload</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
399
+ <span class='id identifier rubyid_stack_names'>stack_names</span> <span class='op'>=</span> <span class='id identifier rubyid_stack_names_from'>stack_names_from</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
400
+ <span class='id identifier rubyid_authorize'>authorize</span>
401
+
402
+ <span class='id identifier rubyid_stack_names'>stack_names</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_stack_name'>stack_name</span><span class='op'>|</span>
403
+ <span class='id identifier rubyid_stack'>stack</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Stack.html" title="Humidifier::Reservoir::Stack (class)">Stack</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Stack.html#initialize-instance_method" title="Humidifier::Reservoir::Stack#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_stack_name'>stack_name</span><span class='rparen'>)</span>
404
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Uploading </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_stack'>stack</span><span class='period'>.</span><span class='id identifier rubyid_stack_name'>stack_name</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
405
+ <span class='id identifier rubyid_stack'>stack</span><span class='period'>.</span><span class='id identifier rubyid_upload'>upload</span>
406
+ <span class='kw'>end</span>
407
+ <span class='kw'>end</span></pre>
408
+ </td>
409
+ </tr>
410
+ </table>
411
+ </div>
412
+
413
+ <div class="method_details ">
414
+ <h3 class="signature " id="validate-instance_method">
415
+
416
+ #<strong>validate</strong>(name = nil) &#x21d2; <tt>Object</tt>
417
+
418
+
419
+
420
+
421
+
422
+ </h3><table class="source_code">
423
+ <tr>
424
+ <td>
425
+ <pre class="lines">
426
+
427
+
428
+ 59
429
+ 60
430
+ 61
431
+ 62
432
+ 63
433
+ 64
434
+ 65
435
+ 66
436
+ 67
437
+ 68
438
+ 69
439
+ 70</pre>
440
+ </td>
441
+ <td>
442
+ <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/cli.rb', line 59</span>
372
443
 
373
444
  <span class='kw'>def</span> <span class='id identifier rubyid_validate'>validate</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
374
445
  <span class='id identifier rubyid_stack_names'>stack_names</span> <span class='op'>=</span> <span class='id identifier rubyid_stack_names_from'>stack_names_from</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
375
446
  <span class='id identifier rubyid_authorize'>authorize</span>
376
447
 
377
448
  <span class='id identifier rubyid_print'>print</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Validating... </span><span class='tstring_end'>&#39;</span></span>
378
- <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Valid.</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_stack_names'>stack_names</span><span class='period'>.</span><span class='id identifier rubyid_all?'>all?</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_stack_name'>stack_name</span><span class='op'>|</span> <span class='const'><span class='object_link'><a href="Stack.html" title="Humidifier::Reservoir::Stack (class)">Stack</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Stack.html#initialize-instance_method" title="Humidifier::Reservoir::Stack#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_stack_name'>stack_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_valid?'><span class='object_link'><a href="Stack.html#valid%3F-instance_method" title="Humidifier::Reservoir::Stack#valid? (method)">valid?</a></span></span> <span class='rbrace'>}</span>
449
+
450
+ <span class='kw'>if</span> <span class='id identifier rubyid_stack_names'>stack_names</span><span class='period'>.</span><span class='id identifier rubyid_all?'>all?</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_stack_name'>stack_name</span><span class='op'>|</span> <span class='const'><span class='object_link'><a href="Stack.html" title="Humidifier::Reservoir::Stack (class)">Stack</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Stack.html#initialize-instance_method" title="Humidifier::Reservoir::Stack#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_stack_name'>stack_name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_valid?'><span class='object_link'><a href="Stack.html#valid%3F-instance_method" title="Humidifier::Reservoir::Stack#valid? (method)">valid?</a></span></span> <span class='rbrace'>}</span>
451
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Valid.</span><span class='tstring_end'>&#39;</span></span>
452
+ <span class='kw'>else</span>
453
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Invalid.</span><span class='tstring_end'>&#39;</span></span>
454
+ <span class='kw'>end</span>
379
455
  <span class='kw'>end</span></pre>
380
456
  </td>
381
457
  </tr>
@@ -387,9 +463,9 @@ about.</p>
387
463
  </div>
388
464
 
389
465
  <div id="footer">
390
- Generated on Wed Nov 8 13:26:15 2017 by
466
+ Generated on Tue Dec 5 14:49:51 2017 by
391
467
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
392
- 0.9.9 (ruby-2.4.2).
468
+ 0.9.12 (ruby-2.4.2).
393
469
  </div>
394
470
 
395
471
  </div>
@@ -644,14 +644,14 @@
644
644
  <pre class="lines">
645
645
 
646
646
 
647
- 30
648
- 31
649
647
  32
650
648
  33
651
- 34</pre>
649
+ 34
650
+ 35
651
+ 36</pre>
652
652
  </td>
653
653
  <td>
654
- <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/config.rb', line 30</span>
654
+ <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/config.rb', line 32</span>
655
655
 
656
656
  <span class='kw'>def</span> <span class='id identifier rubyid_stacks'>stacks</span>
657
657
  <span class='const'>Dir</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_stack_path'>stack_path</span><span class='embexpr_end'>}</span><span class='tstring_content'>/*</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each_with_object'>each_with_object</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_names'>names</span><span class='op'>|</span>
@@ -668,9 +668,9 @@
668
668
  </div>
669
669
 
670
670
  <div id="footer">
671
- Generated on Wed Nov 8 13:26:15 2017 by
671
+ Generated on Tue Dec 5 14:49:52 2017 by
672
672
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
673
- 0.9.9 (ruby-2.4.2).
673
+ 0.9.12 (ruby-2.4.2).
674
674
  </div>
675
675
 
676
676
  </div>
@@ -126,9 +126,9 @@ CLI.</p>
126
126
  </div>
127
127
 
128
128
  <div id="footer">
129
- Generated on Wed Nov 8 13:26:15 2017 by
129
+ Generated on Tue Dec 5 14:49:51 2017 by
130
130
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
131
- 0.9.9 (ruby-2.4.2).
131
+ 0.9.12 (ruby-2.4.2).
132
132
  </div>
133
133
 
134
134
  </div>
@@ -445,9 +445,9 @@ default.</p>
445
445
  </div>
446
446
 
447
447
  <div id="footer">
448
- Generated on Wed Nov 8 13:26:16 2017 by
448
+ Generated on Tue Dec 5 14:49:52 2017 by
449
449
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
450
- 0.9.9 (ruby-2.4.2).
450
+ 0.9.12 (ruby-2.4.2).
451
451
  </div>
452
452
 
453
453
  </div>
@@ -389,6 +389,28 @@ them.</p>
389
389
 
390
390
 
391
391
 
392
+ <span class="summary_desc"><div class='inline'></div></span>
393
+
394
+ </li>
395
+
396
+
397
+ <li class="public ">
398
+ <span class="summary_signature">
399
+
400
+ <a href="#upload-instance_method" title="#upload (instance method)">#<strong>upload</strong> &#x21d2; Object </a>
401
+
402
+
403
+
404
+ </span>
405
+
406
+
407
+
408
+
409
+
410
+
411
+
412
+
413
+
392
414
  <span class="summary_desc"><div class='inline'></div></span>
393
415
 
394
416
  </li>
@@ -722,7 +744,7 @@ them.</p>
722
744
  <span class='id identifier rubyid_valid?'>valid?</span>
723
745
 
724
746
  <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>capabilities:</span> <span class='qwords_beg'>%w[</span><span class='tstring_content'>CAPABILITY_IAM</span><span class='words_sep'> </span><span class='tstring_content'>CAPABILITY_NAMED_IAM</span><span class='words_sep'>]</span> <span class='rbrace'>}</span>
725
- <span class='id identifier rubyid_wait'>wait</span> <span class='op'>?</span> <span class='id identifier rubyid_humidifier_stack'>humidifier_stack</span><span class='period'>.</span><span class='id identifier rubyid_deploy_and_wait'>deploy_and_wait</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_humidifier_stack'>humidifier_stack</span><span class='period'>.</span><span class='id identifier rubyid_deploy'>deploy</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
747
+ <span class='id identifier rubyid_humidifier_stack'>humidifier_stack</span><span class='period'>.</span><span class='id identifier rubyid_public_send'>public_send</span><span class='lparen'>(</span><span class='id identifier rubyid_wait'>wait</span> <span class='op'>?</span> <span class='symbol'>:deploy_and_wait</span> <span class='op'>:</span> <span class='symbol'>:deploy</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
726
748
  <span class='kw'>end</span></pre>
727
749
  </td>
728
750
  </tr>
@@ -821,6 +843,36 @@ them.</p>
821
843
  </td>
822
844
  </tr>
823
845
  </table>
846
+ </div>
847
+
848
+ <div class="method_details ">
849
+ <h3 class="signature " id="upload-instance_method">
850
+
851
+ #<strong>upload</strong> &#x21d2; <tt>Object</tt>
852
+
853
+
854
+
855
+
856
+
857
+ </h3><table class="source_code">
858
+ <tr>
859
+ <td>
860
+ <pre class="lines">
861
+
862
+
863
+ 59
864
+ 60
865
+ 61</pre>
866
+ </td>
867
+ <td>
868
+ <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/stack.rb', line 59</span>
869
+
870
+ <span class='kw'>def</span> <span class='id identifier rubyid_upload'>upload</span>
871
+ <span class='id identifier rubyid_humidifier_stack'>humidifier_stack</span><span class='period'>.</span><span class='id identifier rubyid_upload'>upload</span>
872
+ <span class='kw'>end</span></pre>
873
+ </td>
874
+ </tr>
875
+ </table>
824
876
  </div>
825
877
 
826
878
  <div class="method_details ">
@@ -860,25 +912,27 @@ them.</p>
860
912
  <pre class="lines">
861
913
 
862
914
 
863
- 59
864
- 60
865
- 61
866
- 62
867
915
  63
868
916
  64
869
917
  65
870
- 66</pre>
918
+ 66
919
+ 67
920
+ 68
921
+ 69
922
+ 70
923
+ 71</pre>
871
924
  </td>
872
925
  <td>
873
- <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/stack.rb', line 59</span>
926
+ <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/stack.rb', line 63</span>
874
927
 
875
928
  <span class='kw'>def</span> <span class='id identifier rubyid_valid?'>valid?</span>
876
929
  <span class='id identifier rubyid_humidifier_stack'>humidifier_stack</span><span class='period'>.</span><span class='id identifier rubyid_valid?'>valid?</span>
877
930
  <span class='kw'>rescue</span> <span class='const'>Aws</span><span class='op'>::</span><span class='const'>CloudFormation</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>AccessDenied</span>
878
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="Error.html" title="Humidifier::Reservoir::Error (class)">Error</a></span></span><span class='comma'>,</span> <span class='heredoc_beg'>&lt;&lt;-MSG</span>
879
- <span class='tstring_content'>The authenticated AWS profile does not have the requisite permissions to run
880
- this command. Ensure the profile has cloudformation:ValidateTemplate.
881
- </span><span class='heredoc_end'>MSG
931
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="Error.html" title="Humidifier::Reservoir::Error (class)">Error</a></span></span><span class='comma'>,</span> <span class='heredoc_beg'>&lt;&lt;~MSG</span>
932
+ <span class='tstring_content'> The authenticated AWS profile does not have the requisite permissions
933
+ </span><span class='tstring_content'> to run this command. Ensure the profile has
934
+ </span><span class='tstring_content'> cloudformation:ValidateTemplate.
935
+ </span><span class='heredoc_end'> MSG
882
936
  </span><span class='kw'>end</span></pre>
883
937
  </td>
884
938
  </tr>
@@ -890,9 +944,9 @@ this command. Ensure the profile has cloudformation:ValidateTemplate.
890
944
  </div>
891
945
 
892
946
  <div id="footer">
893
- Generated on Wed Nov 8 13:26:15 2017 by
947
+ Generated on Tue Dec 5 14:49:52 2017 by
894
948
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
895
- 0.9.9 (ruby-2.4.2).
949
+ 0.9.12 (ruby-2.4.2).
896
950
  </div>
897
951
 
898
952
  </div>
@@ -179,6 +179,39 @@ references.</p>
179
179
 
180
180
 
181
181
 
182
+
183
+ <h2>
184
+ Instance Method Summary
185
+ <small><a href="#" class="summary_toggle">collapse</a></small>
186
+ </h2>
187
+
188
+ <ul class="summary">
189
+
190
+ <li class="public ">
191
+ <span class="summary_signature">
192
+
193
+ <a href="#value-instance_method" title="#value (instance method)">#<strong>value</strong> &#x21d2; Object </a>
194
+
195
+
196
+
197
+ </span>
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+ <span class="summary_desc"><div class='inline'></div></span>
208
+
209
+ </li>
210
+
211
+
212
+ </ul>
213
+
214
+
182
215
 
183
216
 
184
217
  <div id="instance_attr_details" class="attr_details">
@@ -309,12 +342,56 @@ references.</p>
309
342
  </div>
310
343
 
311
344
 
345
+ <div id="instance_method_details" class="method_details_list">
346
+ <h2>Instance Method Details</h2>
347
+
348
+
349
+ <div class="method_details first">
350
+ <h3 class="signature first" id="value-instance_method">
351
+
352
+ #<strong>value</strong> &#x21d2; <tt>Object</tt>
353
+
354
+
355
+
356
+
357
+
358
+ </h3><table class="source_code">
359
+ <tr>
360
+ <td>
361
+ <pre class="lines">
362
+
363
+
364
+ 11
365
+ 12
366
+ 13
367
+ 14
368
+ 15
369
+ 16
370
+ 17</pre>
371
+ </td>
372
+ <td>
373
+ <pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/stack.rb', line 11</span>
374
+
375
+ <span class='kw'>def</span> <span class='id identifier rubyid_value'>value</span>
376
+ <span class='kw'>if</span> <span class='id identifier rubyid_attribute'>attribute</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span>
377
+ <span class='const'><span class='object_link'><a href="../../../Humidifier.html" title="Humidifier (module)">Humidifier</a></span></span><span class='period'>.</span><span class='id identifier rubyid_fn'>fn</span><span class='period'>.</span><span class='id identifier rubyid_get_att'>get_att</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_attribute'>attribute</span><span class='rbracket'>]</span><span class='rparen'>)</span>
378
+ <span class='kw'>else</span>
379
+ <span class='const'><span class='object_link'><a href="../../../Humidifier.html" title="Humidifier (module)">Humidifier</a></span></span><span class='period'>.</span><span class='id identifier rubyid_ref'>ref</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
380
+ <span class='kw'>end</span>
381
+ <span class='kw'>end</span></pre>
382
+ </td>
383
+ </tr>
384
+ </table>
385
+ </div>
386
+
387
+ </div>
388
+
312
389
  </div>
313
390
 
314
391
  <div id="footer">
315
- Generated on Wed Nov 8 13:26:15 2017 by
392
+ Generated on Tue Dec 5 14:49:52 2017 by
316
393
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
317
- 0.9.9 (ruby-2.4.2).
394
+ 0.9.12 (ruby-2.4.2).
318
395
  </div>
319
396
 
320
397
  </div>
@@ -204,9 +204,9 @@
204
204
  </div>
205
205
 
206
206
  <div id="footer">
207
- Generated on Wed Nov 8 13:26:15 2017 by
207
+ Generated on Tue Dec 5 14:49:51 2017 by
208
208
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
209
- 0.9.9 (ruby-2.4.2).
209
+ 0.9.12 (ruby-2.4.2).
210
210
  </div>
211
211
 
212
212
  </div>
@@ -484,6 +484,13 @@ pre.code .rubyid_backref,
484
484
  pre.code .rubyid_nth_ref { color: #6D79DE; }
485
485
  pre.code .regexp, .dregexp { color: #036A07; }
486
486
  pre.code a { border-bottom: 1px dotted #bbf; }
487
+ /* inline code */
488
+ p > code {
489
+ padding: 1px 3px 1px 3px;
490
+ border: 1px solid #E1E1E8;
491
+ background: #F7F7F9;
492
+ border-radius: 4px;
493
+ }
487
494
 
488
495
  /* Color fix for links */
489
496
  #content .summary_desc pre.code .id > .object_link a, /* identifier */
@@ -83,9 +83,9 @@ DEALINGS IN THE SOFTWARE.</p>
83
83
  </div></div>
84
84
 
85
85
  <div id="footer">
86
- Generated on Wed Nov 8 13:26:15 2017 by
86
+ Generated on Tue Dec 5 14:49:51 2017 by
87
87
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
88
- 0.9.9 (ruby-2.4.2).
88
+ 0.9.12 (ruby-2.4.2).
89
89
  </div>
90
90
 
91
91
  </div>
@@ -91,11 +91,11 @@ advantage of the flexibility of <code>humidifier</code>.</p>
91
91
 
92
92
  <h2 id="label-Usage">Usage</h2>
93
93
 
94
- <h3 id="label-CLI">CLI</h3>
94
+ <h3 id="label-Getting+started">Getting started</h3>
95
95
 
96
96
  <p><code>Reservoir</code> is meant to be run as a CLI tool. First, build a
97
- ruby script that executes the <code>Humidifier::Reservoir::CLI</code>
98
- class, like so:</p>
97
+ ruby script (for example <code>bin/reservoir</code>) that executes the
98
+ <code>Humidifier::Reservoir::CLI</code> class, like so:</p>
99
99
 
100
100
  <pre class="code ruby"><code class="ruby"><span class='comment'>#!/usr/bin/env ruby
101
101
  </span><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>humidifier/reservoir</span><span class='tstring_end'>&#39;</span></span>
@@ -199,7 +199,7 @@ even though it is not native to CloudFormation. With this
199
199
  AdminUser:
200
200
  group: admin</code></pre>
201
201
 
202
- <h3 id="label-Deployment">Deployment</h3>
202
+ <h3 id="label-Using+the+CLI">Using the CLI</h3>
203
203
 
204
204
  <p>Now that you&#39;ve configured your CLI, your resources, and your mappers,
205
205
  you can use the CLI to display, validate, and deploy your infrastructure to
@@ -215,6 +215,36 @@ if you&#39;re deploying from an instance. For more information, see the <a
215
215
  href="http://docs.aws.amazon.com/sdkforruby/api/">AWS docs</a> under the
216
216
  “Configuration” section.</p>
217
217
 
218
+ <p>Below are the list of commands and some of their options.</p>
219
+
220
+ <h4 id="label-change+-5B-3Fstack-5D"><code>change [?stack]</code></h4>
221
+
222
+ <p>Creates a change set for either the specified stack or all stacks in the
223
+ repo. The change set represents the changes between what is currently
224
+ deployed versus the resources represented by the configuration.</p>
225
+
226
+ <h4 id="label-deploy+-5B-3Fstack-5D"><code>deploy [?stack]</code></h4>
227
+
228
+ <p>Creates or updates (depending on if the stack already exists) one or all
229
+ stacks in the repo.</p>
230
+
231
+ <h4 id="label-display+-5Bstack-5D+-5B-3Fpattern-5D"><code>display [stack] [?pattern]</code></h4>
232
+
233
+ <p>Displays the specified stack in JSON format on the command line. If you
234
+ optionally pass a pattern argument, it will filter the resources down to
235
+ just ones whose names match the given pattern.</p>
236
+
237
+ <h4 id="label-upload+-5B-3Fstack-5D"><code>upload [?stack]</code></h4>
238
+
239
+ <p>Upload one or all stacks in the repo to S3 for reference later. Note that
240
+ this must be combined with the <code>humidifier</code>
241
+ <code>s3_bucket</code> configuration option.</p>
242
+
243
+ <h4 id="label-validate+-5B-3Fstack-5D"><code>validate [?stack]</code></h4>
244
+
245
+ <p>Validate that one or all stacks in the repo are properly configured and
246
+ using values that CloudFormation understands.</p>
247
+
218
248
  <h4 id="label--prefix">–prefix</h4>
219
249
 
220
250
  <p>The <code>deploy</code> command also allows a <code>--prefix</code> command
@@ -360,9 +390,9 @@ href="http://opensource.org/licenses/MIT">MIT License</a>.</p>
360
390
  </div></div>
361
391
 
362
392
  <div id="footer">
363
- Generated on Wed Nov 8 13:26:15 2017 by
393
+ Generated on Tue Dec 5 14:49:51 2017 by
364
394
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
365
- 0.9.9 (ruby-2.4.2).
395
+ 0.9.12 (ruby-2.4.2).
366
396
  </div>
367
397
 
368
398
  </div>
@@ -91,11 +91,11 @@ advantage of the flexibility of <code>humidifier</code>.</p>
91
91
 
92
92
  <h2 id="label-Usage">Usage</h2>
93
93
 
94
- <h3 id="label-CLI">CLI</h3>
94
+ <h3 id="label-Getting+started">Getting started</h3>
95
95
 
96
96
  <p><code>Reservoir</code> is meant to be run as a CLI tool. First, build a
97
- ruby script that executes the <code>Humidifier::Reservoir::CLI</code>
98
- class, like so:</p>
97
+ ruby script (for example <code>bin/reservoir</code>) that executes the
98
+ <code>Humidifier::Reservoir::CLI</code> class, like so:</p>
99
99
 
100
100
  <pre class="code ruby"><code class="ruby"><span class='comment'>#!/usr/bin/env ruby
101
101
  </span><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>humidifier/reservoir</span><span class='tstring_end'>&#39;</span></span>
@@ -199,7 +199,7 @@ even though it is not native to CloudFormation. With this
199
199
  AdminUser:
200
200
  group: admin</code></pre>
201
201
 
202
- <h3 id="label-Deployment">Deployment</h3>
202
+ <h3 id="label-Using+the+CLI">Using the CLI</h3>
203
203
 
204
204
  <p>Now that you&#39;ve configured your CLI, your resources, and your mappers,
205
205
  you can use the CLI to display, validate, and deploy your infrastructure to
@@ -215,6 +215,36 @@ if you&#39;re deploying from an instance. For more information, see the <a
215
215
  href="http://docs.aws.amazon.com/sdkforruby/api/">AWS docs</a> under the
216
216
  “Configuration” section.</p>
217
217
 
218
+ <p>Below are the list of commands and some of their options.</p>
219
+
220
+ <h4 id="label-change+-5B-3Fstack-5D"><code>change [?stack]</code></h4>
221
+
222
+ <p>Creates a change set for either the specified stack or all stacks in the
223
+ repo. The change set represents the changes between what is currently
224
+ deployed versus the resources represented by the configuration.</p>
225
+
226
+ <h4 id="label-deploy+-5B-3Fstack-5D"><code>deploy [?stack]</code></h4>
227
+
228
+ <p>Creates or updates (depending on if the stack already exists) one or all
229
+ stacks in the repo.</p>
230
+
231
+ <h4 id="label-display+-5Bstack-5D+-5B-3Fpattern-5D"><code>display [stack] [?pattern]</code></h4>
232
+
233
+ <p>Displays the specified stack in JSON format on the command line. If you
234
+ optionally pass a pattern argument, it will filter the resources down to
235
+ just ones whose names match the given pattern.</p>
236
+
237
+ <h4 id="label-upload+-5B-3Fstack-5D"><code>upload [?stack]</code></h4>
238
+
239
+ <p>Upload one or all stacks in the repo to S3 for reference later. Note that
240
+ this must be combined with the <code>humidifier</code>
241
+ <code>s3_bucket</code> configuration option.</p>
242
+
243
+ <h4 id="label-validate+-5B-3Fstack-5D"><code>validate [?stack]</code></h4>
244
+
245
+ <p>Validate that one or all stacks in the repo are properly configured and
246
+ using values that CloudFormation understands.</p>
247
+
218
248
  <h4 id="label--prefix">–prefix</h4>
219
249
 
220
250
  <p>The <code>deploy</code> command also allows a <code>--prefix</code> command
@@ -360,9 +390,9 @@ href="http://opensource.org/licenses/MIT">MIT License</a>.</p>
360
390
  </div></div>
361
391
 
362
392
  <div id="footer">
363
- Generated on Wed Nov 8 13:26:15 2017 by
393
+ Generated on Tue Dec 5 14:49:51 2017 by
364
394
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
365
- 0.9.9 (ruby-2.4.2).
395
+ 0.9.12 (ruby-2.4.2).
366
396
  </div>
367
397
 
368
398
  </div>
@@ -166,24 +166,24 @@
166
166
 
167
167
  <li class="even ">
168
168
  <div class="item">
169
- <span class='object_link'><a href="Humidifier/Reservoir/Config.html#initialize-instance_method" title="Humidifier::Reservoir::Config#initialize (method)">#initialize</a></span>
170
- <small>Humidifier::Reservoir::Config</small>
169
+ <span class='object_link'><a href="Humidifier/Reservoir/Stack.html#initialize-instance_method" title="Humidifier::Reservoir::Stack#initialize (method)">#initialize</a></span>
170
+ <small>Humidifier::Reservoir::Stack</small>
171
171
  </div>
172
172
  </li>
173
173
 
174
174
 
175
175
  <li class="odd ">
176
176
  <div class="item">
177
- <span class='object_link'><a href="Humidifier/Reservoir/Stack.html#initialize-instance_method" title="Humidifier::Reservoir::Stack#initialize (method)">#initialize</a></span>
178
- <small>Humidifier::Reservoir::Stack</small>
177
+ <span class='object_link'><a href="Humidifier/Reservoir/Mapping.html#initialize-instance_method" title="Humidifier::Reservoir::Mapping#initialize (method)">#initialize</a></span>
178
+ <small>Humidifier::Reservoir::Mapping</small>
179
179
  </div>
180
180
  </li>
181
181
 
182
182
 
183
183
  <li class="even ">
184
184
  <div class="item">
185
- <span class='object_link'><a href="Humidifier/Reservoir/Mapping.html#initialize-instance_method" title="Humidifier::Reservoir::Mapping#initialize (method)">#initialize</a></span>
186
- <small>Humidifier::Reservoir::Mapping</small>
185
+ <span class='object_link'><a href="Humidifier/Reservoir/Config.html#initialize-instance_method" title="Humidifier::Reservoir::Config#initialize (method)">#initialize</a></span>
186
+ <small>Humidifier::Reservoir::Config</small>
187
187
  </div>
188
188
  </li>
189
189
 
@@ -262,16 +262,16 @@
262
262
 
263
263
  <li class="even ">
264
264
  <div class="item">
265
- <span class='object_link'><a href="Humidifier/Reservoir/BaseMapper.html#resource_for-instance_method" title="Humidifier::Reservoir::BaseMapper#resource_for (method)">#resource_for</a></span>
266
- <small>Humidifier::Reservoir::BaseMapper</small>
265
+ <span class='object_link'><a href="Humidifier/Reservoir/Mapping.html#resource_for-instance_method" title="Humidifier::Reservoir::Mapping#resource_for (method)">#resource_for</a></span>
266
+ <small>Humidifier::Reservoir::Mapping</small>
267
267
  </div>
268
268
  </li>
269
269
 
270
270
 
271
271
  <li class="odd ">
272
272
  <div class="item">
273
- <span class='object_link'><a href="Humidifier/Reservoir/Mapping.html#resource_for-instance_method" title="Humidifier::Reservoir::Mapping#resource_for (method)">#resource_for</a></span>
274
- <small>Humidifier::Reservoir::Mapping</small>
273
+ <span class='object_link'><a href="Humidifier/Reservoir/BaseMapper.html#resource_for-instance_method" title="Humidifier::Reservoir::BaseMapper#resource_for (method)">#resource_for</a></span>
274
+ <small>Humidifier::Reservoir::BaseMapper</small>
275
275
  </div>
276
276
  </li>
277
277
 
@@ -340,6 +340,22 @@
340
340
  </li>
341
341
 
342
342
 
343
+ <li class="even ">
344
+ <div class="item">
345
+ <span class='object_link'><a href="Humidifier/Reservoir/Stack.html#upload-instance_method" title="Humidifier::Reservoir::Stack#upload (method)">#upload</a></span>
346
+ <small>Humidifier::Reservoir::Stack</small>
347
+ </div>
348
+ </li>
349
+
350
+
351
+ <li class="odd ">
352
+ <div class="item">
353
+ <span class='object_link'><a href="Humidifier/Reservoir/CLI.html#upload-instance_method" title="Humidifier::Reservoir::CLI#upload (method)">#upload</a></span>
354
+ <small>Humidifier::Reservoir::CLI</small>
355
+ </div>
356
+ </li>
357
+
358
+
343
359
  <li class="even ">
344
360
  <div class="item">
345
361
  <span class='object_link'><a href="Humidifier/Reservoir/Stack.html#valid%3F-instance_method" title="Humidifier::Reservoir::Stack#valid? (method)">#valid?</a></span>
@@ -356,6 +372,14 @@
356
372
  </li>
357
373
 
358
374
 
375
+ <li class="even ">
376
+ <div class="item">
377
+ <span class='object_link'><a href="Humidifier/Reservoir/Stack/Export.html#value-instance_method" title="Humidifier::Reservoir::Stack::Export#value (method)">#value</a></span>
378
+ <small>Humidifier::Reservoir::Stack::Export</small>
379
+ </div>
380
+ </li>
381
+
382
+
359
383
 
360
384
  </ul>
361
385
  </div>
@@ -100,9 +100,9 @@
100
100
  </div>
101
101
 
102
102
  <div id="footer">
103
- Generated on Wed Nov 8 13:26:15 2017 by
103
+ Generated on Tue Dec 5 14:49:51 2017 by
104
104
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
105
- 0.9.9 (ruby-2.4.2).
105
+ 0.9.12 (ruby-2.4.2).
106
106
  </div>
107
107
 
108
108
  </div>
@@ -24,15 +24,15 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
24
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
25
  spec.require_paths = ['lib']
26
26
 
27
- spec.add_dependency 'aws-sdk-cloudformation', '~> 1.2'
28
- spec.add_dependency 'aws-sdk-s3', '~> 1.6'
29
- spec.add_dependency 'humidifier', '~> 1.9', '>= 1.7'
27
+ spec.add_dependency 'aws-sdk-cloudformation', '~> 1.3'
28
+ spec.add_dependency 'aws-sdk-s3', '~> 1.8'
29
+ spec.add_dependency 'humidifier', '~> 1.11'
30
30
  spec.add_dependency 'thor', '~> 0.20'
31
31
  spec.add_dependency 'thor-hollaback', '~> 0.1'
32
32
 
33
33
  spec.add_development_dependency 'bundler', '~> 1.16'
34
34
  spec.add_development_dependency 'minitest', '~> 5.10'
35
- spec.add_development_dependency 'rake', '~> 12.2'
35
+ spec.add_development_dependency 'rake', '~> 12.3'
36
36
  spec.add_development_dependency 'rubocop', '~> 0.51'
37
37
  spec.add_development_dependency 'simplecov', '~> 0.15'
38
38
  spec.add_development_dependency 'yard', '~> 0.9'
@@ -50,7 +50,8 @@ module Humidifier
50
50
  # Builds a humidifier resource using the given humidifier resource class,
51
51
  # the logical name for the resource, and the user-specified attributes.
52
52
  def resource_for(clazz, name, attributes)
53
- mapped = respond_to?(:attribute_defaults) ? attribute_defaults(name) : {}
53
+ mapped =
54
+ respond_to?(:attribute_defaults) ? attribute_defaults(name) : {}
54
55
 
55
56
  attributes.each do |key, value|
56
57
  mapped.merge!(mapped_from(clazz, key, value))
@@ -3,7 +3,8 @@ module Humidifier
3
3
  # A CLI for running commands to manipulate the stacks that Reservoir knows
4
4
  # about.
5
5
  class CLI < Thor
6
- class_option :aws_profile, desc: 'The AWS profile to authenticate with', aliases: ['-p']
6
+ class_option :aws_profile, desc: 'The AWS profile to authenticate with',
7
+ aliases: ['-p']
7
8
 
8
9
  class_option :debug, desc: 'Sets up debug mode', aliases: ['-d']
9
10
  class_around :safe_execute
@@ -21,7 +22,8 @@ module Humidifier
21
22
  end
22
23
 
23
24
  desc 'deploy [?stack]', 'Update one or all stacks'
24
- option :wait, desc: 'Wait for the stack to create/update', type: :boolean, default: false
25
+ option :wait, desc: 'Wait for the stack to create/update',
26
+ type: :boolean, default: false
25
27
  option :prefix, desc: 'The prefix to use for the stack'
26
28
  def deploy(name = nil)
27
29
  stack_names = stack_names_from(name)
@@ -34,24 +36,44 @@ module Humidifier
34
36
  end
35
37
  end
36
38
 
37
- desc 'display [stack] [?pattern]', 'Display the CloudFormation JSON for a given stack'
39
+ desc 'display [stack] [?pattern]',
40
+ 'Display the CloudFormation JSON for a given stack'
38
41
  def display(name, pattern = nil)
39
42
  puts Stack.new(name, pattern: pattern && /#{pattern}/i).to_cf
40
43
  end
41
44
 
42
- desc 'validate [?stack]', 'Validate that one or all stacks are valid with CloudFormation'
45
+ desc 'upload [?stack]', 'Upload one or all stacks to S3'
46
+ def upload(name = nil)
47
+ stack_names = stack_names_from(name)
48
+ authorize
49
+
50
+ stack_names.each do |stack_name|
51
+ stack = Stack.new(stack_name)
52
+ puts "Uploading #{stack.stack_name}"
53
+ stack.upload
54
+ end
55
+ end
56
+
57
+ desc 'validate [?stack]',
58
+ 'Validate that one or all stacks are valid with CloudFormation'
43
59
  def validate(name = nil)
44
60
  stack_names = stack_names_from(name)
45
61
  authorize
46
62
 
47
63
  print 'Validating... '
48
- puts 'Valid.' if stack_names.all? { |stack_name| Stack.new(stack_name).valid? }
64
+
65
+ if stack_names.all? { |stack_name| Stack.new(stack_name).valid? }
66
+ puts 'Valid.'
67
+ else
68
+ puts 'Invalid.'
69
+ end
49
70
  end
50
71
 
51
72
  no_commands do
52
73
  def authorize
53
74
  return unless options[:aws_profile]
54
- Aws.config[:credentials] = Aws::SharedCredentials.new(profile_name: options[:aws_profile])
75
+ Aws.config[:credentials] =
76
+ Aws::SharedCredentials.new(profile_name: options[:aws_profile])
55
77
  end
56
78
 
57
79
  def safe_execute
@@ -23,7 +23,9 @@ module Humidifier
23
23
  end
24
24
 
25
25
  def stack_path=(stack_path)
26
- raise Error, "Invalid filepath: #{stack_path}" unless File.exist?(stack_path)
26
+ unless File.exist?(stack_path)
27
+ raise Error, "Invalid filepath: #{stack_path}"
28
+ end
27
29
  @stack_path = stack_path
28
30
  end
29
31
 
@@ -39,7 +39,7 @@ module Humidifier
39
39
  valid?
40
40
 
41
41
  opts = { capabilities: %w[CAPABILITY_IAM CAPABILITY_NAMED_IAM] }
42
- wait ? humidifier_stack.deploy_and_wait(opts) : humidifier_stack.deploy(opts)
42
+ humidifier_stack.public_send(wait ? :deploy_and_wait : :deploy, opts)
43
43
  end
44
44
 
45
45
  def resources
@@ -56,20 +56,26 @@ module Humidifier
56
56
  humidifier_stack.to_cf
57
57
  end
58
58
 
59
+ def upload
60
+ humidifier_stack.upload
61
+ end
62
+
59
63
  def valid?
60
64
  humidifier_stack.valid?
61
65
  rescue Aws::CloudFormation::Errors::AccessDenied
62
- raise Error, <<-MSG
63
- The authenticated AWS profile does not have the requisite permissions to run
64
- this command. Ensure the profile has cloudformation:ValidateTemplate.
65
- MSG
66
+ raise Error, <<~MSG
67
+ The authenticated AWS profile does not have the requisite permissions
68
+ to run this command. Ensure the profile has
69
+ cloudformation:ValidateTemplate.
70
+ MSG
66
71
  end
67
72
 
68
73
  private
69
74
 
70
75
  def ensure_resources
71
76
  return true if humidifier_stack.resources.any?
72
- puts "Refusing to deploy stack #{humidifier_stack.name} with no resources"
77
+ puts "Refusing to deploy stack #{humidifier_stack.name} with no " \
78
+ 'resources'
73
79
  false
74
80
  end
75
81
 
@@ -1,6 +1,6 @@
1
1
  module Humidifier
2
2
  module Reservoir
3
3
  # The current version.
4
- VERSION = '0.2.2'.freeze
4
+ VERSION = '0.2.3'.freeze
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: humidifier-reservoir
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Localytics
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-10 00:00:00.000000000 Z
11
+ date: 2017-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-cloudformation
@@ -16,48 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.2'
19
+ version: '1.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.2'
26
+ version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: aws-sdk-s3
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.6'
33
+ version: '1.8'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.6'
40
+ version: '1.8'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: humidifier
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.9'
48
- - - ">="
49
- - !ruby/object:Gem::Version
50
- version: '1.7'
47
+ version: '1.11'
51
48
  type: :runtime
52
49
  prerelease: false
53
50
  version_requirements: !ruby/object:Gem::Requirement
54
51
  requirements:
55
52
  - - "~>"
56
53
  - !ruby/object:Gem::Version
57
- version: '1.9'
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: '1.7'
54
+ version: '1.11'
61
55
  - !ruby/object:Gem::Dependency
62
56
  name: thor
63
57
  requirement: !ruby/object:Gem::Requirement
@@ -120,14 +114,14 @@ dependencies:
120
114
  requirements:
121
115
  - - "~>"
122
116
  - !ruby/object:Gem::Version
123
- version: '12.2'
117
+ version: '12.3'
124
118
  type: :development
125
119
  prerelease: false
126
120
  version_requirements: !ruby/object:Gem::Requirement
127
121
  requirements:
128
122
  - - "~>"
129
123
  - !ruby/object:Gem::Version
130
- version: '12.2'
124
+ version: '12.3'
131
125
  - !ruby/object:Gem::Dependency
132
126
  name: rubocop
133
127
  requirement: !ruby/object:Gem::Requirement