cloudformation-tool 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cloud_formation_tool/cli/compile.rb +1 -1
- data/lib/cloud_formation_tool/cloud_formation.rb +3 -3
- data/lib/cloud_formation_tool/cloud_formation/lambda_code.rb +1 -1
- data/lib/cloud_formation_tool/cloud_formation/stack.rb +2 -2
- data/lib/cloud_formation_tool/cloud_init.rb +4 -4
- data/lib/cloud_formation_tool/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4d9af43cf848d20853c9a8385df91072fbf71b4
|
4
|
+
data.tar.gz: b595890a7682733ee29aa655f4a4a96a14bb23e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e249d712b5eb07de499135378e1368fe900ebd69a160ae31303dead9cd360155a8979aa85712dcf46f94e9e86227f0dc1f084a69b0dac9111da1b8b277621ce6
|
7
|
+
data.tar.gz: 8a083bd072f0071d90ab1416bfed85e317d52a0836c251d26d43814dda3ea4294ba8f29e860eda82282902a3dd8ba3753239d84d3672f44eaa926d26d534f648
|
@@ -10,7 +10,7 @@ module CloudFormationTool
|
|
10
10
|
puts CloudInit.new(file).compile
|
11
11
|
else
|
12
12
|
puts CloudFormation.parse(file).to_yaml
|
13
|
-
# raise AppError.new("not a valid template file. Only .init and .yaml are supported")
|
13
|
+
# raise CloudFormationTool::Errors::AppError.new("not a valid template file. Only .init and .yaml are supported")
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
@@ -26,11 +26,11 @@ module CloudFormationTool
|
|
26
26
|
rescue Psych::SyntaxError => e
|
27
27
|
e.message =~ /line (\d+) column (\d+)/
|
28
28
|
lines = text.split "\n"
|
29
|
-
raise AppError, "Error parsing #{path} at line #{e.line} column #{e.column}:\n" +
|
29
|
+
raise CloudFormationTool::Errors::AppError, "Error parsing #{path} at line #{e.line} column #{e.column}:\n" +
|
30
30
|
"#{lines[e.line-1]}\n" +
|
31
31
|
"#{(' ' * (e.column - 1 ))}^- #{e.problem} #{e.context}"
|
32
32
|
rescue Errno::ENOENT => e
|
33
|
-
raise AppError, "Error reading #{path}: #{e.message}"
|
33
|
+
raise CloudFormationTool::Errors::AppError, "Error reading #{path}: #{e.message}"
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
@@ -110,7 +110,7 @@ module CloudFormationTool
|
|
110
110
|
# warn against duplicate entities, resources or outputs
|
111
111
|
(@data[category] ||= {}).keys.each do |key|
|
112
112
|
if catdata.has_key? key
|
113
|
-
raise AppError
|
113
|
+
raise CloudFormationTool::Errors::AppError, "Error compiling #{path} - duplicate '#{category}' item: #{key}"
|
114
114
|
end
|
115
115
|
end
|
116
116
|
catdata = fixrefs(catdata, rewrites)
|
@@ -25,7 +25,7 @@ module CloudFormationTool
|
|
25
25
|
log "redirected to #{location}"
|
26
26
|
fetch(location, limit - 1)
|
27
27
|
else
|
28
|
-
raise AppError, "Error downloading #{url}: #{response.value}"
|
28
|
+
raise CloudFormationTool::Errors::AppError, "Error downloading #{url}: #{response.value}"
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
@@ -70,7 +70,7 @@ module CloudFormationTool
|
|
70
70
|
resp = awscf.describe_stack_resources stack_name: @name
|
71
71
|
resp.stack_resources
|
72
72
|
rescue Aws::CloudFormation::Errors::ValidationError => e
|
73
|
-
raise Errors::AppError, "Failed to get resources: #{e.message}"
|
73
|
+
raise CloudFormationTool::Errors::AppError, "Failed to get resources: #{e.message}"
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
@@ -134,7 +134,7 @@ module CloudFormationTool
|
|
134
134
|
retry
|
135
135
|
rescue Seahorse::Client::NetworkingError => e # we get this when there's a timeout
|
136
136
|
if (@watch_timeouts += 1) > 5
|
137
|
-
raise AppError, "Too many timeouts!"
|
137
|
+
raise CloudFormationTool::Errors::AppError, "Too many timeouts!"
|
138
138
|
else
|
139
139
|
retry
|
140
140
|
end
|
@@ -14,7 +14,7 @@ module CloudFormationTool
|
|
14
14
|
begin
|
15
15
|
@initfile = YAML.load(File.read(path)).to_h
|
16
16
|
rescue Errno::ENOENT => e
|
17
|
-
raise AppError.new("Error reading #{@path}: " + e.message)
|
17
|
+
raise CloudFormationTool::Errors::AppError.new("Error reading #{@path}: " + e.message)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
@@ -26,9 +26,9 @@ module CloudFormationTool
|
|
26
26
|
begin
|
27
27
|
read_file_content(basepath + "/" + file.delete('file'), file)
|
28
28
|
rescue Errno::EISDIR => e
|
29
|
-
raise AppError, "#{path} - error loading embedded file for #{file['path']}: " + e.message
|
29
|
+
raise CloudFormationTool::Errors::AppError, "#{path} - error loading embedded file for #{file['path']}: " + e.message
|
30
30
|
rescue Errno::ENOENT => e
|
31
|
-
raise AppError, "#{path} - error loading embedded file for #{file['path']}: " + e.message
|
31
|
+
raise CloudFormationTool::Errors::AppError, "#{path} - error loading embedded file for #{file['path']}: " + e.message
|
32
32
|
end
|
33
33
|
else
|
34
34
|
file
|
@@ -36,7 +36,7 @@ module CloudFormationTool
|
|
36
36
|
end
|
37
37
|
@initfile['write_files'] += (@initfile.delete('write_directories') || []).collect do |directory|
|
38
38
|
realdir = "#{basepath}/#{directory['source']}"
|
39
|
-
raise AppError.new("Cloud-init file #{path} references missing directory #{realdir}") unless File.exist? realdir
|
39
|
+
raise CloudFormationTool::Errors::AppError.new("Cloud-init file #{path} references missing directory #{realdir}") unless File.exist? realdir
|
40
40
|
read_dir_files(realdir, directory['target'])
|
41
41
|
end.flatten
|
42
42
|
"#cloud-config\n" + @initfile.to_yaml
|