panoramix 0.7.4 → 0.7.5
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.
- data/lib/panoramix/plugin/cfn.rb +10 -6
- metadata +2 -18
data/lib/panoramix/plugin/cfn.rb
CHANGED
@@ -85,6 +85,7 @@ module Panoramix
|
|
85
85
|
|
86
86
|
# Action delete for this task
|
87
87
|
def delete
|
88
|
+
return unless created?
|
88
89
|
return unless question
|
89
90
|
|
90
91
|
cmd = "aws cloudformation delete-stack \
|
@@ -123,6 +124,14 @@ module Panoramix
|
|
123
124
|
end
|
124
125
|
end
|
125
126
|
|
127
|
+
def validate_file path
|
128
|
+
# Raise error if the file does not exist
|
129
|
+
unless File.exists? path
|
130
|
+
message = I18n.t('errors.cfn.template_not_found', {:path => path})
|
131
|
+
raise(Panoramix::Plugin::DockerUpExceptionError, message)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
126
135
|
# Deafult task
|
127
136
|
def run_default
|
128
137
|
if created?
|
@@ -133,6 +142,7 @@ module Panoramix
|
|
133
142
|
params = ""
|
134
143
|
env.each {|k,v| params = params + "ParameterKey=#{k},ParameterValue=#{v} "}
|
135
144
|
|
145
|
+
validate_file @src
|
136
146
|
template = "file://#{@src}"
|
137
147
|
|
138
148
|
cmd = "aws cloudformation create-stack \
|
@@ -177,12 +187,6 @@ def cfn(args, &block)
|
|
177
187
|
# Required by aws cli
|
178
188
|
template = File.expand_path template
|
179
189
|
|
180
|
-
# Raise error if the file does not exist
|
181
|
-
unless File.exists? template
|
182
|
-
message = I18n.t('errors.cfn.template_not_found', {:path => template})
|
183
|
-
raise(Panoramix::Plugin::DockerUpExceptionError, message)
|
184
|
-
end
|
185
|
-
|
186
190
|
# Get cloudformation parameters file path
|
187
191
|
parameters = cfn_options.empty? ? nil : cfn_options.first[:parameters]
|
188
192
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: panoramix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-10-
|
12
|
+
date: 2015-10-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pry
|
@@ -91,22 +91,6 @@ dependencies:
|
|
91
91
|
- - '='
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: 0.7.7
|
94
|
-
- !ruby/object:Gem::Dependency
|
95
|
-
name: highline
|
96
|
-
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
|
-
requirements:
|
99
|
-
- - ! '>='
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: '0'
|
102
|
-
type: :runtime
|
103
|
-
prerelease: false
|
104
|
-
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
|
-
requirements:
|
107
|
-
- - ! '>='
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '0'
|
110
94
|
- !ruby/object:Gem::Dependency
|
111
95
|
name: toml
|
112
96
|
requirement: !ruby/object:Gem::Requirement
|