Sha256: dbc99936e2076164e0e06cfbd6b9d9174b179106efd4caf129394cd06641b260

Contents?: true

Size: 793 Bytes

Versions: 40

Compression:

Stored size: 793 Bytes

Contents

# frozen_string_literal: true

# tau info status gpg
module InfoStatusGPG
  # Backend method for info status gpg.
  # @return [Boolean] is GPG available?
  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

  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

40 entries across 40 versions & 1 rubygems

Version Path
takeltau-0.45.8 lib/takeltau/info/status/gpg.rb
takeltau-0.45.6 lib/takeltau/info/status/gpg.rb
takeltau-0.45.5 lib/takeltau/info/status/gpg.rb
takeltau-0.45.4 lib/takeltau/info/status/gpg.rb
takeltau-0.45.3 lib/takeltau/info/status/gpg.rb
takeltau-0.45.2 lib/takeltau/info/status/gpg.rb
takeltau-0.45.0 lib/takeltau/info/status/gpg.rb
takeltau-0.44.42 lib/takeltau/info/status/gpg.rb
takeltau-0.44.41 lib/takeltau/info/status/gpg.rb
takeltau-0.44.39 lib/takeltau/info/status/gpg.rb
takeltau-0.44.37 lib/takeltau/info/status/gpg.rb
takeltau-0.44.36 lib/takeltau/info/status/gpg.rb
takeltau-0.44.35 lib/takeltau/info/status/gpg.rb
takeltau-0.44.29 lib/takeltau/info/status/gpg.rb
takeltau-0.44.27 lib/takeltau/info/status/gpg.rb
takeltau-0.44.24 lib/takeltau/info/status/gpg.rb
takeltau-0.44.23 lib/takeltau/info/status/gpg.rb
takeltau-0.44.19 lib/takeltau/info/status/gpg.rb
takeltau-0.44.18 lib/takeltau/info/status/gpg.rb
takeltau-0.44.15 lib/takeltau/info/status/gpg.rb