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.
253 254 255 256 |
# File 'lib/berkshelf/errors.rb', line 253 def initialize(locked_source, source) @locked_source = locked_source @source = source end |
Instance Method Details
#to_s ⇒ Object
258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/berkshelf/errors.rb', line 258 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 |