humidifier-reservoir 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -3
- data/README.md +94 -0
- data/docs/Humidifier.html +2 -2
- data/docs/Humidifier/Reservoir.html +3 -3
- data/docs/Humidifier/Reservoir/BaseMapper.html +61 -23
- data/docs/Humidifier/Reservoir/CLI.html +89 -23
- data/docs/Humidifier/Reservoir/Config.html +6 -6
- data/docs/Humidifier/Reservoir/Error.html +2 -2
- data/docs/Humidifier/Reservoir/Mapping.html +20 -12
- data/docs/Humidifier/Reservoir/Stack.html +272 -60
- data/docs/Humidifier/Reservoir/Stack/Export.html +322 -0
- data/docs/_index.html +9 -2
- data/docs/class_list.html +1 -1
- data/docs/file.LICENSE.html +2 -2
- data/docs/file.README.html +121 -2
- data/docs/index.html +121 -2
- data/docs/method_list.html +52 -4
- data/docs/top-level-namespace.html +2 -2
- data/humidifier-reservoir.gemspec +1 -3
- data/lib/humidifier/reservoir/base_mapper.rb +26 -3
- data/lib/humidifier/reservoir/cli.rb +21 -4
- data/lib/humidifier/reservoir/config.rb +2 -2
- data/lib/humidifier/reservoir/mapping.rb +23 -3
- data/lib/humidifier/reservoir/stack.rb +49 -8
- data/lib/humidifier/reservoir/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea83f857a6387b910a95b9c53538c4ff6851ae41
|
4
|
+
data.tar.gz: d1b405d712ae121e8971c32723d710c19d335f60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c02c9fe112c7c92f9d8347a33a5d215cdc2e27c12285794c5f39db74091632de4d6132c7f8436131717ad7cb484f3c2efae720ba8d88de183d03bd434cbea0b
|
7
|
+
data.tar.gz: f2271e19b9b510850d9df2ddbc7ff7c064fe0e9048c686339bef439bd3491c09b79bcf2b527608ef02fd585aba8370e98f2acde715668dced2919a61d5e8b3e4
|
data/.rubocop.yml
CHANGED
data/README.md
CHANGED
@@ -113,6 +113,100 @@ Now that you've configured your CLI, your resources, and your mappers, you can u
|
|
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
|
+
#### --prefix
|
117
|
+
|
118
|
+
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.
|
119
|
+
|
120
|
+
### Shortcuts
|
121
|
+
|
122
|
+
A couple of convenient shortcuts are built into `humidifier-reservoir` so that writing templates and mappers both can be more concise.
|
123
|
+
|
124
|
+
#### Automatic id properties
|
125
|
+
|
126
|
+
There are a lot of properties in the AWS CloudFormation resource specification that are simply pointers to other entities within the AWS ecosystem. For example, an `AWS::EC2::VPCGatewayAttachment` entity has a `VpcId` property that represents the ID of the associated `AWS::EC2::VPC`.
|
127
|
+
|
128
|
+
Because this pattern is so common, `humidifier-reservoir` detects all properties ending in `Id` and allows you to specify them without the suffix. If you choose to use this format, `humidifier-reservoir` will automatically turn that value into a [CloudFormation resource reference](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html).
|
129
|
+
|
130
|
+
#### Anonymous mappers
|
131
|
+
|
132
|
+
A lot of the time, mappers that you create will not be overly complicated, especially if you're using the aforementioned automatic id properties. Therefore, the `config.map` method takes a block, and allows you to specify the mapper inline. This is recommended for mappers that aren't too complicates as to warrant their own class (for instance, for testing purposes). An example of this using the `UserMapper` from above is below:
|
133
|
+
|
134
|
+
```ruby
|
135
|
+
Humidifier::Reservoir.configure do |config|
|
136
|
+
config.map :users, to: 'AWS::IAM::User' do
|
137
|
+
GROUPS = {
|
138
|
+
'eng' => %w[Engineering Testing Deployment],
|
139
|
+
'admin' => %w[Management Administration]
|
140
|
+
}
|
141
|
+
|
142
|
+
defaults do |logical_name|
|
143
|
+
{ path: '/reservoir/', user_name: logical_name }
|
144
|
+
end
|
145
|
+
|
146
|
+
attribute :group do |group|
|
147
|
+
groups = GROUPS[group]
|
148
|
+
groups.any? ? { groups: GROUPS[group] } : {}
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
```
|
153
|
+
|
154
|
+
#### Cross-stack references
|
155
|
+
|
156
|
+
AWS allows cross-stack references through the [intrinsic `Fn::ImportValue` function](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-importvalue.html). You can take advantage of this with `humidifier-reservoir` by using the `export: true` option on resources in your stacks. For instance, if in one stack you have a subnet that you need to reference in another, you could (`stacks/vpc/subnets.yml`):
|
157
|
+
|
158
|
+
```yaml
|
159
|
+
ProductionPrivateSubnet2a:
|
160
|
+
vpc: ProductionVPC
|
161
|
+
cidr_block: 10.0.0.0/19
|
162
|
+
availability_zone: us-west-2a
|
163
|
+
export: true
|
164
|
+
|
165
|
+
ProductionPrivateSubnet2b:
|
166
|
+
vpc: ProductionVPC
|
167
|
+
cidr_block: 10.0.64.0/19
|
168
|
+
availability_zone: us-west-2b
|
169
|
+
export: true
|
170
|
+
|
171
|
+
ProductionPrivateSubnet2c:
|
172
|
+
vpc: ProductionVPC
|
173
|
+
cidr_block: 10.0.128.0/19
|
174
|
+
availability_zone: us-west-2c
|
175
|
+
export: true
|
176
|
+
```
|
177
|
+
|
178
|
+
And then in another stack, you could reference those values (`stacks/rds/db_subnets_groups.yml`):
|
179
|
+
|
180
|
+
```yaml
|
181
|
+
ProductionDBSubnetGroup:
|
182
|
+
db_subnet_group_description: Production DB private subnet group
|
183
|
+
subnets:
|
184
|
+
- ProductionPrivateSubnet2a
|
185
|
+
- ProductionPrivateSubnet2b
|
186
|
+
- ProductionPrivateSubnet2c
|
187
|
+
```
|
188
|
+
|
189
|
+
Within the configuration, you would specify to use the `Fn::ImportValue` function like so:
|
190
|
+
|
191
|
+
```ruby
|
192
|
+
Humidifier::Reservoir.configure do |config|
|
193
|
+
config.stack_path = 'stacks'
|
194
|
+
|
195
|
+
config.map :subnets, to: 'EC2::Subnet'
|
196
|
+
|
197
|
+
config.map :db_subnet_groups, to: 'RDS::DBSubnetGroup' do
|
198
|
+
attribute :subnets do |subnet_names|
|
199
|
+
subnet_ids =
|
200
|
+
subnet_names.map do |subnet_name|
|
201
|
+
Humidifier.fn.import_value(subnet_name)
|
202
|
+
end
|
203
|
+
|
204
|
+
{ subnet_ids: subnet_ids }
|
205
|
+
end
|
206
|
+
end
|
207
|
+
end
|
208
|
+
```
|
209
|
+
|
116
210
|
## Development
|
117
211
|
|
118
212
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/docs/Humidifier.html
CHANGED
@@ -107,9 +107,9 @@
|
|
107
107
|
</div>
|
108
108
|
|
109
109
|
<div id="footer">
|
110
|
-
Generated on
|
110
|
+
Generated on Wed Nov 8 13:26:15 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.
|
112
|
+
0.9.9 (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'>'</span><span class='tstring_content'>0.
|
127
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.2.0</span><span class='tstring_end'>'</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
|
493
|
+
Generated on Wed Nov 8 13:26:15 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.
|
495
|
+
0.9.9 (ruby-2.4.2).
|
496
496
|
</div>
|
497
497
|
|
498
498
|
</div>
|
@@ -115,6 +115,28 @@ specifying custom attributes.</p>
|
|
115
115
|
|
116
116
|
|
117
117
|
</div>
|
118
|
+
<h2>Constant Summary</h2>
|
119
|
+
<dl class="constants">
|
120
|
+
|
121
|
+
<dt id="COMMON_ATTRIBUTES-constant" class="">COMMON_ATTRIBUTES =
|
122
|
+
<div class="docstring">
|
123
|
+
<div class="discussion">
|
124
|
+
|
125
|
+
<p>The list of attributes that are common to all resources that need to be
|
126
|
+
handles separately.</p>
|
127
|
+
|
128
|
+
|
129
|
+
</div>
|
130
|
+
</div>
|
131
|
+
<div class="tags">
|
132
|
+
|
133
|
+
|
134
|
+
</div>
|
135
|
+
</dt>
|
136
|
+
<dd><pre class="code"><span class='const'>Resource</span><span class='op'>::</span><span class='const'>COMMON_ATTRIBUTES</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span></pre></dd>
|
137
|
+
|
138
|
+
</dl>
|
139
|
+
|
118
140
|
|
119
141
|
|
120
142
|
|
@@ -281,13 +303,13 @@ to the groups attribute after some transformation.</p>
|
|
281
303
|
<pre class="lines">
|
282
304
|
|
283
305
|
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
306
|
+
25
|
307
|
+
26
|
308
|
+
27
|
309
|
+
28</pre>
|
288
310
|
</td>
|
289
311
|
<td>
|
290
|
-
<pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/base_mapper.rb', line
|
312
|
+
<pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/base_mapper.rb', line 25</span>
|
291
313
|
|
292
314
|
<span class='kw'>def</span> <span class='id identifier rubyid_attribute'>attribute</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
293
315
|
<span class='id identifier rubyid_define_method'>define_method</span><span class='lparen'>(</span><span class='symbol'>:attribute_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
@@ -324,12 +346,12 @@ to the groups attribute after some transformation.</p>
|
|
324
346
|
<pre class="lines">
|
325
347
|
|
326
348
|
|
327
|
-
|
328
|
-
|
329
|
-
|
349
|
+
31
|
350
|
+
32
|
351
|
+
33</pre>
|
330
352
|
</td>
|
331
353
|
<td>
|
332
|
-
<pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/base_mapper.rb', line
|
354
|
+
<pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/base_mapper.rb', line 31</span>
|
333
355
|
|
334
356
|
<span class='kw'>def</span> <span class='id identifier rubyid_attribute_methods'>attribute_methods</span>
|
335
357
|
<span class='ivar'>@attribute_methods</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
@@ -375,12 +397,12 @@ based on the logical name.</p>
|
|
375
397
|
<pre class="lines">
|
376
398
|
|
377
399
|
|
378
|
-
|
379
|
-
|
380
|
-
|
400
|
+
45
|
401
|
+
46
|
402
|
+
47</pre>
|
381
403
|
</td>
|
382
404
|
<td>
|
383
|
-
<pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/base_mapper.rb', line
|
405
|
+
<pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/base_mapper.rb', line 45</span>
|
384
406
|
|
385
407
|
<span class='kw'>def</span> <span class='id identifier rubyid_defaults'>defaults</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
386
408
|
<span class='id identifier rubyid_define_method'>define_method</span><span class='lparen'>(</span><span class='symbol'>:attribute_defaults</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
@@ -423,19 +445,35 @@ logical name for the resource, and the user-specified attributes.</p>
|
|
423
445
|
<pre class="lines">
|
424
446
|
|
425
447
|
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
448
|
+
52
|
449
|
+
53
|
450
|
+
54
|
451
|
+
55
|
452
|
+
56
|
453
|
+
57
|
454
|
+
58
|
455
|
+
59
|
456
|
+
60
|
457
|
+
61
|
458
|
+
62
|
459
|
+
63
|
460
|
+
64</pre>
|
431
461
|
</td>
|
432
462
|
<td>
|
433
|
-
<pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/base_mapper.rb', line
|
463
|
+
<pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/base_mapper.rb', line 52</span>
|
434
464
|
|
435
465
|
<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>
|
436
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>
|
437
|
-
|
438
|
-
<span class='id identifier
|
467
|
+
|
468
|
+
<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
|
+
<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>
|
470
|
+
<span class='kw'>end</span>
|
471
|
+
|
472
|
+
<span class='id identifier rubyid_common_attributes'>common_attributes</span> <span class='op'>=</span> <span class='id identifier rubyid_common_attributes_from'>common_attributes_from</span><span class='lparen'>(</span><span class='id identifier rubyid_mapped'>mapped</span><span class='rparen'>)</span>
|
473
|
+
|
474
|
+
<span class='id identifier rubyid_resource'>resource</span> <span class='op'>=</span> <span class='id identifier rubyid_clazz'>clazz</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_mapped'>mapped</span><span class='rparen'>)</span>
|
475
|
+
<span class='id identifier rubyid_resource'>resource</span><span class='period'>.</span><span class='id identifier rubyid_update_attributes'>update_attributes</span><span class='lparen'>(</span><span class='id identifier rubyid_common_attributes'>common_attributes</span><span class='rparen'>)</span>
|
476
|
+
<span class='id identifier rubyid_resource'>resource</span>
|
439
477
|
<span class='kw'>end</span></pre>
|
440
478
|
</td>
|
441
479
|
</tr>
|
@@ -447,9 +485,9 @@ logical name for the resource, and the user-specified attributes.</p>
|
|
447
485
|
</div>
|
448
486
|
|
449
487
|
<div id="footer">
|
450
|
-
Generated on
|
488
|
+
Generated on Wed Nov 8 13:26:16 2017 by
|
451
489
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
452
|
-
0.9.9 (ruby-2.4.
|
490
|
+
0.9.9 (ruby-2.4.2).
|
453
491
|
</div>
|
454
492
|
|
455
493
|
</div>
|
@@ -131,6 +131,28 @@ about.</p>
|
|
131
131
|
<li class="public ">
|
132
132
|
<span class="summary_signature">
|
133
133
|
|
134
|
+
<a href="#change-instance_method" title="#change (instance method)">#<strong>change</strong>(name = nil) ⇒ Object </a>
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
</span>
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
149
|
+
|
150
|
+
</li>
|
151
|
+
|
152
|
+
|
153
|
+
<li class="public ">
|
154
|
+
<span class="summary_signature">
|
155
|
+
|
134
156
|
<a href="#deploy-instance_method" title="#deploy (instance method)">#<strong>deploy</strong>(name = nil) ⇒ Object </a>
|
135
157
|
|
136
158
|
|
@@ -205,9 +227,9 @@ about.</p>
|
|
205
227
|
|
206
228
|
|
207
229
|
<div class="method_details first">
|
208
|
-
<h3 class="signature first" id="
|
230
|
+
<h3 class="signature first" id="change-instance_method">
|
209
231
|
|
210
|
-
#<strong>
|
232
|
+
#<strong>change</strong>(name = nil) ⇒ <tt>Object</tt>
|
211
233
|
|
212
234
|
|
213
235
|
|
@@ -219,6 +241,7 @@ about.</p>
|
|
219
241
|
<pre class="lines">
|
220
242
|
|
221
243
|
|
244
|
+
12
|
222
245
|
13
|
223
246
|
14
|
224
247
|
15
|
@@ -227,18 +250,61 @@ about.</p>
|
|
227
250
|
18
|
228
251
|
19
|
229
252
|
20
|
230
|
-
21
|
231
|
-
22</pre>
|
253
|
+
21</pre>
|
232
254
|
</td>
|
233
255
|
<td>
|
234
|
-
<pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/cli.rb', line
|
256
|
+
<pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/cli.rb', line 12</span>
|
235
257
|
|
236
|
-
<span class='kw'>def</span> <span class='id identifier
|
237
|
-
<span class='id identifier rubyid_stack_names'>stack_names</span> <span class='op'>=</span> <span class='id identifier
|
258
|
+
<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
|
+
<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>
|
238
260
|
<span class='id identifier rubyid_authorize'>authorize</span>
|
239
261
|
|
240
262
|
<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>
|
241
263
|
<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>
|
264
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Creating a changeset for </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'>"</span></span>
|
265
|
+
<span class='id identifier rubyid_stack'>stack</span><span class='period'>.</span><span class='id identifier rubyid_create_change_set'>create_change_set</span>
|
266
|
+
<span class='kw'>end</span>
|
267
|
+
<span class='kw'>end</span></pre>
|
268
|
+
</td>
|
269
|
+
</tr>
|
270
|
+
</table>
|
271
|
+
</div>
|
272
|
+
|
273
|
+
<div class="method_details ">
|
274
|
+
<h3 class="signature " id="deploy-instance_method">
|
275
|
+
|
276
|
+
#<strong>deploy</strong>(name = nil) ⇒ <tt>Object</tt>
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
</h3><table class="source_code">
|
283
|
+
<tr>
|
284
|
+
<td>
|
285
|
+
<pre class="lines">
|
286
|
+
|
287
|
+
|
288
|
+
26
|
289
|
+
27
|
290
|
+
28
|
291
|
+
29
|
292
|
+
30
|
293
|
+
31
|
294
|
+
32
|
295
|
+
33
|
296
|
+
34
|
297
|
+
35</pre>
|
298
|
+
</td>
|
299
|
+
<td>
|
300
|
+
<pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/cli.rb', line 26</span>
|
301
|
+
|
302
|
+
<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
|
+
<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>
|
304
|
+
<span class='id identifier rubyid_authorize'>authorize</span>
|
305
|
+
|
306
|
+
<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>
|
307
|
+
<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='comma'>,</span> <span class='label'>prefix:</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:prefix</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
242
308
|
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Deploying </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'>"</span></span>
|
243
309
|
<span class='id identifier rubyid_stack'>stack</span><span class='period'>.</span><span class='id identifier rubyid_deploy'>deploy</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:wait</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
244
310
|
<span class='kw'>end</span>
|
@@ -263,15 +329,15 @@ about.</p>
|
|
263
329
|
<pre class="lines">
|
264
330
|
|
265
331
|
|
266
|
-
|
267
|
-
|
268
|
-
|
332
|
+
38
|
333
|
+
39
|
334
|
+
40</pre>
|
269
335
|
</td>
|
270
336
|
<td>
|
271
|
-
<pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/cli.rb', line
|
337
|
+
<pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/cli.rb', line 38</span>
|
272
338
|
|
273
339
|
<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>
|
274
|
-
<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='id identifier rubyid_pattern'>pattern</span> <span class='op'>&&</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>
|
340
|
+
<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'>&&</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>
|
275
341
|
<span class='kw'>end</span></pre>
|
276
342
|
</td>
|
277
343
|
</tr>
|
@@ -293,19 +359,19 @@ about.</p>
|
|
293
359
|
<pre class="lines">
|
294
360
|
|
295
361
|
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
362
|
+
43
|
363
|
+
44
|
364
|
+
45
|
365
|
+
46
|
366
|
+
47
|
367
|
+
48
|
368
|
+
49</pre>
|
303
369
|
</td>
|
304
370
|
<td>
|
305
|
-
<pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/cli.rb', line
|
371
|
+
<pre class="code"><span class="info file"># File 'lib/humidifier/reservoir/cli.rb', line 43</span>
|
306
372
|
|
307
373
|
<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>
|
308
|
-
<span class='id identifier rubyid_stack_names'>stack_names</span> <span class='op'>=</span> <span class='id identifier
|
374
|
+
<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>
|
309
375
|
<span class='id identifier rubyid_authorize'>authorize</span>
|
310
376
|
|
311
377
|
<span class='id identifier rubyid_print'>print</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Validating... </span><span class='tstring_end'>'</span></span>
|
@@ -321,9 +387,9 @@ about.</p>
|
|
321
387
|
</div>
|
322
388
|
|
323
389
|
<div id="footer">
|
324
|
-
Generated on
|
390
|
+
Generated on Wed Nov 8 13:26:15 2017 by
|
325
391
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
326
|
-
0.9.9 (ruby-2.4.
|
392
|
+
0.9.9 (ruby-2.4.2).
|
327
393
|
</div>
|
328
394
|
|
329
395
|
</div>
|