Module: BotDetection

Included in:
ActionController::Base
Defined in:
lib/bot_detection.rb,
lib/bot_detection/version.rb

Defined Under Namespace

Modules: InstanceMethods

Constant Summary collapse

VERSION =
"0.9.9"
GOOGLE_USER_AGENTS =
[
  "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
  "Googlebot/2.1 (+http://www.google.com/bot.html)",
  "Googlebot-News",
  "Googlebot-Image/1.0",
  "Googlebot-Video/1.0",
  "(compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html)",
  "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
  "(compatible; Mediapartners-Google/2.1; +http://www.google.com/bot.html)",
  "Mediapartners-Google",
  "AdsBot-Google (+http://www.google.com/adsbot.html)",
  "Googlebot",
  "Googlebot-News (Googlebot)",
  "Googlebot-Image (Googlebot)",
  "Googlebot-Video (Googlebot)",
  "Googlebot-Mobile",
  "Mediapartners-Google",
  "Mediapartners (Googlebot)",
  "Mediapartners-Google Mediapartners (Googlebot)",
  "AdsBot-Google"
]

Class Method Summary collapse

Class Method Details

.included(target) ⇒ Object



4
5
6
# File 'lib/bot_detection.rb', line 4

def self.included(target)
  target.send(:include, BotDetection::InstanceMethods)
end