Exception: Berkshelf::OutdatedCookbookSource
- Inherits:
-
BerkshelfError
- Object
- StandardError
- BerkshelfError
- Berkshelf::OutdatedCookbookSource
- Defined in:
- lib/berkshelf/errors.rb
Instance Method Summary collapse
-
#initialize(locked_source, source) ⇒ OutdatedCookbookSource
constructor
A new instance of OutdatedCookbookSource.
- #to_s ⇒ Object
Methods inherited from BerkshelfError
Constructor Details
#initialize(locked_source, source) ⇒ OutdatedCookbookSource
Returns a new instance of OutdatedCookbookSource.
266 267 268 269 |
# File 'lib/berkshelf/errors.rb', line 266 def initialize(locked_source, source) @locked_source = locked_source @source = source end |
Instance Method Details
#to_s ⇒ Object
271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/berkshelf/errors.rb', line 271 def to_s [ "Berkshelf could not find compatible versions for cookbook '#{@source.name}':", " In Berksfile:", " #{@source.name} (#{@source.version_constraint})", "", " In Berksfile.lock:", " #{@locked_source.name} (#{@locked_source.locked_version})", "", "Try running `berks update #{@source.name}, which will try to find '#{@source.name}' matching '#{@source.version_constraint}'.", ].join("\n") end |