browser 1.1.0 → 2.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bundle/config +2 -0
- data/.hound.yml +26 -6
- data/.rubocop.yml +26 -6
- data/CHANGELOG.md +10 -0
- data/README.md +177 -41
- data/Rakefile +1 -1
- data/bin/rake +16 -0
- data/bot_exceptions.yml +1 -0
- data/bots.yml +188 -192
- data/browser.gemspec +14 -28
- data/languages.yml +54 -54
- data/lib/browser.rb +82 -202
- data/lib/browser/accept_language.rb +47 -0
- data/lib/browser/action_controller.rb +1 -1
- data/lib/browser/base.rb +159 -0
- data/lib/browser/blackberry.rb +21 -0
- data/lib/browser/bot.rb +63 -0
- data/lib/browser/chrome.rb +23 -0
- data/lib/browser/detect_version.rb +19 -0
- data/lib/browser/device.rb +175 -0
- data/lib/browser/device/base.rb +11 -0
- data/lib/browser/device/blackberry_playbook.rb +17 -0
- data/lib/browser/device/ipad.rb +17 -0
- data/lib/browser/device/iphone.rb +17 -0
- data/lib/browser/device/ipod_touch.rb +17 -0
- data/lib/browser/device/kindle.rb +17 -0
- data/lib/browser/device/kindle_fire.rb +17 -0
- data/lib/browser/device/playstation3.rb +17 -0
- data/lib/browser/device/playstation4.rb +17 -0
- data/lib/browser/device/psp.rb +17 -0
- data/lib/browser/device/psvita.rb +17 -0
- data/lib/browser/device/surface.rb +23 -0
- data/lib/browser/device/tv.rb +17 -0
- data/lib/browser/device/unknown.rb +17 -0
- data/lib/browser/device/wii.rb +17 -0
- data/lib/browser/device/wiiu.rb +17 -0
- data/lib/browser/device/xbox_360.rb +17 -0
- data/lib/browser/device/xbox_one.rb +17 -0
- data/lib/browser/edge.rb +19 -0
- data/lib/browser/firefox.rb +19 -0
- data/lib/browser/generic.rb +32 -0
- data/lib/browser/internet_explorer.rb +61 -0
- data/lib/browser/meta/base.rb +1 -1
- data/lib/browser/meta/device.rb +9 -0
- data/lib/browser/meta/generic_browser.rb +1 -1
- data/lib/browser/meta/id.rb +1 -1
- data/lib/browser/meta/ie.rb +1 -1
- data/lib/browser/meta/ios.rb +2 -2
- data/lib/browser/meta/mobile.rb +2 -2
- data/lib/browser/meta/modern.rb +1 -1
- data/lib/browser/meta/platform.rb +2 -2
- data/lib/browser/meta/proxy.rb +1 -1
- data/lib/browser/meta/safari.rb +1 -1
- data/lib/browser/meta/tablet.rb +9 -0
- data/lib/browser/meta/webkit.rb +1 -1
- data/lib/browser/middleware.rb +1 -1
- data/lib/browser/middleware/context.rb +2 -2
- data/lib/browser/middleware/context/additions.rb +1 -1
- data/lib/browser/middleware/context/url_methods.rb +3 -3
- data/lib/browser/nokia.rb +19 -0
- data/lib/browser/opera.rb +19 -0
- data/lib/browser/phantom_js.rb +19 -0
- data/lib/browser/platform.rb +152 -0
- data/lib/browser/platform/adobe_air.rb +21 -0
- data/lib/browser/platform/android.rb +21 -0
- data/lib/browser/platform/base.rb +15 -0
- data/lib/browser/platform/blackberry.rb +21 -0
- data/lib/browser/platform/chrome_os.rb +21 -0
- data/lib/browser/platform/firefox_os.rb +21 -0
- data/lib/browser/platform/ios.rb +28 -0
- data/lib/browser/platform/linux.rb +21 -0
- data/lib/browser/platform/mac.rb +21 -0
- data/lib/browser/platform/other.rb +21 -0
- data/lib/browser/platform/windows.rb +21 -0
- data/lib/browser/platform/windows_mobile.rb +21 -0
- data/lib/browser/platform/windows_phone.rb +21 -0
- data/lib/browser/rails.rb +3 -2
- data/lib/browser/safari.rb +22 -0
- data/lib/browser/testing.rb +23 -0
- data/lib/browser/uc_browser.rb +19 -0
- data/lib/browser/version.rb +2 -7
- data/search_engines.yml +5 -5
- data/test/browser_test.rb +71 -172
- data/test/middleware_test.rb +7 -7
- data/test/sample_app.rb +3 -3
- data/test/test_helper.rb +11 -10
- data/test/ua.yml +15 -26
- data/test/ua_bots.yml +27 -0
- data/test/ua_search_engines.yml +6 -0
- data/test/unit/accept_language_test.rb +92 -0
- data/test/unit/adobe_air_test.rb +5 -10
- data/test/unit/android_test.rb +44 -49
- data/test/unit/blackberry_test.rb +55 -77
- data/test/unit/bots_test.rb +52 -84
- data/test/unit/chrome_test.rb +48 -42
- data/test/unit/console_test.rb +4 -62
- data/test/unit/device_test.rb +193 -0
- data/test/unit/firefox_test.rb +32 -27
- data/test/unit/ie_test.rb +223 -238
- data/test/unit/ios_app_test.rb +3 -3
- data/test/unit/ios_test.rb +87 -94
- data/test/unit/kindle_test.rb +10 -24
- data/test/unit/nokia_test.rb +3 -7
- data/test/unit/opera_test.rb +20 -30
- data/test/unit/platform_test.rb +161 -0
- data/test/unit/proxy_test.rb +3 -3
- data/test/unit/safari_test.rb +66 -0
- data/test/unit/uc_browser_test.rb +3 -7
- data/test/unit/windows_phone_test.rb +19 -40
- data/test/unit/windows_test.rb +32 -34
- metadata +73 -28
- data/lib/browser/methods/blackberry.rb +0 -51
- data/lib/browser/methods/bots.rb +0 -35
- data/lib/browser/methods/consoles.rb +0 -43
- data/lib/browser/methods/devices.rb +0 -41
- data/lib/browser/methods/ie.rb +0 -99
- data/lib/browser/methods/language.rb +0 -16
- data/lib/browser/methods/mobile.rb +0 -35
- data/lib/browser/methods/platform.rb +0 -152
- data/lib/browser/methods/proxy.rb +0 -8
- data/lib/browser/methods/tv.rb +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f578d8090bda26ced6964ce2894e545b7a10e5a6
|
4
|
+
data.tar.gz: e8b3f2a1f6b5f0052af82f531284a6f9bfa25042
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ac0365b335f80c2e460c80990523b928ee88e413ad47f9b52f47d5778e3ef12fe001b0f6f357d45c574ae6bb5503b248062273aa7b261da14638ee1dbff032e
|
7
|
+
data.tar.gz: 0269de18d4aeffa748e7752279579b505e2d1025a70c149421496caa227196e7b97fb8b1629cacbe597667a3aaa4ecc8ddc42127b21476f227727b37d82d53ce
|
data/.bundle/config
ADDED
data/.hound.yml
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
Style/ClassCheck:
|
2
|
+
EnforcedStyle: kind_of?
|
3
|
+
|
4
|
+
Metrics/LineLength:
|
5
|
+
Max: 80
|
6
|
+
|
7
|
+
Style/BlockDelimiters:
|
8
|
+
Enabled: false
|
9
|
+
|
10
|
+
Style/RegexpLiteral:
|
11
|
+
Enabled: false
|
12
|
+
|
13
|
+
Metrics/AbcSize:
|
14
|
+
Enabled: false
|
15
|
+
|
16
|
+
Style/PerlBackrefs:
|
17
|
+
Enabled: false
|
18
|
+
|
1
19
|
ClassLength:
|
2
20
|
Enabled: false
|
3
21
|
|
@@ -68,12 +86,6 @@ DoubleNegation:
|
|
68
86
|
SpaceInsideBlockBraces:
|
69
87
|
SpaceBeforeBlockParameters: false
|
70
88
|
|
71
|
-
LineLength:
|
72
|
-
Max: 130
|
73
|
-
|
74
|
-
RegexpLiteral:
|
75
|
-
MaxSlashes: 0
|
76
|
-
|
77
89
|
SpaceInsideHashLiteralBraces:
|
78
90
|
Enabled: false
|
79
91
|
|
@@ -88,3 +100,11 @@ PercentLiteralDelimiters:
|
|
88
100
|
'%w': '[]'
|
89
101
|
'%W': '[]'
|
90
102
|
'%x': '[]'
|
103
|
+
|
104
|
+
Style/CollectionMethods:
|
105
|
+
PreferredMethods:
|
106
|
+
collect: 'map'
|
107
|
+
collect!: 'map!'
|
108
|
+
inject: 'reduce'
|
109
|
+
detect: 'find'
|
110
|
+
find_all: 'select'
|
data/.rubocop.yml
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
Style/ClassCheck:
|
2
|
+
EnforcedStyle: kind_of?
|
3
|
+
|
4
|
+
Metrics/LineLength:
|
5
|
+
Max: 80
|
6
|
+
|
7
|
+
Style/BlockDelimiters:
|
8
|
+
Enabled: false
|
9
|
+
|
10
|
+
Style/RegexpLiteral:
|
11
|
+
Enabled: false
|
12
|
+
|
13
|
+
Metrics/AbcSize:
|
14
|
+
Enabled: false
|
15
|
+
|
16
|
+
Style/PerlBackrefs:
|
17
|
+
Enabled: false
|
18
|
+
|
1
19
|
ClassLength:
|
2
20
|
Enabled: false
|
3
21
|
|
@@ -68,12 +86,6 @@ DoubleNegation:
|
|
68
86
|
SpaceInsideBlockBraces:
|
69
87
|
SpaceBeforeBlockParameters: false
|
70
88
|
|
71
|
-
LineLength:
|
72
|
-
Max: 130
|
73
|
-
|
74
|
-
RegexpLiteral:
|
75
|
-
MaxSlashes: 0
|
76
|
-
|
77
89
|
SpaceInsideHashLiteralBraces:
|
78
90
|
Enabled: false
|
79
91
|
|
@@ -88,3 +100,11 @@ PercentLiteralDelimiters:
|
|
88
100
|
'%w': '[]'
|
89
101
|
'%W': '[]'
|
90
102
|
'%x': '[]'
|
103
|
+
|
104
|
+
Style/CollectionMethods:
|
105
|
+
PreferredMethods:
|
106
|
+
collect: 'map'
|
107
|
+
collect!: 'map!'
|
108
|
+
inject: 'reduce'
|
109
|
+
detect: 'find'
|
110
|
+
find_all: 'select'
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## v2.0.0 [unreleased]
|
4
|
+
|
5
|
+
- `Browser#platform` now returns instance of `Browser::Platform`, instead of a `String`. It contains information about the platform (software).
|
6
|
+
- `Browser#device` was added. It returns information about the device (hardware).
|
7
|
+
- `Browser#accept_language` now returns a list of `Browser::AcceptLanguage` objects.
|
8
|
+
- `Browser#bot` now returns a `Browser::Bot` instance.
|
9
|
+
- Safari running as web app mode is not recognized as Safari anymore.
|
10
|
+
- [List of all commits since last release](https://github.com/fnando/browser/compare/v1.1.0...v2.0.0)
|
data/README.md
CHANGED
@@ -15,50 +15,108 @@ gem install browser
|
|
15
15
|
## Usage
|
16
16
|
|
17
17
|
```ruby
|
18
|
-
require "rubygems"
|
19
18
|
require "browser"
|
20
19
|
|
21
|
-
browser = Browser.new(
|
22
|
-
|
23
|
-
|
24
|
-
browser.
|
25
|
-
browser.safari?
|
26
|
-
browser.ios?
|
27
|
-
browser.app? # request performed by ios' app webview
|
28
|
-
browser.opera?
|
20
|
+
browser = Browser.new("Some User Agent", accept_language: "en-us")
|
21
|
+
|
22
|
+
# General info
|
23
|
+
browser.bot?
|
29
24
|
browser.chrome?
|
30
|
-
browser.
|
31
|
-
browser.
|
32
|
-
browser.tablet?
|
33
|
-
browser.console?
|
25
|
+
browser.core_media?
|
26
|
+
browser.edge? # Newest MS browser
|
34
27
|
browser.firefox?
|
28
|
+
browser.full_version
|
35
29
|
browser.ie?
|
36
|
-
browser.ie?(6)
|
37
|
-
browser.
|
38
|
-
browser.
|
39
|
-
browser.
|
40
|
-
browser.
|
41
|
-
browser.
|
42
|
-
browser.
|
43
|
-
browser.
|
44
|
-
browser.
|
45
|
-
browser.linux?
|
46
|
-
browser.blackberry?
|
47
|
-
browser.blackberry?(10) # detect specific BlackBerry version
|
48
|
-
browser.bot?
|
49
|
-
browser.search_engine?
|
30
|
+
browser.ie?(6) # detect specific IE version
|
31
|
+
browser.ie?([">8", "<10"]) # detect specific IE (IE9).
|
32
|
+
browser.known? # has the browser been successfully detected?
|
33
|
+
browser.meta # an array with several attributes
|
34
|
+
browser.modern? # Webkit, Firefox 17+, IE 9+ and Opera 12+
|
35
|
+
browser.name # readable browser name
|
36
|
+
browser.nokia?
|
37
|
+
browser.opera?
|
38
|
+
browser.opera_mini?
|
50
39
|
browser.phantom_js?
|
51
40
|
browser.quicktime?
|
52
|
-
browser.
|
53
|
-
browser.
|
54
|
-
browser.android?
|
55
|
-
browser.android?(4.2) # detect Android Jelly Bean 4.2
|
56
|
-
browser.known? # has the browser been successfully detected?
|
57
|
-
browser.meta # an array with several attributes
|
41
|
+
browser.safari?
|
42
|
+
browser.safari_webapp_mode?
|
58
43
|
browser.to_s # the meta info joined by space
|
59
|
-
|
44
|
+
browser.uc_browser?
|
45
|
+
browser.version # major version number
|
46
|
+
browser.webkit?
|
47
|
+
browser.webkit_full_version
|
48
|
+
browser.yandex?
|
49
|
+
|
50
|
+
# Get bot info
|
51
|
+
browser.bot.name
|
52
|
+
browser.bot.search_engine?
|
53
|
+
browser.bot?
|
60
54
|
|
61
|
-
|
55
|
+
# Get device info
|
56
|
+
browser.device
|
57
|
+
browser.device.id
|
58
|
+
browser.device.name
|
59
|
+
browser.device.blackberry_playbook?
|
60
|
+
browser.device.console?
|
61
|
+
browser.device.ios?
|
62
|
+
browser.device.ipad?
|
63
|
+
browser.device.iphone?
|
64
|
+
browser.device.ipod_touch?
|
65
|
+
browser.device.kindle?
|
66
|
+
browser.device.kindle_fire?
|
67
|
+
browser.device.mobile?
|
68
|
+
browser.device.nintendo?
|
69
|
+
browser.device.playstation?
|
70
|
+
browser.device.ps3?
|
71
|
+
browser.device.ps4?
|
72
|
+
browser.device.psp?
|
73
|
+
browser.device.silk?
|
74
|
+
browser.device.surface?
|
75
|
+
browser.device.tablet?
|
76
|
+
browser.device.tv?
|
77
|
+
browser.device.vita?
|
78
|
+
browser.device.wii?
|
79
|
+
browser.device.wiiu?
|
80
|
+
browser.device.xbox?
|
81
|
+
browser.device.xbox_360?
|
82
|
+
browser.device.xbox_one?
|
83
|
+
|
84
|
+
# Get platform info
|
85
|
+
browser.platform
|
86
|
+
browser.platform.id
|
87
|
+
browser.platform.name
|
88
|
+
browser.platform.version # e.g. 9 (for iOS9)
|
89
|
+
browser.platform.adobe_air?
|
90
|
+
browser.platform.android?
|
91
|
+
browser.platform.android?(4.2) # detect Android Jelly Bean 4.2
|
92
|
+
browser.platform.blackberry?
|
93
|
+
browser.platform.blackberry?(10) # detect specific BlackBerry version
|
94
|
+
browser.platform.chrome_os?
|
95
|
+
browser.platform.firefox_os?
|
96
|
+
browser.platform.ios? # detect iOS
|
97
|
+
browser.platform.ios?(9) # detect specific iOS version
|
98
|
+
browser.platform.ios_app?
|
99
|
+
browser.platform.ios_webview?
|
100
|
+
browser.platform.ios_webview? # request performed by ios' app webview
|
101
|
+
browser.platform.linux?
|
102
|
+
browser.platform.mac?
|
103
|
+
browser.platform.other?
|
104
|
+
browser.platform.windows10?
|
105
|
+
browser.platform.windows7?
|
106
|
+
browser.platform.windows8?
|
107
|
+
browser.platform.windows8_1?
|
108
|
+
browser.platform.windows?
|
109
|
+
browser.platform.windows_mobile?
|
110
|
+
browser.platform.windows_phone?
|
111
|
+
browser.platform.windows_rt?
|
112
|
+
browser.platform.windows_touchscreen_desktop?
|
113
|
+
browser.platform.windows_vista?
|
114
|
+
browser.platform.windows_wow64?
|
115
|
+
browser.platform.windows_x64?
|
116
|
+
browser.platform.windows_x64?
|
117
|
+
browser.platform.windows_x64_inclusive?
|
118
|
+
browser.platform.windows_xp?
|
119
|
+
```
|
62
120
|
|
63
121
|
### What defines a modern browser?
|
64
122
|
|
@@ -95,6 +153,36 @@ This adds a helper method called `browser`, that inspects your current user agen
|
|
95
153
|
<% end %>
|
96
154
|
```
|
97
155
|
|
156
|
+
### Accept Language
|
157
|
+
|
158
|
+
Parses the accept-language header from an HTTP request and produces an array of language objects sorted by quality.
|
159
|
+
|
160
|
+
```ruby
|
161
|
+
browser = Browser.new("Some User Agent", accept_language: "en-us")
|
162
|
+
|
163
|
+
browser.accept_language.class
|
164
|
+
#=> Array
|
165
|
+
|
166
|
+
language = browser.accept_language.first
|
167
|
+
|
168
|
+
language.code
|
169
|
+
#=> "en"
|
170
|
+
|
171
|
+
language.region
|
172
|
+
#=> "US"
|
173
|
+
|
174
|
+
language.full
|
175
|
+
#=> "en-US"
|
176
|
+
|
177
|
+
language.quality
|
178
|
+
#=> 1.0
|
179
|
+
|
180
|
+
language.name
|
181
|
+
#=> "English/United States"
|
182
|
+
```
|
183
|
+
|
184
|
+
Result is always sorted in quality order from highest -> lowest. as per the HTTP spec, omitting the quality value implies 1.0.
|
185
|
+
|
98
186
|
### Internet Explorer
|
99
187
|
|
100
188
|
Internet Explorer has a compatibility view mode that allows newer versions (IE8+) to run as an older version. Browser will always return the navigator version, ignoring the compatibility view version, when defined. If you need to get the engine's version, you have to use `Browser#msie_version` and `Browser#msie_full_version`.
|
@@ -123,12 +211,30 @@ browser.modern?
|
|
123
211
|
|
124
212
|
This behavior changed in `v1.0.0`; previously there wasn't a way of getting the real browser version.
|
125
213
|
|
214
|
+
### Safari
|
215
|
+
|
216
|
+
iOS webviews and web apps aren't detect as Safari anymore, so be aware of that if that's your case. You can use a combination of platform and webkit detection to do whatever you want.
|
217
|
+
|
218
|
+
```ruby
|
219
|
+
# iPad's Safari running as web app mode.
|
220
|
+
browser = Browser.new("Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B405")
|
221
|
+
|
222
|
+
browser.safari?
|
223
|
+
#=> false
|
224
|
+
|
225
|
+
browser.webkit?
|
226
|
+
#=> true
|
227
|
+
|
228
|
+
browser.platform.ios?
|
229
|
+
#=> true
|
230
|
+
```
|
231
|
+
|
126
232
|
### Bots
|
127
233
|
|
128
|
-
Browser used to detect empty user agents as bots, but this
|
234
|
+
Browser used to detect empty user agents as bots, but this behavior has changed. If you want to bring this detection back, you can activate it through the following call:
|
129
235
|
|
130
236
|
```ruby
|
131
|
-
Browser::
|
237
|
+
Browser::Bot.detect_empty_ua!
|
132
238
|
```
|
133
239
|
|
134
240
|
### Middleware
|
@@ -153,22 +259,52 @@ Notice that you can have multiple conditionals.
|
|
153
259
|
|
154
260
|
```ruby
|
155
261
|
Rails.configuration.middleware.use Browser::Middleware do
|
156
|
-
next if browser.search_engine?
|
262
|
+
next if browser.bot.search_engine?
|
157
263
|
redirect_to upgrade_path(browser: "oldie") if browser.ie? && !browser.modern?
|
158
264
|
redirect_to upgrade_path(browser: "oldfx") if browser.firefox? && !browser.modern?
|
159
265
|
end
|
160
266
|
```
|
161
267
|
|
162
|
-
If you need
|
268
|
+
If you need access to the `Rack::Request` object (e.g. to exclude a path), you can do so with `request`.
|
269
|
+
|
163
270
|
```ruby
|
164
271
|
Rails.configuration.middleware.use Browser::Middleware do
|
165
|
-
redirect_to upgrade_path unless browser.modern? || request.env[
|
272
|
+
redirect_to upgrade_path unless browser.modern? || request.env["PATH_INFO"] == "/exclude_me"
|
166
273
|
end
|
167
274
|
```
|
168
275
|
|
276
|
+
## Development
|
277
|
+
|
278
|
+
If you want to contribute to this project, just follow the tips below.
|
279
|
+
|
280
|
+
To configure your environment, you must have Ruby and bundler installed. Then run `bundle install` to install all dependencies.
|
281
|
+
|
282
|
+
To run tests, execute `./bin/rake`.
|
283
|
+
|
284
|
+
### Adding new features
|
285
|
+
|
286
|
+
Before using your time to code a new feature, open a ticket asking if it makes sense and if it's on this project's scope.
|
287
|
+
|
288
|
+
#### Adding a new bot
|
289
|
+
|
290
|
+
1. Add the user agent to `test/ua_bots.yml`.
|
291
|
+
2. Add the readable name to `bots.yml`. The key must be something that matches the user agent, in lowercased text.
|
292
|
+
3. Run tests.
|
293
|
+
|
294
|
+
#### Adding a new search engine
|
295
|
+
|
296
|
+
1. Add the user agent to `test/ua_search_engines.yml`.
|
297
|
+
2. Add the same user agent to `test/ua_bots.yml`.
|
298
|
+
3. Add the readable name to `search_engines.yml`. The key must be something that matches the user agent, in lowercased text.
|
299
|
+
4. Run tests.
|
300
|
+
|
301
|
+
#### Wrong browser detection
|
302
|
+
|
303
|
+
Follow the instructions of [CONTRIBUTING.md](https://github.com/fnando/browser/blob/master/CONTRIBUTING.md).
|
304
|
+
|
169
305
|
## Maintainer
|
170
306
|
|
171
|
-
* Nando Vieira - http://nandovieira.com
|
307
|
+
* Nando Vieira - http://nandovieira.com
|
172
308
|
|
173
309
|
## Contributors
|
174
310
|
|
data/Rakefile
CHANGED
data/bin/rake
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'rake' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require "pathname"
|
10
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require "rubygems"
|
14
|
+
require "bundler/setup"
|
15
|
+
|
16
|
+
load Gem.bin_path("rake", "rake")
|
data/bot_exceptions.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
- ruby build
|
data/bots.yml
CHANGED
@@ -1,230 +1,226 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
abot: "CrawlDaddy, abot
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
200pleasebot: "200PleaseBot"
|
2
|
+
360spider: "360Spider"
|
3
|
+
abot: "CrawlDaddy, abot"
|
4
|
+
addthis: "AddThis"
|
5
|
+
admantx: "ADmantX Platform Semantic Analyzer"
|
6
|
+
adsbot-google: "Google Adwords"
|
7
|
+
advbot: "AdvBot"
|
8
|
+
ahrefsbot: "Ahrefs backlinks research tool"
|
9
9
|
alexa: "Alexa Crawler"
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
apache-httpclient: "Java http library"
|
11
|
+
apachebench: "ApacheBench (ab)"
|
12
|
+
appengine-google: "Google App Engine"
|
13
|
+
applebot: "Apple Bot"
|
14
14
|
archive.org_bot: "Internet Archive (archive.org)"
|
15
|
-
|
16
|
-
|
15
|
+
ask jeeves: "Ask Jeeves"
|
16
|
+
asynchttpclient: "Java http and WebSocket client library"
|
17
17
|
awe.sm: "Awe.sm URL expander"
|
18
|
-
|
19
|
-
|
20
|
-
BDCbot: "Big Data Corp (ecommerce.bigdatacorp.com.br/faq.aspx)"
|
18
|
+
baidu: "Baidu"
|
19
|
+
bdcbot: "Big Data Corp"
|
21
20
|
bingbot: "Microsoft bing bot"
|
22
21
|
bitlybot: "bit.ly bot"
|
23
|
-
|
24
|
-
|
22
|
+
blekkobot: "Blekkobot"
|
23
|
+
blexbot: "BLEXBot (webmeup)"
|
25
24
|
bot@linkfluence.net: "Linkfluence bot"
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
bufferbot: "BufferBot"
|
26
|
+
buibui-checkbot: "buibui"
|
27
|
+
butterfly: "Topsy Labs"
|
29
28
|
buzztalk: "buzztalk"
|
30
|
-
|
29
|
+
catchbot: "CatchBot (catchbot.com)"
|
31
30
|
check_http: "Nagios monitor"
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
31
|
+
cliqzbot: "Cliqzbot"
|
32
|
+
cmradar/0.1: "CMRadar/0.1"
|
33
|
+
coldfusion: "ColdFusion http library"
|
34
|
+
comodo-webinspector-crawler: "Comodo"
|
35
|
+
crowsnest: "Crowsnest"
|
37
36
|
curabot: "cura.yt"
|
38
37
|
curl: "curl unix CLI http client"
|
39
|
-
|
38
|
+
dap/nethttp: "DAP/NetHTTP"
|
40
39
|
datagnionbot: "datagnion.com/bot.html"
|
41
|
-
|
40
|
+
daumoa: "Korean portal and search engine indexing bot"
|
42
41
|
developers.google.com/+/web/snippet/: "Google Plus"
|
43
|
-
diffbot: "Diffbot
|
44
|
-
|
45
|
-
|
46
|
-
domainsbot: "DomainsBot
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
ExaleadCloudView: "ExaleadCloudView"
|
42
|
+
diffbot: "Diffbot"
|
43
|
+
digitalpersona fingerprint software: "HP Fingerprint scanner"
|
44
|
+
domain re-animator bot: "Domain Re-Animator Bot"
|
45
|
+
domainsbot: "DomainsBot"
|
46
|
+
domaintunocrawler: "DomainTuno"
|
47
|
+
dotbot: "Dot Bot"
|
48
|
+
duckduck: "Duck Duck Go"
|
49
|
+
embedly: "Embedly"
|
50
|
+
eoaagent: "EOAAgent"
|
51
|
+
eventmachine httpclient: "Ruby http library"
|
52
|
+
everyonesocialbot: "EveryoneSocial"
|
53
|
+
evrinid: "Evri bot"
|
54
|
+
exabot: "Exalead's bot"
|
55
|
+
exaleadcloudview: "ExaleadCloudView"
|
58
56
|
facebookexternalhit: "Facebook Bot"
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
57
|
+
facebot: "Facebook Bot"
|
58
|
+
feedburner: "RSS bot"
|
59
|
+
feedfetcher-google: "Google Feedfetcher"
|
60
|
+
findxbot: "Findxbot"
|
61
|
+
flipboardproxy: "FlipboardProxy"
|
62
|
+
friendfeedbot: "FriendFeed"
|
63
|
+
genieo: "Genieo Web filter bot"
|
66
64
|
getprismatic.com: "getprismatic.com"
|
67
|
-
|
68
|
-
Gimme60bot: "Gimme60 (gimme60.com)"
|
65
|
+
gigabot: "Gigabot spider"
|
69
66
|
gimme60bot: "Gimme60 (gimme60.com)"
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
67
|
+
gimmeusabot: "Gimme60 (gimme60.com)"
|
68
|
+
go http package: "Go http library"
|
69
|
+
google page speed insights: "Google Page Speed Insights"
|
70
|
+
google Web Preview: "Google Instant Previews crawler"
|
71
|
+
googlebot: "Google Bot"
|
72
|
+
grapeshotcrawler: "GrapeshotCrawler"
|
73
|
+
gravitybot: "Gravity Bot"
|
74
|
+
hatena::bookmark: "Hatena::Bookmark"
|
78
75
|
heritrix: "heritrix"
|
79
|
-
|
80
|
-
|
81
|
-
|
76
|
+
htmlparser: "HTMLParser"
|
77
|
+
http_request2: "HTTP_Request2"
|
78
|
+
httpclient: "HTTPClient"
|
82
79
|
https://developers.google.com/+/web/snippet: "Google+ Snippet Fetcher"
|
83
|
-
|
80
|
+
hubspot: "HubSpot"
|
84
81
|
ia_archiver: "Internet Archive (WayBackMachine)"
|
85
|
-
|
82
|
+
icoreservice: "iCoreService"
|
86
83
|
idmarch: "idmarch.org/bot.html"
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
84
|
+
inagist: "URL resolver"
|
85
|
+
insieve: "Insieve Bot"
|
86
|
+
insitesbot: "Insitesbot"
|
87
|
+
instapaper: "Instapaper"
|
88
|
+
istellabot: "IstellaBot"
|
92
89
|
jack: "jack"
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
90
|
+
jakarta commons: "Jakarta Commons HttpClient"
|
91
|
+
java: "Generic Java http library"
|
92
|
+
jetslide: "Jetslide"
|
93
|
+
js-kit: "URL resolver"
|
94
|
+
kemvibot: "Kemvi"
|
95
|
+
kimengi: "Kimengi Bot"
|
99
96
|
knows.is: "knows.is"
|
100
|
-
|
101
|
-
|
97
|
+
kojitsubot: "Kojitsubot"
|
98
|
+
komodiabot: "KomodiaBot"
|
102
99
|
kraken: "kraken"
|
103
|
-
|
104
|
-
libwww-perl: "Perl client-server library
|
105
|
-
|
100
|
+
laconica: "Laconica"
|
101
|
+
libwww-perl: "Perl client-server library"
|
102
|
+
lijit crawler: "Lijit"
|
106
103
|
linkdexbot: "Linkdex Bot"
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
lwp-trivial: "Another Perl library
|
104
|
+
linkedinbot: "LinkedIn"
|
105
|
+
linkscrawler: "LinksCrawler"
|
106
|
+
linode: "Linode Longview"
|
107
|
+
lipperhey: "Lipperhey"
|
108
|
+
livelapbot: "Livelapbot"
|
109
|
+
loadtimebot: "Load Time Bot"
|
110
|
+
longurl: "URL expander service"
|
111
|
+
lumibot: "Lumibot"
|
112
|
+
lwp-trivial: "Another Perl library"
|
116
113
|
magpie-crawler: "magpie-crawler"
|
117
|
-
|
118
|
-
meanpathbot: "meanpath
|
119
|
-
|
120
|
-
|
121
|
-
memoryBot: "mignify.com/bot.html"
|
114
|
+
mail.ru_bot: "Mail.ru Bot"
|
115
|
+
meanpathbot: "meanpath"
|
116
|
+
mediapartners-google: "Google Adsense bot"
|
117
|
+
megaindex.ru: "MegaIndex"
|
122
118
|
memorybot: "mignify.com/bot.html"
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
119
|
+
metauri: "MetaURI"
|
120
|
+
mfe_expand: "Mcafee spider"
|
121
|
+
mir web crawler: "MIR web crawler"
|
122
|
+
mj12bot: "Majestic-12 spider"
|
123
|
+
mojeekbot: "Mojeek UK search crawler"
|
124
|
+
ms search 6.0 robot: "MS Search 6.0 Robot"
|
129
125
|
msnbot: "Microsoft bot"
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
126
|
+
nerdybot: "NerdyBot"
|
127
|
+
netstate: "netEstate NE Crawler"
|
128
|
+
netvibes: "Personalized dashboard bot"
|
129
|
+
netzcheckbot: "netzcheck"
|
130
|
+
newrelicpinger: "NewRelic monitor"
|
135
131
|
newsme: "newsme"
|
136
132
|
niki-bot: "niki-bot"
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
133
|
+
ning: "NING - Yet Another Twitter Swarmer"
|
134
|
+
nutch: "Apache search spider"
|
135
|
+
openhosebot: "OpenHoseBot"
|
136
|
+
orangebot: "OrangeBot"
|
137
|
+
pagesinventory: "pagesinventory.com"
|
138
|
+
panopta: "Monitoring service"
|
139
|
+
paperlibot: "PaperLi"
|
144
140
|
peerindex: "peerindex"
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
psbot-page: "
|
141
|
+
percolatecrawler: "PercolateCrawler"
|
142
|
+
perfectmarketkwtbot: "PerfectMarket"
|
143
|
+
phantomjs: "PhantomJS"
|
144
|
+
pingdom: "Pingdom monitoring"
|
145
|
+
pinterest: "Pinterest"
|
146
|
+
plukkie: "botje.com/plukkie.htm"
|
147
|
+
psbot-page: "Picsearch"
|
152
148
|
publiclibraryarchive.org: "publiclibraryarchive.org"
|
153
|
-
|
154
|
-
|
149
|
+
pycurl: "Python http library"
|
150
|
+
python-httplib2: "Python-httplib2"
|
155
151
|
python-requests: "Python http library"
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
152
|
+
python-urllib: "Python http library"
|
153
|
+
queryseeker: "QuerySeekerSpider"
|
154
|
+
quicklook: "QuickLook"
|
155
|
+
re-animator: "Domain Re-Animator Bot"
|
156
|
+
readability: "Readability"
|
157
|
+
rebelmouse: "RebelMouse"
|
162
158
|
redditbot: "Reddit Bot"
|
163
|
-
|
164
|
-
|
159
|
+
relateiq: "RelateIQ"
|
160
|
+
riddler: "Riddler Bot"
|
165
161
|
rogerbot: "SeoMoz spider"
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
spbot: "OpenLinkProfiler
|
162
|
+
rssmicro: "RSS/Atom Feed Robot (rssmicro.com)"
|
163
|
+
ruby: "Ruby"
|
164
|
+
scrapy: "Scrapy"
|
165
|
+
screaming frog seo spider: Screaming Frog SEO Spider
|
166
|
+
searchmetricsbot: "SearchmetricsBot"
|
167
|
+
semrushbot: "SEO analysis bot"
|
168
|
+
seokicks: "SEOKicks"
|
169
|
+
seznambot: "SeznamBot"
|
170
|
+
shopwiki: "ShopWiki"
|
171
|
+
shortlinktranslate: "Link shortener"
|
172
|
+
showyoubot: "Showyou iOS app spider"
|
173
|
+
siege: "Joe Dog Siege"
|
174
|
+
sistrix: "SISTRIX"
|
175
|
+
siteuptime: "Site monitoring services"
|
176
|
+
slack: "Slackbot-LinkExpanding"
|
177
|
+
slackbot: "Slack Bot"
|
178
|
+
slurp: "Yahoo spider"
|
179
|
+
smtbot: "SimilarTech"
|
180
|
+
sogou: "Chinese search engine"
|
181
|
+
spbot: "OpenLinkProfiler"
|
186
182
|
spider: "generic web spider"
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
trendictionbot: "
|
194
|
-
|
183
|
+
spinn3r: "Spinn3r aggregator"
|
184
|
+
sputnikbot: "SputnikBot"
|
185
|
+
statuscake: "StatusCake"
|
186
|
+
structureddatatestingtool: 'Google-StructuredDataTestingTool'
|
187
|
+
test certificate info: "C http library?"
|
188
|
+
tineye: "TinEye Bot"
|
189
|
+
trendictionbot: "Trendiction Search"
|
190
|
+
turnitinbot: "TurnitinBot"
|
195
191
|
tweetedtimes: "The Tweeted Times"
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
Wget: "wget unix CLI http client"
|
192
|
+
tweetmemebot: "TweetMeMe Crawler"
|
193
|
+
twikle: "Social web search bot"
|
194
|
+
twitjobsearch: "TwitJobSearch"
|
195
|
+
twitmunin: "Twitmunin"
|
196
|
+
twitterbot: "Twitter URL expander"
|
197
|
+
twurly: "Twurly"
|
198
|
+
typhoeus: "Typhoeus"
|
199
|
+
umbot: "uberMetrics"
|
200
|
+
unwindfetch: "Gnip"
|
201
|
+
uptimerobot: "Uptime Robot"
|
202
|
+
vagabondo: "Vagabondo"
|
203
|
+
vb project: "Visual Basic"
|
204
|
+
vigil: "Vigil"
|
205
|
+
vkshare: "VKontake Sharer"
|
206
|
+
voilabot: "VoilaBot"
|
207
|
+
vrcrawler: "Venture Radar"
|
208
|
+
wasalive-bot: "Wasalive Bots"
|
209
|
+
wbsearchbot: "Ware Bay Best Buys"
|
210
|
+
webscout: "Webscout"
|
211
|
+
wesee: "WeSEE"
|
217
212
|
wget: "wget unix CLI http client"
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
yacybot: "YaCy
|
224
|
-
|
225
|
-
|
226
|
-
|
213
|
+
wordpress: "WordPress spider"
|
214
|
+
wormly: "WormlyBot"
|
215
|
+
wotbox: "Wotbox"
|
216
|
+
xenu link sleuth: "Xenu Link Sleuth"
|
217
|
+
xovibot: "XoviBot"
|
218
|
+
yacybot: "YaCy"
|
219
|
+
yandex: "Yandex"
|
220
|
+
yeti: "Naver Corp"
|
221
|
+
yourls: "YOURLS"
|
227
222
|
zelist.ro: "feed parser"
|
228
|
-
|
223
|
+
zibb: "ZIBB spider"
|
229
224
|
zitebot: "Zite"
|
230
|
-
|
225
|
+
zyborg: "Zyborg"
|
226
|
+
mrchrome: "MrChrome"
|