class WorkflowPluginBase

Base class for all workflow plugins

Constants

DESCF_FORMAT
DESC_HELP

Public Class Methods

descf(usage, args, description, options = {}) click to toggle source

Improves formatting for desc so that args are lain out nicely

# File lib/core/workflow_plugin_base.rb, line 34
def descf(usage, args, description, options = {})
  desc(format(DESCF_FORMAT, usage, args), description, options)
end
help_desc(help_desc) click to toggle source

rubocop:disable all

# File lib/core/workflow_plugin_base.rb, line 25
def help_desc(help_desc)
  @help_desc = help_desc
end
help_text() click to toggle source
# File lib/core/workflow_plugin_base.rb, line 29
def help_text
  @help_desc
end
new(args = [], options = {}, config = {}) click to toggle source
Calls superclass method
# File lib/core/workflow_plugin_base.rb, line 8
def initialize(args = [], options = {}, config = {})
  super(args, options, config)
  @logger = LogHelper.load_logger(self.class.name, @options)
end
subcommand_help(cmd) click to toggle source

Overrides the existing thor subcommand_help to improve formatting.

# File lib/core/workflow_plugin_base.rb, line 39
def subcommand_help(cmd)
  desc DESC_HELP, "Describe subcommands or one specific subcommand"
  class_eval "def help(command = nil, subcommand = true); super; end"
end

Public Instance Methods

bld() click to toggle source
# File lib/core/workflow_plugin_base.rb, line 53
def bld
  @build ||= PluginLoader.load_plugin Conf.build.action, "build_actions",
                                      @logger, options, Conf
end
help(command = nil, subcommand = false) click to toggle source
Calls superclass method
# File lib/core/workflow_plugin_base.rb, line 19
def help(command = nil, subcommand = false)
  super command, subcommand
end
vcs() click to toggle source
# File lib/core/workflow_plugin_base.rb, line 48
def vcs
  @vcs ||= PluginLoader.load_plugin Conf.vcs.action, "vcs_actions",
                                    @logger, options, Conf
end