lib/heirloom/cli/list.rb in heirloom-0.2.0 vs lib/heirloom/cli/list.rb in heirloom-0.3.0.rc1

- old
+ new

@@ -3,16 +3,19 @@ class List def initialize @opts = read_options @logger = HeirloomLogger.new :log_level => @opts[:level] + exit 1 unless CLI::Shared.valid_options? :provided => @opts, + :required => [:name], + :logger => @logger @archive = Archive.new :name => @opts[:name], :logger => @logger end def list(count = @opts[:count]) - puts @archive.list(count) + jj @archive.list(count) end private def read_options @@ -26,11 +29,11 @@ heirloom list -n NAME EOS opt :help, "Display Help" - opt :level, "Log level.", :type => :string, - :default => 'info' + opt :level, "Log level [debug|info|warn|error].", :type => :string, + :default => 'info' opt :name, "Name of archive.", :type => :string opt :count, "Number of versions to return.", :type => :integer, :default => 10 end end