summaryrefslogtreecommitdiff
path: root/chef/lib/chef/knife/cookbook_show.rb
diff options
context:
space:
mode:
authorTollef Fog Heen <tfheen@err.no>2010-04-19 21:45:30 +0200
committerDaniel DeLeo <dan@opscode.com>2010-05-01 10:00:18 -0700
commit3f686c1160ff83d80025cde6aad088b7007684e7 (patch)
treecf2c4146947b171abec9bc08fa002573d2bc793b /chef/lib/chef/knife/cookbook_show.rb
parent36b2259aff96e36ba12494887aa6ec4a49a031a3 (diff)
downloadchef-3f686c1160ff83d80025cde6aad088b7007684e7.tar.gz
Implement pluggable output formats for knife
You can now choose output formats for knife with the -f parameter. Initially, JSON and YAML are implemented.
Diffstat (limited to 'chef/lib/chef/knife/cookbook_show.rb')
-rw-r--r--chef/lib/chef/knife/cookbook_show.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/chef/lib/chef/knife/cookbook_show.rb b/chef/lib/chef/knife/cookbook_show.rb
index eaf23e65d3..ac255e8b13 100644
--- a/chef/lib/chef/knife/cookbook_show.rb
+++ b/chef/lib/chef/knife/cookbook_show.rb
@@ -52,9 +52,9 @@ class Chef
pretty_print(result)
when 2 # We are showing a specific part of the cookbook
result = rest.get_rest("cookbooks/#{@name_args[0]}")
- json_pretty_print(result[@name_args[1]])
+ output(result[@name_args[1]])
when 1 # We are showing the whole cookbook data
- json_pretty_print(rest.get_rest("cookbooks/#{@name_args[0]}"))
+ output(rest.get_rest("cookbooks/#{@name_args[0]}"))
end
end