### Home Classes Methods

### In Files

- lib/chef/cookbook/metadata.rb

### Parent

Object

### Methods

- ::from_hash
- ::from_json
- ::new
- ::validate_json
- #==
- #attribute
- #conflicts
- #depends
- #description
- #from_hash
- #from_json
- #grouping
- #license
- #long_description
- #maintainer
- #maintainer_email
- #name
- #provides
- #recipe
- #recommends
- #replaces
- #suggests
- #supports
- #to_hash
- #to_json

### Included Modules

- Chef::Mixin::ParamsValidate
- Chef::Mixin::FromFile

### Files

- LICENSE

### Class/Module Index

Quicksearch

- Chef
- Chef::ApiClient
- Chef::ApiClient::Registration
- Chef::Application
- Chef::Application::Apply
- Chef::Application::Client
- Chef::Application::Knife
- Chef::Application::Solo
- Chef::Application::Wakeup
- Chef::Application::WindowsService
- Chef::Checksum
- Chef::Checksum::Storage
- Chef::Checksum::Storage::Filesystem
- Chef::ChefFS
- Chef::ChefFS::CommandLine
- Chef::ChefFS::FilePattern
- Chef::ChefFS::FileSystem
- Chef::ChefFS::FileSystem::BaseFSDir
- Chef::ChefFS::FileSystem::BaseFSObject
- Chef::ChefFS::FileSystem::ChefRepositoryFileSystemEntry
- Chef::ChefFS::FileSystem::ChefRepositoryFileSystemRootDir
- Chef::ChefFS::FileSystem::ChefServerRootDir
- Chef::ChefFS::FileSystem::CookbookDir
- Chef::ChefFS::FileSystem::CookbookFile
- Chef::ChefFS::FileSystem::CookbookSubdir
- Chef::ChefFS::FileSystem::CookbooksDir
- Chef::ChefFS::FileSystem::DataBagDir
- Chef::ChefFS::FileSystem::DataBagItem
- Chef::ChefFS::FileSystem::DataBagsDir
- Chef::ChefFS::FileSystem::FileSystemEntry
- Chef::ChefFS::FileSystem::FileSystemError
- Chef::ChefFS::FileSystem::FileSystemRootDir
- Chef::ChefFS::FileSystem::MustDeleteRecursivelyError
- Chef::ChefFS::FileSystem::NodesDir
- Chef::ChefFS::FileSystem::NonexistentFSObject
- Chef::ChefFS::FileSystem::NotFoundError
- Chef::ChefFS::FileSystem::RestListDir
- Chef::ChefFS::FileSystem::RestListEntry
- Chef::ChefFS::Knife
- Chef::ChefFS::PathUtils
- Chef::Client
- Chef::Config
- Chef::Cookbook
- Chef::Cookbook::Chefignore
- Chef::Cookbook::CookbookVersionLoader
- Chef::Cookbook::FileSystemFileVendor
- Chef::Cookbook::FileVendor
- Chef::Cookbook::Metadata
- Chef::Cookbook::MinimalMetadata
- Chef::Cookbook::RemoteFileVendor
- Chef::Cookbook::SyntaxCheck
- Chef::Cookbook::SyntaxCheck::PersistentSet
- Chef::CookbookCacheCleaner
- Chef::CookbookCollection
- Chef::CookbookLoader
- Chef::CookbookSiteStreamingUploader
- Chef::CookbookSiteStreamingUploader::MultipartStream
- Chef::CookbookSiteStreamingUploader::StreamPart
- Chef::CookbookSiteStreamingUploader::StringPart
- Chef::CookbookSynchronizer
- Chef::CookbookUploader
- Chef::CookbookVersion
- Chef::DSL
- Chef::DSL::DataQuery
- Chef::DSL::IncludeAttribute
- Chef::DSL::IncludeRecipe
- Chef::DSL::PlatformIntrospection
- Chef::DSL::PlatformIntrospection::PlatformDependentValue
- Chef::DSL::PlatformIntrospection::PlatformFamilyDependentValue
- Chef::DSL::Recipe
- Chef::DSL::RegistryHelper
- Chef::Daemon
- Chef::DataBag
- Chef::DataBagItem
- Chef::Digester
- Chef::EncryptedDataBagItem
- Chef::EncryptedDataBagItem::DecryptionFailure
- Chef::EncryptedDataBagItem::Decryptor
- Chef::EncryptedDataBagItem::Decryptor::Version0Decryptor
- Chef::EncryptedDataBagItem::Decryptor::Version1Decryptor
- Chef::EncryptedDataBagItem::Encryptor
- Chef::EncryptedDataBagItem::UnsupportedCipher
- Chef::EncryptedDataBagItem::UnsupportedEncryptedDataBagItemFormat
- Chef::Environment
- Chef::EventDispatch
- Chef::EventDispatch::Base
- Chef::EventDispatch::Dispatcher
- Chef::Exceptions
- Chef::Exceptions::AmbiguousRunlistSpecification
- Chef::Exceptions::Application
- Chef::Exceptions::AttributeNotFound
- Chef::Exceptions::CannotDetermineNodeName
- Chef::Exceptions::CannotWritePrivateKey
- Chef::Exceptions::CommandTimeout
- Chef::Exceptions::ConfigurationError
- Chef::Exceptions::CookbookFrozen
- Chef::Exceptions::CookbookNotFound
- Chef::Exceptions::CookbookNotFoundInRepo
- Chef::Exceptions::CookbookVersionConflict
- Chef::Exceptions::CookbookVersionNameMismatch
- Chef::Exceptions::CookbookVersionSelection
- Chef::Exceptions::CookbookVersionSelection::InvalidRunListItems
- Chef::Exceptions::CookbookVersionSelection::UnsatisfiableRunListItem
- Chef::Exceptions::Cron
- Chef::Exceptions::DsclCommandFailed
- Chef::Exceptions::EnclosingDirectoryDoesNotExist
- Chef::Exceptions::Env
- Chef::Exceptions::ErlCall
- Chef::Exceptions::Exec
- Chef::Exceptions::FileNotFound
- Chef::Exceptions::Group
- Chef::Exceptions::GroupIDNotFound
- Chef::Exceptions::Ifconfig
- Chef::Exceptions::IllegalChecksumRevert
- Chef::Exceptions::ImmutableAttributeModification
- Chef::Exceptions::InsufficientPermissions
- Chef::Exceptions::InvalidCommandOption
- Chef::Exceptions::InvalidCookbookVersion
- Chef::Exceptions::InvalidDataBagItemID
- Chef::Exceptions::InvalidDataBagName
- Chef::Exceptions::InvalidDataBagPath
- Chef::Exceptions::InvalidEnvironmentRunListSpecification
- Chef::Exceptions::InvalidHomeDirectory
- Chef::Exceptions::InvalidPrivateKey
- Chef::Exceptions::InvalidRemoteFileURI
- Chef::Exceptions::InvalidRemoteGitReference
- Chef::Exceptions::InvalidResourceReference
- Chef::Exceptions::InvalidResourceSpecification
- Chef::Exceptions::InvalidVersionConstraint
- Chef::Exceptions::Link
- Chef::Exceptions::MissingLibrary
- Chef::Exceptions::MissingParentDirectory
- Chef::Exceptions::MissingRole
- Chef::Exceptions::Mount
- Chef::Exceptions::MultipleFailures
- Chef::Exceptions::ObsoleteDependencySyntax
- Chef::Exceptions::Override
- Chef::Exceptions::Package
- Chef::Exceptions::PrivateKeyMissing
- Chef::Exceptions::RecipeNotFound
- Chef::Exceptions::RedirectLimitExceeded
- Chef::Exceptions::RequestedUIDUnavailable
- Chef::Exceptions::ResourceNotFound
- Chef::Exceptions::RoleNotFound
- Chef::Exceptions::Route
- Chef::Exceptions::SearchIndex
- Chef::Exceptions::Service
- Chef::Exceptions::SolrConnectionError
- Chef::Exceptions::StaleAttributeRead
- Chef::Exceptions::UnresolvableGitReference
- Chef::Exceptions::UnsupportedAction
- Chef::Exceptions::User
- Chef::Exceptions::UserIDNotFound
- Chef::Exceptions::ValidationFailed
- Chef::Exceptions::Win32APIError
- Chef::Exceptions::Win32APIFunctionNotImplemented
- Chef::Exceptions::Win32NotWindows
- Chef::Exceptions::Win32RegArchitectureIncorrect
- Chef::Exceptions::Win32RegBadType
- Chef::Exceptions::Win32RegBadValueSize
- Chef::Exceptions::Win32RegDataMissing
- Chef::Exceptions::Win32RegHiveMissing
- Chef::Exceptions::Win32RegKeyMissing
- Chef::Exceptions::Win32RegNoRecursive
- Chef::Exceptions::Win32RegTypeDoesNotExist
- Chef::Exceptions::Win32RegTypesMismatch
- Chef::Exceptions::Win32RegValueExists
- Chef::Exceptions::Win32RegValueMissing
- Chef::Exceptions::WindowsNotAdmin
- Chef::FileAccessControl
- Chef::FileAccessControl::Unix
- Chef::FileAccessControl::Windows
- Chef::FileAccessControl::Windows::Security
- Chef::FileCache
- Chef::Formatters
- Chef::Formatters::APIErrorFormatting
- Chef::Formatters::Base
- Chef::Formatters::Doc
- Chef::Formatters::ErrorDescription
- Chef::Formatters::ErrorInspectors
- Chef::Formatters::ErrorInspectors::CompileErrorInspector
- Chef::Formatters::ErrorInspectors::CookbookResolveErrorInspector
- Chef::Formatters::ErrorInspectors::CookbookSyncErrorInspector
- Chef::Formatters::ErrorInspectors::NodeLoadErrorInspector
- Chef::Formatters::ErrorInspectors::RegistrationErrorInspector
- Chef::Formatters::ErrorInspectors::ResourceFailureInspector
- Chef::Formatters::ErrorInspectors::RunListExpansionErrorInspector
- Chef::Formatters::ErrorMapper
- Chef::Formatters::Minimal
- Chef::Formatters::NullFormatter
- Chef::Formatters::Outputter
- Chef::Formatters::UnknownFormatter
- Chef::Handler
- Chef::Handler::ErrorReport
- Chef::Handler::JsonFile
- Chef::JSONCompat
- Chef::Knife
- Chef::Knife::Bootstrap
- Chef::Knife::ClientBulkDelete
- Chef::Knife::ClientCreate
- Chef::Knife::ClientDelete
- Chef::Knife::ClientEdit
- Chef::Knife::ClientList
- Chef::Knife::ClientReregister
- Chef::Knife::ClientShow
- Chef::Knife::Configure
- Chef::Knife::ConfigureClient
- Chef::Knife::CookbookBulkDelete
- Chef::Knife::CookbookCreate
- Chef::Knife::CookbookDelete
- Chef::Knife::CookbookDownload
- Chef::Knife::CookbookList
- Chef::Knife::CookbookMetadata
- Chef::Knife::CookbookMetadataFromFile
- Chef::Knife::CookbookSCMRepo
- Chef::Knife::CookbookShow
- Chef::Knife::CookbookSiteDownload
- Chef::Knife::CookbookSiteInstall
- Chef::Knife::CookbookSiteList
- Chef::Knife::CookbookSiteSearch
- Chef::Knife::CookbookSiteShare
- Chef::Knife::CookbookSiteShow
- Chef::Knife::CookbookSiteUnshare
- Chef::Knife::CookbookSiteVendor
- Chef::Knife::CookbookTest
- Chef::Knife::CookbookUpload
- Chef::Knife::Core
- Chef::Knife::Core::BootstrapContext
- Chef::Knife::Core::GenericPresenter
- Chef::Knife::Core::NodeFormattingOptions
- Chef::Knife::Core::NodePresenter
- Chef::Knife::Core::ObjectLoader
- Chef::Knife::Core::ObjectLoader::ObjectType
- Chef::Knife::Core::TextFormatter
- Chef::Knife::DataBagCreate
- Chef::Knife::DataBagDelete
- Chef::Knife::DataBagEdit
- Chef::Knife::DataBagFromFile
- Chef::Knife::DataBagList
- Chef::Knife::DataBagShow
- Chef::Knife::Delete
- Chef::Knife::Diff
- Chef::Knife::Download
- Chef::Knife::EnvironmentCreate
- Chef::Knife::EnvironmentDelete
- Chef::Knife::EnvironmentEdit
- Chef::Knife::EnvironmentFromFile
- Chef::Knife::EnvironmentList
- Chef::Knife::EnvironmentShow
- Chef::Knife::Exec
- Chef::Knife::Help
- Chef::Knife::IndexRebuild
- Chef::Knife::List
- Chef::Knife::NodeBulkDelete
- Chef::Knife::NodeCreate
- Chef::Knife::NodeDelete
- Chef::Knife::NodeEdit
- Chef::Knife::NodeEditor
- Chef::Knife::NodeFromFile
- Chef::Knife::NodeList
- Chef::Knife::NodeRunListAdd
- Chef::Knife::NodeRunListRemove
- Chef::Knife::NodeShow
- Chef::Knife::Raw
- Chef::Knife::RecipeList
- Chef::Knife::RoleBulkDelete
- Chef::Knife::RoleCreate
- Chef::Knife::RoleDelete
- Chef::Knife::RoleEdit
- Chef::Knife::RoleFromFile
- Chef::Knife::RoleList
- Chef::Knife::RoleShow
- Chef::Knife::Search
- Chef::Knife::Show
- Chef::Knife::Ssh
- Chef::Knife::Status
- Chef::Knife::SubcommandLoader
- Chef::Knife::TagCreate
- Chef::Knife::TagDelete
- Chef::Knife::TagList
- Chef::Knife::UI
- Chef::Knife::Upload
- Chef::Knife::UserCreate
- Chef::Knife::UserDelete
- Chef::Knife::UserEdit
- Chef::Knife::UserList
- Chef::Knife::UserReregister
- Chef::Knife::UserShow
- Chef::Log
- Chef::Log::Formatter
- Chef::Mixin
- Chef::Mixin::Checksum
- Chef::Mixin::Command
- Chef::Mixin::Command::Unix
- Chef::Mixin::Command::Windows
- Chef::Mixin::ConvertToClassName
- Chef::Mixin::CreatePath
- Chef::Mixin::DeepMerge
- Chef::Mixin::DeepMerge::InvalidParameter
- Chef::Mixin::DeepMerge::InvalidSubtractiveMerge
- Chef::Mixin::DeprecatedLanguageModule
- Chef::Mixin::Deprecation
- Chef::Mixin::Deprecation::DeprecatedInstanceVariable
- Chef::Mixin::Deprecation::DeprecatedObjectProxyBase
- Chef::Mixin::EnforceOwnershipAndPermissions
- Chef::Mixin::FileClass
- Chef::Mixin::FromFile
- Chef::Mixin::GetSourceFromPackage
- Chef::Mixin::ParamsValidate
- Chef::Mixin::PathSanity
- Chef::Mixin::Securable
- Chef::Mixin::Securable::WindowsMacros
- Chef::Mixin::Securable::WindowsSecurableAttributes
- Chef::Mixin::ShellOut
- Chef::Mixin::Template
- Chef::Mixin::Template::ChefContext
- Chef::Mixin::Template::TemplateError
- Chef::Mixin::WhyRun
- Chef::Mixin::WhyRun::ConvergeActions
- Chef::Mixin::WhyRun::ResourceRequirements
- Chef::Mixin::WhyRun::ResourceRequirements::Assertion
- Chef::Mixin::WhyRun::ResourceRequirements::Assertion::AssertionFailure
- Chef::Mixin::XMLEscape
- Chef::Mixin::XMLEscape::FastXS
- Chef::Mixin::XMLEscape::PureRuby
- Chef::Node
- Chef::Node::AttrArray
- Chef::Node::Attribute
- Chef::Node::ImmutableArray
- Chef::Node::ImmutableMash
- Chef::Node::Immutablize
- Chef::Node::VividMash
- Chef::Platform
- Chef::Provider
- Chef::Provider::Breakpoint
- Chef::Provider::CookbookFile
- Chef::Provider::Cron
- Chef::Provider::Cron::Solaris
- Chef::Provider::Deploy
- Chef::Provider::Deploy::Revision
- Chef::Provider::Deploy::Timestamped
- Chef::Provider::Directory
- Chef::Provider::Env
- Chef::Provider::Env::Windows
- Chef::Provider::ErlCall
- Chef::Provider::Execute
- Chef::Provider::File
- Chef::Provider::Git
- Chef::Provider::Group
- Chef::Provider::Group::Aix
- Chef::Provider::Group::Dscl
- Chef::Provider::Group::Gpasswd
- Chef::Provider::Group::Groupadd
- Chef::Provider::Group::Groupmod
- Chef::Provider::Group::Pw
- Chef::Provider::Group::Suse
- Chef::Provider::Group::Usermod
- Chef::Provider::Group::Windows
- Chef::Provider::HttpRequest
- Chef::Provider::Ifconfig
- Chef::Provider::LWRPBase
- Chef::Provider::LWRPBase::InlineResources
- Chef::Provider::LWRPBase::InlineResources::ClassMethods
- Chef::Provider::Link
- Chef::Provider::Log
- Chef::Provider::Log::ChefLog
- Chef::Provider::Mdadm
- Chef::Provider::Mount
- Chef::Provider::Mount::Mount
- Chef::Provider::Mount::Windows
- Chef::Provider::Ohai
- Chef::Provider::Package
- Chef::Provider::Package::Apt
- Chef::Provider::Package::Dpkg
- Chef::Provider::Package::EasyInstall
- Chef::Provider::Package::Freebsd
- Chef::Provider::Package::Ips
- Chef::Provider::Package::Macports
- Chef::Provider::Package::Pacman
- Chef::Provider::Package::Portage
- Chef::Provider::Package::Rpm
- Chef::Provider::Package::Rubygems
- Chef::Provider::Package::Rubygems::AlternateGemEnvironment
- Chef::Provider::Package::Rubygems::CurrentGemEnvironment
- Chef::Provider::Package::Rubygems::GemEnvironment
- Chef::Provider::Package::SmartOS
- Chef::Provider::Package::Solaris
- Chef::Provider::Package::Yum
- Chef::Provider::Package::Yum::RPMDb
- Chef::Provider::Package::Yum::RPMDbPackage
- Chef::Provider::Package::Yum::RPMDependency
- Chef::Provider::Package::Yum::RPMPackage
- Chef::Provider::Package::Yum::RPMProvide
- Chef::Provider::Package::Yum::RPMRequire
- Chef::Provider::Package::Yum::RPMUtils
- Chef::Provider::Package::Yum::RPMVersion
- Chef::Provider::Package::Yum::YumCache
- Chef::Provider::Package::Zypper
- Chef::Provider::RegistryKey
- Chef::Provider::RemoteDirectory
- Chef::Provider::RemoteFile
- Chef::Provider::ResourceUpdate
- Chef::Provider::Route
- Chef::Provider::RubyBlock
- Chef::Provider::Script
- Chef::Provider::Service
- Chef::Provider::Service::Arch
- Chef::Provider::Service::Debian
- Chef::Provider::Service::Freebsd
- Chef::Provider::Service::Gentoo
- Chef::Provider::Service::Init
- Chef::Provider::Service::Insserv
- Chef::Provider::Service::Invokercd
- Chef::Provider::Service::Macosx
- Chef::Provider::Service::Redhat
- Chef::Provider::Service::Simple
- Chef::Provider::Service::Solaris
- Chef::Provider::Service::Systemd
- Chef::Provider::Service::Upstart
- Chef::Provider::Service::Windows
- Chef::Provider::Subversion
- Chef::Provider::Template
- Chef::Provider::TemplateFinder
- Chef::Provider::User
- Chef::Provider::User::Dscl
- Chef::Provider::User::Pw
- Chef::Provider::User::Useradd
- Chef::Provider::User::Windows
- Chef::REST
- Chef::REST::AuthCredentials
- Chef::REST::CookieJar
- Chef::REST::NoopInflater
- Chef::REST::RESTRequest
- Chef::Recipe
- Chef::ReservedNames
- Chef::ReservedNames::Win32
- Chef::ReservedNames::Win32::API
- Chef::ReservedNames::Win32::API::Error
- Chef::ReservedNames::Win32::API::File
- Chef::ReservedNames::Win32::API::File::BY_HANDLE_FILE_INFORMATION
- Chef::ReservedNames::Win32::API::File::FILETIME
- Chef::ReservedNames::Win32::API::File::REPARSE_DATA_BUFFER
- Chef::ReservedNames::Win32::API::File::REPARSE_DATA_BUFFER_GENERIC
- Chef::ReservedNames::Win32::API::File::REPARSE_DATA_BUFFER_MOUNT_POINT
- Chef::ReservedNames::Win32::API::File::REPARSE_DATA_BUFFER_SYMBOLIC_LINK
- Chef::ReservedNames::Win32::API::File::REPARSE_DATA_BUFFER_UNION
- Chef::ReservedNames::Win32::API::File::SECURITY_ATTRIBUTES
- Chef::ReservedNames::Win32::API::File::WIN32_FIND_DATA
- Chef::ReservedNames::Win32::API::Macros
- Chef::ReservedNames::Win32::API::Memory
- Chef::ReservedNames::Win32::API::PSAPI
- Chef::ReservedNames::Win32::API::PSAPI::PROCESS_MEMORY_COUNTERS
- Chef::ReservedNames::Win32::API::Process
- Chef::ReservedNames::Win32::API::Security
- Chef::ReservedNames::Win32::API::Security::ACE_HEADER
- Chef::ReservedNames::Win32::API::Security::ACE_WITH_MASK_AND_SID
- Chef::ReservedNames::Win32::API::Security::ACLStruct
- Chef::ReservedNames::Win32::API::Security::LUID
- Chef::ReservedNames::Win32::API::Security::LUID_AND_ATTRIBUTES
- Chef::ReservedNames::Win32::API::Security::TOKEN_PRIVILEGES
- Chef::ReservedNames::Win32::API::System
- Chef::ReservedNames::Win32::API::System::OSVERSIONINFOEX
- Chef::ReservedNames::Win32::API::Unicode
- Chef::ReservedNames::Win32::Error
- Chef::ReservedNames::Win32::File
- Chef::ReservedNames::Win32::File::Info
- Chef::ReservedNames::Win32::Handle
- Chef::ReservedNames::Win32::Memory
- Chef::ReservedNames::Win32::Process
- Chef::ReservedNames::Win32::Security
- Chef::ReservedNames::Win32::Security::ACE
- Chef::ReservedNames::Win32::Security::ACL
- Chef::ReservedNames::Win32::Security::SID
- Chef::ReservedNames::Win32::Security::SecurableObject
- Chef::ReservedNames::Win32::Security::SecurityDescriptor
- Chef::ReservedNames::Win32::Security::Token
- Chef::ReservedNames::Win32::Unicode
- Chef::ReservedNames::Win32::Version
- Chef::Resource
- Chef::Resource::AptPackage
- Chef::Resource::Bash
- Chef::Resource::Breakpoint
- Chef::Resource::ChefGem
- Chef::Resource::Conditional
- Chef::Resource::CookbookFile
- Chef::Resource::Cron
- Chef::Resource::Csh
- Chef::Resource::Deploy
- Chef::Resource::DeployBranch
- Chef::Resource::DeployRevision
- Chef::Resource::Directory
- Chef::Resource::DpkgPackage
- Chef::Resource::EasyInstallPackage
- Chef::Resource::Env
- Chef::Resource::ErlCall
- Chef::Resource::Execute
- Chef::Resource::File
- Chef::Resource::FreebsdPackage
- Chef::Resource::GemPackage
- Chef::Resource::Git
- Chef::Resource::Group
- Chef::Resource::HttpRequest
- Chef::Resource::Ifconfig
- Chef::Resource::IpsPackage
- Chef::Resource::LWRPBase
- Chef::Resource::Link
- Chef::Resource::Log
- Chef::Resource::MacportsPackage
- Chef::Resource::Mdadm
- Chef::Resource::Mount
- Chef::Resource::Notification
- Chef::Resource::Ohai
- Chef::Resource::Package
- Chef::Resource::PacmanPackage
- Chef::Resource::Perl
- Chef::Resource::PlatformMap
- Chef::Resource::PortagePackage
- Chef::Resource::Python
- Chef::Resource::RegistryKey
- Chef::Resource::RemoteDirectory
- Chef::Resource::RemoteFile
- Chef::Resource::Route
- Chef::Resource::RpmPackage
- Chef::Resource::Ruby
- Chef::Resource::RubyBlock
- Chef::Resource::Scm
- Chef::Resource::Script
- Chef::Resource::Service
- Chef::Resource::SmartOSPackage
- Chef::Resource::SolarisPackage
- Chef::Resource::Subversion
- Chef::Resource::Template
- Chef::Resource::TimestampedDeploy
- Chef::Resource::User
- Chef::Resource::YumPackage
- Chef::ResourceCollection
- Chef::ResourceCollection::StepableIterator
- Chef::ResourceDefinition
- Chef::ResourceDefinitionList
- Chef::ResourceReporter
- Chef::ResourceReporter::ResourceReport
- Chef::Role
- Chef::RunContext
- Chef::RunContext::CookbookCompiler
- Chef::RunList
- Chef::RunList::RunListExpansion
- Chef::RunList::RunListExpansionFromAPI
- Chef::RunList::RunListExpansionFromDisk
- Chef::RunList::RunListItem
- Chef::RunList::VersionedRecipeList
- Chef::RunLock
- Chef::RunStatus
- Chef::Runner
- Chef::Sandbox
- Chef::ScanAccessControl
- Chef::Search
- Chef::Search::Query
- Chef::ShellOut
- Chef::StreamingCookbookUploader
- Chef::StreamingCookbookUploader::MultipartStream
- Chef::StreamingCookbookUploader::StreamPart
- Chef::StreamingCookbookUploader::StringPart
- Chef::User
- Chef::Util
- Chef::Util::FileEdit
- Chef::Util::Windows
- Chef::Util::Windows::NetGroup
- Chef::Util::Windows::NetUse
- Chef::Util::Windows::NetUser
- Chef::Util::Windows::Volume
- Chef::Version
- Chef::VersionConstraint
- Chef::Win32
- Chef::Win32::Registry
- Shell
- Shell::ClientSession
- Shell::DoppelGangerClient
- Shell::DoppelGangerSession
- Shell::Extensions
- Shell::Extensions::FalseClass
- Shell::Extensions::ObjectCoreExtensions
- Shell::Extensions::String
- Shell::Extensions::Symbol
- Shell::Extensions::TrueClass
- Shell::ModelWrapper
- Shell::NamedDataBagWrapper
- Shell::Options
- Shell::ShellREST
- Shell::ShellSession
- Shell::SoloSession
- Shell::StandAloneSession
- Net
- Net::HTTPError
- Net::HTTPFatalError
- Net::HTTPRetriableError
- Net::HTTPServerException
- FFI
- FFI::Pointer
- FileUtils
- FileUtils::Entry_
- ChefNetHTTPExceptionExtensions
- Dir
- FalseClass
- Mash
- Numeric
- Object
- Regexp
- String
- Symbol
- TrueClass

No matching classes.

# Chef::Cookbook::Metadata

Chef::Cookbook::Metadata provides a convenient DSL for declaring metadata about Chef Cookbooks.

### Constants

ATTRIBUTES
COMPARISON_FIELDS
CONFLICTING
DEPENDENCIES
DESCRIPTION
GROUPINGS
LICENSE
LONG_DESCRIPTION
MAINTAINER
MAINTAINER_EMAIL
NAME
PLATFORMS
PROVIDING
RECIPES
RECOMMENDATIONS
REPLACING
SUGGESTIONS
VERSION
VERSION_CONSTRAINTS

### Attributes

attributes[R]
conflicting[R]
cookbook[R]
dependencies[R]
groupings[R]
platforms[R]
providing[R]
recipes[R]
recommendations[R]
replacing[R]
suggestions[R]
version[R]

### Public Class Methods

from_hash(o) click to toggle source

    # File lib/chef/cookbook/metadata.rb, line 447
    def self.from_hash(o)
      cm = self.new()
      cm.from_hash(o)
      cm
    end

from_json(string) click to toggle source

    # File lib/chef/cookbook/metadata.rb, line 474
    def self.from_json(string)
      o = Chef::JSONCompat.from_json(string)
      self.from_hash(o)
    end

new(cookbook=nil, maintainer='YOUR_COMPANY_NAME', maintainer_email='YOUR_EMAIL', license='none') click to toggle source

Builds a new Chef::Cookbook::Metadata object.

### Parameters

cookbook<String> | An optional cookbook object
maintainer<String> | An optional maintainer
maintainer_email<String> | An optional maintainer email

license<String>::An optional license. Default is Apache v2.0

### Returns

metadata<Chef::Cookbook::Metadata>

    # File lib/chef/cookbook/metadata.rb, line 92
    def initialize(cookbook=nil, maintainer='YOUR_COMPANY_NAME', maintainer_email='YOUR_EMAIL', license='none')
      @cookbook = cookbook
      @name = cookbook ? cookbook.name : ""
      @long_description = ""
      self.maintainer(maintainer)
      self.maintainer_email(maintainer_email)
      self.license(license)
      self.description('A fabulous new cookbook')
      @platforms = Mash.new
      @dependencies = Mash.new
      @recommendations = Mash.new
      @suggestions = Mash.new
      @conflicting = Mash.new
      @providing = Mash.new
      @replacing = Mash.new
      @attributes = Mash.new
      @groupings = Mash.new
      @recipes = Mash.new
      @version = Version.new "0.0.0"
      if cookbook
        @recipes = cookbook.fully_qualified_recipe_names.inject({}) do |r, e|
          e = self.name if e =~ /::default$/
          r[e] = ""
          self.provides e
          r
        end
      end
    end

validate_json(json_str) click to toggle source

    # File lib/chef/cookbook/metadata.rb, line 479
    def self.validate_json(json_str)
      o = Chef::JSONCompat.from_json(json_str)
      metadata = new()
      VERSION_CONSTRAINTS.each do |method_name, hash_key|
        if constraints = o[hash_key]
         constraints.each do |cb_name, constraints|
           metadata.send(method_name, cb_name, *Array(constraints))
         end
        end
      end
      true
    end

### Public Instance Methods

==(other) click to toggle source

    # File lib/chef/cookbook/metadata.rb, line 121
    def ==(other)
      COMPARISON_FIELDS.inject(true) do |equal_so_far, field|
        equal_so_far && other.respond_to?(field) && (other.send(field) == send(field))
      end
    end

attribute(name, options) click to toggle source

Adds an attribute )hat a user needs to configure for this cookbook. Takes a name (with the / notation for a nested attribute), followed by any of these options

    display_name<String>:: What a UI should show for this attribute
    description<String>:: A hint as to what this attr is for
    choice<Array>:: An array of choices to present to the user.
    calculated<Boolean>:: If true, the default value is calculated by the recipe and cannot be displayed.
    type<String>:: "string" or "array" - default is "string"  ("hash" is supported for backwards compatibility)
    required<String>:: Whether this attr is 'required', 'recommended' or 'optional' - default 'optional' (true/false values also supported for backwards compatibility)
    recipes<Array>:: An array of recipes which need this attr set.
    default<String>,<Array>,<Hash>:: The default value

### Parameters

name<String> | The name of the attribute ('foo', or 'apache2/log_dir')
options<Hash> | The description of the options

### Returns

options<Hash> | Returns the current options hash

    # File lib/chef/cookbook/metadata.rb, line 386
    def attribute(name, options)
      validate(
        options,
        {
          :display_name => { :kind_of => String },
          :description => { :kind_of => String },
          :choice => { :kind_of => [ Array ], :default => [] },
          :calculated => { :equal_to => [ true, false ], :default => false },
          :type => { :equal_to => [ "string", "array", "hash", "symbol" ], :default => "string" },
          :required => { :equal_to => [ "required", "recommended", "optional", true, false ], :default => "optional" },
          :recipes => { :kind_of => [ Array ], :default => [] },
          :default => { :kind_of => [ String, Array, Hash ] }
        }
      )
      options[:required] = remap_required_attribute(options[:required]) unless options[:required].nil?
      validate_string_array(options[:choice])
      validate_calculated_default_rule(options)
      validate_choice_default_rule(options)

      @attributes[name] = options
      @attributes[name]
    end

conflicts(cookbook, *version_args) click to toggle source

Adds a conflict for another cookbook, with version checking strings.

### Parameters

cookbook<String> | The cookbook
version<String> | A version constraint of the form "OP VERSION",

where OP is one of < <= = > >= ~> and VERSION has the form x.y.z or x.y.

### Returns

versions<Array> | Returns the list of versions for the platform

    # File lib/chef/cookbook/metadata.rb, line 311
    def conflicts(cookbook, *version_args)
      version = new_args_format(:conflicts, cookbook, version_args)
      validate_version_constraint(:conflicts, cookbook, version)
      @conflicting[cookbook] = version
      @conflicting[cookbook]
    end

depends(cookbook, *version_args) click to toggle source

Adds a dependency on another cookbook, with version checking strings.

### Parameters

cookbook<String> | The cookbook
version<String> | A version constraint of the form "OP VERSION",

where OP is one of < <= = > >= ~> and VERSION has the form x.y.z or x.y.

### Returns

versions<Array> | Returns the list of versions for the platform

    # File lib/chef/cookbook/metadata.rb, line 260
    def depends(cookbook, *version_args)
      version = new_args_format(:depends, cookbook, version_args)
      validate_version_constraint(:depends, cookbook, version)
      @dependencies[cookbook] = version
      @dependencies[cookbook]
    end

description(arg=nil) click to toggle source

Sets the current description, or returns it. Should be short - one line only!

### Parameters

description<String> | The new description

### Returns

description<String> | Returns the description

    # File lib/chef/cookbook/metadata.rb, line 179
    def description(arg=nil)
      set_or_return(
        :description,
        arg,
        :kind_of => [ String ]
      )
    end

from_hash(o) click to toggle source

    # File lib/chef/cookbook/metadata.rb, line 453
    def from_hash(o)
      @name                         = o[NAME] if o.has_key?(NAME)
      @description                  = o[DESCRIPTION] if o.has_key?(DESCRIPTION)
      @long_description             = o[LONG_DESCRIPTION] if o.has_key?(LONG_DESCRIPTION)
      @maintainer                   = o[MAINTAINER] if o.has_key?(MAINTAINER)
      @maintainer_email             = o[MAINTAINER_EMAIL] if o.has_key?(MAINTAINER_EMAIL)
      @license                      = o[LICENSE] if o.has_key?(LICENSE)
      @platforms                    = o[PLATFORMS] if o.has_key?(PLATFORMS)
      @dependencies                 = handle_deprecated_constraints(o[DEPENDENCIES]) if o.has_key?(DEPENDENCIES)
      @recommendations              = handle_deprecated_constraints(o[RECOMMENDATIONS]) if o.has_key?(RECOMMENDATIONS)
      @suggestions                  = handle_deprecated_constraints(o[SUGGESTIONS]) if o.has_key?(SUGGESTIONS)
      @conflicting                  = handle_deprecated_constraints(o[CONFLICTING]) if o.has_key?(CONFLICTING)
      @providing                    = o[PROVIDING] if o.has_key?(PROVIDING)
      @replacing                    = handle_deprecated_constraints(o[REPLACING]) if o.has_key?(REPLACING)
      @attributes                   = o[ATTRIBUTES] if o.has_key?(ATTRIBUTES)
      @groupings                    = o[GROUPINGS] if o.has_key?(GROUPINGS)
      @recipes                      = o[RECIPES] if o.has_key?(RECIPES)
      @version                      = o[VERSION] if o.has_key?(VERSION)
      self
    end

from_json(string) click to toggle source

    # File lib/chef/cookbook/metadata.rb, line 492
    def from_json(string)
      o = Chef::JSONCompat.from_json(string)
      from_hash(o)
    end

grouping(name, options) click to toggle source

    # File lib/chef/cookbook/metadata.rb, line 409
    def grouping(name, options)
      validate(
        options,
        {
          :title => { :kind_of => String },
          :description => { :kind_of => String }
        }
      )
      @groupings[name] = options
      @groupings[name]
    end

license(arg=nil) click to toggle source

Sets the current license, or returns it.

### Parameters

license<String> | The current license.

### Returns

license<String> | Returns the current license

    # File lib/chef/cookbook/metadata.rb, line 164
    def license(arg=nil)
      set_or_return(
        :license,
        arg,
        :kind_of => [ String ]
      )
    end

long_description(arg=nil) click to toggle source

Sets the current long description, or returns it. Might come from a README, say.

### Parameters

long_description<String> | The new long description

### Returns

long_description<String> | Returns the long description

    # File lib/chef/cookbook/metadata.rb, line 194
    def long_description(arg=nil)
      set_or_return(
        :long_description,
        arg,
        :kind_of => [ String ]
      )
    end

maintainer(arg=nil) click to toggle source

Sets the cookbooks maintainer, or returns it.

### Parameters

maintainer<String> | The maintainers name

### Returns

maintainer<String> | Returns the current maintainer.

    # File lib/chef/cookbook/metadata.rb, line 134
    def maintainer(arg=nil)
      set_or_return(
        :maintainer,
        arg,
        :kind_of => [ String ]
      )
    end

maintainer_email(arg=nil) click to toggle source

Sets the maintainers email address, or returns it.

### Parameters

maintainer_email<String> | The maintainers email address

### Returns

maintainer_email<String> | Returns the current maintainer email.

    # File lib/chef/cookbook/metadata.rb, line 149
    def maintainer_email(arg=nil)
      set_or_return(
        :maintainer_email,
        arg,
        :kind_of => [ String ]
      )
    end

name(arg=nil) click to toggle source

Sets the name of the cookbook, or returns it.

### Parameters

name<String> | The curent cookbook name.

### Returns

name<String> | Returns the current cookbook name.

    # File lib/chef/cookbook/metadata.rb, line 225
    def name(arg=nil)
      set_or_return(
        :name,
        arg,
        :kind_of => [ String ]
      )
    end

provides(cookbook, *version_args) click to toggle source

Adds a recipe, definition, or resource provided by this cookbook.

Recipes are specified as normal Definitions are followed by (), and can include :params for prototyping Resources are the stringified version (service)

### Parameters

recipe, definition, resource<String> | The thing we provide
version<String> | A version constraint of the form "OP VERSION",

where OP is one of < <= = > >= ~> and VERSION has the form x.y.z or x.y.

### Returns

versions<Array> | Returns the list of versions for the platform

    # File lib/chef/cookbook/metadata.rb, line 332
    def provides(cookbook, *version_args)
      version = new_args_format(:provides, cookbook, version_args)
      validate_version_constraint(:provides, cookbook, version)
      @providing[cookbook] = version
      @providing[cookbook]
    end

recipe(name, description) click to toggle source

Adds a description for a recipe.

### Parameters

recipe<String> | The recipe
description<String> | The description of the recipe

### Returns

description<String> | Returns the current description

    # File lib/chef/cookbook/metadata.rb, line 363
    def recipe(name, description)
      @recipes[name] = description
    end

recommends(cookbook, *version_args) click to toggle source

Adds a recommendation for another cookbook, with version checking strings.

### Parameters

cookbook<String> | The cookbook
version<String> | A version constraint of the form "OP VERSION",

where OP is one of < <= = > >= ~> and VERSION has the form x.y.z or x.y.

### Returns

versions<Array> | Returns the list of versions for the platform

    # File lib/chef/cookbook/metadata.rb, line 277
    def recommends(cookbook, *version_args)
      version = new_args_format(:recommends, cookbook,  version_args)
      validate_version_constraint(:recommends, cookbook, version)
      @recommendations[cookbook] = version
      @recommendations[cookbook]
    end

replaces(cookbook, *version_args) click to toggle source

Adds a cookbook that is replaced by this one, with version checking strings.

### Parameters

cookbook<String> | The cookbook we replace
version<String> | A version constraint of the form "OP VERSION",

where OP is one of < <= = > >= ~> and VERSION has the form x.y.z or x.y.

### Returns

versions<Array> | Returns the list of versions for the platform

    # File lib/chef/cookbook/metadata.rb, line 348
    def replaces(cookbook, *version_args)
      version = new_args_format(:replaces, cookbook, version_args)
      validate_version_constraint(:replaces, cookbook, version)
      @replacing[cookbook] = version
      @replacing[cookbook]
    end

suggests(cookbook, *version_args) click to toggle source

Adds a suggestion for another cookbook, with version checking strings.

### Parameters

cookbook<String> | The cookbook
version<String> | A version constraint of the form "OP VERSION",

where OP is one of < <= = > >= ~> and VERSION has the formx.y.z or x.y.

### Returns

versions<Array> | Returns the list of versions for the platform

    # File lib/chef/cookbook/metadata.rb, line 294
    def suggests(cookbook, *version_args)
      version = new_args_format(:suggests, cookbook, version_args)
      validate_version_constraint(:suggests, cookbook, version)
      @suggestions[cookbook] = version
      @suggestions[cookbook]
    end

supports(platform, *version_args) click to toggle source

Adds a supported platform, with version checking strings.

### Parameters

platform<String>,<Symbol> | The platform (like :ubuntu or :mac_os_x)
version<String> | A version constraint of the form "OP VERSION",

where OP is one of < <= = > >= ~> and VERSION has the form x.y.z or x.y.

### Returns

versions<Array> | Returns the list of versions for the platform

    # File lib/chef/cookbook/metadata.rb, line 243
    def supports(platform, *version_args)
      version = new_args_format(:supports, platform, version_args)
      validate_version_constraint(:supports, platform, version)
      @platforms[platform] = version
      @platforms[platform]
    end

to_hash() click to toggle source

    # File lib/chef/cookbook/metadata.rb, line 421
    def to_hash
      {
        NAME             => self.name,
        DESCRIPTION      => self.description,
        LONG_DESCRIPTION => self.long_description,
        MAINTAINER       => self.maintainer,
        MAINTAINER_EMAIL => self.maintainer_email,
        LICENSE          => self.license,
        PLATFORMS        => self.platforms,
        DEPENDENCIES     => self.dependencies,
        RECOMMENDATIONS  => self.recommendations,
        SUGGESTIONS      => self.suggestions,
        CONFLICTING      => self.conflicting,
        PROVIDING        => self.providing,
        REPLACING        => self.replacing,
        ATTRIBUTES       => self.attributes,
        GROUPINGS        => self.groupings,
        RECIPES          => self.recipes,
        VERSION          => self.version
      }
    end

to_json(*a) click to toggle source

    # File lib/chef/cookbook/metadata.rb, line 443
    def to_json(*a)
      self.to_hash.to_json(*a)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.