fulfil_api 0.3.2 → 0.3.4

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: 65225f0a5c01020f7d50c09468555157a52ffc8454b99e0937b63321c11b1e29
4
- data.tar.gz: 0cf0e22367baff564776329df08318aad4ab27b75b53f669b8f0a0c68d8ecbc8
3
+ metadata.gz: d84aacbbab5d3d73a1b407912c8d94d7a8578b6fd48b9375e65fac19525ea37e
4
+ data.tar.gz: a18d7a8d06b96c9b94746051f7c425c7495939165dbbaf6225ba09bc69e5abe7
5
5
  SHA512:
6
- metadata.gz: a3f3dc9ad0b7ae0915df9c16ab407f71a7394baa33cd8518b26caa562fbabbc4c5a8dbc6981f39cc725fb86b7f13eefdba1605c31b4854148531b4ccfc0e3266
7
- data.tar.gz: c58d7de83e14f54f07b9035cceb7c227ee7c1c6b623c73f3d26ce74700b1cccc383d7d17b9a1e265c7cbab5e6383d4e7921acee85f743b4d5349efe375baba55
6
+ metadata.gz: 390ed78db90f52c61b201e974f7f783d623d4efdc9dee30733c244c1b379b014bd2d3c403c78dfa46c301e11e6341b5191cb79218271c59db1d8b3245ba9903d
7
+ data.tar.gz: 7243dccede3d9f6aa7eb3af9a088bad20c388880719d0803de6e46ecd87a5a9a3864489bfe07c74ef78bfe4da24f78a2b5cd8f42391a9ae96d6318848a3ed386
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-minitest
3
3
  - rubocop-performance
4
4
  - rubocop-rake
@@ -45,7 +45,8 @@ module FulfilApi
45
45
  #
46
46
  # @return [Fulfil::Configuration] The current configuration object.
47
47
  def self.configuration
48
- Thread.current[:fulfil_api_configuration] ||= Configuration.new
48
+ Thread.current[:fulfil_api_configuration] ||=
49
+ @configuration ||= Configuration.new
49
50
  end
50
51
 
51
52
  # Allows the configuration of the gem in a thread-safe manner.
@@ -19,7 +19,7 @@ module FulfilApi
19
19
  #
20
20
  # @example Hold multipe customer shipments
21
21
  # FulfilApi::CustomerShipment.hold([123, 456], note: "Double booking")
22
- def hold!(id_or_ids, note:)
22
+ def hold!(id_or_ids, note:) # rubocop:disable Naming/PredicateMethod
23
23
  FulfilApi.client.put("/model/#{MODEL_NAME}/hold", body: [[*id_or_ids].flatten, note])
24
24
  true
25
25
  end
@@ -37,7 +37,7 @@ module FulfilApi
37
37
  #
38
38
  # @example Unhold a customer shipment
39
39
  # FulfilApi::CustomerShipment.unhold([123, 456], note: "All clear")
40
- def unhold!(id_or_ids, note:)
40
+ def unhold!(id_or_ids, note:) # rubocop:disable Naming/PredicateMethod
41
41
  FulfilApi.client.put("/model/#{MODEL_NAME}/unhold", body: [[*id_or_ids].flatten, note])
42
42
  true
43
43
  end
@@ -58,7 +58,9 @@ module FulfilApi
58
58
 
59
59
  current_offset += 1
60
60
  rescue FulfilApi::Error => e
61
- retry if e.details[:response_status] == 429
61
+ raise e unless e.details[:response_status] == 429
62
+
63
+ retry
62
64
  end
63
65
 
64
66
  self
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FulfilApi
4
- VERSION = "0.3.2"
4
+ VERSION = "0.3.4"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fulfil_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Vermaas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-05-08 00:00:00.000000000 Z
11
+ date: 2025-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  requirements: []
128
- rubygems_version: 3.5.18
128
+ rubygems_version: 3.5.11
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: A HTTP client to interact the Fulfil.io API