class Inspec::Requirement
def source_satisfies_spec?
def source_satisfies_spec? return true if version_constraints.empty? # Semverse::Constraint.satisfy_all returns a list of versions that match all of the # supplied constraints. Since we're only matching against a single version, the return # of satisfy_all will be non-empty if the profile version we have satisfies the constraints. constraints = @version_constraints.map { |x| Semverse::Constraint.new(x) } !Semverse::Constraint.satisfy_all(constraints, Semverse::Version.new(profile.version)).empty? end