lib/claide/command/options.rb in claide-0.6.1 vs lib/claide/command/options.rb in claide-0.7.0
- old
+ new
@@ -8,20 +8,20 @@
# @return [Array<Array<String, String>>] The default options for a root
# command implemented by CLAide.
#
DEFAULT_ROOT_OPTIONS = [
['--completion-script', 'Print the auto-completion script'],
- ['--version', 'Show the version of the tool']
+ ['--version', 'Show the version of the tool'],
]
# @return [Array<Array<String, String>>] The default options implemented
# by CLAide.
#
DEFAULT_OPTIONS = [
['--verbose', 'Show more debugging information'],
['--no-ansi', 'Show output without ANSI codes'],
- ['--help', 'Show help banner of specified command']
+ ['--help', 'Show help banner of specified command'],
]
# @return [Array<Array<String, String>>] The list of the default
# options for the given command.
#
@@ -65,12 +65,11 @@
# The invoked command.
#
def self.print_version(command)
puts command.class.version
if command.verbose?
- prefix = command.class.plugin_prefix
- PluginsHelper.plugin_load_paths(prefix).each do |path|
- puts PluginsHelper.plugin_info(path)
+ PluginsHelper.specifications.each do |spec|
+ puts "#{spec.name}: #{spec.version}"
end
end
end
# Prints an auto-completion script according to the user shell.