lib/inch/cli/command/options/base.rb in inch-0.3.0 vs lib/inch/cli/command/options/base.rb in inch-0.3.1.rc1

- old
+ new

@@ -127,27 +127,27 @@ opts.separator "Other options:" opts.on("--[no-]color", "Run without color") do |v| Term::ANSIColor::coloring = v end opts.on_tail('-v', '--version', 'Show version.') do - trace "inch #{Inch::VERSION}" + ui.trace "inch #{Inch::VERSION}" exit end opts.on_tail('-h', '--help', 'Show this help.') do - trace opts + ui.trace opts exit end end # Quits the application using `exit` # # @param msg [String,nil] optional, message to be displayed # @return [void] def kill(msg = nil) - warn usage - warn msg.red unless msg.nil? - warn "Try `--help' for more information." + ui.warn usage + ui.warn msg.red unless msg.nil? + ui.warn "Try `--help' for more information." exit 1 end # Parses the option and handles invalid switches # @@ -171,10 +171,10 @@ # Callback when an unrecognize option is parsed # # @param [OptionParser::ParseError] err the exception raised by the # option parser def unrecognized_option(err) - trace "Unrecognized/#{err.message}".red + ui.warn "Unrecognized/#{err.message}".red end end end end end