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.46.9 lib/takeltau/info/status/gpg.rb
takeltau-0.46.8 lib/takeltau/info/status/gpg.rb
takeltau-0.46.5 lib/takeltau/info/status/gpg.rb
takeltau-0.46.1 lib/takeltau/info/status/gpg.rb
takeltau-0.46.0 lib/takeltau/info/status/gpg.rb
takeltau-0.45.27 lib/takeltau/info/status/gpg.rb
takeltau-0.45.26 lib/takeltau/info/status/gpg.rb
takeltau-0.45.24 lib/takeltau/info/status/gpg.rb
takeltau-0.45.23 lib/takeltau/info/status/gpg.rb
takeltau-0.45.22 lib/takeltau/info/status/gpg.rb
takeltau-0.45.21 lib/takeltau/info/status/gpg.rb
takeltau-0.45.19 lib/takeltau/info/status/gpg.rb
takeltau-0.45.17 lib/takeltau/info/status/gpg.rb
takeltau-0.45.16 lib/takeltau/info/status/gpg.rb
takeltau-0.45.14 lib/takeltau/info/status/gpg.rb
takeltau-0.45.13 lib/takeltau/info/status/gpg.rb
takeltau-0.45.12 lib/takeltau/info/status/gpg.rb
takeltau-0.45.11 lib/takeltau/info/status/gpg.rb
takeltau-0.45.10 lib/takeltau/info/status/gpg.rb
takeltau-0.45.9 lib/takeltau/info/status/gpg.rb