# File lib/chef/knife/cookbook_site_show.rb, line 27 def run case @name_args.length when 1 cookbook_data = noauth_rest.get_rest("http://cookbooks.opscode.com/api/v1/cookbooks/#{@name_args[0]}") when 2 cookbook_data = noauth_rest.get_rest("http://cookbooks.opscode.com/api/v1/cookbooks/#{@name_args[0]}/versions/#{name_args[1].gsub('.', '_')}") end output(format_for_display(cookbook_data)) end