Sha256: 53711450dbd4d14b9a3695be48bbe5db8068b85f9f0810a5f2d1c01f7cbab222

Contents?: true

Size: 874 Bytes

Versions: 52

Compression:

Stored size: 874 Bytes

Contents

# frozen_string_literal: true

# tau info status gpg
module InfoStatusGPG
  # Backend method for info status gpg.
  # @return [Boolean] is GPG available?
  # rubocop:disable Metrics/MethodLength
  def info_status_gpg
    log.debug 'Check gpg status'

    unless _info_status_gpg_keys
      log.error 'gpg keys are not available'
      return false
    end

    unless _info_status_gpg_agent
      log.error 'gpg agent is not available'
      return false
    end

    log.debug 'gpg is available'
    true
  end
  # rubocop:enable Metrics/MethodLength

  private

  # Check gpg keys
  def _info_status_gpg_keys
    status_keys = try config.active['cmd_info_status_gpg_keys']
    status_keys.exitstatus.zero?
  end

  # Check gpg agent
  def _info_status_gpg_agent
    status_agent = try config.active['cmd_info_status_gpg_agent']
    status_agent.exitstatus.zero?
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
takeltau-0.44.14 lib/takeltau/info/status/gpg.rb
takeltau-0.44.12 lib/takeltau/info/status/gpg.rb
takeltau-0.44.11 lib/takeltau/info/status/gpg.rb
takeltau-0.44.8 lib/takeltau/info/status/gpg.rb
takeltau-0.44.2 lib/takeltau/info/status/gpg.rb
takeltau-0.43.23 lib/takeltau/info/status/gpg.rb
takeltau-0.43.21 lib/takeltau/info/status/gpg.rb
takeltau-0.43.19 lib/takeltau/info/status/gpg.rb
takeltau-0.43.16 lib/takeltau/info/status/gpg.rb
takeltau-0.43.15 lib/takeltau/info/status/gpg.rb
takeltau-0.43.14 lib/takeltau/info/status/gpg.rb
takeltau-0.43.10 lib/takeltau/info/status/gpg.rb
takeltau-0.43.6 lib/takeltau/info/status/gpg.rb
takeltau-0.43.4 lib/takeltau/info/status/gpg.rb
takeltau-0.43.2 lib/takeltau/info/status/gpg.rb
takeltau-0.43.1 lib/takeltau/info/status/gpg.rb
takeltau-0.42.7 lib/takeltau/info/status/gpg.rb
takeltau-0.42.5 lib/takeltau/info/status/gpg.rb
takeltau-0.42.4 lib/takeltau/info/status/gpg.rb
takeltau-0.42.3 lib/takeltau/info/status/gpg.rb