Exception: Berkshelf::CookbookValidationFailure
- Inherits:
-
BerkshelfError
- Object
- StandardError
- BerkshelfError
- Berkshelf::CookbookValidationFailure
- Defined in:
- lib/berkshelf/errors.rb
Instance Method Summary collapse
-
#initialize(location, cached_cookbook) ⇒ CookbookValidationFailure
constructor
A new instance of CookbookValidationFailure.
- #to_s ⇒ Object
Methods inherited from BerkshelfError
Constructor Details
#initialize(location, cached_cookbook) ⇒ CookbookValidationFailure
Returns a new instance of CookbookValidationFailure.
221 222 223 224 |
# File 'lib/berkshelf/errors.rb', line 221 def initialize(location, cached_cookbook) @location = location @cached_cookbook = cached_cookbook end |
Instance Method Details
#to_s ⇒ Object
226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/berkshelf/errors.rb', line 226 def to_s [ "The cookbook downloaded from #{@location.to_s}:", " #{@cached_cookbook.cookbook_name} (#{@cached_cookbook.version})", "", "does not satisfy the version constraint:", " #{@cached_cookbook.cookbook_name} (#{@location.version_constraint})", "", "This occurs when the Chef Server has a cookbook with a missing/mis-matched version number in its `metadata.rb`", ].join("\n") end |