vpndetection 5.20.1 → 5.21.0

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: e98412d49d39377f043d99996c82203b2c7644033a452d76b74082335214fd7b
4
- data.tar.gz: 6b8139f0a48fbd720cf9de04c7883fb0f966faf311f4ef8ca88e2084eee35547
3
+ metadata.gz: 6fa3bf8879a5ca2b75c4723b1fbae1fab3e6c9d2364ae3f698c5ab14a2a298b4
4
+ data.tar.gz: d4c91265a5556b14d2ddc7f2adbea510bbcf965e18074e7522ed2c5bb3b82532
5
5
  SHA512:
6
- metadata.gz: 22d80d7a8714065408d32933a3f9841c6609ebd689134465a69c58a2de0dd8192d52ad477a1a8894d3d6216868c85fa86cb337687588af18b67e057599f1d3af
7
- data.tar.gz: eec7f92bc6b66369ea4207f2e9585b319cfcc6eff7d2bfffc899e90d17373e8bfc4cf92d688f6e997665cb7de5db713371e6931e4fb95801420e32f55169c518
6
+ metadata.gz: 949cc07141631b8a5d81d742effc103be59e58957c19373598a130a6a50382b08e12d428f010515603cd27a49ef55734951c7dae74f437dfb091c3bf465e868b
7
+ data.tar.gz: 454fe612a10c57b5ba861ab6b51bb3475b2ddfdd7056d6e65f6eef2628776e9794cba6a3e3a95fbfc5e397fd78ebfd95e10ae975fb3b7d268e1aeb8f802b62e5
data/README.md CHANGED
@@ -276,7 +276,7 @@ There are official VPNDetection client libraries available for many languages in
276
276
 
277
277
  VPN Detection API: Accurate anonymity detection identifying VPNs, residential proxies, hosting servers, Tor nodes, CDNs, relays and more.
278
278
 
279
- [<img src="https://s3.vpndetection.io/vpndetection-public/brand/mark.svg" alt="VPNDetection" height="64"/>](https://vpndetection.io/)
279
+ [<picture><source media="(prefers-color-scheme: dark)" srcset="https://s3.vpndetection.io/vpndetection-public/brand/logo-dark.svg"><img src="https://s3.vpndetection.io/vpndetection-public/brand/logo.svg" alt="VPNDetection" height="40"/></picture>](https://vpndetection.io/)
280
280
 
281
281
  ## License
282
282
 
@@ -16,10 +16,11 @@ module VPNDetection
16
16
  #
17
17
  # A value may be a scalar (equality, strings without regard to case), an
18
18
  # Array meaning any-of, a Hash of `gte`/`gt`/`lte`/`lt` bounding a number,
19
- # or a nested condition. A member set to `false` or `nil` is ignored
20
- # entirely - a condition states the positive signals you act on, so there is
21
- # no way to write "block when this is false", which would otherwise read as
22
- # blocking everybody.
19
+ # or a nested condition. A term on a member the answer holds as a list
20
+ # matches when any element matches it. A member set to `false` or `nil` is
21
+ # ignored entirely - a condition states the positive signals you act on, so
22
+ # there is no way to write "block when this is false", which would otherwise
23
+ # read as blocking everybody.
23
24
  module Condition
24
25
  BOUND_KEYS = %w[gte gt lte lt].freeze
25
26
 
@@ -99,7 +100,13 @@ module VPNDetection
99
100
  # An ABSENT member arrives here as nil, which is exactly what "not in your
100
101
  # plan" looks like. Every branch below must therefore reject it, which is
101
102
  # what makes an unserved member fail a match rather than pass it.
103
+ #
104
+ # A member the answer holds as a list (`pubproxy.protocols`, a `web` row)
105
+ # matches when any element matches the term, so an object term must match
106
+ # one element whole.
102
107
  def matches_value?(want, got)
108
+ return got.any? { |element| matches_value?(want, element) } if got.is_a?(Array)
109
+
103
110
  case want
104
111
  when Array then want.any? { |entry| matches_value?(entry, got) }
105
112
  when Hash
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module VPNDetection
4
- VERSION = '5.20.1'
4
+ VERSION = '5.21.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vpndetection
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.20.1
4
+ version: 5.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mslm Dev