custom pwd file path

This commit is contained in:
Alexander Popov 2022-08-04 00:10:56 +03:00
parent 51a09ffe61
commit 0ce3e506bb
Signed by: iiiypuk
GPG Key ID: D8C9B59A9F04A70C
4 changed files with 17 additions and 2 deletions

View File

@ -6,6 +6,9 @@
- - Information
- ♻️ - Edited
## 0.2.6 - [03/08/2022]
- - Added enviopment variable for custom password path
## 0.2.5 - [31/07/2022]
- - Added timeout user input
- ♻️ - Source file separated

View File

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

View File

@ -1,3 +1,13 @@
def password_file
begin
file_path = "#{ENV["PMNG_PWD_FILE"]}"
file_path.to_s
rescue KeyError
file_path = "#{ENV["HOME"]}/.pwd.yml"
file_path.to_s
end
end
VERSION = {{ `shards version "#{__DIR__}"`.chomp.stringify }}
PASSWORD_FILE_PATH = "#{ENV["HOME"]}/.pwd.yml"
PASSWORD_FILE_PATH = password_file()
USER_INPUT_TIMEOUT = 60

View File

@ -1,4 +1,6 @@
module Pmng::Functions
extend self
class Statistics
getter passwords : Array(Password)
getter outdated : Int32