Module: Kdeploy::Banner

Defined in:
lib/kdeploy/banner.rb

Constant Summary collapse

ASCII_LOGO =
<<~'LOGO'
            _            _
    /\ /\__| | ___ _ __ | | ___  _   _
   / //_/ _` |/ _ \ '_ \| |/ _ \| | | |
  / __ \ (_| |  __/ |_) | | (_) | |_| |
  \/  \/\__,_|\___| .__/|_|\___/ \__, |
                  |_|            |___/
LOGO

Class Method Summary collapse

Class Method Details

.showObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/kdeploy/banner.rb', line 8

def show
  pastel = Pastel.new
  <<~BANNER
    #{pastel.bright_blue(ASCII_LOGO)}

    #{pastel.bright_yellow('')} #{pastel.bright_white('Lightweight Agentless Deployment Tool')}
    #{pastel.bright_yellow('🚀')} #{pastel.bright_white('Deploy with confidence, scale with ease')}

    =====================================================================================================

  BANNER
end

.show_error(message) ⇒ Object



30
31
32
33
34
35
36
37
# File 'lib/kdeploy/banner.rb', line 30

def show_error(message)
  pastel = Pastel.new
  <<~ERROR
    #{show}
    #{pastel.red("Error: #{message}")}

  ERROR
end

.show_success(message) ⇒ Object



39
40
41
42
43
44
45
46
# File 'lib/kdeploy/banner.rb', line 39

def show_success(message)
  pastel = Pastel.new
  <<~SUCCESS
    #{show}
    #{pastel.green("Success: #{message}")}

  SUCCESS
end

.show_versionObject



21
22
23
24
25
26
27
28
# File 'lib/kdeploy/banner.rb', line 21

def show_version
  pastel = Pastel.new
  <<~VERSION
    #{show}
    #{pastel.bright_white("Version: #{VERSION}")}

  VERSION
end