Sha256: 00f47f5abb54a45daf9a8bea64da41899140954fd4fe814e1ab0f2e19321bd23

Contents?: true

Size: 915 Bytes

Versions: 27

Compression:

Stored size: 915 Bytes

Contents

# frozen_string_literal: true

# takelage info status gopass
module InfoStatusGopass
  # Backend method for info status gopass.
  # @return [Boolean] is gopass available?
  # rubocop:disable Metrics/MethodLength
  def info_status_gopass
    log.debug 'Check gopass status'

    root = _info_status_gopass_root_store

    if root.chomp.empty?
      log.error 'gopass root store not found'
      return false
    end

    key = _info_status_lib_git_signingkey(root)

    unless _info_status_lib_git_key_available(key).exitstatus.zero?
      log.error 'gopass root store gpg key is not available'
      return false
    end

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

  private

  # Get gopass root store
  def _info_status_gopass_root_store
    cmd_gopass_root_store = config.active['cmd_info_status_gopass_root_store']
    (run cmd_gopass_root_store).chomp
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
takelage-0.33.1 lib/takelage/info/status/gopass.rb
takelage-0.32.4 lib/takelage/info/status/gopass.rb
takelage-0.32.3 lib/takelage/info/status/gopass.rb
takelage-0.32.1 lib/takelage/info/status/gopass.rb
takelage-0.32.0 lib/takelage/info/status/gopass.rb
takelage-0.31.0 lib/takelage/info/status/gopass.rb
takelage-0.30.6 lib/takelage/info/status/gopass.rb
takelage-0.30.5 lib/takelage/info/status/gopass.rb
takelage-0.30.1 lib/takelage/info/status/gopass.rb
takelage-0.30.0 lib/takelage/info/status/gopass.rb
takelage-0.29.14 lib/takelage/info/status/gopass.rb
takelage-0.29.13 lib/takelage/info/status/gopass.rb
takelage-0.29.11 lib/takelage/info/status/gopass.rb
takelage-0.29.10 lib/takelage/info/status/gopass.rb
takelage-0.29.8 lib/takelage/info/status/gopass.rb
takelage-0.29.6 lib/takelage/info/status/gopass.rb
takelage-0.29.0 lib/takelage/info/status/gopass.rb
takelage-0.28.26 lib/takelage/info/status/gopass.rb
takelage-0.28.24 lib/takelage/info/status/gopass.rb
takelage-0.28.14 lib/takelage/info/status/gopass.rb