class ChefDK::IdDumper
Attributes
cb_path[R]
ui[R]
Public Class Methods
new(ui, cb_relpath)
click to toggle source
# File lib/chef-dk/command/describe_cookbook.rb, line 12 def initialize(ui, cb_relpath) @ui = ui @cb_path = cb_relpath end
Public Instance Methods
chefignore()
click to toggle source
# File lib/chef-dk/command/describe_cookbook.rb, line 43 def chefignore @chefignore ||= Chef::Cookbook::Chefignore.new(File.join(cookbook_path, "chefignore")) end
cookbook_loader()
click to toggle source
# File lib/chef-dk/command/describe_cookbook.rb, line 34 def cookbook_loader @cookbook_loader ||= begin loader = Chef::Cookbook::CookbookVersionLoader.new(cookbook_path, chefignore) loader.load! loader end end
cookbook_path()
click to toggle source
# File lib/chef-dk/command/describe_cookbook.rb, line 30 def cookbook_path File.expand_path(cb_path) end
cookbook_version()
click to toggle source
# File lib/chef-dk/command/describe_cookbook.rb, line 26 def cookbook_version @cookbook_version ||= cookbook_loader.cookbook_version end
run()
click to toggle source
# File lib/chef-dk/command/describe_cookbook.rb, line 17 def run id = ChefDK::CookbookProfiler::Identifiers.new(cookbook_version) ui.msg "Path: #{cookbook_path}" ui.msg "SemVer version: #{id.semver_version}" ui.msg "Identifier: #{id.content_identifier}" ui.msg "File fingerprints:" ui.msg id.fingerprint_text end