legitbot 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/legitbot/facebook.rb +1 -1
- data/lib/legitbot/version.rb +1 -1
- data/test/facebook_test.rb +14 -3
- 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: bd30bde22fd8379ba4f81c816b37dc6b1ba428e65a4d559df5c930cbb464f582
|
4
|
+
data.tar.gz: f82f9f393980056a5c3a022f63b48a7344183307d7c7fb0fe5b89ad0e12ca135
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2964ab88011ea1daac0c1b656d6e4d50ca9a91f927bb7ce8255c6db873f5db193ff797764b81d695df5dcdd11ad3b2785ef9ec746fbb1475300bc68aed0270cc
|
7
|
+
data.tar.gz: 20efd5d2e5f062ab1f4afd0844aa9713a5bb28afaea3647c299b8ae3bce1e0b89fe4e8450157ff1dc259cc1a6e4e86d9a8028a6dd2a0059ea3ddffd8ccd13186
|
data/lib/legitbot/facebook.rb
CHANGED
data/lib/legitbot/version.rb
CHANGED
data/test/facebook_test.rb
CHANGED
@@ -15,8 +15,19 @@ class FacebookTest < Minitest::Test
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def test_user_agent
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
Legitbot.bot("facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)", "31.13.76.56") do |bot|
|
19
|
+
assert_equal :facebook, bot.detected_as
|
20
|
+
assert bot.valid?, msg: "true Facebook"
|
21
|
+
end
|
22
|
+
|
23
|
+
Legitbot.bot("facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)", "173.252.87.8") do |bot|
|
24
|
+
assert_equal :facebook, bot.detected_as
|
25
|
+
assert bot.valid?, msg: "true Facebook"
|
26
|
+
end
|
27
|
+
|
28
|
+
Legitbot.bot("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/601.2.4 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.4 facebookexternalhit/1.1 Facebot Twitterbot/1.0", "92.243.181.7") do |bot|
|
29
|
+
assert_equal :facebook, bot.detected_as
|
30
|
+
assert bot.fake?, msg: "fake Facebook"
|
31
|
+
end
|
21
32
|
end
|
22
33
|
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.4
|
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-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: irrc
|