cfhighlander 0.6.0 → 0.6.1.alpha.1542198781

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a420928c7aa2dc54c5108db929d3433eabc6c07b9bfc4d6b7b8c3a4d2428781c
4
- data.tar.gz: 68f5e733bdfe5e9b0ac8e1d75c0c61a49c0b7cd45f39d2edfa035a020918644d
3
+ metadata.gz: 305201fcb187e9c69fb165d5e6dafea795ff5afccf199e13f7904bf358a78405
4
+ data.tar.gz: 3f755245699f69b4a26e4573d45060bc9a7586b2dc3a56124a1970dd72e0c32b
5
5
  SHA512:
6
- metadata.gz: bf81b9c324540bb3fba23b6d5d91bcd03d033bd6080174bf356458a1a4c789dcdb8f1f066d1c2c7f75612b57080bcaca5abf7fe2b2b0508631a591ad69839ecb
7
- data.tar.gz: c2613946392325b606435379d1fb480ed8b60c77fba729c2cfa8bcdf4ec3f5a1a79cef2675ded78c89bbe9396724d3d890ea62d1fb593919346bbf1e9d272f00
6
+ metadata.gz: b2e87a3d16bce6e6b81edd226feb2cf037ab333ebfee025a8dbbe91027892525a69e1c730fa5dff88de06ffac54d13d1d6a4dda324a67ceaf5e7dacaad2519fb
7
+ data.tar.gz: 60ef31bdde50e470b657254cedc9ebdded421f7c93855120fec308207e2f397aea2cdd62239698f3d7be7fb46aa87618ceebd87c66671faa3f26c6b8f1dd1bf0
@@ -171,8 +171,7 @@ module Cfhighlander
171
171
  # `cfndsl #{@cfndsl_compiled_path} -p -f #{format} -o #{output_path} --disable-binding`
172
172
  puts "CloudFormation #{format.upcase} template for #{dsl.name} written to #{output_path}"
173
173
 
174
-
175
-
174
+ return JSON.parse(model.to_json)
176
175
 
177
176
  end
178
177
 
@@ -44,7 +44,7 @@ module Cfhighlander
44
44
  model = component.cfn_model_raw
45
45
  template.subcomponents.each do |sub_component|
46
46
  next unless sub_component.inlined
47
- model['Resources'].delete(sub_component.component_loaded.name)
47
+ model['Resources'].delete(sub_component.cfn_name)
48
48
  end
49
49
  end
50
50
 
@@ -94,6 +94,12 @@ module Cfhighlander
94
94
  inline_elements('Conditions', component, template)
95
95
  inline_elements('Mappings', component, template)
96
96
  inline_elements('Resources', component, template)
97
+
98
+ # outputs are renamed AFTER all of the other processing
99
+ # has been done, as outputs are referenced. Only
100
+ # outputs of inlined components are renamed
101
+ flatten_namespace('Outputs', component, template)
102
+ Debug.debug_dump_cfn(template, 'flat.outputs')
97
103
  inline_elements('Outputs', component, template)
98
104
  end
99
105
 
@@ -364,7 +370,7 @@ module Cfhighlander
364
370
  def self.rename_mapping(tree, search, replacement)
365
371
  tree.keys.each do |k|
366
372
  v = tree[k]
367
- if k == 'Fn::FindInMap' and v[0] = search
373
+ if k == 'Fn::FindInMap' and v[0] == search
368
374
  tree[k] = [replacement, v[1], v[2]]
369
375
  end
370
376
 
@@ -440,9 +446,6 @@ module Cfhighlander
440
446
 
441
447
  flatten_namespace('Resources', component, template)
442
448
  Debug.debug_dump_cfn(template, 'flat.resources')
443
-
444
- flatten_namespace('Outputs', component, template)
445
- Debug.debug_dump_cfn(template, 'flat.outputs')
446
449
  end
447
450
 
448
451
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfhighlander
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1.alpha.1542198781
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikola Tosic
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-10-09 00:00:00.000000000 Z
13
+ date: 2018-11-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: highline
@@ -293,12 +293,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
293
293
  version: '0'
294
294
  required_rubygems_version: !ruby/object:Gem::Requirement
295
295
  requirements:
296
- - - ">="
296
+ - - ">"
297
297
  - !ruby/object:Gem::Version
298
- version: '0'
298
+ version: 1.3.1
299
299
  requirements: []
300
300
  rubyforge_project:
301
- rubygems_version: 2.7.7
301
+ rubygems_version: 2.7.8
302
302
  signing_key:
303
303
  specification_version: 4
304
304
  summary: DSL on top of cfndsl. Manage libraries of cloudformation components