Exception: Berkshelf::OutdatedDependency
- Inherits:
-
BerkshelfError
- Object
- StandardError
- BerkshelfError
- Berkshelf::OutdatedDependency
- Defined in:
- lib/berkshelf/errors.rb
Instance Method Summary collapse
-
#initialize(locked, dependency) ⇒ OutdatedDependency
constructor
A new instance of OutdatedDependency.
- #to_s ⇒ Object (also: #message)
Methods inherited from BerkshelfError
Constructor Details
#initialize(locked, dependency) ⇒ OutdatedDependency
Returns a new instance of OutdatedDependency.
283 284 285 286 |
# File 'lib/berkshelf/errors.rb', line 283 def initialize(locked, dependency) @locked = locked @dependency = dependency end |
Instance Method Details
#to_s ⇒ Object Also known as: message
288 289 290 291 292 293 294 295 296 |
# File 'lib/berkshelf/errors.rb', line 288 def to_s "Berkshelf could not find compatible versions for cookbook '#{@dependency.name}':\n" + " In Berksfile:\n" + " #{@dependency.name} (#{@dependency.version_constraint})\n\n" + " In Berksfile.lock:\n" + " #{@locked.name} (#{@locked.version})\n\n" + "Try running `berks update #{@dependency.name}`, which will try to find '#{@dependency.name}' matching " + "'#{@dependency.version_constraint}'." end |