cfndsl 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -135,7 +135,8 @@ module CfnDsl
135
135
  # @param [Hash] yaml_opts, other options to pass to YAML generator
136
136
  def yaml(name:, files:, pathmap:, extras: [], **yaml_opts)
137
137
  generate_model_tasks(name: name, files: files, pathmap: pathmap, extras: extras) do |model, f|
138
- YAML.dump(model, f, **yaml_opts)
138
+ simple_model = JSON.parse(model.to_json) # convert model to a simple ruby object to avoid yaml tags
139
+ YAML.dump(simple_model, f, **yaml_opts)
139
140
  end
140
141
  self
141
142
  end
@@ -189,7 +190,7 @@ module CfnDsl
189
190
  files.each do |source|
190
191
  matched_extras = build_extras_filelist(source, extras)
191
192
 
192
- file source.pathmap(pathmap) => [source, :load_spec_types, matched_extras] do |task|
193
+ file source.pathmap(pathmap) => [source, :load_spec_types, *matched_extras] do |task|
193
194
  eval_extras = matched_extras.map { |e| [:yaml, e] } # eval treats yaml and json same
194
195
  puts "Generating Cloudformation for #{source} to #{task.name}"
195
196
  model = CfnDsl.eval_file_with_extras(source, eval_extras, verbose)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CfnDsl
4
- VERSION = '1.0.4'
4
+ VERSION = '1.0.5'
5
5
  end
@@ -0,0 +1 @@
1
+ description: 5 machine cluster
@@ -1,2 +1 @@
1
- description: 5 machine cluster
2
1
  machines: 5
@@ -12,6 +12,7 @@ describe Cfnlego do
12
12
  output << '# http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-eip.html#cfn-ec2-eip-domain'
13
13
  output << "\n InstanceId String # http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-eip.html#cfn-ec2-eip-instanceid"
14
14
  output << "\n PublicIpv4Pool String # http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-eip.html#cfn-ec2-eip-publicipv4pool"
15
+ output << "\n Tags [List] # http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-eip.html#cfn-ec2-eip-tags"
15
16
  output << "\n end\nend\n"
16
17
  expect(template).to eq output
17
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfndsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Jack
@@ -128,6 +128,7 @@ files:
128
128
  - sample/import.rb
129
129
  - sample/lambda.rb
130
130
  - sample/s3.rb
131
+ - sample/t1-extra.yaml
131
132
  - sample/t1.rb
132
133
  - sample/t1.yaml
133
134
  - sample/vpc_example.rb