Sha256: 03a3c191b8ce540f61f0b26ab5c6309f841227a007c121e66c050fc7fd7fd2f1

Contents?: true

Size: 695 Bytes

Versions: 203

Compression:

Stored size: 695 Bytes

Contents

# frozen_string_literal: true

require 'eac_cli/old_configs/entry_reader'

module EacCli
  class OldConfigs
    class StorePasswordsEntryReader < ::EacCli::OldConfigs::EntryReader
      ENTRY_KEY = 'core.store_passwords'

      def initialize(console_configs)
        super(console_configs, ENTRY_KEY,
          before_input: -> { banner },
          validator: ->(entry_value) { %w[yes no].include?(entry_value) }
        )
      end

      def banner
        infom 'Do you wanna to store passwords?'
        infom 'Warning: the passwords will be store in clear text in ' \
          "\"#{console_configs.configs.storage_path}\""
        infom 'Enter "yes" or "no"'
      end
    end
  end
end

Version data entries

203 entries across 203 versions & 4 rubygems

Version Path
avm-tools-0.99.1 vendor/eac_cli/lib/eac_cli/old_configs/store_passwords_entry_reader.rb
eac_cli-0.17.0 lib/eac_cli/old_configs/store_passwords_entry_reader.rb
avm-tools-0.99.0 vendor/eac_cli/lib/eac_cli/old_configs/store_passwords_entry_reader.rb