legitbot 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/legitbot/legitbot.rb +1 -1
- data/lib/legitbot/version.rb +1 -1
- data/lib/legitbot/yandex.rb +5 -4
- data/test/google_test.rb +6 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c83907c63ca1e3b12ebe1479a2329549d66f259912ac6f481e09c1faceba2200
|
4
|
+
data.tar.gz: f04afcf8f277cfca0be564ec4c5e26937867ea3472623953f7e67c797bd60888
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b44c6c4403472ab5999c3d565cd85d9914dc61f88ec99041c8f92d41a560a4c47fa701791a2ea5d3e2444fbb3a6e5f192af771a56781567ecda540c7dbc58aa5
|
7
|
+
data.tar.gz: fbd8d5567bbaf7dbee169230727d7a100d87df92d214a12b1d5af3ab57bc2d99cf5f5e0790d40dfb02359d9cccf31268d904d86bb479074c82a63a119398dd84
|
data/lib/legitbot/legitbot.rb
CHANGED
data/lib/legitbot/version.rb
CHANGED
data/lib/legitbot/yandex.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Legitbot
|
2
|
-
# https://yandex.com/support/webmaster/robot-workings/check-yandex-robots.
|
2
|
+
# https://yandex.com/support/webmaster/robot-workings/check-yandex-robots.html
|
3
3
|
|
4
4
|
class Yandex < BotMatch
|
5
5
|
ValidDomains = ["yandex.ru.", "yandex.net.", "yandex.com."]
|
@@ -9,8 +9,9 @@ module Legitbot
|
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
-
rule Legitbot::Yandex, %w(YandexBot YandexMobileBot
|
12
|
+
rule Legitbot::Yandex, %w(YandexBot YandexAccessibilityBot YandexMobileBot
|
13
|
+
YandexDirectDyn YandexScreenshotBot YandexImages YandexVideo YandexVideoParser
|
13
14
|
YandexMedia YandexBlogs YandexFavicons YandexWebmaster YandexPagechecker
|
14
|
-
YandexImageResizer YandexSitelinks YandexMetrika
|
15
|
-
|
15
|
+
YandexImageResizer YaDirectFetcher YandexCalendar YandexSitelinks YandexMetrika
|
16
|
+
YandexNews YandexVertis YandexSearchShop YandexVerticals)
|
16
17
|
end
|
data/test/google_test.rb
CHANGED
@@ -30,8 +30,13 @@ class GoogleTest < Minitest::Test
|
|
30
30
|
assert bot.valid?, msg: "Valid Googlebot"
|
31
31
|
end
|
32
32
|
|
33
|
-
def
|
33
|
+
def test_valid_name
|
34
34
|
bot = Legitbot.bot("Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)", "66.249.64.141")
|
35
35
|
assert_equal :google, bot.detected_as
|
36
36
|
end
|
37
|
+
|
38
|
+
def test_fake_name
|
39
|
+
bot = Legitbot.bot("Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)", "81.1.172.108")
|
40
|
+
assert_equal :google, bot.detected_as
|
41
|
+
end
|
37
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: legitbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Azarov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: irrc
|