cleanup range check

This commit is contained in:
Viktor Szakats 2017-09-01 16:47:31 +00:00
parent 18f5b43d90
commit 42e2c71dbc

View File

@ -260,7 +260,7 @@ class FormulaAuditor
end end
lenratio = (100 * secure_details[:file].length / details[:file].length).to_i lenratio = (100 * secure_details[:file].length / details[:file].length).to_i
return if lenratio < 90 || lenratio > 110 return unless (90..110).cover?(lenratio)
"The URL #{url} may be able to use HTTPS rather than HTTP. Please verify it in a browser." "The URL #{url} may be able to use HTTPS rather than HTTP. Please verify it in a browser."
end end