1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2024-11-27 07:33:05 +00:00

add last_update in MPWConfig

This commit is contained in:
nishiki 2014-01-12 11:36:56 +01:00
parent 477178ecdd
commit b9988102d6

View file

@ -19,6 +19,7 @@ class MPWConfig
attr_accessor :sync_port
attr_accessor :sync_pwd
attr_accessor :sync_sufix
attr_accessor :sync_last_update
# Constructor
# @args: file_config -> the specify config file
@ -57,7 +58,8 @@ class MPWConfig
'sync_host' => host,
'sync_port' => port,
'sync_pwd' => password,
'sync_suffix' => suffix}}
'sync_suffix' => suffix,
'last_update' => 0 }}
begin
File.open(@file_config, 'w') do |file|
@ -84,6 +86,7 @@ class MPWConfig
@sync_port = config['config']['sync_port']
@sync_pwd = config['config']['sync_pwd']
@sync_sufix = config['config']['sync_suffix']
@sync_last_update = config['config']['sync_last_update'].to_i
if @key.empty? || @file_gpg.empty?
@error_msg = I18n.t('error.config.check')