alma 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/alma/loan_set.rb +7 -2
- data/lib/alma/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: ffe7f9e2bafe164f38d89d6ca0c4b97d13eb778e9e59dbe7995aa6622fe0dfb5
|
4
|
+
data.tar.gz: e887790912286f3750b83f34435a2e9870a57ca56f9cb85de971c64682967964
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e7d1d3246dda68dc81d5ab05356d73969421053b20a830181d937239d3e6446cba8f7e6f9ff805673693b287a0b6549a1f6c54ac0b11b172bcaa85449f844d6
|
7
|
+
data.tar.gz: cf3ba3362fd3809039df685cffe2b4b9d3b8a9f02bbd0968fca761c8d72bf3bb41e0be542574d6acef3bfc81e246b097596db26a974acb1f8fda444cb85a8257
|
data/lib/alma/loan_set.rb
CHANGED
@@ -39,8 +39,9 @@ module Alma
|
|
39
39
|
def all
|
40
40
|
Enumerator.new do |yielder|
|
41
41
|
offset = 0
|
42
|
+
limit = 100
|
42
43
|
loop do
|
43
|
-
extra_args = @search_args.merge({ limit
|
44
|
+
extra_args = @search_args.merge({ limit:, offset: })
|
44
45
|
r = (offset == 0) ? self : single_record_class.where_user(user_id, extra_args)
|
45
46
|
|
46
47
|
unless r.empty?
|
@@ -48,7 +49,11 @@ module Alma
|
|
48
49
|
offset += 100
|
49
50
|
end
|
50
51
|
|
51
|
-
|
52
|
+
# TODO: r.count greater than "limit" doesn't make any sense unless the ALMA User/Loan API is broken.
|
53
|
+
# We should remove this qualification in October once Alma fixes the bug they introduced in their
|
54
|
+
# September release.
|
55
|
+
# @see https://developers.exlibrisgroup.com/forums/topic/limit-and-offset-not-being-applied-to-retrieve-user-loans-api/
|
56
|
+
if r.empty? || r.count < limit || r.count > limit
|
52
57
|
raise StopIteration
|
53
58
|
end
|
54
59
|
end
|
data/lib/alma/version.rb
CHANGED