diff options
author | elijah <elijah@riseup.net> | 2012-12-12 23:04:52 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2012-12-12 23:04:52 -0800 |
commit | 4c86d6527bfa83faa124d4887b54be4702ca63b8 (patch) | |
tree | 3b596a6b07e15db2d7a308f9aacafe7070a181bc /lib/leap_cli/commands | |
parent | 32f00970fd6e5dbae3772f7f854b425098d94098 (diff) |
`leap list --print` -- now it evaluates all node keys before printing
Diffstat (limited to 'lib/leap_cli/commands')
-rw-r--r-- | lib/leap_cli/commands/list.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/leap_cli/commands/list.rb b/lib/leap_cli/commands/list.rb index 42f2996..501a548 100644 --- a/lib/leap_cli/commands/list.rb +++ b/lib/leap_cli/commands/list.rb @@ -35,9 +35,10 @@ module LeapCli; module Commands node_list = manager.nodes properties = properties.split(',') max_width = nodes.keys.inject(0) {|max,i| [i.size,max].max} - nodes.keys.sort.each do |node_name| - value = properties.collect{|prop| node_list[node_name][prop]}.join(', ') - printf("%#{max_width}s %s\n", node_name, value) + nodes.each_node do |node| + node.evaluate + value = properties.collect{|prop| node[prop]}.join(', ') + printf("%#{max_width}s %s\n", node.name, value) end puts end |