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: e0b2bb25bca9454ecbfbfbed8c3c5ce751734f22
4
- data.tar.gz: a650a529257a400c4ff9aa1d09e0c4ac49d3ab52
3
+ metadata.gz: da465e2c61c5e0ed8e43f200ecc5bcada19c4d15
4
+ data.tar.gz: 944159f87d612d6c5cc9ec1273c7f0d359c72e81
5
5
  SHA512:
6
- metadata.gz: b3a22a8bac4c06712e353ef355c59e420347f60e95b33a985b273c7489e522b04eb012033ee2d7e25f3a2bd135599895923ef75b8f8f62cedb473d5da835d925
7
- data.tar.gz: c7723d3e2c358621615d173f7b32877b510b78ba5939a8f29d04c85290939d500b3ac6a7276a435b4f94d063953e1a842aeb3136073bd7591f9bb075f72d4d50
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
 
@@ -15,7 +15,7 @@
15
15
  module Cfn
16
16
  module Ruby
17
17
  module Dsl
18
- VERSION = "0.5.2"
18
+ VERSION = "0.5.3"
19
19
  end
20
20
  end
21
21
  end
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.2
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-07 00:00:00.000000000 Z
18
+ date: 2015-05-08 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: detabulator