Merge pull request #1376 from chef/chris-rock/supermarket-cli

print name for supermarket profiles
This commit is contained in:
Dominik Richter 2016-12-22 09:54:57 +01:00 committed by GitHub
commit dad96a0311
2 changed files with 2 additions and 2 deletions

View file

@ -12,7 +12,7 @@ module Supermarket
# displays a list of profiles
def self.profiles(supermarket_url = SUPERMARKET_URL)
url = "#{supermarket_url}/api/v1/tools-search"
_success, data = get(url, { type: 'compliance_profile', items: 100, order: 'recently_added' })
_success, data = get(url, { type: 'compliance_profile', items: 100 })
if !data.nil?
profiles = JSON.parse(data)
profiles['items'].map { |x|

View file

@ -22,7 +22,7 @@ module Supermarket
headline('Available profiles:')
supermarket_profiles.each { |p|
li("#{p['tool_owner']}/#{p['slug']}")
li("#{p['tool_name']} #{mark_text(p['tool_owner'] + '/' + p['slug'])}")
}
end