Sha256: 4c9e9e8142efaa5fd56dd3cb3cd4b21a0bb0bf86b24f9d4e52c9fb7447eb10da

Contents?: true

Size: 637 Bytes

Versions: 8

Compression:

Stored size: 637 Bytes

Contents

require "hashie"

module Climine::Command
  class Status < Base

    desc "list", "get Redmine IssueStatuses."
    option :table, type: :boolean, aliases: '-t', desc: "default asc. ex) 'id,category:desc,updated_on'", default: false
    def list
      unless options[:table]
        render :statuses, redmine.statuses
      else
        render_table redmine.statuses.issue_statuses.map{|status|
          Hashie::Mash.new(
            id: status.id,
            name: status.name,
            is_default: status.is_default,
            is_closed: status.is_closed
          )
        }.sort{|a,b| a.id - b.id}
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
climine-0.1.1 lib/climine/command/status.rb
climine-0.1.0 lib/climine/command/status.rb
climine-0.0.8 lib/climine/command/status.rb
climine-0.0.7 lib/climine/command/status.rb
climine-0.0.6 lib/climine/command/status.rb
climine-0.0.5 lib/climine/command/status.rb
climine-0.0.4 lib/climine/command/status.rb
climine-0.0.3 lib/climine/command/status.rb