Sha256: a990ee0dcea9b0ace0928f76dbdf7d82e84c2c12490de5a40732ce223736cdec
Contents?: true
Size: 1.05 KB
Versions: 19
Compression:
Stored size: 1.05 KB
Contents
COLORS_BY_PROPERTY_VALUES = { "Enabled" => :green, "Configurable" => :yellow, "Unavailable" => :underline } command :'app_ids:list' do |c| c.syntax = 'ios app_ids:list' c.summary = 'Lists the App IDs' c.description = '' c.action do |args, options| app_ids = try{agent.list_app_ids} title = "Legend: #{COLORS_BY_PROPERTY_VALUES.collect{|k, v| k.send(v)}.join(', ')}" table = Terminal::Table.new :title => title do |t| t << ["Bundle Seed ID", "Description", "Development", "Distribution"] app_ids.each do |app_id| t << :separator row = [app_id.bundle_seed_id, app_id.description] [app_id.development_properties, app_id.distribution_properties].each do |properties| values = [] properties.each do |key, value| color = COLORS_BY_PROPERTY_VALUES[value] || :reset values << key.sub(/\:$/, "").send(color) end row << values.join("\n") end t << row end end puts table end end alias_command :app_ids, :'app_ids:list'
Version data entries
19 entries across 19 versions & 1 rubygems