def table_heading(value)
headings = Hash.new do |hash,key|
items = key.to_s.split('_')
hash[key] = items.length > 1 ?
items.map{|x| headings[x.to_sym]}.join(' ') :
items.first.capitalize
end
headings.merge!({
:creation_time => "Created",
:expires_in_seconds => "Expires In",
:uuid => "ID",
:id => 'ID',
:current_scale => "Current",
:scales_from => "Minimum",
:scales_to => "Maximum",
:gear_sizes => "Allowed Gear Sizes",
:consumed_gears => "Gears Used",
:max_gears => "Gears Allowed",
:max_domains => "Domains Allowed",
:compact_members => "Members",
:gear_info => "Gears",
:plan_id => "Plan",
:url => "URL",
:ssh_string => "SSH",
:connection_info => "Connection URL",
:gear_profile => "Gear Size",
:visible_to_ssh? => 'Available',
:downloaded_cartridge_url => 'From',
:auto_deploy => 'Deployment',
:sha1 => 'SHA1',
:ref => 'Git Reference',
:use_authorization_tokens => 'Use Auth Tokens',
:ssl_ca_file => 'SSL Cert CA File',
:ssl_version => 'SSL Version',
:ssl_client_cert_file => 'SSL x509 Client Cert File',
:ssl_client_key_file => 'SSL x509 Client Key File',
:zones => 'Available Zones'
})
headings[value]
end