cfndsl 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -4
- data/Rakefile +1 -1
- data/lib/cfndsl/aws/resource_specification.json +10539 -3262
- data/lib/cfndsl/rake_task.rb +3 -2
- data/lib/cfndsl/version.rb +1 -1
- data/sample/t1-extra.yaml +1 -0
- data/sample/t1.yaml +0 -1
- data/spec/generate_spec.rb +1 -0
- metadata +2 -1
data/lib/cfndsl/rake_task.rb
CHANGED
@@ -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
|
-
|
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)
|
data/lib/cfndsl/version.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
description: 5 machine cluster
|
data/sample/t1.yaml
CHANGED
data/spec/generate_spec.rb
CHANGED
@@ -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
|
+
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
|