Sha256: 566b1bc674e2aa16f1616a324ebd309b83e7a9dda4295f2a825b1debb90f5208

Contents?: true

Size: 1.77 KB

Versions: 2

Compression:

Stored size: 1.77 KB

Contents

# coding: utf-8
Dir[File.dirname(__FILE__) + '/cli/*.rb'].each {|file| require file  }

# The CLI Command structure for Thor
class CLI < Thor

  # callback for managing ARGV errors
  def self.exit_on_failure?
    true
  end

  # Constructor override to manage debug, colors and emoji options for logger
  def initialize(*args)
    super
    log = get_logger
    options[:colors.to_s]
    log.level = :debug if options[:debug]
    log.emoji  = options[:emoji.to_s]
    log.color  = options[:colors.to_s]
    log.debug  "DEBUG activated" if options[:debug]
  end

  class_option :quiet, :desc => "Quiet mode, limit output to :fatal", :aliases => "-q", :type => :boolean
  class_option :emoji, :desc => "Display Emoji", :type => :boolean, :default => true
  class_option :colors, :desc => "Display colors", :type => :boolean, :default => true
  class_option :debug, :desc => "Set log level to :debug", :aliases => "-d", :type => :boolean


  include CLISplash
  desc "commands SUBCOMMAND ...ARGS", "Managing commands/batchs supervision & orchestration"
  subcommand "commands", Commands
  desc "sequences SUBCOMMAND ...ARGS", "Managing Sequences of commands"
  subcommand "sequences", Sequences
  desc "logs SUBCOMMAND ...ARGS", "Managing Files/Logs supervision"
  subcommand "logs", Logs
  desc "processes SUBCOMMAND ...ARGS", "Managing processes supervision"
  subcommand "processes", Processes
  desc "daemon SUBCOMMAND ...ARGS", "Splash daemon controller"
  subcommand "daemon", CLIController
  desc "config SUBCOMMAND ...ARGS", "Config tools for Splash"
  subcommand "config", Config
  desc "documentation SUBCOMMAND ...ARGS", "Documentation for Splash"
  subcommand "documentation", Documentation
  desc "webadmin SUBCOMMAND ...ARGS", "Splash Webadmin daemon controller"
  subcommand "webadmin", WebAdmin


end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
prometheus-splash-0.7.0 lib/splash/cli.rb
prometheus-splash-0.6.1 lib/splash/cli.rb