This commit is contained in:
Alexander Popov 2022-03-13 13:46:29 +03:00
parent 038e8a0b14
commit ce5bca45a3
2 changed files with 28 additions and 22 deletions

View File

@ -6,5 +6,9 @@
- - Information - - Information
- ♻️ - Edited - ♻️ - Edited
## 0.2.1 - [13/03/2022]
- ✔️ - fixed empty search field
- ✔️ - fixed password generate colors to russian flag
## 0.2.0 - [04/01/2022] ## 0.2.0 - [04/01/2022]
- reading passwords file from program folder (portable mode) - reading passwords file from program folder (portable mode)

View File

@ -21,7 +21,7 @@ class Password
property update : Int32 property update : Int32
end end
VERSION = "0.1.0" VERSION = "0.2.1"
begin begin
OptionParser.parse do |parser| OptionParser.parse do |parser|
@ -37,8 +37,8 @@ begin
end end
parser.on "-g", "--generate-password", "Generate password" do parser.on "-g", "--generate-password", "Generate password" do
puts Random::Secure.urlsafe_base64(16, padding: false).colorize(:black).back(:white) puts Random::Secure.urlsafe_base64(16, padding: false).colorize(:black).back(:white)
puts Random::Secure.urlsafe_base64(16, padding: false).colorize(:white).back(:red)
puts Random::Secure.urlsafe_base64(16, padding: false).colorize(:white).back(:blue) puts Random::Secure.urlsafe_base64(16, padding: false).colorize(:white).back(:blue)
puts Random::Secure.urlsafe_base64(16, padding: false).colorize(:white).back(:red)
exit(0) exit(0)
end end
parser.on "-t", "--unixtime", "Return local timestamp" do parser.on "-t", "--unixtime", "Return local timestamp" do
@ -80,6 +80,8 @@ while loop
if password_string.to_s == ":q" if password_string.to_s == ":q"
puts "Bye! 👋🏻" puts "Bye! 👋🏻"
exit(0) exit(0)
elsif password_string.to_s.size == 0
puts
elsif password_string.to_s == ":h" elsif password_string.to_s == ":h"
puts "Help:\n-----" puts "Help:\n-----"
puts ":s - Return stats" puts ":s - Return stats"
@ -101,8 +103,7 @@ while loop
end end
puts outdated_count puts outdated_count
end else
new_array.each do |item| new_array.each do |item|
if item.url.includes?(password_string.to_s) if item.url.includes?(password_string.to_s)
puts item.url.colorize(:magenta).mode(:blink) puts item.url.colorize(:magenta).mode(:blink)
@ -126,6 +127,7 @@ while loop
puts "---".colorize(:dark_gray) puts "---".colorize(:dark_gray)
end end
end end
end
puts puts
end end