lib/pennyworth/cli/shell.rb in pennyworth-11.2.2 vs lib/pennyworth/cli/shell.rb in pennyworth-12.0.0
- old
+ new
@@ -13,20 +13,20 @@
system_errors: Actions::System::Errors.new,
system_signals: Actions::System::Signals.new,
text: Actions::Text.new
}.freeze
- def initialize parser: Parsers::Assembler.new, actions: ACTIONS, container: Container
+ def initialize parser: Parser.new, actions: ACTIONS, container: Container
@parser = parser
@actions = actions
@container = container
end
def call arguments = []
perform parser.call(arguments)
rescue OptionParser::ParseError, KeyError => error
- logger.error error.message
+ logger.error { error.message }
end
private
attr_reader :parser, :actions, :container
@@ -41,10 +41,10 @@
in action_http_statuses: true then http_statuses
in action_ruby_gems: true then ruby_gems configuration
in action_system_signals: true then system_signals
in action_system_errors: true then system_errors
in action_text: String => content then text content
- in action_version: String => version then logger.info version
+ in action_version: true then logger.info { Identity::VERSION_LABEL }
else usage
end
end
# rubocop:enable Metrics/MethodLength