tfdsl 0.1.9 → 0.1.10

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: 85d091cc968fb7724fecfe17f7952ffb2c26a43f0ff7a593abc83c5cdea71b1c
4
- data.tar.gz: a5617e1893c31b61ea1b9d9d0918d84b9a7d073886b2c87b46b9078ae5cb484d
3
+ metadata.gz: 188ff59f9e8c63a9d7123ed9900db3079a74b17f16926b11cebf3863db5cbf41
4
+ data.tar.gz: 45d14091543dfe0e02512247dffbcf97550432715c357e2ab382c62482a9856d
5
5
  SHA512:
6
- metadata.gz: 5dbb4b3c42abd4b0f309cc3f68546186c096d971a91ae4d755effef112d2f881e9656964600a86dd24021899280382334b59463453f7179c1c6fd7d9d474ad9b
7
- data.tar.gz: 97f415d389060a6f71cf591b61f751dd842eaf14243c9c09ba61f9708878f17014a7625f7bb887c81c2be2985e70b6d299893fc3e1f5c6abb9791adbfe9e1572
6
+ metadata.gz: 71f58ea39f028ddb1dfc1ddf06388e02975bb0583bd3da4db9571e6ea14b10d8f60ec66b7bc19824417e106a3d961c52414b98913c7b265ad272d9aab3357b49
7
+ data.tar.gz: 4dff89253f6ede3be10703f0a1a7ee41d43ffbeac17de45f69ee8c9b8fc7a187451ab5288ad37b6d2a8f5514a70ff87a9fd487cca46013e163263e631b194cb7
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tfdsl (0.1.9)
4
+ tfdsl (0.1.10)
5
5
  deep_merge (~> 1.2)
6
6
 
7
7
  GEM
@@ -64,13 +64,16 @@ module TFDSL
64
64
  __blocks__.each do |b|
65
65
  json = b.to_json_repr depth + 1
66
66
  if b.__labels__.empty?
67
- ref[b.__type__] = json
67
+ if ref[b.__type__].nil?
68
+ ref[b.__type__] = json
69
+ else
70
+ ref[b.__type__] = [ref[b.__type__], json].flatten
71
+ end
68
72
  else
69
73
  ref[b.__type__] = [] if ref[b.__type__].nil?
70
74
  ref[b.__type__] << json
71
75
  end
72
76
  end
73
-
74
77
  block['tmp']
75
78
  end
76
79
  end
@@ -30,7 +30,7 @@ module TFDSL
30
30
  stack[key] = {} if stack[key].nil?
31
31
  stack[key] = stack[key].deep_merge obj.to_json_repr
32
32
  end
33
- stack.to_json
33
+ JSON.pretty_generate(stack)
34
34
  end
35
35
  end
36
36
  end
@@ -1,3 +1,3 @@
1
1
  module TFDSL
2
- VERSION = '0.1.9'.freeze
2
+ VERSION = '0.1.10'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tfdsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tiago Lopo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-19 00:00:00.000000000 Z
11
+ date: 2020-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deep_merge