convection 1.0.7 → 1.1.0

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: be6c1a790e3d66d1a1a1907e2543e339a5f39227
4
- data.tar.gz: b21f7e968d922e636e1bbd780d4e1080de55e7f1
3
+ metadata.gz: e2fbb9d3617f0fdc56557348bff6af6e9fea02d5
4
+ data.tar.gz: 72b2294473548ecf3dca76447cc1d3856ba10562
5
5
  SHA512:
6
- metadata.gz: 1026937d7b8a85c2396e6b741ce25db204a17be364a3250e8a7af982aac83496c768f30be8616f4c2406d3aa5223350f2d27ac312c8b0d6e933df71d9ee592c7
7
- data.tar.gz: 6a71da2ecd5bdbc36072ea60adad59cfbb48f43c58f72cd3159146735dd7dcf3b6ded426cafcdf72cb23b427cee153660e60787e779b6c467004a7c6c2be4197
6
+ metadata.gz: a04248baa397f71147b9ad7f3f1988c7187948eddce4719d6653b8f35e15bb25905fd5e432db4a6816d0869da7170b0e044122266e519c645d600cdfcb1b6c17
7
+ data.tar.gz: 2abc3d4166c8b06c27bab845ff8116c6826c5e395546f169d6b83a7af3eeb4873274bacf9d95810300a0a200f1158afd59605e9d4e283e1fb365c77bcf1614b5
@@ -423,7 +423,7 @@ do this with a security group.
423
423
  Convection provides an `ec2_security_group` method for creating security groups.
424
424
  The [AWS::EC2::SecurityGroup][cf-security-group] resource requires a description
425
425
  and a reference to our VPC. We can add the `ec2_security_group` method to our
426
- Cloudfile with a `description` and `vpc` attribute to create a default security
426
+ vpc template with a `description` and `vpc` attribute to create a default security
427
427
  group for our NAT router.
428
428
 
429
429
  Add the below block to your vpc.rb template
@@ -100,7 +100,7 @@ module Convection
100
100
  next
101
101
  end
102
102
 
103
- block.call(Model::Event.new(:deleted, "Delete remote stack #{ stack.cloud_name }", :info)) if block
103
+ block.call(Model::Event.new(:delete, "Delete remote stack #{ stack.cloud_name }", :info)) if block
104
104
  stack.delete(&block)
105
105
 
106
106
  if stack.error?
@@ -41,10 +41,12 @@ module Convection
41
41
  end
42
42
 
43
43
  def document
44
- {
44
+ doc = {
45
45
  'Version' => version,
46
46
  'Statement' => statement.map(&:render)
47
47
  }
48
+ doc['Id'] = id if id
49
+ doc
48
50
  end
49
51
 
50
52
  def render(parent = {})
@@ -16,7 +16,7 @@ module Convection
16
16
  def ebs(&block)
17
17
  ebs = ResourceProperty::EC2BlockStoreBlockDevice.new(self)
18
18
  ebs.instance_exec(&block) if block
19
- properties['Ebs'].set(config)
19
+ properties['Ebs'].set(ebs)
20
20
  end
21
21
  end
22
22
  end
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ module Convection::Model::Mixin
4
+ describe Policy do
5
+ let(:template) { double(:template) }
6
+ subject { described_class.new(name: 'test-policy', template: template) }
7
+
8
+ it 'does not set Id on #document if absent' do
9
+ expect(subject.document['Id']).to be_nil
10
+ end
11
+
12
+ it 'sets Id on #document if provided' do
13
+ subject.id('MyDocumentId')
14
+ expect(subject.document['Id']).to eq('MyDocumentId')
15
+ end
16
+ end
17
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: convection
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Manero
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-15 00:00:00.000000000 Z
11
+ date: 2017-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -293,6 +293,7 @@ files:
293
293
  - spec/convection/model/template/resource/lambdas_spec.rb
294
294
  - spec/convection/model/template/resource/loggroups_spec.rb
295
295
  - spec/convection/model/template/resource/permission_spec.rb
296
+ - spec/convection/model/template/resource/policy_document_spec.rb
296
297
  - spec/convection/model/template/resource/rds_security_groups_spec.rb
297
298
  - spec/convection/model/template/resource/vpc_endpoints_spec.rb
298
299
  - spec/convection/model/template/resource_attribute/update_policies_spec.rb
@@ -362,6 +363,7 @@ test_files:
362
363
  - spec/convection/model/template/resource/lambdas_spec.rb
363
364
  - spec/convection/model/template/resource/loggroups_spec.rb
364
365
  - spec/convection/model/template/resource/permission_spec.rb
366
+ - spec/convection/model/template/resource/policy_document_spec.rb
365
367
  - spec/convection/model/template/resource/rds_security_groups_spec.rb
366
368
  - spec/convection/model/template/resource/vpc_endpoints_spec.rb
367
369
  - spec/convection/model/template/resource_attribute/update_policies_spec.rb