diff options
author | mms <git@sapka.me> | 2024-12-27 01:11:07 +0100 |
---|---|---|
committer | mms <git@sapka.me> | 2024-12-27 01:12:47 +0100 |
commit | 2e3aa037bc0326dde07bc36045b64bf5683e978e (patch) | |
tree | 349b220353e3d2c91d4ec615f49febf6b2508949 | |
parent | 447231ad3947d3a83e76cd90d870e2f7b7428f76 (diff) |
l--------- | new/bin/.#server.rb | 1 | ||||
-rw-r--r-- | new/bin/mixins/splash.rb | 94 | ||||
-rwxr-xr-x | new/bin/server.rb | 43 |
3 files changed, 100 insertions, 38 deletions
diff --git a/new/bin/.#server.rb b/new/bin/.#server.rb new file mode 120000 index 0000000..e9c1dc6 --- /dev/null +++ b/new/bin/.#server.rb @@ -0,0 +1 @@ +mms@voyager.local.45942:1734682989
\ No newline at end of file diff --git a/new/bin/mixins/splash.rb b/new/bin/mixins/splash.rb new file mode 100644 index 0000000..04cdaca --- /dev/null +++ b/new/bin/mixins/splash.rb @@ -0,0 +1,94 @@ +module Crys + module Splash + SPLASH_1 = <<-HEREDOC + ▄████▄ ██▀███ ▓██ ██▓ ██████ ██████ ██▓▄▄▄█████▓▓█████ +▒██▀ ▀█ ▓██ ▒ ██▒ ▒██ ██▒▒██ ▒ ▒██ ▒ ▓██▒▓ ██▒ ▓▒▓█ ▀ +▒▓█ ▄ ▓██ ░▄█ ▒ ▒██ ██░░ ▓██▄ ░ ▓██▄ ▒██▒▒ ▓██░ ▒░▒███ +▒▓▓▄ ▄██▒▒██▀▀█▄ ░ ▐██▓░ ▒ ██▒ ▒ ██▒░██░░ ▓██▓ ░ ▒▓█ ▄ +▒ ▓███▀ ░░██▓ ▒██▒ ░ ██▒▓░▒██████▒▒▒██████▒▒░██░ ▒██▒ ░ ░▒████▒ +░ ░▒ ▒ ░░ ▒▓ ░▒▓░ ██▒▒▒ ▒ ▒▓▒ ▒ ░▒ ▒▓▒ ▒ ░░▓ ▒ ░░ ░░ ▒░ ░ + ░ ▒ ░▒ ░ ▒░ ▓██ ░▒░ ░ ░▒ ░ ░░ ░▒ ░ ░ ▒ ░ ░ ░ ░ ░ +░ ░░ ░ ▒ ▒ ░░ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ +░ ░ ░ ░ ░ ░ ░ ░ ░ ░ +░ ░ ░ +HEREDOC + + SPLASH_2 = <<-HEREDOC + _/_/_/ _/_/_/ _/ _/ + _/ _/ _/_/ _/ _/ _/_/_/ _/ _/_/_/_/ _/_/ + _/ _/_/ _/ _/ _/_/ _/_/ _/ _/ _/_/_/_/ +_/ _/ _/ _/ _/_/ _/ _/ _/ _/ + _/_/_/ _/ _/_/_/ _/_/_/ _/_/_/ _/ _/_/ _/_/_/ + _/ + _/_/ +HEREDOC + + SPLASH_3 = <<-HEREDOC + @@@@@@@ @@@@@@@ @@@ @@@ @@@@@@ @@@@@@ @@@ @@@@@@@ @@@@@@@@ + !@@ @@! @@@ @@! !@@ !@@ !@@ @@! @@! @@! + !@! @!@!!@! !@!@! !@@!! !@@!! !!@ @!! @!!!:! + :!! !!: :!! !!: !:! !:! !!: !!: !!: + :: :: : : : : .: ::.: : ::.: : : : : :: ::: +HEREDOC + + SPLASH_4 = <<-HEREDOC + ██████╗██████╗ ██╗ ██╗███████╗███████╗██╗████████╗███████╗ +██╔════╝██╔══██╗╚██╗ ██╔╝██╔════╝██╔════╝██║╚══██╔══╝██╔════╝ +██║ ██████╔╝ ╚████╔╝ ███████╗███████╗██║ ██║ █████╗ +██║ ██╔══██╗ ╚██╔╝ ╚════██║╚════██║██║ ██║ ██╔══╝ +╚██████╗██║ ██║ ██║ ███████║███████║██║ ██║ ███████╗ + ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚══════╝ +HEREDOC + + SPLASH_5 = <<-HEREDOC + █████████ █████████ ███ █████ + ███░░░░░███ ███░░░░░███ ░░░ ░░███ + ███ ░░░ ████████ █████ ████ █████ ░███ ░░░ ████ ███████ ██████ +░███ ░░███░░███░░███ ░███ ███░░ ░░█████████ ░░███ ░░░███░ ███░░███ +░███ ░███ ░░░ ░███ ░███ ░░█████ ░░░░░░░░███ ░███ ░███ ░███████ +░░███ ███ ░███ ░███ ░███ ░░░░███ ███ ░███ ░███ ░███ ███░███░░░ + ░░█████████ █████ ░░███████ ██████ ░░█████████ █████ ░░█████ ░░██████ + ░░░░░░░░░ ░░░░░ ░░░░░███ ░░░░░░ ░░░░░░░░░ ░░░░░ ░░░░░ ░░░░░░ + ███ ░███ + ░░██████ + ░░░░░░ +HEREDOC + + SPLASH_6 = <<-HEREDOC + ▄▀▄▄▄▄ ▄▀▀▄▀▀▀▄ ▄▀▀▄ ▀▀▄ ▄▀▀▀▀▄ ▄▀▀▀▀▄ ▄▀▀█▀▄ ▄▀▀▀█▀▀▄ ▄▀▀█▄▄▄▄ +█ █ ▌ █ █ █ █ ▀▄ ▄▀ █ █ ▐ █ █ ▐ █ █ █ █ █ ▐ ▐ ▄▀ ▐ +▐ █ ▐ █▀▀█▀ ▐ █ ▀▄ ▀▄ ▐ █ ▐ ▐ █ █▄▄▄▄▄ + █ ▄▀ █ █ ▀▄ █ ▀▄ █ █ █ █ ▌ + ▄▀▄▄▄▄▀ █ █ ▄▀ █▀▀▀ █▀▀▀ ▄▀▀▀▀▀▄ ▄▀ ▄▀▄▄▄▄ +█ ▐ ▐ ▐ █ ▐ ▐ █ █ █ █ ▐ +▐ ▐ ▐ ▐ ▐ ▐ +HEREDOC + + SPLASH_7 = <<-HEREDOC +:'######::'########::'##:::'##::'######:::'######::'####:'########:'########: +'##... ##: ##.... ##:. ##:'##::'##... ##:'##... ##:. ##::... ##..:: ##.....:: + ##:::..:: ##:::: ##::. ####::: ##:::..:: ##:::..::: ##::::: ##:::: ##::::::: + ##::::::: ########::::. ##::::. ######::. ######::: ##::::: ##:::: ######::: + ##::::::: ##.. ##:::::: ##:::::..... ##::..... ##:: ##::::: ##:::: ##...:::: + ##::: ##: ##::. ##::::: ##::::'##::: ##:'##::: ##:: ##::::: ##:::: ##::::::: +. ######:: ##:::. ##:::: ##::::. ######::. ######::'####:::: ##:::: ########: +:......:::..:::::..:::::..::::::......::::......:::....:::::..:::::........:: +HEREDOC + + + SPLASH = [ + SPLASH_1, + SPLASH_2, + SPLASH_3, + SPLASH_4, + SPLASH_5, + SPLASH_6, + SPLASH_7, + ] + + def print_splash + puts SPLASH.sample + end + + end +end diff --git a/new/bin/server.rb b/new/bin/server.rb index c46253d..8133623 100755 --- a/new/bin/server.rb +++ b/new/bin/server.rb @@ -1,47 +1,14 @@ require "launchy" require_relative "../lib/crys" +require_relative "mixins/splash.rb" + module Crys class ServerRunner - SPLASH_1 = <<-HEREDOC - ▄████▄ ██▀███ ▓██ ██▓ ██████ ██████ ██▓▄▄▄█████▓▓█████ -▒██▀ ▀█ ▓██ ▒ ██▒ ▒██ ██▒▒██ ▒ ▒██ ▒ ▓██▒▓ ██▒ ▓▒▓█ ▀ -▒▓█ ▄ ▓██ ░▄█ ▒ ▒██ ██░░ ▓██▄ ░ ▓██▄ ▒██▒▒ ▓██░ ▒░▒███ -▒▓▓▄ ▄██▒▒██▀▀█▄ ░ ▐██▓░ ▒ ██▒ ▒ ██▒░██░░ ▓██▓ ░ ▒▓█ ▄ -▒ ▓███▀ ░░██▓ ▒██▒ ░ ██▒▓░▒██████▒▒▒██████▒▒░██░ ▒██▒ ░ ░▒████▒ -░ ░▒ ▒ ░░ ▒▓ ░▒▓░ ██▒▒▒ ▒ ▒▓▒ ▒ ░▒ ▒▓▒ ▒ ░░▓ ▒ ░░ ░░ ▒░ ░ - ░ ▒ ░▒ ░ ▒░ ▓██ ░▒░ ░ ░▒ ░ ░░ ░▒ ░ ░ ▒ ░ ░ ░ ░ ░ -░ ░░ ░ ▒ ▒ ░░ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ -░ ░ ░ ░ ░ ░ ░ ░ ░ ░ -░ ░ ░ -HEREDOC - - SPLASH_2 = <<-HEREDOC - _/_/_/ _/_/_/ _/ _/ - _/ _/ _/_/ _/ _/ _/_/_/ _/ _/_/_/_/ _/_/ - _/ _/_/ _/ _/ _/_/ _/_/ _/ _/ _/_/_/_/ -_/ _/ _/ _/ _/_/ _/ _/ _/ _/ - _/_/_/ _/ _/_/_/ _/_/_/ _/_/_/ _/ _/_/ _/_/_/ - _/ - _/_/ -HEREDOC - - SPLASH_3 = <<-HEREDOC -@@@@@@@ @@@@@@@ @@@ @@@ @@@@@@ @@@@@@ @@@ @@@@@@@ @@@@@@@@ -@@@@@@@@ @@@@@@@@ @@@ @@@ @@@@@@@ @@@@@@@ @@@ @@@@@@@ @@@@@@@@ -!@@ @@! @@@ @@! !@@ !@@ !@@ @@! @@! @@! -!@! !@! @!@ !@! @!! !@! !@! !@! !@! !@! -!@! @!@!!@! !@!@! !!@@!! !!@@!! !!@ @!! @!!!:! -!!! !!@!@! @!!! !!@!!! !!@!!! !!! !!! !!!!!: -:!! !!: :!! !!: !:! !:! !!: !!: !!: -:!: :!: !:! :!: !:! !:! :!: :!: :!: -::: ::: :: ::: :: :::: :: :::: :: :: :: :: :::: -:: :: : : : : : :: : : :: : : : : : :: :: -HEREDOC - - SPLASH = [SPLASH_1, SPLASH_2, SPLASH_3] + include Splash + def initialize(server_class:, root:, section:) @root = File.expand_path root @server = server_class.new(root: root) @@ -50,7 +17,7 @@ HEREDOC def serve puts "" - puts SPLASH.sample + print_splash puts "Hello mms to \e[1m" + section + "\e[22m" puts "Serving from: " + root puts "" |