lib/awesome_bot/result.rb in awesome_bot-1.7.1 vs lib/awesome_bot/result.rb in awesome_bot-1.8.0

- old
+ new

@@ -24,21 +24,21 @@ def statuses_issues(allow_redirects = false, allow_timeouts = false) s = status.select { |x| x['status'] != 200 } r = s.reject { |x| AwesomeBot.status_is_redirected? x['status'] } t = s.reject do |x| - (x['status'] == -1) && ((x['error'].message == 'Net::ReadTimeout') || (x['error'].message == 'execution expired')) + (x['status'] == STATUS_ERROR) && ((x['error'].message == 'Net::ReadTimeout') || (x['error'].message == 'execution expired')) end if (allow_redirects == false) && (allow_timeouts == false) return s elsif (allow_redirects == true) && (allow_timeouts == false) return r elsif (allow_redirects == false) && (allow_timeouts == true) return t else return r.reject do |x| - (x['status'] == -1) && ((x['error'].message == 'Net::ReadTimeout') || (x['error'].message == 'execution expired')) + (x['status'] == STATUS_ERROR) && ((x['error'].message == 'Net::ReadTimeout') || (x['error'].message == 'execution expired')) end end end def success(allow_redirects = false, allow_timeouts = false)