cloudformation-ruby-dsl 0.5.2 → 0.5.3
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: da465e2c61c5e0ed8e43f200ecc5bcada19c4d15
|
4
|
+
data.tar.gz: 944159f87d612d6c5cc9ec1273c7f0d359c72e81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b3e19f1204f0f1fb87aee2322f2aeaed7b516aaefd453857af5b8b832678e8ca919459f788e143909476ad763ac376093ca69757829b3286217384dfeffe082
|
7
|
+
data.tar.gz: bdcfbe758e2538f545888597e893b79116e99d2b26d3b5953d200df4ca450b360684d403e5d04520ec2c3597948372e28027b79e10758ee3c8f6430ffb21e324
|
@@ -32,11 +32,14 @@ SYSTEM_ENV = "export PATH=#{VENDOR_PATH}/bin:$PATH; export AWS_CLOUDFORMATION_HO
|
|
32
32
|
|
33
33
|
# Parse command-line arguments based on cfn-cmd syntax (cfn-create-stack etc.) and return the parameters and region
|
34
34
|
def cfn_parse_args
|
35
|
+
stack_name = nil
|
35
36
|
parameters = {}
|
36
37
|
region = ENV['EC2_REGION'] || ENV['AWS_DEFAULT_REGION'] || 'us-east-1'
|
37
38
|
nopretty = false
|
38
39
|
ARGV.slice_before(/^--/).each do |name, value|
|
39
40
|
case name
|
41
|
+
when '--stack-name'
|
42
|
+
stack_name = value
|
40
43
|
when '--parameters'
|
41
44
|
parameters = Hash[value.split(/;/).map { |pair| pair.split(/=/, 2) }]
|
42
45
|
when '--region'
|
@@ -45,7 +48,7 @@ def cfn_parse_args
|
|
45
48
|
nopretty = true
|
46
49
|
end
|
47
50
|
end
|
48
|
-
[parameters, region, nopretty]
|
51
|
+
[stack_name, parameters, region, nopretty]
|
49
52
|
end
|
50
53
|
|
51
54
|
def cfn_cmd(template)
|
@@ -283,10 +286,10 @@ end
|
|
283
286
|
|
284
287
|
# Core interpreter for the DSL
|
285
288
|
class TemplateDSL < JsonObjectDSL
|
286
|
-
attr_reader :parameters, :aws_region, :nopretty
|
289
|
+
attr_reader :parameters, :aws_region, :nopretty, :stack_name
|
287
290
|
|
288
291
|
def initialize()
|
289
|
-
@parameters, @aws_region, @nopretty = cfn_parse_args
|
292
|
+
@stack_name, @parameters, @aws_region, @nopretty = cfn_parse_args
|
290
293
|
super
|
291
294
|
end
|
292
295
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudformation-ruby-dsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shawn Smith
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date: 2015-05-
|
18
|
+
date: 2015-05-08 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: detabulator
|