Compare commits

...

5 Commits

6 changed files with 26 additions and 6 deletions

View File

@ -6,6 +6,10 @@
- - Information - - Information
- ♻️ - Edited - ♻️ - Edited
## 0.2.7b - [14/04/2023]
- - Added environment variable for custom input timeout
- ✔️ - User input is converted to lowercase
## 0.2.6 - [03/08/2022] ## 0.2.6 - [03/08/2022]
- - Added environment variable for custom password file path - - Added environment variable for custom password file path
- - Added version in to ASCII logo - - Added version in to ASCII logo

View File

@ -1,5 +1,6 @@
# 🔑 The very simple password manager for humans # 🔑 The very simple password manager for humans
![Crystal](https://img.shields.io/badge/Crystal-000000?style=for-the-badge&color=000000&logo=crystal)
![License](https://img.shields.io/badge/license-public_domain-brightgreen?style=for-the-badge&color=ffcc68) ![License](https://img.shields.io/badge/license-public_domain-brightgreen?style=for-the-badge&color=ffcc68)
![NO_COLOR](https://img.shields.io/badge/no__color-support-brightgreen?style=for-the-badge&color=d44e52) ![NO_COLOR](https://img.shields.io/badge/no__color-support-brightgreen?style=for-the-badge&color=d44e52)
![Emoji](https://img.shields.io/badge/emoji-like-brightgreen?style=for-the-badge&color=ec8a4b) ![Emoji](https://img.shields.io/badge/emoji-like-brightgreen?style=for-the-badge&color=ec8a4b)

View File

@ -2,5 +2,5 @@ version: 2.0
shards: shards:
ameba: ameba:
git: https://github.com/crystal-ameba/ameba.git git: https://github.com/crystal-ameba/ameba.git
version: 1.0.0 version: 1.4.3

View File

@ -1,5 +1,5 @@
name: pmng name: pmng
version: 0.2.6 version: 0.2.7
authors: authors:
- Alexander Popov <iiiypuk@iiiypuk.me> - Alexander Popov <iiiypuk@iiiypuk.me>
@ -11,8 +11,8 @@ targets:
development_dependencies: development_dependencies:
ameba: ameba:
github: crystal-ameba/ameba github: crystal-ameba/ameba
version: ~> 1.0.0 version: ~> 1.4.0
crystal: 1.5.0 crystal: 1.7.0
license: MIT license: MIT

View File

@ -94,7 +94,7 @@ module Pmng
passwords_finded_array = 0 passwords_finded_array = 0
passwords_array.each do |item| passwords_array.each do |item|
if item.url.includes?(password_string.to_s) if item.url.includes?(password_string.to_s.downcase)
Functions.show_item(item) Functions.show_item(item)
puts "-----".colorize(:dark_gray).mode(:bold) puts "-----".colorize(:dark_gray).mode(:bold)

View File

@ -1,4 +1,6 @@
def password_file def password_file
# Return password file path
begin begin
file_path = "#{ENV["PMNG_PWD_FILE"]}" file_path = "#{ENV["PMNG_PWD_FILE"]}"
file_path.to_s file_path.to_s
@ -8,6 +10,19 @@ def password_file
end end
end end
def input_timeout
# Return user 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 # return default 60s
end
end
VERSION = {{ `shards version "#{__DIR__}"`.chomp.stringify }} VERSION = {{ `shards version "#{__DIR__}"`.chomp.stringify }}
PASSWORD_FILE_PATH = password_file() PASSWORD_FILE_PATH = password_file()
USER_INPUT_TIMEOUT = 60 USER_INPUT_TIMEOUT = input_timeout()