mirror of
https://github.com/nishiki/manage-password.git
synced 2024-11-30 08:53:05 +00:00
add last_update in MPWConfig
This commit is contained in:
parent
477178ecdd
commit
b9988102d6
1 changed files with 13 additions and 10 deletions
|
@ -19,6 +19,7 @@ class MPWConfig
|
||||||
attr_accessor :sync_port
|
attr_accessor :sync_port
|
||||||
attr_accessor :sync_pwd
|
attr_accessor :sync_pwd
|
||||||
attr_accessor :sync_sufix
|
attr_accessor :sync_sufix
|
||||||
|
attr_accessor :sync_last_update
|
||||||
|
|
||||||
# Constructor
|
# Constructor
|
||||||
# @args: file_config -> the specify config file
|
# @args: file_config -> the specify config file
|
||||||
|
@ -57,7 +58,8 @@ class MPWConfig
|
||||||
'sync_host' => host,
|
'sync_host' => host,
|
||||||
'sync_port' => port,
|
'sync_port' => port,
|
||||||
'sync_pwd' => password,
|
'sync_pwd' => password,
|
||||||
'sync_suffix' => suffix}}
|
'sync_suffix' => suffix,
|
||||||
|
'last_update' => 0 }}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
File.open(@file_config, 'w') do |file|
|
File.open(@file_config, 'w') do |file|
|
||||||
|
@ -84,6 +86,7 @@ class MPWConfig
|
||||||
@sync_port = config['config']['sync_port']
|
@sync_port = config['config']['sync_port']
|
||||||
@sync_pwd = config['config']['sync_pwd']
|
@sync_pwd = config['config']['sync_pwd']
|
||||||
@sync_sufix = config['config']['sync_suffix']
|
@sync_sufix = config['config']['sync_suffix']
|
||||||
|
@sync_last_update = config['config']['sync_last_update'].to_i
|
||||||
|
|
||||||
if @key.empty? || @file_gpg.empty?
|
if @key.empty? || @file_gpg.empty?
|
||||||
@error_msg = I18n.t('error.config.check')
|
@error_msg = I18n.t('error.config.check')
|
||||||
|
|
Loading…
Reference in a new issue