lib/awesome_bot/result.rb in awesome_bot-1.5.0 vs lib/awesome_bot/result.rb in awesome_bot-1.5.1

- old
+ new

@@ -1,9 +1,10 @@ -require 'awesome_bot/white_list' - # Result module AwesomeBot + require 'awesome_bot/statuses' + require 'awesome_bot/white_list' + # Result class Result attr_accessor :dupes attr_accessor :skip_dupe attr_accessor :status @@ -21,10 +22,10 @@ @links = links.partition { |u| AwesomeBot.white_list @w, u } end def statuses_issues(allow_redirects = false, allow_timeouts = false) s = status.select { |x| x['status'] != 200 } - r = s.reject { |x| (x['status'] > 299) && (x['status'] < 400) } + 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')) end if (allow_redirects == false) && (allow_timeouts == false)