cfn-model 0.1.26 → 0.1.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/cfn-model/parser/cfn_parser.rb +5 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 488aee5673dda0c608a8e06188e3523533e2b538986f2f87554ee52deae1328b
|
4
|
+
data.tar.gz: d855010ad2a9ae2df2e2034309e8cf042870ea85c73d87385ac919e64e7eb8ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f303ead37c4819bd0b510948e611bc7aded4aedd0194df4dd68df2cae1b03010fbaf68f1ccc5af0f033ed8d70b70e829d39e42b4cfd7b6597ee4495cf2d2311
|
7
|
+
data.tar.gz: fde8609245bab2d49c1c87f0f8229f4d1bd2b488599ed7a06ec63e530a89ddcd918b91ac52b41c60c8c716c69ddaea7a8d5ab089b5f42ffee2db55fd1a97b273
|
@@ -62,12 +62,15 @@ class CfnParser
|
|
62
62
|
def apply_parameter_values(cfn_model, parameter_values_json)
|
63
63
|
unless parameter_values_json.nil?
|
64
64
|
parameter_values = JSON.load parameter_values_json
|
65
|
-
|
66
|
-
|
65
|
+
unless parameter_values.is_a?(Hash) && parameter_values.has_key?('Parameters')
|
66
|
+
raise JSON::ParserError.new('JSON parameters must be a dictionary with key "Parameters"')
|
67
|
+
end
|
67
68
|
parameter_values['Parameters'].each do |parameter_name, parameter_value|
|
68
69
|
if cfn_model.parameters.has_key?(parameter_name)
|
69
70
|
cfn_model.parameters[parameter_name].synthesized_value = parameter_value.to_s
|
70
71
|
end
|
72
|
+
# not going to complain if there are extra parameters in JSON.... if doing a scan
|
73
|
+
# you only have one file for all the templates
|
71
74
|
end
|
72
75
|
|
73
76
|
# any leftovers get default value
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfn-model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Kascic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
132
|
rubyforge_project:
|
133
|
-
rubygems_version: 2.
|
133
|
+
rubygems_version: 2.7.6
|
134
134
|
signing_key:
|
135
135
|
specification_version: 4
|
136
136
|
summary: cfn-model
|