lib/license_acceptance/acceptor.rb in license-acceptance-1.0.11 vs lib/license_acceptance/acceptor.rb in license-acceptance-1.0.12

- old
+ new

@@ -102,10 +102,11 @@ # Check whether the specified product requires license acceptance for the given version. def license_required?(mixlib_name, version) product = product_reader.lookup_by_mixlib(mixlib_name) return false if product.nil? # If they don't pass a version we assume they want latest - return true if version.to_s == "latest" || version.nil? + # All versions in all channels require license acceptance + return true if ["latest", "unstable", "current", "stable"].include?(version.to_s) || version.nil? Gem::Version.new(version) >= Gem::Version.new(product.license_required_version) end # Some callers only know about mixlib names so we need a way for them to get the product # id as this library knows it.