Method: Keybox::Application::PasswordSafe#load_database

Defined in:
lib/keybox/application/password_safe.rb

#load_databaseObject

load the database from its super secret location



219
220
221
222
223
224
225
226
227
228
# File 'lib/keybox/application/password_safe.rb', line 219

def load_database
    password = nil
    if not File.exists?(@options.db_file) then
        hsay 'Creating initial database.', :information
        password  = prompt("Initial Password for (#{@options.db_file})", :echo => "*", :validate => true)
    else
        password  = prompt("Password for (#{@options.db_file})", :echo => "*")
    end
    @db = Keybox::Storage::Container.new(password,@options.db_file)
end