bot_detection 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d3eb0c816dab6abd7bedf902b7064e55d87b6b3
4
- data.tar.gz: 31db977a5485d47cf579822b3e6a46297730ff91
3
+ metadata.gz: e95e799dda05201285a7785ebcdbd4bfac871278
4
+ data.tar.gz: a33bfd5449247970885c9687a3b7d9fbd7c14d0e
5
5
  SHA512:
6
- metadata.gz: 9dec5f7768f8a9d382c7a6faa045977e649b89e8e05a0f25f90224f97333e65a33edf023960162c91a11e21c0ebc78ec0f145cba22b06f20c8f71687e670f81a
7
- data.tar.gz: ce183a9aa5f595fe46eaa1e9a3a7de8972b4a86d22cb66c4c29e3bf591e80f6f3b80790ad12808b8fb739d1a1d0d8732d1cc7d1815b6cd09477a9eeff0816f74
6
+ metadata.gz: d6fb0bbbc3591a8cc295286b7cc2534fe38130cb9a6e422542aecf3aecbe642bb426a2fc222fd4a15e45ab6e72c6dc9ef10da2d9da4d44cbb512eeee79ba84bd
7
+ data.tar.gz: 89aeb6ec92cc70e203e390ceea71cb49d3edd523e11fb0f3fbd0a65a82e8e6ef28bc082772966c1deacfc62b6ceed720e8e05090fc12383499ebc088ac2e40d6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ #### Release 1.0.2
4
+
5
+ - added some new user agents to the list of known bots
6
+
3
7
  #### Release 1.0.1
4
8
 
5
9
  - Yandex support added
data/README.md CHANGED
@@ -1,20 +1,31 @@
1
1
  # BotDetection
2
2
 
3
- TODO: Write a gem description
3
+ BotDetection will help you identify users on your site as search engine crawlers or other bots like Facebook spiders.
4
+ Currently supported Bots are:
5
+
6
+ - Search Engines:
7
+ - all known Google-Bots
8
+ - Yahoo
9
+ - MSN
10
+ - Bing
11
+ - Yandex
12
+ - Baidu
13
+ - Bots
14
+ - Facebook
4
15
 
5
16
  ## Installation
6
17
 
7
18
  Add this line to your application's Gemfile:
8
19
 
9
- gem 'bot_detection'
20
+ gem 'bot_detection'
10
21
 
11
22
  And then execute:
12
23
 
13
- $ bundle
24
+ $ bundle
14
25
 
15
26
  Or install it yourself as:
16
27
 
17
- $ gem install bot_detection
28
+ $ gem install bot_detection
18
29
 
19
30
  ## Changes
20
31
 
@@ -22,11 +33,23 @@ See the [CHANGELOG.md](CHANGELOG.md) file for details.
22
33
 
23
34
  ## Usage
24
35
 
25
- TODO: Write usage instructions here
36
+ After installing the GEM you can use within your controllers or helpers the following methods
37
+
38
+ # this will return true if user agent and reverse DNS lookup will match one bot out of the database otherwise false is returned
39
+ is_search_engine_crawler?
40
+
41
+ # this will return true if user agent will match one bot out of the database otherwise false is returned, a reverse dns lookup isn't executed
42
+ is_search_engine_crawler? reverse_lookup: false
43
+
44
+ # will return true if the current user agent is a known bot otherwise false is returned
45
+ is_known_crawler?
46
+
47
+ # this will return true if the current user agent is associated with google and the reverse dns lookup will match google.com or googlebot.com
48
+ is_google?
26
49
 
27
50
  ## Contributing
28
51
 
29
- 1. Fork it ( https://github.com/[my-github-username]/bot_detection/fork )
52
+ 1. Fork it ( https://github.com/sumy/bot_detection/fork )
30
53
  2. Create your feature branch (`git checkout -b my-new-feature`)
31
54
  3. Commit your changes (`git commit -am 'Add some feature'`)
32
55
  4. Push to the branch (`git push origin my-new-feature`)
@@ -3,5 +3,11 @@ BotDetection::BotUserAgents = [
3
3
  "FacebookExternalHit/1.0",
4
4
  "facebookexternalhit/1.0 (+http://www.facebook.com/externalhit_uatext.php)",
5
5
  "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)",
6
- "facebookplatform/1.0 (+http://developers.facebook.com)"
6
+ "facebookplatform/1.0 (+http://developers.facebook.com)",
7
+ "Mozilla/5.0 (compatible; MJ12bot/v1.4.5; http://www.majestic12.co.uk/bot.php?+)",
8
+ "Mozilla/5.0 (compatible; SISTRIX Crawler; http://crawler.sistrix.net/)",
9
+ "ShowyouBot (http://showyou.com/crawler)",
10
+ "Mozilla/5.0 (compatible; AhrefsBot/5.0; +http://ahrefs.com/robot/)",
11
+ "Mozilla/5.0 (compatible; proximic; +http://www.proximic.com/info/spider.php)",
12
+ "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.0; trendictionbot0.5.0; trendiction search; http://www.trendiction.de/bot; please let us know of any problems; web at trendiction.com) Gecko/20071127 Firefox/3.0.0.11",
7
13
  ]
@@ -1,4 +1,5 @@
1
1
  BotDetection::SearchEngineUserAgents = [
2
+ "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)",
2
3
  "Baiduspider+(+http://www.baidu.com/search/spider.htm)",
3
4
  "Baiduspider+(+http://www.baidu.com/search/spider_jp.html)",
4
5
  "BaiDuSpider",
@@ -1,3 +1,3 @@
1
1
  module BotDetection
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bot_detection
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nils Berenbold