power_stencil 0.4.5 → 0.4.6

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
  SHA1:
3
- metadata.gz: ab0b5d7b62f1636b7e3c2a17212cd48c1e833cea
4
- data.tar.gz: 59167fd9220c2f6c6423258f8ad92390536daac6
3
+ metadata.gz: cf42bb3aa3fce0dcef410238959e9394cc65f0ff
4
+ data.tar.gz: 7de48ededf8571e15521a0b24e4b38ea2371e56e
5
5
  SHA512:
6
- metadata.gz: 239ae37df2aad36d94d027ca321133240fedf98ad258d44cd3a9bc7118d324e9be5c30c5890bb4177429479884f0659a135bb0ea160c86b7520e9db1df8ccea0
7
- data.tar.gz: 46099abe943eaab6ae42ca194c32a60e6b10ccf27153e7bd62ba49f84d4b14cb0053656ac97700a648cda9a76183328d4dab7a70d6f667842543268dac12df08
6
+ metadata.gz: 2740f61ea898b2996ad83818de653ad63ac5a737afa0a41bc18351a5b745d0ce3d27d46813572f283e290b576babecf64df6be36ec8159abfa178054260c872d
7
+ data.tar.gz: 710d575d1ca588505ca2c4cd58d60f55c7b530a6466634f26751906a0ab86735343e9f483b3e07c757033d3d85a97d88e0b75463648ba27eeab82c9872d85877
@@ -17,7 +17,16 @@ module PowerStencil
17
17
  if config[:raw]
18
18
  puts entity.to_yaml
19
19
  else
20
- puts entity.to_hash.to_yaml
20
+ # Display entity including data coming from reverse methods
21
+ h = entity.to_hash
22
+ entity.class.fields_constraints.each do |field_name, constraints|
23
+ next unless constraints[:reverse_method]
24
+ reverse_method_conf = constraints[:reverse_method]
25
+ val = entity.send(reverse_method_conf[:actual_method])
26
+ node = h[entity.class.name][:dynamic_data] ||= {}
27
+ node[reverse_method_conf[:actual_method]] = val.as_path unless val.nil?
28
+ end
29
+ puts h.to_yaml
21
30
  end
22
31
  puts
23
32
  end
@@ -1,3 +1,3 @@
1
1
  module PowerStencil
2
- VERSION = '0.4.5'.freeze
2
+ VERSION = '0.4.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: power_stencil
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurent B.
@@ -253,7 +253,7 @@ homepage: https://gitlab.com/tools4devops/power_stencil
253
253
  licenses:
254
254
  - MIT
255
255
  metadata: {}
256
- post_install_message: "\nThank you for installing PowerStencil 0.4.5 !\nFrom the command
256
+ post_install_message: "\nThank you for installing PowerStencil 0.4.6 !\nFrom the command
257
257
  line you can run `power_stencil --help`\nIf your shell is not completing the command:\n
258
258
  \ If you use rbenv: `rbenv rehash`\n If you use zsh : `rehash`\n\nFull documentation
259
259
  here : https://gitlab.com/tools4devops/power_stencil/blob/master/README.md\nFeel