REFACTOR: Rename GooglebotDetection to CrawlerDetection because we

will likely whitelist more crawlers in the future.
This commit is contained in:
Robin Ward
2014-02-20 16:07:02 -05:00
parent 7716d940a0
commit c4b5455c21
5 changed files with 34 additions and 34 deletions

5
lib/crawler_detection.rb Normal file
View File

@@ -0,0 +1,5 @@
module CrawlerDetection
def self.crawler?(user_agent)
!/Googlebot|Mediapartners|AdsBot/.match(user_agent).nil?
end
end