cfndsl 0.8.2 → 0.8.3
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.
- checksums.yaml +8 -8
- data/lib/cfndsl/resources.rb +1 -3
- data/lib/cfndsl/version.rb +1 -1
- data/spec/resources_spec.rb +24 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjM4NDk1YmQxYmM2MzhmMGZmOTAyZGVmY2Q0YjMzYjIxMmEzY2ZkMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTFiYmIwYWY3MjZmYjA1ZmRkNGI0MjBjYjZhMGYxNzYzNzBhZDJiNA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTM2YmU1YWY5NWQ0NDhlMDUwMjhlYWQ2YTFmNjk1MmEzMmJkNzQ1NTVlZTY1
|
10
|
+
NzliZDU4ZjFmNTZiZmQ4NzUxNWM2MmQ0MWZlMDcxODllYTVjNjQ0M2FjNGEx
|
11
|
+
MWRiNGYyNzBjYzc2OWE5NTg0MjU4MzRkN2E1NGJmZDY0N2U4ZWQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjU2OTZkYjJjMDk3NDgzYzBhMjIwN2QyNjVkOTNjOTZkNTQzZDg3Zjc1ZGFl
|
14
|
+
ZTUzN2M2OGE2N2M3N2MxMzQxNzdmMjQxZDU1M2FmNTUzYmI5OTc3NWJmNDYz
|
15
|
+
NDdmODYzNGE0N2FmYTlhZGE5YjA3MTQ3MmIxNmI1YTM0OTZhNjM=
|
data/lib/cfndsl/resources.rb
CHANGED
@@ -9,10 +9,8 @@ module CfnDsl
|
|
9
9
|
dsl_attr_setter :Type, :DependsOn, :DeletionPolicy, :Condition
|
10
10
|
dsl_content_object :Property, :Metadata, :UpdatePolicy, :CreationPolicy
|
11
11
|
|
12
|
-
# rubocop:disable UnusedMethodArgument
|
13
|
-
# rubocop:disable UselessAssignment
|
14
12
|
def addTag(name, value, propagate = nil)
|
15
|
-
add_tag(name, value, propagate
|
13
|
+
add_tag(name, value, propagate)
|
16
14
|
end
|
17
15
|
|
18
16
|
def add_tag(name, value, propagate = nil)
|
data/lib/cfndsl/version.rb
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe CfnDsl::ResourceDefinition do
|
4
|
+
subject { CfnDsl::CloudFormationTemplate.new.AutoScalingGroup(:web_servers) }
|
5
|
+
|
6
|
+
context '#addTag' do
|
7
|
+
it 'is a pass-through method to add_tag' do
|
8
|
+
expect(subject).to receive(:add_tag).with('role', 'web-server', true)
|
9
|
+
subject.addTag('role', 'web-server', true)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
context '#add_tag' do
|
14
|
+
it 'adds a Tag for the resource' do
|
15
|
+
subject.add_tag('role', 'web-server', true)
|
16
|
+
tags = subject.Property(:Tags).value
|
17
|
+
expect(tags).to be_an(Array)
|
18
|
+
tag = tags.pop
|
19
|
+
expect(tag.instance_variable_get('@Key')).to eq('role')
|
20
|
+
expect(tag.instance_variable_get('@Value')).to eq('web-server')
|
21
|
+
expect(tag.instance_variable_get('@PropagateAtLaunch')).to eq(true)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfndsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Jack
|
@@ -91,6 +91,7 @@ files:
|
|
91
91
|
- spec/external_parameters_spec.rb
|
92
92
|
- spec/fixtures/heattest.rb
|
93
93
|
- spec/fixtures/test.rb
|
94
|
+
- spec/resources_spec.rb
|
94
95
|
- spec/spec_helper.rb
|
95
96
|
homepage: https://github.com/stevenjack/cfndsl
|
96
97
|
licenses:
|
@@ -123,4 +124,5 @@ test_files:
|
|
123
124
|
- spec/external_parameters_spec.rb
|
124
125
|
- spec/fixtures/heattest.rb
|
125
126
|
- spec/fixtures/test.rb
|
127
|
+
- spec/resources_spec.rb
|
126
128
|
- spec/spec_helper.rb
|