lib/pod/command/keys/list.rb in cocoapods-keys-2.0.0 vs lib/pod/command/keys/list.rb in cocoapods-keys-2.0.1
- old
+ new
@@ -28,18 +28,20 @@
def display_current_keyring(keyring)
UI.puts "Keys for #{keyring.name}"
data = keyring.keychain_data
data.each_with_index do |(key, value), index|
- prefix = (index == data.length - 1) ? ' └ ' : ' ├ '
+ prefix = index == data.length - 1 ? ' └ ' : ' ├ '
UI.puts prefix + " #{key} - #{value}"
end
UI.puts
end
def display_keyring(keyring)
UI.puts "#{keyring.name} - #{keyring.path}"
- if keyring.keys.length == 1
+ if keyring.keys.empty?
+ # Skip
+ elsif keyring.keys.length == 1
UI.puts ' └ ' + keyring.keys[0]
else
UI.puts ' └ ' + keyring.keys[0...-1].join(' ') + ' & ' + keyring.keys[-1]
end
UI.puts