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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 4aaed3e31e1e9c85fefa9e4864aae2f4cf1e31f3
4
- data.tar.gz: 52ac4d113f83aa02fc3c43fc3dffae43768f5eeb
2
+ SHA256:
3
+ metadata.gz: 488aee5673dda0c608a8e06188e3523533e2b538986f2f87554ee52deae1328b
4
+ data.tar.gz: d855010ad2a9ae2df2e2034309e8cf042870ea85c73d87385ac919e64e7eb8ec
5
5
  SHA512:
6
- metadata.gz: a3d1b9331c70d06568aaf55b9fe912b0a3a2f085769a3dba5094b512367dce968711027919354bbaf96c8f0853063a6759ade1b6e81902f82a49a75a19247cec
7
- data.tar.gz: bc5251b45be4392b4bd262343dd3599167e168e7326ac01e973edc04a710d789dc6a19dd392a5bc05c3eeb9b3a2492540bc01a20e7994258f1f9beadbe042139
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
- return unless parameter_values.is_a? Hash
66
- return unless parameter_values.has_key? 'Parameters'
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.26
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: 2018-08-10 00:00:00.000000000 Z
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.4.6
133
+ rubygems_version: 2.7.6
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: cfn-model