appnigma-sdk 0.2.0 → 0.2.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 +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/appnigma/transport.rb +10 -4
- data/lib/appnigma/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: 4e72996c156750c03593d82ddb050a5cd8beeadd4446011aa49491cb795e4c16
|
|
4
|
+
data.tar.gz: c799bb5d090ae298307d3cbf4a962a5572873cb9aa468e7bfed2648e25696040
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1a837ce176625edb9dbf5b0150c4f742dbd830e662594099b2b49c619a0568c9e395579479a408cbf2464ffb3182014a07857c9454c56880072de897798f898d
|
|
7
|
+
data.tar.gz: 53ea5d5c768d972cdfd2d33fbd5c31688c93bf3a589b2b30ccc7472c812576c9cf0a6b0c2ee63335d81378ac92a214876fa5bbba489fbf35fe71aadbd427c4d5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.1](https://github.com/Appnigma/ap-sdks/compare/ruby-v0.2.0...ruby-v0.2.1) (2026-10-26)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug fixes
|
|
7
|
+
|
|
8
|
+
* **ruby:** a hexadecimal or exponent Retry-After no longer counts as a wait ([#16](https://github.com/Appnigma/ap-sdks/issues/16)) ([14fc61e](https://github.com/Appnigma/ap-sdks/commit/14fc61e636f61395f713857a3b0327fd9bb50029))
|
|
9
|
+
|
|
3
10
|
## 0.2.0
|
|
4
11
|
|
|
5
12
|
Each of your functions now has one live version, and `run` says whose function
|
data/lib/appnigma/transport.rb
CHANGED
|
@@ -35,6 +35,9 @@ module Appnigma
|
|
|
35
35
|
class Transport
|
|
36
36
|
USER_AGENT = "appnigma-sdk-ruby/#{VERSION}".freeze
|
|
37
37
|
|
|
38
|
+
# A Retry-After of plain whole or part seconds; see read_retry_after.
|
|
39
|
+
RETRY_AFTER_SECONDS = /\A\d+(\.\d+)?\z/
|
|
40
|
+
|
|
38
41
|
# Builds the generated API for one configuration. Tests pass their own.
|
|
39
42
|
DEFAULT_API_FACTORY = ->(config) { Generated::DefaultApi.new(Generated::ApiClient.new(config)) }
|
|
40
43
|
|
|
@@ -117,12 +120,15 @@ module Appnigma
|
|
|
117
120
|
end
|
|
118
121
|
|
|
119
122
|
# Our server sends seconds. Anything else (an HTTP date from a proxy,
|
|
120
|
-
# junk) reads as "not given" rather than as a wait
|
|
123
|
+
# junk) reads as "not given" rather than as a wait, as in the TypeScript
|
|
124
|
+
# package. Only plain decimals count (RETRY_AFTER_SECONDS): Float() reads
|
|
125
|
+
# "0x10" as 16, and "1e3" and "1_000" as 1000.
|
|
121
126
|
def read_retry_after(value)
|
|
122
|
-
|
|
127
|
+
value = value&.strip
|
|
128
|
+
return nil unless value&.match?(RETRY_AFTER_SECONDS)
|
|
123
129
|
|
|
124
|
-
seconds = Float(value
|
|
125
|
-
return nil
|
|
130
|
+
seconds = Float(value)
|
|
131
|
+
return nil unless seconds.finite?
|
|
126
132
|
|
|
127
133
|
seconds == seconds.floor ? seconds.to_i : seconds
|
|
128
134
|
end
|
data/lib/appnigma/version.rb
CHANGED