Class: GDK::Command::Tail

Inherits:
BaseCommand show all
Defined in:
lib/gdk/command/tail.rb

Overview

Handles ‘gdk tail` command execution

This command accepts the following subcommands:

  • –help

Constant Summary collapse

OUTPUT =
<<~MSG
  Usage: gdk tail [[--help] | [<log_or_shortcut>[ <...>]]

  Tail command:

    gdk tail                                                  # Tail all log files (stdout and stderr only)
    gdk tail <log_or_shortcut>[ <...>]                        # Tail specified log files (stdout and stderr only)
    gdk tail --help                                           # Print this help text

  Available logs:

    %<logs>s

  Shortcuts:

    %<shortcuts>s

  To contribute to GitLab, see
  https://docs.gitlab.com/ee/development/index.html.
MSG

Instance Attribute Summary

Attributes inherited from BaseCommand

#stderr, #stdout

Instance Method Summary collapse

Methods inherited from BaseCommand

#config, #display_help_message, #help, #initialize, #print_ready_message, #ready_messages, validate_config?

Constructor Details

This class inherits a constructor from GDK::Command::BaseCommand

Instance Method Details

#run(args = []) ⇒ Object



31
32
33
34
35
# File 'lib/gdk/command/tail.rb', line 31

def run(args = [])
  return print_help if (args & ['--help', '-h']).any?

  Runit.tail(args)
end