From 2e32b223b0e97fa6b87204d56cb80252b2d06565 Mon Sep 17 00:00:00 2001 From: Adrien Waksberg Date: Thu, 20 Oct 2016 14:25:42 +0200 Subject: [PATCH] remove old function display --- lib/mpw/cli.rb | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/lib/mpw/cli.rb b/lib/mpw/cli.rb index 617b58d..3420bc1 100644 --- a/lib/mpw/cli.rb +++ b/lib/mpw/cli.rb @@ -247,44 +247,6 @@ class Cli end end - # Display an item in the default format - # @args: item -> an array with the item information - def display_item(item) - puts '--------------------'.cyan - print 'Id: '.cyan - puts item.id - print "#{I18n.t('display.name')}: ".cyan - puts item.name - print "#{I18n.t('display.group')}: ".cyan - puts item.group - print "#{I18n.t('display.server')}: ".cyan - puts item.host - print "#{I18n.t('display.protocol')}: ".cyan - puts item.protocol - print "#{I18n.t('display.login')}: ".cyan - puts item.user - - if @clipboard - print "#{I18n.t('display.password')}: ".cyan - puts '***********' - else - print "#{I18n.t('display.password')}: ".cyan - puts @mpw.get_password(item.id) - - if @mpw.get_otp_code(item.id) > 0 - print "#{I18n.t('display.otp_code')}: ".cyan - puts "#{@mpw.get_otp_code(item.id)} (#{@mpw.get_otp_remaining_time}s)" - end - end - - print "#{I18n.t('display.port')}: ".cyan - puts item.port - print "#{I18n.t('display.comment')}: ".cyan - puts item.comment - - clipboard(item) if @clipboard - end - # Copy in clipboard the login and password # @args: item -> the item # clipboard -> enable clipboard