Class: CLISplash::Documentation

Inherits:
Thor
  • Object
show all
Includes:
Splash::Config, Splash::Exiter
Defined in:
lib/splash/cli/documentation.rb

Constant Summary

Constants included from Splash::Exiter

Splash::Exiter::EXIT_MAP

Constants included from Splash::Constants

Splash::Constants::AUTHOR, Splash::Constants::BACKENDS_STRUCT, Splash::Constants::CONFIG_FILE, Splash::Constants::COPYRIGHT, Splash::Constants::DAEMON_LOGMON_SCHEDULING, Splash::Constants::DAEMON_PID_FILE, Splash::Constants::DAEMON_PID_PATH, Splash::Constants::DAEMON_PROCESS_NAME, Splash::Constants::DAEMON_STDERR_TRACE, Splash::Constants::DAEMON_STDOUT_TRACE, Splash::Constants::EMAIL, Splash::Constants::EXECUTION_TEMPLATE, Splash::Constants::EXECUTION_TEMPLATE_TOKENS_LIST, Splash::Constants::LICENSE, Splash::Constants::LOGGERS_STRUCT, Splash::Constants::PROMETHEUS_PUSHGATEWAY_HOST, Splash::Constants::PROMETHEUS_PUSHGATEWAY_PORT, Splash::Constants::TRACE_PATH, Splash::Constants::TRANSPORTS_STRUCT, Splash::Constants::VERSION

Instance Method Summary collapse

Methods included from Splash::Exiter

#splash_exit

Methods included from Splash::Loggers

#change_logger, #get_logger

Methods included from Splash::Config

#get_config

Methods included from Splash::ConfigUtilities

#checkconfig, #setupsplash

Methods included from Splash::Helpers

#daemonize, #get_process, #group_root, #install_file, #is_root?, #make_folder, #make_link, #run_as_root, #search_file_in_gem, #user_root, #verify_file, #verify_folder, #verify_link, #verify_service

Instance Method Details

#readmeObject



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/splash/cli/documentation.rb', line 11

def readme
  filename = search_file_in_gem("prometheus-splash","README.md")

  if options[:formatted] then
    content = TTY::Markdown.parse_file(filename)
  else
    conten = File::readlines(filename).join
  end
  pager = TTY::Pager.new
  pager.page(content)
  splash_exit case: :quiet_exit
end