terraform-synthesizer 0.0.16 → 0.0.18

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
2
  SHA256:
3
- metadata.gz: 7e742e74bfa241477d03973992c8791cf8ffe68930b58b4eed82598c084a4e57
4
- data.tar.gz: d26630d09fc22a704a3935403c83f71e7e420921a329bcd8a623e599ffc8c57b
3
+ metadata.gz: dfa8a6f04f030c12789a17bed2daa44cb64ca012f96321631f325cd5b0af27b5
4
+ data.tar.gz: 41d44dfcb45b9ba54223d2ff817eb48401e6db4902b938a90f3d7cd7a9d7363b
5
5
  SHA512:
6
- metadata.gz: c6cf1088cada6405cc839674f0e0a29e6d917359a3e022a79ca65f049e47633d843d3dba6e297b3e66864bdd2827fec3a5a8d1756cb7c906ff629f97bdf0900f
7
- data.tar.gz: 58c0632dbce69a7cd498b6fc49ab305997bf750ab02defe56aee9fd65d690da81ee441025251591cc0fa09a364507959bfdcaff108e083becd682578689f87b7
6
+ metadata.gz: d2f7a2dd85260ed9f22502de55079ecb4fdbc8f628b9912e78442fad8a39f6f7c2f69fd7290bf5ddff8fdeec7583c3263ed11ad9b90670e2e95f43e04eaaa61f
7
+ data.tar.gz: 544b05947a1118635e649d0536b7ff0e8b925c824f74962f8c58beb5cf622999923a27e6649e61d85e4da26bfe8eb908106ed8e8871c6598c1d03dc3b952bcb2
@@ -1,3 +1,3 @@
1
1
  module TerraformSynthesizer
2
- VERSION = %(0.0.16).freeze
2
+ VERSION = %(0.0.18).freeze
3
3
  end
@@ -29,7 +29,10 @@ class TerraformSynthesizer < AbstractSynthesizer
29
29
  def method_missing(method_name, *args, &)
30
30
  BLOCK_KEYS.each do |block_key|
31
31
  if @in_block_key
32
- raise ArgumentError, %(not assigning anything to this #{block_key}) if args[0].nil?
32
+ if args[0].nil? || args[0].empty?
33
+ raise ArgumentError,
34
+ %(not assigning anything to this #{block_key})
35
+ end
33
36
 
34
37
  @in_block_key = false
35
38
  @translation[:template][block_key.to_sym][method_name.to_sym] = args[0]
@@ -38,10 +41,8 @@ class TerraformSynthesizer < AbstractSynthesizer
38
41
 
39
42
  @translation = {} if @translation.nil?
40
43
  @translation[:template] = {} if @translation[:template].nil?
44
+ @translation[:template][block_key.to_sym] = {} \
41
45
  if @translation[:template][block_key.to_sym].nil?
42
- @translation[:template][block_key.to_sym] =
43
- {}
44
- end
45
46
  @in_block_key = true
46
47
 
47
48
  yield
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terraform-synthesizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - drzthslnt@gmail.com