lib/kpm/tasks.rb in kpm-0.0.15 vs lib/kpm/tasks.rb in kpm-0.1.0

- old
+ new

@@ -25,12 +25,13 @@ method_option :verify_sha1, :type => :boolean, :default => true, :desc => 'Validate sha1 sum' desc 'install config_file', 'Install Kill Bill server and plugins according to the specified YAML configuration file.' - def install(config_file) - Installer.from_file(config_file).install(options[:force_download], options[:verify_sha1]) + def install(config_file=nil) + help = Installer.from_file(config_file).install(options[:force_download], options[:verify_sha1]) + say help, :green unless help.nil? end method_option :destination, :type => :string, :default => nil, @@ -222,9 +223,22 @@ end desc 'search_for_kaui', 'Searches for all versions of Kaui and prints them to the screen.' def search_for_kaui say "Available versions: #{KauiArtifact.versions(options[:overrides], options[:ssl_verify]).to_a.join(', ')}", :green + end + + method_option :version, + :type => :string, + :default => 'LATEST', + :desc => 'Kill Bill version' + desc 'info', 'Describe information about a Kill Bill version' + def info + info = KillbillServerArtifact.info(options[:version], + options[:overrides], + options[:ssl_verify]) + + say "Dependencies for version #{options[:version]}\n " + (info.map {|k,v| "#{k} #{v}"}).join("\n "), :green end private def logger