cfndsl 0.9.1 → 0.9.2

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
- OTA3MDgzMTQ5MzNmYmJkNGE5ZDFiYzljY2IzOTRjMzg2MWU0OWFiYw==
4
+ MjkwNTFiYmFiYzFjODRlODlkYzJkMjdiNjgyNDk5NWEzZmI1NDQ4Ng==
5
5
  data.tar.gz: !binary |-
6
- ZmE3MTViZGJhYWYzOWJkMmM3MmEyZjFlZTkwNTFiYjFiZDBiZDVhMw==
6
+ NmU4YzQzNWM3YzdjNTAxN2MyMjE3MmNiYmMwZGJiNWU4MjkzYzZlMg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjBkOWQwYWY0MmNjMmRkMWU1ZDJjMTdiMzk3YmQyMTUwMDRhNmQ1ZGY3Y2Yy
10
- NGU5ODQxNDk5Mjk2MzIwZGVkODE2ZmE3OTQ4OGI0ZWJjZjFhODhjNjNhYzIy
11
- MzE1NTJjNjA2YjZlMjdlNDFjMTQ1ODA1ZGJiNjY5ZjYwZjM3NTI=
9
+ NzQ5NzYyZTBiNDU4ZTM0Nzg3MTA1ZDZkNWE5OTVjNWQ1YTUxNjQ0MzRkNWVi
10
+ Zjc3ODM4ZGEzZjU1MDMyMjFjNDdkMDNhZWY5MWU3MzczMmZhNWMxMWRmN2Ni
11
+ NjQ5NjViNjZmZTVlZDVkOWViMjcyZjM4OTE4Y2Q3OGZiZTBkMGU=
12
12
  data.tar.gz: !binary |-
13
- MjdhZDE3ODc3MTYyZjc2NDRjNjNkNzkxZmQ1ODM3NGNhOTY3ZjcyYjAzMWJl
14
- ZjdiOTRmNGRkYmJiN2I3Njk5MzU3ZTU5MTZmZDMzN2IwMGQ1ODdjYWFiMGYw
15
- MmUzNjc1ZGJhODdkZWYyZDc5ZDEzMThkMTM0OTdjNzg2MjM4Mzg=
13
+ YzAxYTM5MWM3MTRiZDExZDY0ZGQxNTNlM2MxNGNkNWZlNjMzMWJlZDEzYWNk
14
+ Y2Y4ZmMxZThlZGQ3ZDlhYTg4ZmU4YjlhYzNjZmYyNjg3NDc2NmRjYTA4NDA2
15
+ NmYxYzQ4OTdhNTYxOThiMDlhM2UzZDc0YTE1NTE4YWQ4NjZkOWE=
@@ -143,6 +143,7 @@ module CfnDsl
143
143
  end
144
144
  parts = name.split('::')
145
145
  until parts.empty?
146
+ break if parts[0] == 'Resource'
146
147
  abreve_name = parts.join('_')
147
148
  if names.key?(abreve_name)
148
149
  # this only happens if there is an ambiguity
@@ -1,3 +1,3 @@
1
1
  module CfnDsl
2
- VERSION = '0.9.1'.freeze
2
+ VERSION = '0.9.2'.freeze
3
3
  end
@@ -1,8 +1,21 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe CfnDsl::ResourceDefinition do
4
- subject { CfnDsl::CloudFormationTemplate.new.AutoScalingGroup(:web_servers) }
4
+ subject { CfnDsl::CloudFormationTemplate.new.EC2_Instance(:single_server) }
5
+ context '#all_refs' do
6
+ it 'checks that the type is AWS::EC2::Instance' do
7
+ expect(subject.instance_variable_get('@Type')).to eq('AWS::EC2::Instance')
8
+ end
9
+ end
10
+ end
5
11
 
12
+ describe CfnDsl::ResourceDefinition do
13
+ subject { CfnDsl::CloudFormationTemplate.new.AutoScalingGroup(:web_servers) }
14
+ context '#all_refs' do
15
+ it 'checks that the type is AWS::AutoScaling::AutoScalingGroup' do
16
+ expect(subject.instance_variable_get('@Type')).to eq('AWS::AutoScaling::AutoScalingGroup')
17
+ end
18
+ end
6
19
  context '#addTag' do
7
20
  it 'is a pass-through method to add_tag' do
8
21
  expect(subject).to receive(:add_tag).with('role', 'web-server', true)
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.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Jack
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-06-22 00:00:00.000000000 Z
12
+ date: 2016-07-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler