lib/cloud_test.rb in forj-1.0.9 vs lib/cloud_test.rb in forj-1.0.10

- old
+ new

@@ -54,11 +54,11 @@ use 'forj set infra_repo=<PathToYourRepo>' to set it and restart. Otherwise, we will build a new one with some predefined data, you can review and update later. END - ) + ) s_ask = format( 'Do you want to create a new one from Maestro (yes/no)?', infra_dir ) b_build_infra = agree(s_ask) @@ -88,15 +88,13 @@ # Ask the user to get server(s) to destroy server_id_length = 0 server_name_length = 0 o_forge[:server].each do |server| - if server[:id].length > server_id_length - server_id_length = server[:id].length - end + server_id_length = server[:id].length if server[:id].length > server_id_length - if server[:name].length > server_name_length + if server[:name].length > server_name_length server_name_length = server[:name].length end end server_index = 1 @@ -104,18 +102,18 @@ puts format( '|%s |%s |%s |', 'Index '.ljust(6), 'Name'.ljust(server_name_length), 'ID'.ljust(server_id_length) - ) +) # Display Forge servers detail o_forge[:server].each do |server| puts format( '|%s |%s |%s |', server_index.to_s.ljust(6), server[:name].to_s.ljust(server_name_length), server[:id].to_s.ljust(server_id_length) - ) + ) server_index += 1 end o_high_line = HighLine.new