user input timeout env variable

This commit is contained in:
Alexander Popov 2022-08-07 21:23:59 +03:00
parent 2ce1701039
commit abdb758aa2
Signed by: iiiypuk
GPG Key ID: D8C9B59A9F04A70C
3 changed files with 16 additions and 2 deletions

View File

@ -6,6 +6,9 @@
- - Information
- ♻️ - Edited
## 0.2.7 - [00/08/2022]
- - Added environment variable for custom input timeout
## 0.2.6 - [03/08/2022]
- - Added environment variable for custom password file path
- - Added version in to ASCII logo

View File

@ -1,5 +1,5 @@
name: pmng
version: 0.2.6
version: 0.2.7
authors:
- Alexander Popov <iiiypuk@iiiypuk.me>

View File

@ -8,6 +8,17 @@ def password_file
end
end
def input_timeout
user_input_timeout = 60
begin
user_input_timeout = "#{ENV["PMNG_TIMEOUT"]}"
user_input_timeout.to_i
rescue KeyError
user_input_timeout.to_i
end
end
VERSION = {{ `shards version "#{__DIR__}"`.chomp.stringify }}
PASSWORD_FILE_PATH = password_file()
USER_INPUT_TIMEOUT = 60
USER_INPUT_TIMEOUT = input_timeout()