summaryrefslogtreecommitdiff
path: root/lib/chef/knife/cookbook_show.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/knife/cookbook_show.rb')
-rw-r--r--lib/chef/knife/cookbook_show.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/chef/knife/cookbook_show.rb b/lib/chef/knife/cookbook_show.rb
index 07f7684c27..2229bd9d0e 100644
--- a/lib/chef/knife/cookbook_show.rb
+++ b/lib/chef/knife/cookbook_show.rb
@@ -16,16 +16,16 @@
# limitations under the License.
#
-require 'chef/knife'
+require "chef/knife"
class Chef
class Knife
class CookbookShow < Knife
deps do
- require 'chef/json_compat'
- require 'uri'
- require 'chef/cookbook_version'
+ require "chef/json_compat"
+ require "uri"
+ require "chef/cookbook_version"
end
banner "knife cookbook show COOKBOOK [VERSION] [PART] [FILENAME] (options)"
@@ -65,7 +65,7 @@ class Chef
end
cookbook_name, segment, filename = @name_args[0], @name_args[2], @name_args[3]
- cookbook_version = @name_args[1] == 'latest' ? '_latest' : @name_args[1]
+ cookbook_version = @name_args[1] == "latest" ? "_latest" : @name_args[1]
cookbook = rest.get("cookbooks/#{cookbook_name}/#{cookbook_version}")
manifest_entry = cookbook.preferred_manifest_record(node, segment, filename)
@@ -76,11 +76,11 @@ class Chef
pretty_print(temp_file.read)
when 3 # We are showing a specific part of the cookbook
- cookbook_version = @name_args[1] == 'latest' ? '_latest' : @name_args[1]
+ cookbook_version = @name_args[1] == "latest" ? "_latest" : @name_args[1]
result = rest.get("cookbooks/#{@name_args[0]}/#{cookbook_version}")
output(result.manifest[@name_args[2]])
when 2 # We are showing the whole cookbook data
- cookbook_version = @name_args[1] == 'latest' ? '_latest' : @name_args[1]
+ cookbook_version = @name_args[1] == "latest" ? "_latest" : @name_args[1]
output(rest.get("cookbooks/#{@name_args[0]}/#{cookbook_version}"))
when 1 # We are showing the cookbook versions (all of them)
cookbook_name = @name_args[0]