legitbot 1.11.3 → 1.11.4
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 +4 -4
- data/README.md +0 -1
- data/lib/legitbot/google.rb +0 -1
- data/lib/legitbot/openai.rb +1 -0
- data/lib/legitbot/version.rb +1 -1
- data/lib/legitbot.rb +0 -1
- metadata +2 -4
- data/lib/legitbot/you.rb +0 -13
- data/test/you_test.rb +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4eb9d4bfaf5ff78ed62ae79fe7b04df534c90a5f56ddaa37e0dfc3757494aa97
|
4
|
+
data.tar.gz: 6a923ad4220650542c6e8fba65c348cc7ab3138f524b3a0a44ebe2078d577844
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50359966f76d4c17b3de6c662a64d88c8e28e38e07963cb03abbf44cb4bb7fb2f84a3a499e7b6314ffbbe0ad03ec5528cc21990dd5ff6029bf1ecb0f2b5d6c61
|
7
|
+
data.tar.gz: 78c189b1e114dcd82e0c0c94c5a0eadf898f53256d6ecff67f67505770d751a3930dbb3fc7f2f6a0641942d0feab9f08ab20177998ff8c51c47f97aaec462e33
|
data/README.md
CHANGED
@@ -70,7 +70,6 @@ end
|
|
70
70
|
the list of IPs is in the
|
71
71
|
[Troubleshooting page](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/guides/troubleshooting-cards)
|
72
72
|
- [Yandex robots](https://yandex.com/support/webmaster/robot-workings/check-yandex-robots.xml)
|
73
|
-
- [You.com](https://about.you.com/youbot/)
|
74
73
|
|
75
74
|
## License
|
76
75
|
|
data/lib/legitbot/google.rb
CHANGED
data/lib/legitbot/openai.rb
CHANGED
data/lib/legitbot/version.rb
CHANGED
data/lib/legitbot.rb
CHANGED
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: 1.11.
|
4
|
+
version: 1.11.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: 2024-12-
|
11
|
+
date: 2024-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fast_interval_tree
|
@@ -96,7 +96,6 @@ files:
|
|
96
96
|
- lib/legitbot/validators/ip_ranges.rb
|
97
97
|
- lib/legitbot/version.rb
|
98
98
|
- lib/legitbot/yandex.rb
|
99
|
-
- lib/legitbot/you.rb
|
100
99
|
- lib/rubocop/cop/custom.rb
|
101
100
|
- lib/rubocop/cop/custom/ip_ranges.rb
|
102
101
|
- rakelib/bump.rake
|
@@ -123,7 +122,6 @@ files:
|
|
123
122
|
- test/pinterest_test.rb
|
124
123
|
- test/test_helper.rb
|
125
124
|
- test/twitter_test.rb
|
126
|
-
- test/you_test.rb
|
127
125
|
homepage: https://github.com/alaz/legitbot
|
128
126
|
licenses:
|
129
127
|
- Apache-2.0
|
data/lib/legitbot/you.rb
DELETED
data/test/you_test.rb
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative 'test_helper'
|
4
|
-
|
5
|
-
class YouTest < Minitest::Test
|
6
|
-
def test_malicious_ip
|
7
|
-
ip = '20.59.41.22'
|
8
|
-
match = Legitbot::You.new ip
|
9
|
-
|
10
|
-
refute_predicate match, :valid?
|
11
|
-
end
|
12
|
-
|
13
|
-
def test_valid_ip
|
14
|
-
ip = '20.59.40.22'
|
15
|
-
match = Legitbot::You.new ip
|
16
|
-
|
17
|
-
assert_predicate match, :valid?
|
18
|
-
end
|
19
|
-
|
20
|
-
def test_malicious_ua
|
21
|
-
bot = Legitbot.bot(
|
22
|
-
'Mozilla/5.0 (compatible; YouBot/1.0; +https://about.you.com/youbot/)',
|
23
|
-
'20.59.41.22'
|
24
|
-
)
|
25
|
-
|
26
|
-
assert bot
|
27
|
-
refute_predicate bot, :valid?
|
28
|
-
end
|
29
|
-
|
30
|
-
def test_valid_ua
|
31
|
-
bot = Legitbot.bot(
|
32
|
-
'Mozilla/5.0 (compatible; YouBot/1.0; +https://about.you.com/youbot/)',
|
33
|
-
'20.59.40.22'
|
34
|
-
)
|
35
|
-
|
36
|
-
assert bot
|
37
|
-
assert_predicate bot, :valid?
|
38
|
-
end
|
39
|
-
end
|