class LicenseAcceptance::Strategy::File
def accepted?(product_relationship)
For all the given products in the product set, search all possible locations for the
def accepted?(product_relationship) searching = [product_relationship.parent] + product_relationship.children missing_licenses = searching.clone logger.debug("Searching for the following licenses: #{missing_licenses.map(&:id)}") searching.each do |product| config.license_locations.each do |loc| f = ::File.join(loc, product.filename) if ::File.exist?(f) logger.debug("Found license #{product.filename} at #{f}") missing_licenses.delete(product) break end end break if missing_licenses.empty? end logger.debug("Missing licenses remaining: #{missing_licenses.map(&:id)}") missing_licenses end