legitbot 1.12.9 → 1.12.11

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
  SHA256:
3
- metadata.gz: 697cda2913df1a57bb6428757291999b38cb12736b01fa2984ece22ff2810467
4
- data.tar.gz: 7d8b33dabb85eb21a2ee3fe7290f606bed7c7810080210d16027db8d61893940
3
+ metadata.gz: 91f8fa53bd35c40ab2eb9c98ef5fad1dda96a869fd474076dde8df0842acf380
4
+ data.tar.gz: 20b7a9bc47fd9eeaed1391797d22c39b3b52a47aa491ab3a9507b61f3535b5cb
5
5
  SHA512:
6
- metadata.gz: d56cb3a8578bc490f36ed0823b7bd38173562b6858aa97cea19af39111784ce74522134f5bcb4763197d7cea7ff95310ebf78e7cf3598945091d68a308c0fa97
7
- data.tar.gz: d056f6b7711710de20e9375123f983c46fb5b71abe1ec76c9b9917e855233f602c18003d743fd43a7b90ea32e9fc13bedd057d37b05d76f71539e89a63f4d0f9
6
+ metadata.gz: f102c06a48ccfebbbfeb3d3c8d430979639347ac653f8ce71d345ced341b8a76efafa30f9d0931c3756458727b0c66a019a560b10f5064f16a3c1f8eb3563dc4
7
+ data.tar.gz: 93626c8c0621b88fdf2e5e3f77f06986036e53ecee44966751268111f28aa56fa4f73d095a7784e5cf4414eba668fae324d8966fc43df2daec60aec4b2cce3a1
data/.rubocop.yml CHANGED
@@ -5,7 +5,7 @@ require:
5
5
  - rubocop/cop/custom
6
6
 
7
7
  AllCops:
8
- CacheRootDirectory: 'vendor'
8
+ CacheRootDirectory: "vendor"
9
9
  NewCops: enable
10
10
  SuggestExtensions: false
11
11
 
@@ -18,5 +18,11 @@ Naming/MemoizedInstanceVariableName:
18
18
  Style/MapToHash:
19
19
  Enabled: false
20
20
 
21
+ Style/OneClassPerFile:
22
+ Enabled: false
23
+
24
+ Style/RedundantParentheses:
25
+ Enabled: false
26
+
21
27
  Custom/IpRanges:
22
28
  Enabled: true
data/lib/legitbot/ias.rb CHANGED
@@ -22,8 +22,13 @@ module Legitbot # :nodoc:
22
22
  92.42.105.39
23
23
  92.204.170.15
24
24
  92.204.190.235
25
+ 92.204.248.55
26
+ 151.106.17.251
25
27
  162.211.125.4
26
28
  162.211.125.5
29
+ 162.211.125.6
30
+ 162.211.125.7
31
+ 162.211.125.8
27
32
  173.224.127.64
28
33
  173.224.127.65
29
34
  173.224.127.66
@@ -21,7 +21,7 @@ module Legitbot
21
21
  # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
22
22
  def self.bot(user_agent, ip)
23
23
  bots = @rules
24
- .select { |rule| rule[:fragments].any? { |f| user_agent.index f } }
24
+ .select { |rule| rule[:fragments].any? { |f| user_agent&.index f } }
25
25
  .map { |rule| rule[:class].new(ip) }
26
26
 
27
27
  selected = bots.select(&:valid?).first if bots.size > 1
@@ -51,6 +51,8 @@ module Legitbot # :nodoc:
51
51
  4.197.64.64/28
52
52
  4.197.115.112/28
53
53
  4.205.128.176/28
54
+ 9.160.163.224/28
55
+ 9.160.164.128/28
54
56
  13.65.138.96/28
55
57
  13.65.138.112/28
56
58
  13.67.46.240/28
@@ -94,6 +96,10 @@ module Legitbot # :nodoc:
94
96
  20.169.78.160/28
95
97
  20.169.78.176/28
96
98
  20.169.78.192/28
99
+ 20.169.78.208/28
100
+ 20.169.86.224/28
101
+ 20.169.86.240/28
102
+ 20.169.87.112/28
97
103
  20.172.29.32/28
98
104
  20.193.50.32/28
99
105
  20.193.233.240/28
@@ -101,7 +107,9 @@ module Legitbot # :nodoc:
101
107
  20.194.1.0/28
102
108
  20.194.157.176/28
103
109
  20.198.67.96/28
110
+ 20.203.245.32/28
104
111
  20.204.24.240/28
112
+ 20.206.107.192/28
105
113
  20.210.154.128/28
106
114
  20.210.174.208/28
107
115
  20.210.211.192/28
@@ -121,6 +129,7 @@ module Legitbot # :nodoc:
121
129
  20.215.220.176/28
122
130
  20.215.220.192/28
123
131
  20.215.220.208/28
132
+ 20.226.32.80/28
124
133
  20.227.140.32/28
125
134
  20.228.106.176/28
126
135
  20.235.75.208/28
@@ -145,10 +154,11 @@ module Legitbot # :nodoc:
145
154
  40.84.221.208/28
146
155
  40.84.221.224/28
147
156
  40.116.73.208/28
157
+ 40.122.235.112/28
148
158
  51.8.155.48/28
149
159
  51.8.155.64/28
150
160
  51.8.155.80/28
151
- 51.8.155.112/28
161
+ 51.107.70.192/28
152
162
  52.148.129.32/28
153
163
  52.154.22.48/28
154
164
  52.156.77.144/28
@@ -200,6 +210,7 @@ module Legitbot # :nodoc:
200
210
  52.255.111.48/28
201
211
  52.255.111.80/28
202
212
  52.255.111.112/28
213
+ 57.151.131.224/28
203
214
  57.154.174.112/28
204
215
  57.154.175.0/28
205
216
  57.154.187.32/28
@@ -227,7 +238,6 @@ module Legitbot # :nodoc:
227
238
  135.220.73.240/28
228
239
  135.237.131.208/28
229
240
  135.237.133.48/28
230
- 135.237.133.112/28
231
241
  137.135.183.96/28
232
242
  137.135.190.240/28
233
243
  137.135.191.32/28
@@ -240,13 +250,17 @@ module Legitbot # :nodoc:
240
250
  172.178.141.128/28
241
251
  172.183.143.224/28
242
252
  172.183.222.128/28
253
+ 172.196.40.208/28
254
+ 172.202.102.112/28
243
255
  172.204.16.64/28
256
+ 172.204.27.16/28
244
257
  172.212.159.64/28
245
258
  172.213.11.144/28
246
259
  172.213.12.112/28
247
260
  172.213.21.16/28
248
261
  172.213.21.112/28
249
262
  172.213.21.144/28
263
+ 172.215.218.96/28
250
264
  191.233.1.112/28
251
265
  191.233.1.128/28
252
266
  191.233.1.224/28
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Legitbot
4
- VERSION = '1.12.9'
4
+ VERSION = '1.12.11'
5
5
  end
@@ -11,4 +11,8 @@ class LegitbotTest < Minitest::Test
11
11
  flunk 'No bot Firefox is possible'
12
12
  end
13
13
  end
14
+
15
+ def test_nil_ua
16
+ assert_nil Legitbot.bot(nil, '127.0.0.1')
17
+ end
14
18
  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: 1.12.9
4
+ version: 1.12.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Azarov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-02-21 00:00:00.000000000 Z
11
+ date: 2026-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fast_interval_tree