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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0fecbc4364d334002fa953f034360d8684a0aace45b7bb6b41af3261176adedc
4
- data.tar.gz: c0e1eb175cc5d6a6564fb5a71b445e62b2ba7ef337ec8420f590c74c1a5cc1c0
3
+ metadata.gz: 4e72996c156750c03593d82ddb050a5cd8beeadd4446011aa49491cb795e4c16
4
+ data.tar.gz: c799bb5d090ae298307d3cbf4a962a5572873cb9aa468e7bfed2648e25696040
5
5
  SHA512:
6
- metadata.gz: 3bc2a714d3fded4fc7103acbd6bce1c842e35cfdea8921c38ac562af599e513b6f38385a438714758073266e3761b09860394debb4a40bd334b42c6af40dcc10
7
- data.tar.gz: 32c2e31f9de37713f7cc0cb4f9574edd314cc1e59eedac9e935987b624d24dcbc5157d7fbb3847737a8b479b54c759a8a3ed61233b012745f636109953eba736
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
@@ -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
- return nil if value.nil?
127
+ value = value&.strip
128
+ return nil unless value&.match?(RETRY_AFTER_SECONDS)
123
129
 
124
- seconds = Float(value, exception: false)
125
- return nil if seconds.nil? || !seconds.finite? || seconds.negative?
130
+ seconds = Float(value)
131
+ return nil unless seconds.finite?
126
132
 
127
133
  seconds == seconds.floor ? seconds.to_i : seconds
128
134
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Appnigma
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1" # x-release-please-version
5
5
 
6
6
  # The version of the API description (openapi/sdk-v1.yaml) this gem was
7
7
  # generated from. Written by bin/generate; a test ties it to the file.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appnigma-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Appnigma