class CookbookOmnifetch::BaseLocation
def cached_cookbook
-
(CachedCookbook)
-
def cached_cookbook raise AbstractFunction, "#cached_cookbook must be implemented on #{self.class.name}!" end
def initialize(dependency, options = {})
def initialize(dependency, options = {}) @dependency = dependency @options = options end
def install
-
(void)
-
def install raise AbstractFunction, "#install must be implemented on #{self.class.name}!" end
def installed?
-
(Boolean)
-
def installed? raise AbstractFunction, "#installed? must be implemented on #{self.class.name}!" end
def lock_data
-
(Hash)
-
def lock_data raise AbstractFunction, "#to_lock must be implemented on #{self.class.name}!" end
def to_lock
-
(string)
-
def to_lock raise AbstractFunction, "#to_lock must be implemented on #{self.class.name}!" end
def validate_cached!(path)
-
(true)
-
Raises:
-
(MismatcheCookboookName)
- -
(CookbookValidationFailure)
- -
(NotACookbook)
-
Parameters:
-
path
(String
) --
def validate_cached!(path) unless CookbookOmnifetch.cookbook?(path) raise NotACookbook.new(path) end cookbook = CookbookOmnifetch.cached_cookbook_class.from_path(path) unless @dependency.version_constraint.satisfies?(cookbook.version) raise CookbookValidationFailure.new(dependency, cookbook) end unless @dependency.name == cookbook.cookbook_name raise MismatchedCookbookName.new(dependency, cookbook) end true end