vpndetection 5.13.0 → 5.13.1

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: 301c578b3581f03f895c4b9a4009323762a04e59b4ead6e47d3d455cdaa10b0b
4
- data.tar.gz: 2cf326e39b03b1960233c0adba514c1115057ef087640c689e1311c0e6281881
3
+ metadata.gz: 19f67b3d99978bf48bc57ce35856bb63f9fb694c84cefcf6a5fafb6d0947cbce
4
+ data.tar.gz: 5edf4e4d3097810bf3d01ca9d4e7c50da761f7796bc10d7d5983f73262e90a36
5
5
  SHA512:
6
- metadata.gz: 89c02efabb3588a63eb229f8a918f90022fbcb7fb85f4c7b5de6876c60909c4da2515e91858182f3d56f66c7e28f694fc215e64473edf09ea70b5b0c441b2aa1
7
- data.tar.gz: d26e967bbdc35a5e12798f9977de9bc22f077292ed981a100663df00a62adf1188e9bb5b8d37679c38cd5d688976362912bee5438d1b76cd19dcfb1bc36bbb54
6
+ metadata.gz: 854befe2839b82a145d776e357f85ea819470f2474b7e1431141722fec1c64a85cc438b6b6957c9f32edd0fbcd26a3f6aa23e00305e18486f7d62c40c0acfda3
7
+ data.tar.gz: b2bdccc3fb59c98eb863db25e167b17cd6076f5bdd9f98da13eecb38bcd48d5fa9deb5432c43184c2e5093959096046c6036a23a31c6ac363c96eae6c96f49b1
data/README.md CHANGED
@@ -23,7 +23,7 @@ Requires Ruby 3.3 or newer.
23
23
 
24
24
  ## Usage
25
25
 
26
- **No API key needed to start.** Without a key a lookup answers `ip`, `is_vpn`, Tor and relay detection, `location` and `asn`, with no daily or monthly cap: up to 60 lookups a minute from each address.
26
+ **No API key needed to start.** Without a key a lookup answers `ip`, `is_vpn`, Tor and relay detection, `location` and `asn`, unlimited, with no daily or monthly cap.
27
27
 
28
28
  ```ruby
29
29
  require 'vpndetection'
@@ -151,7 +151,7 @@ end
151
151
 
152
152
  `kind` is one of `:bad_request`, `:unauthorized`, `:forbidden`, `:rate_limited`, `:quota_exceeded`, `:server_error` or `:network`.
153
153
 
154
- Note that `:rate_limited` and `:quota_exceeded` both arrive as HTTP 429 and are not the same thing. A rate limit is when the API faces extreme traffic bursts, or a lookup without a key passes 60 a minute, and so retrying later works; but a spent quota needs your allowance raised or the window to roll over. The library retries rate limits for you, but not if your quota is exceeded. It waits the `Retry-After` the API sent, or its own backoff from 250 ms when that's past about 24.8 days.
154
+ Note that `:rate_limited` and `:quota_exceeded` both arrive as HTTP 429 and are not the same thing. A rate limit is when the API faces extreme traffic bursts and so retrying later works; but a spent quota needs your allowance raised or the window to roll over. The library retries rate limits for you, but not if your quota is exceeded. It waits the `Retry-After` the API sent, or its own backoff from 250 ms when that's past about 24.8 days.
155
155
 
156
156
  ### Timeouts and retries
157
157
 
@@ -25,7 +25,7 @@ module VPNDetection
25
25
 
26
26
  # @param api_key [String, nil] omit it to look up without one: a lookup then
27
27
  # answers `ip`, `is_vpn`, the Tor and relay members, `location` and `asn`,
28
- # up to 60 a minute from each address, and a batch is refused as
28
+ # with no daily or monthly cap, and a batch is refused as
29
29
  # `:unauthorized`. It is trimmed, and a key of blanks alone is no key.
30
30
  # @param cache [Boolean] pass false to disable caching.
31
31
  # @param cache_ttl [Numeric] how long an answer stays fresh, in seconds.
@@ -7,11 +7,10 @@ module VPNDetection
7
7
  # Everything this library raises.
8
8
  #
9
9
  # `:rate_limited` and `:quota_exceeded` both arrive as HTTP 429 and are NOT the
10
- # same thing. A rate limit is the API protecting itself, or a lookup without a
11
- # key past 60 a minute, and carries `Retry-After`; retrying works. A spent
12
- # quota carries no such header and retrying will not help until the window
13
- # rolls over or the limit is raised. The header is the only thing that
14
- # distinguishes them.
10
+ # same thing. A rate limit is the API protecting itself and carries
11
+ # `Retry-After`; retrying works. A spent quota carries no such header and
12
+ # retrying will not help until the window rolls over or the limit is raised.
13
+ # The header is the only thing that distinguishes them.
15
14
  class Error < StandardError
16
15
  KINDS = %i[
17
16
  bad_request unauthorized forbidden rate_limited quota_exceeded server_error network
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module VPNDetection
4
- VERSION = '5.13.0'
4
+ VERSION = '5.13.1'
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.13.0
4
+ version: 5.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mslm Dev