class Berkshelf::CookbookStore
def satisfy(name, constraint)
-
(Berkshelf::CachedCookbook, nil)
-
Parameters:
-
constraint
(Semverse::Constraint
) -- -
name
(#to_s
) --
def satisfy(name, constraint) graph = Solve::Graph.new cookbooks(name).each { |cookbook| graph.artifact(name, cookbook.version) } name, version = Solve.it!(graph, [[name, constraint]], ENV["DEBUG_RESOLVER"] ? { ui: Berkshelf.ui } : {}).first cookbook(name, version) rescue Solve::Errors::NoSolutionError nil end