def chef_version_requirement
      if spec.metadata['halite_chef_version']
        # Manually overridden by gem metadata, use that.
        [spec.metadata['halite_chef_version']]
      elsif dep = spec.dependencies.find {|inner_dep| inner_dep.name == 'chef' && !inner_dep.requirement.none? }
        # Parse through the dependencies looking for something like `spec.add_dependency 'chef', '>= 12.1''`.
        dep.requirement.as_list
      else
        ['>= 12']
      end
    end
def chef_version_requirement
      if spec.metadata['halite_chef_version']
        # Manually overridden by gem metadata, use that.
        [spec.metadata['halite_chef_version']]
      elsif dep = spec.dependencies.find {|inner_dep| inner_dep.name == 'chef' && !inner_dep.requirement.none? }
        # Parse through the dependencies looking for something like `spec.add_dependency 'chef', '>= 12.1''`.
        dep.requirement.as_list
      else
        ['>= 12']
      end
    end
Figure out which version of Chef this cookbook requires. Returns an array
 of Gem::Requirement-style string like `~> 12.0`.

 @return [Array<String>]