module InfoStatusBar
takelage info status bar
Public Instance Methods
info_status_bar()
click to toggle source
Backend method for info status bar. @return [String] status info bar rubocop:disable Metrics/MethodLength
# File lib/takelage/info/status/bar.rb, line 8 def info_status_bar log.debug 'Get status info bar' @bar_list = [] _info_status_bar_takelage _info_status_bar_tau _info_status_bar_git _info_status_bar_gopass _info_status_bar_gpg _info_status_bar_mutagen _info_status_bar_ssh bar = @bar_list.join(' | ') log.debug "status info bar: #{bar}" bar end
Private Instance Methods
_info_status_bar_git()
click to toggle source
Add git status info to bar.
# File lib/takelage/info/status/bar.rb, line 44 def _info_status_bar_git @status_git = info_status_git @bar_list << ("git: #{@status_git ? 'ok'.green : 'no'.red}") end
_info_status_bar_gopass()
click to toggle source
Add gopass status info to bar.
# File lib/takelage/info/status/bar.rb, line 50 def _info_status_bar_gopass @status_gopass = info_status_gopass @bar_list << ("gopass: #{@status_gopass ? 'ok'.green : 'no'.red}") end
_info_status_bar_gpg()
click to toggle source
Add gpg status info to bar.
# File lib/takelage/info/status/bar.rb, line 56 def _info_status_bar_gpg if @status_git || @status_gopass @bar_list << "gpg: #{'ok'.green}" return end @bar_list << ("gpg: #{info_status_gpg ? 'ok'.green : 'no'.red}") end
_info_status_bar_mutagen()
click to toggle source
Add mutagen status info to bar.
# File lib/takelage/info/status/bar.rb, line 66 def _info_status_bar_mutagen @bar_list << ("mutagen: #{mutagen_check_daemon ? 'ok'.green : 'no'.red}") end
_info_status_bar_ssh()
click to toggle source
Add ssh status info to bar.
# File lib/takelage/info/status/bar.rb, line 71 def _info_status_bar_ssh @bar_list << ("ssh: #{info_status_ssh ? 'ok'.green : 'no'.red}") end
_info_status_bar_takelage()
click to toggle source
Add takelage version info to bar.
# File lib/takelage/info/status/bar.rb, line 30 def _info_status_bar_takelage takelage_version_file = '/etc/takelage_version' return unless _file_exists? takelage_version_file _file_read takelage_version_file @bar_list << "#{config.active['docker_repo']}: #{@content_file.chomp.green}" end
_info_status_bar_tau()
click to toggle source
Add tau version info to bar.
# File lib/takelage/info/status/bar.rb, line 39 def _info_status_bar_tau @bar_list << "tau: #{Takelage::VERSION.green}" end