aws-cfn-compiler 0.9.20 → 0.9.21

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 640e002a656701661bb83c206787586544be8146
4
- data.tar.gz: 5365902f02751c7043df5b3566d2f3332a8781a0
3
+ metadata.gz: b1362f3d59f71abf3917f519164e979f1bda688c
4
+ data.tar.gz: 6f6ead16051d565729413cb2be8eba9b3bbfa7ba
5
5
  SHA512:
6
- metadata.gz: 24cf23031d4cf11fc27c85ab89a36bce568743e824ba02a1b04186596b8222acd789351d8bd9f67bebde4ffaacf32d23c45cf4c27a60103437e0773f7d4328ea
7
- data.tar.gz: 36c7d203fabf3d67642ad8229d119e9e96e92993524f5d6c380658e41ccf66b5929fdc0c97f33eccd013568062b8bc2877e62318e82cefdb4956219429d19c44
6
+ metadata.gz: a7bc4db60ac6d41b7a2b640d9e4f2ec3720deec795fbee617091f52327146c3e2cdb3830fc2c4c1606c0407d6f0bc56d5f31f0ba981f610294c9ee474db20790
7
+ data.tar.gz: 212780a3f87a67f2dcea6a55bc2fced8ab5d58cc57d674468e9f80c0fa689be206d5b0251f1c5056f18c8111232f6bcc3ff20bef1b45bde82d0f861bcb3f330c
@@ -266,21 +266,21 @@ module Aws
266
266
  end
267
267
  end
268
268
 
269
- def find_conditions(hash)
269
+ def find_conditions(hash,level=0)
270
270
  if hash.is_a? Hash
271
271
  hash.keys.collect do |key|
272
- if 'Condition' == key
272
+ if 'Condition' == key and level <= 4
273
273
  if hash[key].is_a?(Array)
274
274
  hash[key].first
275
275
  else
276
276
  hash[key]
277
277
  end
278
278
  else
279
- find_conditions(hash[key])
279
+ find_conditions(hash[key],level+1)
280
280
  end
281
281
  end.flatten.compact.uniq
282
282
  elsif hash.is_a? Array
283
- hash.collect{|a| find_conditions(a)}.flatten.compact.uniq
283
+ hash.collect{|a| find_conditions(a,level+1)}.flatten.compact.uniq
284
284
  end
285
285
  end
286
286
 
@@ -119,7 +119,12 @@ module Aws
119
119
  elsif filename =~ /\.js(|on)\z/i
120
120
  item[section].merge! JSON.parse(content)
121
121
  elsif filename =~ /\.ya?ml\z/i
122
- item[section].merge! YAML.load(content)
122
+ begin
123
+ item[section].merge! YAML.load(content)
124
+ rescue => e
125
+ logger.fatal "YAML error: #{e.message}"
126
+ raise e
127
+ end
123
128
  else
124
129
  next
125
130
  end
@@ -1,7 +1,7 @@
1
1
  module Aws
2
2
  module Cfn
3
3
  module Compiler
4
- VERSION = '0.9.20'
4
+ VERSION = '0.9.21'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-cfn-compiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.20
4
+ version: 0.9.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - PKinney
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-23 00:00:00.000000000 Z
11
+ date: 2014-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print