class Chef::ChefFS::FileSystem::ChefServer::VersionedCookbookDir

Constants

VALID_VERSIONED_COOKBOOK_NAME

See Erchef code github.com/chef/chef_objects/blob/968a63344d38fd507f6ace05f73d53e9cd7fb043/src/chef_regex.erl#L94

Public Class Methods

new(name, parent, options = {}) click to toggle source
# File lib/chef/chef_fs/file_system/chef_server/versioned_cookbook_dir.rb, line 30
def initialize(name, parent, options = {})
  super(name, parent)
  # If the name is apache2-1.0.0 and versioned_cookbooks is on, we know
  # the actual cookbook_name and version.
  if name =~ VALID_VERSIONED_COOKBOOK_NAME
    @cookbook_name = $1
    @version = $2
  else
    @exists = false
  end
end