cfndsl 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZGU3OGJlMTY0NDY1ZjJiMzFmYTUzMjdhOGI0NGZkYmE1MTNjZDBjZg==
4
+ YjM4NDk1YmQxYmM2MzhmMGZmOTAyZGVmY2Q0YjMzYjIxMmEzY2ZkMw==
5
5
  data.tar.gz: !binary |-
6
- NGExYTFhN2Y1MzVjY2M5NmU0NDhmOWRhYzYyZGY3ODJmMGJmMDdjNA==
6
+ NTFiYmIwYWY3MjZmYjA1ZmRkNGI0MjBjYjZhMGYxNzYzNzBhZDJiNA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDJhOGMyYTk2NmU5ZTU1Y2EwYTlkNTVkYjM5NTgxZDFiMTg2NTk2ZjkwODEw
10
- MDY3ZmE0MDBjZjhiODIzZTdlYjdlY2ZmNDRmYTY1MWExYzIyZDk0ZDg3ZTdi
11
- MzMxODYyZDkzYjliYjk1MzJlZjZjZjdkN2M1YzY1ZDUyNWM0MmQ=
9
+ ZTM2YmU1YWY5NWQ0NDhlMDUwMjhlYWQ2YTFmNjk1MmEzMmJkNzQ1NTVlZTY1
10
+ NzliZDU4ZjFmNTZiZmQ4NzUxNWM2MmQ0MWZlMDcxODllYTVjNjQ0M2FjNGEx
11
+ MWRiNGYyNzBjYzc2OWE5NTg0MjU4MzRkN2E1NGJmZDY0N2U4ZWQ=
12
12
  data.tar.gz: !binary |-
13
- NzQ4NzQ5NTJmMmM2YzA5NzllMDMyMjE5ODQyNTJmNmMxNWJkZDBmZDQxOGUw
14
- ZTc3Y2ZhODQ2Y2Y4NTU1MTY0NzM4MjdmZTQ2NGIzMDhhZjQwZTkwOTAxMGJl
15
- M2MyM2I4YjAxMzc3M2IzNzgyZWRlYjc3OGRhNTA1YjVhNmE1YjE=
13
+ YjU2OTZkYjJjMDk3NDgzYzBhMjIwN2QyNjVkOTNjOTZkNTQzZDg3Zjc1ZGFl
14
+ ZTUzN2M2OGE2N2M3N2MxMzQxNzdmMjQxZDU1M2FmNTUzYmI5OTc3NWJmNDYz
15
+ NDdmODYzNGE0N2FmYTlhZGE5YjA3MTQ3MmIxNmI1YTM0OTZhNjM=
@@ -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 = nil)
13
+ add_tag(name, value, propagate)
16
14
  end
17
15
 
18
16
  def add_tag(name, value, propagate = nil)
@@ -1,3 +1,3 @@
1
1
  module CfnDsl
2
- VERSION = '0.8.2'.freeze
2
+ VERSION = '0.8.3'.freeze
3
3
  end
@@ -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.2
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