internetdata 2.8.5 → 2.8.7
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 +1 -1
- data/lib/internetdata/api/database_v2_api.rb +1 -1
- data/lib/internetdata/api_client.rb +1 -1
- data/lib/internetdata/api_error.rb +1 -1
- data/lib/internetdata/api_model_base.rb +1 -1
- data/lib/internetdata/client.rb +8 -4
- data/lib/internetdata/configuration.rb +1 -1
- data/lib/internetdata/database_api.rb +1 -1
- data/lib/internetdata/errors.rb +1 -1
- data/lib/internetdata/models/client_registration.rb +1 -1
- data/lib/internetdata/models/database.rb +2 -2
- data/lib/internetdata/models/database_checksums_response.rb +1 -1
- data/lib/internetdata/models/database_format.rb +1 -1
- data/lib/internetdata/models/database_list.rb +1 -1
- data/lib/internetdata/models/database_metadata.rb +1 -1
- data/lib/internetdata/models/database_metadata_column.rb +1 -1
- data/lib/internetdata/models/database_version.rb +3 -3
- data/lib/internetdata/models/db_checksums.rb +1 -1
- data/lib/internetdata/models/device_authorization.rb +1 -1
- data/lib/internetdata/models/download.rb +1 -1
- data/lib/internetdata/models/download_list.rb +1 -1
- data/lib/internetdata/models/error_envelope.rb +1 -1
- data/lib/internetdata/models/oauth_metadata.rb +1 -1
- data/lib/internetdata/models/standing.rb +1 -1
- data/lib/internetdata/models/token_response.rb +1 -1
- data/lib/internetdata/retries.rb +10 -1
- data/lib/internetdata/transport.rb +17 -2
- data/lib/internetdata/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0f14b7d6a525337e7b52c053e18cef8025bf359912e95bc819d8fd410caa9838
|
|
4
|
+
data.tar.gz: 44b976c01d3f6ddb0cdcbd92183fedadecb6f579350c00663377d7b8f3f65242
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b07e9d69f4b16770627a42cff9ea3db360646b97758ffdba433c8e534b3e4dbaf596101d0829021e146707bcc03105031902b80b241505c89af026802a2b2c30
|
|
7
|
+
data.tar.gz: 50d8d1cc12b1f427d669cd273bed58af9a37f9eef8e1c3bc2e317f301fbade53a8f0ef7672680988aa77edb283d39e33685e8a53c59b1f86661a7f6cc7ad56c7
|
data/README.md
CHANGED
|
@@ -35,7 +35,7 @@ client.database.list.each do |database|
|
|
|
35
35
|
end
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
`list` returns one entry per database FAMILY, because a license is held against the family while a download names a specific version. `standing` is `licensed` if the family is yours today, `expired` if the term has ended, and `unlicensed` if it is published but has never been bought. `versions` carries the
|
|
38
|
+
`list` returns one entry per database FAMILY, because a license is held against the family while a download names a specific version. `standing` is `licensed` if the family is yours today, `expired` if the term has ended, and `unlicensed` if it is published but has never been bought. `versions` carries the IDs you pass everywhere else, oldest first, and the formats each one is actually built in.
|
|
39
39
|
|
|
40
40
|
### What is inside a database
|
|
41
41
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
data/lib/internetdata/client.rb
CHANGED
|
@@ -21,16 +21,20 @@ module InternetData
|
|
|
21
21
|
|
|
22
22
|
# @param api_key [String, nil] a key carrying the `db.download` scope. Omit
|
|
23
23
|
# it and no credential is sent; every database published today answers 401.
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
#
|
|
24
|
+
# The blanks around it are dropped, and blanks alone are no key.
|
|
25
|
+
# @param retries [Integer] extra attempts for a transient failure, from 0. Each
|
|
26
|
+
# waits the server's `Retry-After` when it sent one of at most about 24.8
|
|
27
|
+
# days, and otherwise a backoff of 250 ms that doubles per retry.
|
|
27
28
|
# @param timeout [Numeric] seconds allowed for one API call, 0 for no bound. It
|
|
28
29
|
# also bounds the CONNECT phase of a transfer, which is otherwise unlimited.
|
|
29
30
|
# @raise [ArgumentError] for a `timeout` that is negative, not a finite number,
|
|
30
|
-
# or past 2147483.647 seconds (2**31 - 1 ms), the longest curl holds
|
|
31
|
+
# or past 2147483.647 seconds (2**31 - 1 ms), the longest curl holds; for a
|
|
32
|
+
# `retries` that is not an Integer from 0; and for an `api_key` holding a
|
|
33
|
+
# control character, without the key in the message.
|
|
31
34
|
# @param transport [Transport, nil] override the HTTP layer, mostly for tests.
|
|
32
35
|
def initialize(api_key: nil, base_url: DEFAULT_BASE_URL, retries: DEFAULT_RETRIES,
|
|
33
36
|
timeout: DEFAULT_TIMEOUT, transport: nil)
|
|
37
|
+
retries = Retries.checked_count(retries)
|
|
34
38
|
@transport = transport || Transport.new(
|
|
35
39
|
Transport::Config.new(api_key: api_key, base_url: base_url, timeout: timeout),
|
|
36
40
|
)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -23,7 +23,7 @@ module InternetData
|
|
|
23
23
|
# each one.
|
|
24
24
|
#
|
|
25
25
|
# A license is held against the family while a download names one version, so
|
|
26
|
-
# the
|
|
26
|
+
# the IDs {#download}, {#download_bytes}, {#download_url}, {#checksums} and
|
|
27
27
|
# {#metadata} take come from each family's `versions`, not from the family.
|
|
28
28
|
#
|
|
29
29
|
# This is the server's answer for this key, so a listing held from one key is
|
data/lib/internetdata/errors.rb
CHANGED
|
@@ -58,7 +58,7 @@ module InternetData
|
|
|
58
58
|
when 401 then :unauthorized
|
|
59
59
|
when 403 then :forbidden
|
|
60
60
|
# Every other 4xx is a CLIENT error. Classifying on the RANGE rather than
|
|
61
|
-
# on an enumerated list is what keeps a 404 from an unknown database
|
|
61
|
+
# on an enumerated list is what keeps a 404 from an unknown database ID
|
|
62
62
|
# falling through to the retryable server_error default and being retried
|
|
63
63
|
# twice before it fails.
|
|
64
64
|
when 400..499 then :bad_request
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module InternetData
|
|
17
|
-
# One database FAMILY, with your organization's license beside it. A license covers the family, while a download names a specific version, so the
|
|
17
|
+
# One database FAMILY, with your organization's license beside it. A license covers the family, while a download names a specific version, so the IDs passed to `download` and `checksum` come from `versions`.
|
|
18
18
|
class Database < ApiModelBase
|
|
19
19
|
# The family, e.g. `vpn_ip`. What a license is held against.
|
|
20
20
|
attr_accessor :base
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -15,14 +15,14 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module InternetData
|
|
17
17
|
class DatabaseVersion < ApiModelBase
|
|
18
|
-
# The versioned
|
|
18
|
+
# The versioned ID. Pass this to `download`, `checksum` and `metadata`.
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
21
21
|
attr_accessor :version
|
|
22
22
|
|
|
23
23
|
attr_accessor :summary
|
|
24
24
|
|
|
25
|
-
# The formats this version is BUILT in. Asking for another is a 400, not a gap - the `_provider` catalogs are keyed by provider
|
|
25
|
+
# The formats this version is BUILT in. Asking for another is a 400, not a gap - the `_provider` catalogs are keyed by provider ID, so no MMDB exists for them.
|
|
26
26
|
attr_accessor :formats
|
|
27
27
|
|
|
28
28
|
# The formats an evaluation sample is published in, if any.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The InternetData API: download the databases your organization is licensed for, and manage the account behind them. See https://docs.internetdata.io for guides and https://github.com/internetdata for the official client libraries.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 2026.
|
|
6
|
+
The version of the OpenAPI document: 2026.11.02
|
|
7
7
|
Contact: support@internetdata.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.25.0
|
data/lib/internetdata/retries.rb
CHANGED
|
@@ -5,7 +5,7 @@ module InternetData
|
|
|
5
5
|
#
|
|
6
6
|
# Only a 5xx, a transport failure and a 429 that carried `Retry-After` are
|
|
7
7
|
# worth another attempt. Every other 4xx is a client error and fails on the
|
|
8
|
-
# first try, so an unknown database
|
|
8
|
+
# first try, so an unknown database ID is not asked for three times.
|
|
9
9
|
module Retries
|
|
10
10
|
BACKOFF_SECONDS = 0.25
|
|
11
11
|
|
|
@@ -15,6 +15,15 @@ module InternetData
|
|
|
15
15
|
|
|
16
16
|
module_function
|
|
17
17
|
|
|
18
|
+
# `retries`, once it is a count. Refused where it is set: unchecked, -1 and
|
|
19
|
+
# NaN read as none, 1.5 as two, Infinity retried a failing call for good, and
|
|
20
|
+
# a String, nil or true raised a raw ArgumentError out of every failing call.
|
|
21
|
+
def checked_count(retries)
|
|
22
|
+
return retries if retries.is_a?(Integer) && retries >= 0
|
|
23
|
+
|
|
24
|
+
raise ArgumentError, "retries must be an Integer from 0, not #{retries.inspect}"
|
|
25
|
+
end
|
|
26
|
+
|
|
18
27
|
# `retry_if`, when given, is asked after each retryable failure, and a false
|
|
19
28
|
# answer ends the attempts there.
|
|
20
29
|
def with_retries(retries, retry_if: nil)
|
|
@@ -24,6 +24,19 @@ module InternetData
|
|
|
24
24
|
"timeout must be a number of seconds from 0 (no bound) to #{LONGEST_TIMEOUT}, not #{timeout.inspect}"
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
+
# `api_key` without the blanks around it, nil for blanks alone. A control
|
|
28
|
+
# character is refused where it is set, and the key is left out of the
|
|
29
|
+
# message: a CR or LF failed every call with Ethon's raw InvalidValue, whose
|
|
30
|
+
# message quoted the key, and a tab, NUL or DEL went out inside it (2.8.5).
|
|
31
|
+
def self.checked_key(api_key)
|
|
32
|
+
return nil if api_key.nil?
|
|
33
|
+
|
|
34
|
+
key = api_key.to_s.strip
|
|
35
|
+
raise ArgumentError, 'api_key must not contain a control character' if key.match?(/[[:cntrl:]]/)
|
|
36
|
+
|
|
37
|
+
key.empty? ? nil : key
|
|
38
|
+
end
|
|
39
|
+
|
|
27
40
|
# The generated Configuration applies a security scheme whatever it holds, so
|
|
28
41
|
# a keyless client would send `Authorization: Bearer ` - an empty credential,
|
|
29
42
|
# which the API answers 401 to rather than treating as no credential at all.
|
|
@@ -35,7 +48,7 @@ module InternetData
|
|
|
35
48
|
self.scheme = uri.scheme
|
|
36
49
|
self.host = uri.port == uri.default_port ? uri.host : "#{uri.host}:#{uri.port}"
|
|
37
50
|
self.base_path = uri.path
|
|
38
|
-
self.access_token = api_key
|
|
51
|
+
self.access_token = Transport.checked_key(api_key)
|
|
39
52
|
self.timeout = timeout.nil? ? nil : Transport.checked_timeout(timeout)
|
|
40
53
|
end
|
|
41
54
|
|
|
@@ -240,7 +253,9 @@ module InternetData
|
|
|
240
253
|
when 'Integer' then value.is_a?(Integer)
|
|
241
254
|
when 'Float' then value.is_a?(Numeric)
|
|
242
255
|
when 'Boolean' then [true, false].include?(value)
|
|
243
|
-
|
|
256
|
+
# The spec's `type: object`, a sample row: through 2.8.5 a row of 1, "x"
|
|
257
|
+
# or [] came back as the answer.
|
|
258
|
+
when 'Object' then value.is_a?(Hash)
|
|
244
259
|
when /\AArray<(?<inner>.+)>\z/
|
|
245
260
|
inner = Regexp.last_match(:inner)
|
|
246
261
|
value.is_a?(Array) && value.each_with_index.all? { |v, i| check_type!(v, inner, "#{where}[#{i}]") }
|
data/lib/internetdata/version.rb
CHANGED