walinko 0.1.0 → 0.1.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: fab8530917c42b499678f18a29388a6a022aa95db4244b52aab4521f86769103
4
- data.tar.gz: 7229de0b6795beb1cad9e3f3ce3194e48a008029c0b0ea085b035a7df8bc0540
3
+ metadata.gz: 9d12b902200715901b4d4599699926a2aa25e22759b889ec62960aec56ca4397
4
+ data.tar.gz: c05aa4712904022b0201cc59f998901a70bab56bc4ba26389ddbfdd87e49ab2a
5
5
  SHA512:
6
- metadata.gz: 9632be9a36b8603403f9bb32007856f0524a6d107ad917103f6e7b3303eebabbd131a49a1269664be6a5a49bcb4c416b9d6cd47c02768dbc35ec0344f6b730dd
7
- data.tar.gz: 5f86b31f8b0e9d1aec9fafc54e1d14db11c3abb23bc64e8424415b221f75741b5a9450d2fe726ca773344bddf8993e130a5626b2a9e867f45bbb1a99fef9d0a6
6
+ metadata.gz: bd2c8ffa37bc4ef6772b1e93bb9bb13992f3475fd8d460db13569de018e57b8d5335b85bb2cb0d5e454c9960c8028b60b9441d8dcc75104e9ba956faae678b0b
7
+ data.tar.gz: d1ca119491d8bb8ba846940b82b1554382d74d5f87d10d8214cf01b3bd19f948c7e46d198a8ebae78d1b3444ab23ecc30b8623c68e284ff9cb9bddaed4588553
data/CHANGELOG.md CHANGED
@@ -4,6 +4,20 @@ All notable changes to this gem are documented here. The format is based on
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
5
5
  adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.1.1] — 2026-05-04
8
+
9
+ ### Fixed
10
+ - `wait_until_done` could time out earlier than requested — the deadline
11
+ check `now + interval >= deadline` has been corrected to `now >= deadline`.
12
+ - `Retry-After: 0` was discarded and fell back to exponential backoff
13
+ instead of retrying immediately as the server instructed.
14
+ - Published gem now includes the MIT `LICENSE` file (the gemspec already
15
+ referenced it, but the file was missing from the gem contents).
16
+
17
+ ### Added
18
+ - `internal_error` (HTTP 500) is now covered in the error-mapping test
19
+ matrix.
20
+
7
21
  ## [0.1.0] — 2026-05-01
8
22
 
9
23
  First publishable release. Targets Walinko public API
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Walinko
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -192,8 +192,9 @@ module Walinko
192
192
  def parse_retry_after(raw)
193
193
  v = raw['Retry-After']
194
194
  return nil if v.nil?
195
+ return nil unless v.match?(/\A\d+\z/)
195
196
 
196
- v.to_i.positive? ? v.to_i : nil
197
+ v.to_i
197
198
  end
198
199
 
199
200
  def safe_parse_json(body)
@@ -106,7 +106,7 @@ module Walinko
106
106
  status = fetch(tracking_id)
107
107
  return status if status.done?
108
108
 
109
- if monotonic_now + interval.to_f >= deadline
109
+ if monotonic_now >= deadline
110
110
  raise TimeoutError.new(
111
111
  "Timed out waiting for #{tracking_id} after #{timeout}s (still #{status.status})",
112
112
  http_status: 504,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Walinko
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: walinko
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Walinko
@@ -63,6 +63,7 @@ extensions: []
63
63
  extra_rdoc_files: []
64
64
  files:
65
65
  - CHANGELOG.md
66
+ - LICENSE
66
67
  - README.md
67
68
  - lib/walinko.rb
68
69
  - lib/walinko/configuration.rb