lib/tocer/cli/shell.rb in tocer-15.1.2 vs lib/tocer/cli/shell.rb in tocer-15.2.0

- old
+ new

@@ -4,32 +4,32 @@ module Tocer module CLI # The main Command Line Interface (CLI) object. class Shell - include Actions::Import[:config, :insert, :specification, :logger] + include Actions::Import[:config, :insert, :kernel, :logger, :specification] def initialize(parser: Parser.new, **) super(**) @parser = parser end def call arguments = Core::EMPTY_ARRAY act_on parser.call(arguments) rescue OptionParser::ParseError => error - puts error.message + logger.error { error.message } end private attr_reader :parser def act_on configuration case configuration in action_config: Symbol => action then config.call action in action_insert: true then insert.call configuration - in action_version: true then logger.info { specification.labeled_version } - else logger.any { parser.to_s } + in action_version: true then kernel.puts specification.labeled_version + else kernel.puts parser.to_s end end end end end