class ChefCLI::PolicyfileCompiler

def cookbook_demands_from_current

def cookbook_demands_from_current
  cookbooks_for_demands.map do |cookbook_name|
    spec = cookbook_location_spec_for(cookbook_name)
    if spec.nil?
      [ cookbook_name, DEFAULT_DEMAND_CONSTRAINT ]
    elsif spec.version_fixed?
      [ cookbook_name, "= #{spec.version}" ]
    else
      [ cookbook_name, spec.version_constraint.to_s ]
    end
  end
end