Sha256: b8bff5dc6815b8e1099c85c39a9a58ef65d309026eddd6e818ff4e0ac1e8b84b

Contents?: true

Size: 910 Bytes

Versions: 52

Compression:

Stored size: 910 Bytes

Contents

# frozen_string_literal: true

# tau 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

52 entries across 52 versions & 1 rubygems

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