internetdata 2.20.0 → 2.20.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: 38eb0c38fc67669b6bc5197ac24b6cd7ef6298ed730d15cece31ad1f87c598dc
4
- data.tar.gz: 8bb00098bc8b7bb037e7cdbd47f29ae8704d21048887d87e42d0867a5892e14f
3
+ metadata.gz: 9753502a706d802663e90a4c440a1a9eb37cb9c018180e0a6a1088bb4dc2928d
4
+ data.tar.gz: 6f9f6e87a5858bcdb3ab041ca1aea6c10a290ed0005c4757facb32765c9eb378
5
5
  SHA512:
6
- metadata.gz: c11694442899c1c5d9fa59413928c3ba6cd2e8d5afef91c66d40235c52c8cd96a146a6d017720b8686482b64386edc323258a4789ca868985191eea71e4788e6
7
- data.tar.gz: c21cbe575712211fa03a803e7cb40488304d8233f61b450bcb744b7657e9ff2e92f128765f0aaec5c93345c9cd3417fa0bd2f5dad4e782757389fc06d39cf8e0
6
+ metadata.gz: ad44a99b6e0d9c0e5696ad882c8c54c58d28bcceb8175905deb5578370f79053776646a2276d97ffe33f8223cbbeffe1d2fd5d807cf50456f59d2ef04630c6a2
7
+ data.tar.gz: d57884b23e959bde28958e9f51ab22878bbc56b89015acec6dfca6eaca788dfd4efc446dce61e2553bf5b24da9897c7bd30ec93b84176e39acf20784978b5426
data/README.md CHANGED
@@ -250,7 +250,7 @@ result = client.lookup('146.70.116.130', timeout: 2, retries: 0)
250
250
  catalog = client.database.list(timeout: 5)
251
251
  ```
252
252
 
253
- `timeout` is in seconds and bounds each attempt, body included, so a call that is retried can take longer in total. It defaults to 30 seconds, and 0 means no bound. The client's values are defaults: `lookup`, `lookup_asn`, `lookup_domain`, `lookup_batch`, `my_ip` and `my_entitlement` each take `timeout:` and `retries:` for that call alone, and `list`, `metadata`, `checksums`, `downloads`, `download_url` and every `client.oauth` method take `timeout:`. A negative value, anything that isn't a number, and anything past 2147483.647 seconds (the longest curl holds) raise `ArgumentError` where you pass them, before any request. So does a `retries` that isn't an Integer from 0, and a `concurrency` that isn't an Integer from 1 given to `Client.new`, which `lookup_batch` refuses as `:bad_request`.
253
+ `timeout` is in seconds and bounds each attempt, body included, so a call that is retried can take longer in total. It defaults to 30 seconds, and 0 means no bound. The client's values are defaults: `lookup`, `lookup_asn`, `lookup_domain`, `lookup_batch`, `my_ip` and `my_entitlement` each take `timeout:` and `retries:` for that call alone, and `list`, `metadata`, `checksums`, `downloads`, `download_url` and every `client.oauth` method take `timeout:`. A negative value, anything that isn't a number, and anything past 2147483 seconds (the longest curl holds) raise `ArgumentError` where you pass them, before any request. So does a `retries` that isn't an Integer from 0, and a `concurrency` that isn't an Integer from 1 given to `Client.new`, which `lookup_batch` refuses as `:bad_request`.
254
254
 
255
255
  `download` and `download_bytes` take no `timeout:` and raise `ArgumentError` if handed one, rather than accepting it and quietly doing nothing: a transfer runs to gigabytes and minutes, so any bound that suits a JSON call would abandon a healthy download. They bound only their connection with the client's value. `download_url` does take one, because minting the link is an ordinary API request - it bounds that request, not whatever you do with the link afterwards.
256
256
 
@@ -45,10 +45,9 @@ module InternetData
45
45
  # phase with it.
46
46
  # @raise [ArgumentError] for an `api_key` with a control character in it.
47
47
  # @raise [ArgumentError] for a `timeout`, here or on any call, that is
48
- # negative, not a finite number, or past 2147483.647 seconds (2**31 - 1 ms),
49
- # the longest curl holds, for a `retries`, here or on any call, that is
50
- # not an Integer from 0, and for a `concurrency` that is not an Integer
51
- # from 1.
48
+ # negative, not a finite number, or past 2147483 seconds, the longest curl
49
+ # holds, for a `retries`, here or on any call, that is not an Integer from
50
+ # 0, and for a `concurrency` that is not an Integer from 1.
52
51
  # @param transport [Transport, nil] override the HTTP layer, mostly for tests.
53
52
  def initialize(api_key: nil, base_url: DEFAULT_BASE_URL, cache: true,
54
53
  cache_max_size: DEFAULT_CACHE_MAX_SIZE, cache_ttl: DEFAULT_CACHE_TTL,
@@ -23,10 +23,12 @@ module InternetData
23
23
  # under the database's spelling, so a lookup names that.
24
24
  LOOKUP_AUTH = %w[BearerAuth].freeze
25
25
 
26
- # The longest `timeout` curl holds, in seconds: 2**31 - 1 ms, about 24.8 days.
27
- # libcurl refuses a longer one, and any negative, and Ethon ignores the
28
- # refusal, so the call would run with no bound at all.
29
- LONGEST_TIMEOUT = 2_147_483.647
26
+ # The longest `timeout` curl holds, in whole seconds: INT_MAX / 1000, about
27
+ # 24.8 days. libcurl refuses a longer one, and any negative, and Ethon ignores
28
+ # the refusal, so the call would run with no bound at all. Not 2**31 - 1 ms:
29
+ # Typhoeus rounds a fraction UP to a whole second, so 2147483.001 reached
30
+ # libcurl as 2147484 and failed every call with a raw Ethon::Errors::SetOption.
31
+ LONGEST_TIMEOUT = 2_147_483
30
32
 
31
33
  # `timeout`, once it is a bound curl can hold: seconds, 0 for none. Refused
32
34
  # where it is set, because nothing downstream refuses it: a negative ran with
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InternetData
4
- VERSION = '2.20.0'
4
+ VERSION = '2.20.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: internetdata
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.20.0
4
+ version: 2.20.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mslm Dev