mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
polish banner
This commit is contained in:
parent
4d1be2a460
commit
3a5c8adc58
1 changed files with 20 additions and 14 deletions
|
@ -138,28 +138,34 @@ module Sidekiq # :nodoc:
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.w
|
HOLIDAY_COLORS = {
|
||||||
"\e[37m"
|
# got other color-specific holidays from around the world?
|
||||||
|
# https://developer-book.com/post/definitive-guide-for-colored-text-in-terminal/#256-color-escape-codes
|
||||||
|
"3-17" => "\e[1;32m", # St. Patrick's Day green
|
||||||
|
"10-31" => "\e[38;5;208m" # Halloween orange
|
||||||
|
}
|
||||||
|
|
||||||
|
def self.day
|
||||||
|
@@day ||= begin
|
||||||
|
t = Date.today
|
||||||
|
"#{t.month}-#{t.day}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
COLORS = {
|
|
||||||
# got other holidays from around the world?
|
|
||||||
# https://developer-book.com/post/definitive-guide-for-colored-text-in-terminal/#256-color-escape-codes
|
|
||||||
"3-17" => "\e[1;32m", # Happy St. Patrick's Day!
|
|
||||||
"10-31" => "\e[38;5;208m" # Happy Halloween!
|
|
||||||
}
|
|
||||||
COLORS.default = "\e[1;31m"
|
|
||||||
|
|
||||||
def self.r
|
def self.r
|
||||||
t = Date.today
|
@@r ||= HOLIDAY_COLORS[day] || "\e[1;31m"
|
||||||
COLORS["#{t.month}-#{t.day}"]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.b
|
def self.b
|
||||||
"\e[30m"
|
@@b ||= HOLIDAY_COLORS[day] || "\e[30m"
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.w
|
||||||
|
"\e[1;37m"
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.reset
|
def self.reset
|
||||||
|
@@b = @@r = @@day = nil
|
||||||
"\e[0m"
|
"\e[0m"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -172,7 +178,7 @@ module Sidekiq # :nodoc:
|
||||||
#{w} ,$$$$$b#{b}/#{w}md$$$P^'
|
#{w} ,$$$$$b#{b}/#{w}md$$$P^'
|
||||||
#{w} .d$$$$$$#{b}/#{w}$$$P'
|
#{w} .d$$$$$$#{b}/#{w}$$$P'
|
||||||
#{w} $$^' `"#{b}/#{w}$$$' #{r}____ _ _ _ _
|
#{w} $$^' `"#{b}/#{w}$$$' #{r}____ _ _ _ _
|
||||||
#{w} $: ,$$: #{r} / ___|(_) __| | ___| | _(_) __ _
|
#{w} $: #{b}'#{w},$$: #{r} / ___|(_) __| | ___| | _(_) __ _
|
||||||
#{w} `b :$$ #{r} \\___ \\| |/ _` |/ _ \\ |/ / |/ _` |
|
#{w} `b :$$ #{r} \\___ \\| |/ _` |/ _ \\ |/ / |/ _` |
|
||||||
#{w} $$: #{r} ___) | | (_| | __/ <| | (_| |
|
#{w} $$: #{r} ___) | | (_| | __/ <| | (_| |
|
||||||
#{w} $$ #{r}|____/|_|\\__,_|\\___|_|\\_\\_|\\__, |
|
#{w} $$ #{r}|____/|_|\\__,_|\\___|_|\\_\\_|\\__, |
|
||||||
|
|
Loading…
Add table
Reference in a new issue