aws-cfn-compiler 0.9.20 → 0.9.21
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1362f3d59f71abf3917f519164e979f1bda688c
|
4
|
+
data.tar.gz: 6f6ead16051d565729413cb2be8eba9b3bbfa7ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
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.
|
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-
|
11
|
+
date: 2014-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|