lib/berkshelf/resolver.rb in berkshelf-3.0.0.beta9 vs lib/berkshelf/resolver.rb in berkshelf-3.0.0.rc1
- old
+ new
@@ -55,10 +55,13 @@
#
# @note this is the format that Solve uses to determine a solution for the graph
#
# @return [Array<String, String>]
def demand_array
- demands.collect { |demand| [ demand.name, demand.version_constraint ] }
+ demands.collect do |demand|
+ constraint = demand.locked_version || demand.version_constraint
+ [demand.name, constraint]
+ end
end
# Finds a solution for the currently added dependencies and their dependencies and
# returns an array of CachedCookbooks.
#