lib/site_hook/cli.rb in site_hook-0.4.0 vs lib/site_hook/cli.rb in site_hook-0.5.0
- old
+ new
@@ -26,10 +26,19 @@
desc '--version, -v', 'Print the version'
# Prints version string
# @return [NilClass] nil
def __print_version
- puts SiteHook::VERSION
+ puts "Version: v#{SiteHook::VERSION}"
+ end
+
+ map %w(--gem-info --info --about) => :__gem_info
+ desc '--gem-info, --info, --about', 'Print info on the gem.'
+ def __gem_info
+ say "Gem Name: #{SiteHook::Gem::Info.name}"
+ say "Gem Constant: #{SiteHook::Gem::Info.constant_name}"
+ say "Gem Author: #{SiteHook::Gem::Info.author}"
+ say "Gem Version: v#{SiteHook::VERSION}"
end
method_option(:log_levels, type: :hash, banner: 'LEVELS', default: SiteHook.log_levels)
desc 'start', 'Start SiteHook'