def define_resource_requirements
super
requirements.assert(:install) do |a|
a.assertion { @new_resource.source }
a.failure_message Chef::Exceptions::Package, "Source for package #{@new_resource.name} required for action install"
end
requirements.assert(:all_actions) do |a|
a.assertion { !@new_resource.source || @package_source_found }
a.failure_message Chef::Exceptions::Package, "Package #{@new_resource.name} not found: #{@new_resource.source}"
a.whyrun "would assume #{@new_resource.source} would be have previously been made available"
end
end