folio_client 0.14.0 → 0.15.0
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/Gemfile.lock +12 -13
- data/lib/folio_client/job_status.rb +12 -7
- data/lib/folio_client/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d0d61214a5547fd8ff28b9e79cef6eae123bddea9b060039163a1d8d7e3a8b91
|
|
4
|
+
data.tar.gz: f343f324c6bd48998394d3bc3badeff7aa010cdafcf171d53c076df44c341756
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ba5f952cf9c4449adece5c15496832bb89a73cba6fcc866e4f7024c393f22fedab0be86c4a8a394c4d893b8c9a224e38305dc79e3d0a657c76c8413658600a88
|
|
7
|
+
data.tar.gz: c747fa00a2e6f51ba219116bc197922fab303bda976fc0945d9e906d3160813206ae434c2d8c791f66c41a92781d288eaaae40401ed03db83d4eded7783d17a1
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
folio_client (0.
|
|
4
|
+
folio_client (0.15.0)
|
|
5
5
|
activesupport (>= 4.2, < 8)
|
|
6
6
|
dry-monads
|
|
7
7
|
faraday
|
|
@@ -11,7 +11,7 @@ PATH
|
|
|
11
11
|
GEM
|
|
12
12
|
remote: https://rubygems.org/
|
|
13
13
|
specs:
|
|
14
|
-
activesupport (7.1.
|
|
14
|
+
activesupport (7.1.2)
|
|
15
15
|
base64
|
|
16
16
|
bigdecimal
|
|
17
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
@@ -24,7 +24,7 @@ GEM
|
|
|
24
24
|
addressable (2.8.5)
|
|
25
25
|
public_suffix (>= 2.0.2, < 6.0)
|
|
26
26
|
ast (2.4.2)
|
|
27
|
-
base64 (0.
|
|
27
|
+
base64 (0.2.0)
|
|
28
28
|
bigdecimal (3.1.4)
|
|
29
29
|
byebug (11.1.3)
|
|
30
30
|
concurrent-ruby (1.2.2)
|
|
@@ -33,7 +33,7 @@ GEM
|
|
|
33
33
|
rexml
|
|
34
34
|
diff-lcs (1.5.0)
|
|
35
35
|
docile (1.4.0)
|
|
36
|
-
drb (2.
|
|
36
|
+
drb (2.2.0)
|
|
37
37
|
ruby2_keywords
|
|
38
38
|
dry-core (1.0.1)
|
|
39
39
|
concurrent-ruby (~> 1.0)
|
|
@@ -42,7 +42,7 @@ GEM
|
|
|
42
42
|
concurrent-ruby (~> 1.0)
|
|
43
43
|
dry-core (~> 1.0, < 2)
|
|
44
44
|
zeitwerk (~> 2.6)
|
|
45
|
-
faraday (2.7.
|
|
45
|
+
faraday (2.7.12)
|
|
46
46
|
base64
|
|
47
47
|
faraday-net_http (>= 2.0, < 3.1)
|
|
48
48
|
ruby2_keywords (>= 0.0.4)
|
|
@@ -58,12 +58,12 @@ GEM
|
|
|
58
58
|
scrub_rb (>= 1.0.1, < 2)
|
|
59
59
|
unf
|
|
60
60
|
minitest (5.20.0)
|
|
61
|
-
mutex_m (0.
|
|
61
|
+
mutex_m (0.2.0)
|
|
62
62
|
parallel (1.23.0)
|
|
63
63
|
parser (3.2.2.4)
|
|
64
64
|
ast (~> 2.4.1)
|
|
65
65
|
racc
|
|
66
|
-
public_suffix (5.0.
|
|
66
|
+
public_suffix (5.0.4)
|
|
67
67
|
racc (1.7.3)
|
|
68
68
|
rainbow (3.1.1)
|
|
69
69
|
rake (13.1.0)
|
|
@@ -82,12 +82,11 @@ GEM
|
|
|
82
82
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
83
83
|
rspec-support (~> 3.12.0)
|
|
84
84
|
rspec-support (3.12.1)
|
|
85
|
-
rubocop (1.
|
|
86
|
-
base64 (~> 0.1.1)
|
|
85
|
+
rubocop (1.57.2)
|
|
87
86
|
json (~> 2.3)
|
|
88
87
|
language_server-protocol (>= 3.17.0)
|
|
89
88
|
parallel (~> 1.10)
|
|
90
|
-
parser (>= 3.2.2.
|
|
89
|
+
parser (>= 3.2.2.4)
|
|
91
90
|
rainbow (>= 2.2.2, < 4.0)
|
|
92
91
|
regexp_parser (>= 1.8, < 3.0)
|
|
93
92
|
rexml (>= 3.2.5, < 4.0)
|
|
@@ -116,10 +115,10 @@ GEM
|
|
|
116
115
|
simplecov_json_formatter (~> 0.1)
|
|
117
116
|
simplecov-html (0.12.3)
|
|
118
117
|
simplecov_json_formatter (0.1.4)
|
|
119
|
-
standard (1.
|
|
118
|
+
standard (1.32.0)
|
|
120
119
|
language_server-protocol (~> 3.17.0.2)
|
|
121
120
|
lint_roller (~> 1.0)
|
|
122
|
-
rubocop (~> 1.
|
|
121
|
+
rubocop (~> 1.57.2)
|
|
123
122
|
standard-custom (~> 1.0.0)
|
|
124
123
|
standard-performance (~> 1.2)
|
|
125
124
|
standard-custom (1.0.2)
|
|
@@ -132,7 +131,7 @@ GEM
|
|
|
132
131
|
concurrent-ruby (~> 1.0)
|
|
133
132
|
unf (0.1.4)
|
|
134
133
|
unf_ext
|
|
135
|
-
unf_ext (0.0.
|
|
134
|
+
unf_ext (0.0.9.1)
|
|
136
135
|
unicode-display_width (2.5.0)
|
|
137
136
|
webmock (3.19.1)
|
|
138
137
|
addressable (>= 2.8.0)
|
|
@@ -35,8 +35,8 @@ class FolioClient
|
|
|
35
35
|
Failure(:not_found)
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
def wait_until_complete(wait_secs: default_wait_secs, timeout_secs: default_timeout_secs)
|
|
39
|
-
wait_with_timeout(wait_secs: wait_secs, timeout_secs: timeout_secs) { status }
|
|
38
|
+
def wait_until_complete(wait_secs: default_wait_secs, timeout_secs: default_timeout_secs, max_checks: default_max_checks)
|
|
39
|
+
wait_with_timeout(wait_secs: wait_secs, timeout_secs: timeout_secs, max_checks: max_checks) { status }
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
def instance_hrids
|
|
@@ -66,13 +66,18 @@ class FolioClient
|
|
|
66
66
|
10 * 60
|
|
67
67
|
end
|
|
68
68
|
|
|
69
|
-
def
|
|
69
|
+
def default_max_checks
|
|
70
|
+
# arbitrary best guess at number of times to check for job status before erroring
|
|
71
|
+
10
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def wait_with_timeout(wait_secs: default_wait_secs, timeout_secs: default_timeout_secs, max_checks: default_max_checks)
|
|
70
75
|
Timeout.timeout(timeout_secs) do
|
|
71
76
|
loop.with_index do |_, i|
|
|
72
77
|
result = yield
|
|
73
78
|
|
|
74
79
|
# If a 404, wait a bit longer before raising an error.
|
|
75
|
-
check_not_found(result, i)
|
|
80
|
+
check_not_found(result, i, max_checks)
|
|
76
81
|
return result if done_waiting?(result)
|
|
77
82
|
|
|
78
83
|
sleep(wait_secs)
|
|
@@ -86,10 +91,10 @@ class FolioClient
|
|
|
86
91
|
result.success? || (result.failure? && result.failure == :error)
|
|
87
92
|
end
|
|
88
93
|
|
|
89
|
-
def check_not_found(result, index)
|
|
90
|
-
return unless result.failure? && result.failure == :not_found && index >
|
|
94
|
+
def check_not_found(result, index, max_checks)
|
|
95
|
+
return unless result.failure? && result.failure == :not_found && index > max_checks
|
|
91
96
|
|
|
92
|
-
raise ResourceNotFound, "Job #{job_execution_id} not found after #{index} retries"
|
|
97
|
+
raise ResourceNotFound, "Job #{job_execution_id} not found after #{index} retries. The data import job may still have completed."
|
|
93
98
|
end
|
|
94
99
|
end
|
|
95
100
|
end
|
data/lib/folio_client/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: folio_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.15.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter Mangiafico
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-11-
|
|
11
|
+
date: 2023-11-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -222,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
222
222
|
- !ruby/object:Gem::Version
|
|
223
223
|
version: '0'
|
|
224
224
|
requirements: []
|
|
225
|
-
rubygems_version: 3.4.
|
|
225
|
+
rubygems_version: 3.4.10
|
|
226
226
|
signing_key:
|
|
227
227
|
specification_version: 4
|
|
228
228
|
summary: Interface for interacting with the Folio ILS API.
|