folio_client 0.15.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +349 -13
- data/Gemfile +2 -2
- data/Gemfile.lock +27 -32
- data/README.md +3 -2
- data/Rakefile +3 -3
- data/api_test.rb +13 -12
- data/folio_client.gemspec +28 -26
- data/lib/folio_client/authenticator.rb +21 -11
- data/lib/folio_client/data_import.rb +18 -17
- data/lib/folio_client/inventory.rb +19 -20
- data/lib/folio_client/job_status.rb +19 -14
- data/lib/folio_client/organizations.rb +15 -16
- data/lib/folio_client/records_editor.rb +15 -13
- data/lib/folio_client/source_storage.rb +28 -15
- data/lib/folio_client/unexpected_response.rb +4 -0
- data/lib/folio_client/users.rb +12 -13
- data/lib/folio_client/version.rb +1 -1
- data/lib/folio_client.rb +70 -47
- metadata +37 -12
- data/.autoupdate/postupdate +0 -19
- data/.rubocop/custom.yml +0 -84
- data/.standard.yml +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da03f2878d6f8a2fb1ae082580b5aff119922c4175c8ee728b23a4939280b1f2
|
4
|
+
data.tar.gz: 53e1db7d78323b83a2e60f4220f3b636f6ab55d11182ab6684b76aaf08c70cfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4ada8c1720ba8e2942c96bffd6919f1064dab43740f07606153403ff75baf558ac001eb6347c2b271ed8a9d730727acf611c189a212d64a4ecefa68da19d30c
|
7
|
+
data.tar.gz: 1fffec41e5286364b033f3456b23f73f03aaa83c9d1ab8a8a23c11ce739c0b26adadf4111c9a81434449d3d74635a42aebf45bfeb5c3da9ffff6da8f17233e24
|
data/.rubocop.yml
CHANGED
@@ -1,18 +1,354 @@
|
|
1
|
-
inherit_mode:
|
2
|
-
merge:
|
3
|
-
- Exclude
|
4
|
-
|
5
1
|
require:
|
6
|
-
- standard
|
7
|
-
- standard-custom
|
8
|
-
- standard-performance
|
9
2
|
- rubocop-performance
|
10
3
|
- rubocop-rspec
|
11
4
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
5
|
+
AllCops:
|
6
|
+
TargetRubyVersion: 3.0
|
7
|
+
DisplayCopNames: true
|
8
|
+
SuggestExtensions: false
|
9
|
+
Exclude:
|
10
|
+
- bin/**
|
11
|
+
- vendor/bundle/**/*
|
12
|
+
|
13
|
+
# Per team developer playbook
|
14
|
+
Layout/LineLength:
|
15
|
+
Max: 150
|
16
|
+
RSpec/MultipleMemoizedHelpers:
|
17
|
+
Enabled: false
|
18
|
+
RSpec/MultipleExpectations:
|
19
|
+
Max: 3
|
20
|
+
RSpec/ExampleLength:
|
21
|
+
Max: 15
|
22
|
+
|
23
|
+
RSpec/BeEq: # new in 2.9.0
|
24
|
+
Enabled: true
|
25
|
+
RSpec/BeNil: # new in 2.9.0
|
26
|
+
Enabled: true
|
27
|
+
RSpec/ChangeByZero: # new in 2.11
|
28
|
+
Enabled: true
|
29
|
+
RSpec/ClassCheck: # new in 2.13
|
30
|
+
Enabled: true
|
31
|
+
RSpec/ExcessiveDocstringSpacing: # new in 2.5
|
32
|
+
Enabled: true
|
33
|
+
RSpec/IdenticalEqualityAssertion: # new in 2.4
|
34
|
+
Enabled: true
|
35
|
+
RSpec/NoExpectationExample: # new in 2.13
|
36
|
+
Enabled: true
|
37
|
+
RSpec/SortMetadata: # new in 2.14
|
38
|
+
Enabled: true
|
39
|
+
RSpec/SubjectDeclaration: # new in 2.5
|
40
|
+
Enabled: true
|
41
|
+
RSpec/VerifiedDoubleReference: # new in 2.10.0
|
42
|
+
Enabled: true
|
43
|
+
FactoryBot/ConsistentParenthesesStyle: # new in 2.14
|
44
|
+
Enabled: true
|
45
|
+
FactoryBot/SyntaxMethods: # new in 2.7
|
46
|
+
Enabled: true
|
47
|
+
RSpec/Rails/AvoidSetupHook: # new in 2.4
|
48
|
+
Enabled: true
|
49
|
+
RSpec/Rails/HaveHttpStatus: # new in 2.12
|
50
|
+
Enabled: true
|
51
|
+
RSpec/Rails/InferredSpecType: # new in 2.14
|
52
|
+
Enabled: true
|
53
|
+
Capybara/MatchStyle: # new in 2.17
|
54
|
+
Enabled: true
|
55
|
+
Capybara/NegationMatcher: # new in 2.14
|
56
|
+
Enabled: true
|
57
|
+
Capybara/SpecificActions: # new in 2.14
|
58
|
+
Enabled: true
|
59
|
+
Capybara/SpecificFinders: # new in 2.13
|
60
|
+
Enabled: true
|
61
|
+
Capybara/SpecificMatcher: # new in 2.12
|
62
|
+
Enabled: true
|
63
|
+
RSpec/DuplicatedMetadata: # new in 2.16
|
64
|
+
Enabled: true
|
65
|
+
RSpec/PendingWithoutReason: # new in 2.16
|
66
|
+
Enabled: true
|
67
|
+
FactoryBot/FactoryNameStyle: # new in 2.16
|
68
|
+
Enabled: true
|
69
|
+
RSpec/Rails/MinitestAssertions: # new in 2.17
|
70
|
+
Enabled: true
|
71
|
+
RSpec/RedundantAround: # new in 2.19
|
72
|
+
Enabled: true
|
73
|
+
RSpec/SkipBlockInsideExample: # new in 2.19
|
74
|
+
Enabled: true
|
75
|
+
RSpec/Rails/TravelAround: # new in 2.19
|
76
|
+
Enabled: true
|
77
|
+
FactoryBot/AssociationStyle: # new in 2.23
|
78
|
+
Enabled: true
|
79
|
+
FactoryBot/FactoryAssociationWithStrategy: # new in 2.23
|
80
|
+
Enabled: true
|
81
|
+
FactoryBot/RedundantFactoryOption: # new in 2.23
|
82
|
+
Enabled: true
|
83
|
+
RSpec/BeEmpty: # new in 2.20
|
84
|
+
Enabled: true
|
85
|
+
RSpec/ContainExactly: # new in 2.19
|
86
|
+
Enabled: true
|
87
|
+
RSpec/IndexedLet: # new in 2.20
|
88
|
+
Enabled: true
|
89
|
+
RSpec/MatchArray: # new in 2.19
|
90
|
+
Enabled: true
|
91
|
+
|
92
|
+
Gemspec/DeprecatedAttributeAssignment: # new in 1.30
|
93
|
+
Enabled: true
|
94
|
+
Gemspec/DevelopmentDependencies: # new in 1.44
|
95
|
+
Enabled: false
|
96
|
+
Gemspec/RequireMFA: # new in 1.23
|
97
|
+
Enabled: true
|
98
|
+
Layout/LineContinuationLeadingSpace: # new in 1.31
|
99
|
+
Enabled: true
|
100
|
+
Layout/LineContinuationSpacing: # new in 1.31
|
101
|
+
Enabled: true
|
102
|
+
Layout/LineEndStringConcatenationIndentation: # new in 1.18
|
103
|
+
Enabled: true
|
104
|
+
Layout/SpaceBeforeBrackets: # new in 1.7
|
105
|
+
Enabled: true
|
106
|
+
Lint/AmbiguousAssignment: # new in 1.7
|
107
|
+
Enabled: true
|
108
|
+
Lint/AmbiguousOperatorPrecedence: # new in 1.21
|
109
|
+
Enabled: true
|
110
|
+
Lint/AmbiguousRange: # new in 1.19
|
111
|
+
Enabled: true
|
112
|
+
Lint/ConstantOverwrittenInRescue: # new in 1.31
|
113
|
+
Enabled: true
|
114
|
+
Lint/DeprecatedConstants: # new in 1.8
|
115
|
+
Enabled: true
|
116
|
+
Lint/DuplicateBranch: # new in 1.3
|
117
|
+
Enabled: true
|
118
|
+
Lint/DuplicateMagicComment: # new in 1.37
|
119
|
+
Enabled: true
|
120
|
+
Lint/DuplicateMatchPattern: # new in 1.50
|
121
|
+
Enabled: true
|
122
|
+
Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
|
123
|
+
Enabled: true
|
124
|
+
Lint/EmptyBlock: # new in 1.1
|
125
|
+
Enabled: true
|
126
|
+
Lint/EmptyClass: # new in 1.3
|
127
|
+
Enabled: true
|
128
|
+
Lint/EmptyInPattern: # new in 1.16
|
129
|
+
Enabled: true
|
130
|
+
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
|
131
|
+
Enabled: true
|
132
|
+
Lint/ItWithoutArgumentsInBlock: # new in 1.59
|
133
|
+
Enabled: true
|
134
|
+
Lint/LambdaWithoutLiteralBlock: # new in 1.8
|
135
|
+
Enabled: true
|
136
|
+
Lint/LiteralAssignmentInCondition: # new in 1.58
|
137
|
+
Enabled: true
|
138
|
+
Lint/MixedCaseRange: # new in 1.53
|
139
|
+
Enabled: true
|
140
|
+
Lint/NoReturnInBeginEndBlocks: # new in 1.2
|
141
|
+
Enabled: true
|
142
|
+
Lint/NonAtomicFileOperation: # new in 1.31
|
143
|
+
Enabled: true
|
144
|
+
Lint/NumberedParameterAssignment: # new in 1.9
|
145
|
+
Enabled: true
|
146
|
+
Lint/OrAssignmentToConstant: # new in 1.9
|
147
|
+
Enabled: true
|
148
|
+
Lint/RedundantDirGlobSort: # new in 1.8
|
149
|
+
Enabled: true
|
150
|
+
Lint/RedundantRegexpQuantifiers: # new in 1.53
|
151
|
+
Enabled: true
|
152
|
+
Lint/RefinementImportMethods: # new in 1.27
|
153
|
+
Enabled: true
|
154
|
+
Lint/RequireRangeParentheses: # new in 1.32
|
155
|
+
Enabled: true
|
156
|
+
Lint/RequireRelativeSelfPath: # new in 1.22
|
157
|
+
Enabled: true
|
158
|
+
Lint/SymbolConversion: # new in 1.9
|
159
|
+
Enabled: true
|
160
|
+
Lint/ToEnumArguments: # new in 1.1
|
161
|
+
Enabled: true
|
162
|
+
Lint/TripleQuotes: # new in 1.9
|
163
|
+
Enabled: true
|
164
|
+
Lint/UnexpectedBlockArity: # new in 1.5
|
165
|
+
Enabled: true
|
166
|
+
Lint/UnmodifiedReduceAccumulator: # new in 1.1
|
167
|
+
Enabled: true
|
168
|
+
Lint/UselessRescue: # new in 1.43
|
169
|
+
Enabled: true
|
170
|
+
Lint/UselessRuby2Keywords: # new in 1.23
|
171
|
+
Enabled: true
|
172
|
+
Metrics/CollectionLiteralLength: # new in 1.47
|
173
|
+
Enabled: true
|
174
|
+
Naming/BlockForwarding: # new in 1.24
|
175
|
+
Enabled: true
|
176
|
+
Security/CompoundHash: # new in 1.28
|
177
|
+
Enabled: true
|
178
|
+
Security/IoMethods: # new in 1.22
|
179
|
+
Enabled: true
|
180
|
+
Style/ArgumentsForwarding: # new in 1.1
|
181
|
+
Enabled: true
|
182
|
+
Style/ArrayIntersect: # new in 1.40
|
183
|
+
Enabled: true
|
184
|
+
Style/CollectionCompact: # new in 1.2
|
185
|
+
Enabled: true
|
186
|
+
Style/ComparableClamp: # new in 1.44
|
187
|
+
Enabled: true
|
188
|
+
Style/ConcatArrayLiterals: # new in 1.41
|
189
|
+
Enabled: true
|
190
|
+
Style/DataInheritance: # new in 1.49
|
191
|
+
Enabled: true
|
192
|
+
Style/DirEmpty: # new in 1.48
|
193
|
+
Enabled: true
|
194
|
+
Style/DocumentDynamicEvalDefinition: # new in 1.1
|
195
|
+
Enabled: true
|
196
|
+
Style/EmptyHeredoc: # new in 1.32
|
197
|
+
Enabled: true
|
198
|
+
Style/EndlessMethod: # new in 1.8
|
199
|
+
Enabled: true
|
200
|
+
Style/EnvHome: # new in 1.29
|
201
|
+
Enabled: true
|
202
|
+
Style/ExactRegexpMatch: # new in 1.51
|
203
|
+
Enabled: true
|
204
|
+
Style/FetchEnvVar: # new in 1.28
|
205
|
+
Enabled: true
|
206
|
+
Style/FileEmpty: # new in 1.48
|
207
|
+
Enabled: true
|
208
|
+
Style/FileRead: # new in 1.24
|
209
|
+
Enabled: true
|
210
|
+
Style/FileWrite: # new in 1.24
|
211
|
+
Enabled: true
|
212
|
+
Style/HashConversion: # new in 1.10
|
213
|
+
Enabled: true
|
214
|
+
Style/HashExcept: # new in 1.7
|
215
|
+
Enabled: true
|
216
|
+
Style/IfWithBooleanLiteralBranches: # new in 1.9
|
217
|
+
Enabled: true
|
218
|
+
Style/InPatternThen: # new in 1.16
|
219
|
+
Enabled: true
|
220
|
+
Style/MagicCommentFormat: # new in 1.35
|
221
|
+
Enabled: true
|
222
|
+
Style/MapCompactWithConditionalBlock: # new in 1.30
|
223
|
+
Enabled: true
|
224
|
+
Style/MapToHash: # new in 1.24
|
225
|
+
Enabled: true
|
226
|
+
Style/MapToSet: # new in 1.42
|
227
|
+
Enabled: true
|
228
|
+
Style/MinMaxComparison: # new in 1.42
|
229
|
+
Enabled: true
|
230
|
+
Style/MultilineInPatternThen: # new in 1.16
|
231
|
+
Enabled: true
|
232
|
+
Style/NegatedIfElseCondition: # new in 1.2
|
233
|
+
Enabled: true
|
234
|
+
Style/NestedFileDirname: # new in 1.26
|
235
|
+
Enabled: true
|
236
|
+
Style/NilLambda: # new in 1.3
|
237
|
+
Enabled: true
|
238
|
+
Style/NumberedParameters: # new in 1.22
|
239
|
+
Enabled: true
|
240
|
+
Style/NumberedParametersLimit: # new in 1.22
|
241
|
+
Enabled: true
|
242
|
+
Style/ObjectThen: # new in 1.28
|
243
|
+
Enabled: true
|
244
|
+
Style/OpenStructUse: # new in 1.23
|
245
|
+
Enabled: true
|
246
|
+
Style/OperatorMethodCall: # new in 1.37
|
247
|
+
Enabled: true
|
248
|
+
Style/QuotedSymbols: # new in 1.16
|
249
|
+
Enabled: true
|
250
|
+
Style/RedundantArgument: # new in 1.4
|
251
|
+
Enabled: true
|
252
|
+
Style/RedundantArrayConstructor: # new in 1.52
|
253
|
+
Enabled: true
|
254
|
+
Style/RedundantConstantBase: # new in 1.40
|
255
|
+
Enabled: true
|
256
|
+
Style/RedundantCurrentDirectoryInPath: # new in 1.53
|
257
|
+
Enabled: true
|
258
|
+
Style/RedundantDoubleSplatHashBraces: # new in 1.41
|
259
|
+
Enabled: true
|
260
|
+
Style/RedundantEach: # new in 1.38
|
261
|
+
Enabled: true
|
262
|
+
Style/RedundantFilterChain: # new in 1.52
|
263
|
+
Enabled: true
|
264
|
+
Style/RedundantHeredocDelimiterQuotes: # new in 1.45
|
265
|
+
Enabled: true
|
266
|
+
Style/RedundantInitialize: # new in 1.27
|
267
|
+
Enabled: true
|
268
|
+
Style/RedundantLineContinuation: # new in 1.49
|
269
|
+
Enabled: true
|
270
|
+
Style/RedundantRegexpArgument: # new in 1.53
|
271
|
+
Enabled: true
|
272
|
+
Style/RedundantRegexpConstructor: # new in 1.52
|
273
|
+
Enabled: true
|
274
|
+
Style/RedundantSelfAssignmentBranch: # new in 1.19
|
275
|
+
Enabled: true
|
276
|
+
Style/RedundantStringEscape: # new in 1.37
|
277
|
+
Enabled: true
|
278
|
+
Style/ReturnNilInPredicateMethodDefinition: # new in 1.53
|
279
|
+
Enabled: true
|
280
|
+
Style/SelectByRegexp: # new in 1.22
|
281
|
+
Enabled: true
|
282
|
+
Style/SingleLineDoEndBlock: # new in 1.57
|
283
|
+
Enabled: true
|
284
|
+
Style/StringChars: # new in 1.12
|
285
|
+
Enabled: true
|
286
|
+
Style/SuperWithArgsParentheses: # new in 1.58
|
287
|
+
Enabled: true
|
288
|
+
Style/SwapValues: # new in 1.1
|
289
|
+
Enabled: true
|
290
|
+
Style/YAMLFileRead: # new in 1.53
|
291
|
+
Enabled: true
|
292
|
+
Capybara/ClickLinkOrButtonStyle: # new in 2.19
|
293
|
+
Enabled: true
|
294
|
+
Capybara/RedundantWithinFind: # new in 2.20
|
295
|
+
Enabled: true
|
296
|
+
Capybara/RSpec/HaveSelector: # new in 2.19
|
297
|
+
Enabled: true
|
298
|
+
Capybara/RSpec/PredicateMatcher: # new in 2.19
|
299
|
+
Enabled: true
|
300
|
+
FactoryBot/IdSequence: # new in <<next>>
|
301
|
+
Enabled: true
|
302
|
+
RSpec/EmptyMetadata: # new in 2.24
|
303
|
+
Enabled: true
|
304
|
+
RSpec/Eq: # new in 2.24
|
305
|
+
Enabled: true
|
306
|
+
RSpec/MetadataStyle: # new in 2.24
|
307
|
+
Enabled: true
|
308
|
+
RSpec/ReceiveMessages: # new in 2.23
|
309
|
+
Enabled: true
|
310
|
+
RSpec/SpecFilePathFormat: # new in 2.24
|
311
|
+
Enabled: true
|
312
|
+
RSpec/SpecFilePathSuffix: # new in 2.24
|
313
|
+
Enabled: true
|
314
|
+
RSpec/Rails/NegationBeValid: # new in 2.23
|
315
|
+
Enabled: true
|
16
316
|
|
17
|
-
|
18
|
-
|
317
|
+
Performance/AncestorsInclude: # new in 1.7
|
318
|
+
Enabled: true
|
319
|
+
Performance/BigDecimalWithNumericArgument: # new in 1.7
|
320
|
+
Enabled: true
|
321
|
+
Performance/BlockGivenWithExplicitBlock: # new in 1.9
|
322
|
+
Enabled: true
|
323
|
+
Performance/CollectionLiteralInLoop: # new in 1.8
|
324
|
+
Enabled: true
|
325
|
+
Performance/ConcurrentMonotonicTime: # new in 1.12
|
326
|
+
Enabled: true
|
327
|
+
Performance/ConstantRegexp: # new in 1.9
|
328
|
+
Enabled: true
|
329
|
+
Performance/MapCompact: # new in 1.11
|
330
|
+
Enabled: true
|
331
|
+
Performance/MapMethodChain: # new in 1.19
|
332
|
+
Enabled: true
|
333
|
+
Performance/MethodObjectAsBlock: # new in 1.9
|
334
|
+
Enabled: true
|
335
|
+
Performance/RedundantEqualityComparisonBlock: # new in 1.10
|
336
|
+
Enabled: true
|
337
|
+
Performance/RedundantSortBlock: # new in 1.7
|
338
|
+
Enabled: true
|
339
|
+
Performance/RedundantSplitRegexpArgument: # new in 1.10
|
340
|
+
Enabled: true
|
341
|
+
Performance/RedundantStringChars: # new in 1.7
|
342
|
+
Enabled: true
|
343
|
+
Performance/ReverseFirst: # new in 1.7
|
344
|
+
Enabled: true
|
345
|
+
Performance/SortReverse: # new in 1.7
|
346
|
+
Enabled: true
|
347
|
+
Performance/Squeeze: # new in 1.7
|
348
|
+
Enabled: true
|
349
|
+
Performance/StringIdentifierArgument: # new in 1.13
|
350
|
+
Enabled: true
|
351
|
+
Performance/StringInclude: # new in 1.7
|
352
|
+
Enabled: true
|
353
|
+
Performance/Sum: # new in 1.8
|
354
|
+
Enabled: true
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
folio_client (0.
|
4
|
+
folio_client (0.16.0)
|
5
5
|
activesupport (>= 4.2, < 8)
|
6
6
|
dry-monads
|
7
7
|
faraday
|
8
|
+
faraday-cookie_jar
|
8
9
|
marc
|
9
10
|
zeitwerk
|
10
11
|
|
@@ -21,11 +22,11 @@ GEM
|
|
21
22
|
minitest (>= 5.1)
|
22
23
|
mutex_m
|
23
24
|
tzinfo (~> 2.0)
|
24
|
-
addressable (2.8.
|
25
|
+
addressable (2.8.6)
|
25
26
|
public_suffix (>= 2.0.2, < 6.0)
|
26
27
|
ast (2.4.2)
|
27
28
|
base64 (0.2.0)
|
28
|
-
bigdecimal (3.1.
|
29
|
+
bigdecimal (3.1.5)
|
29
30
|
byebug (11.1.3)
|
30
31
|
concurrent-ruby (1.2.2)
|
31
32
|
connection_pool (2.4.1)
|
@@ -33,6 +34,7 @@ GEM
|
|
33
34
|
rexml
|
34
35
|
diff-lcs (1.5.0)
|
35
36
|
docile (1.4.0)
|
37
|
+
domain_name (0.6.20231109)
|
36
38
|
drb (2.2.0)
|
37
39
|
ruby2_keywords
|
38
40
|
dry-core (1.0.1)
|
@@ -42,32 +44,36 @@ GEM
|
|
42
44
|
concurrent-ruby (~> 1.0)
|
43
45
|
dry-core (~> 1.0, < 2)
|
44
46
|
zeitwerk (~> 2.6)
|
45
|
-
faraday (2.
|
47
|
+
faraday (2.8.1)
|
46
48
|
base64
|
47
49
|
faraday-net_http (>= 2.0, < 3.1)
|
48
50
|
ruby2_keywords (>= 0.0.4)
|
51
|
+
faraday-cookie_jar (0.0.7)
|
52
|
+
faraday (>= 0.8.0)
|
53
|
+
http-cookie (~> 1.0.0)
|
49
54
|
faraday-net_http (3.0.2)
|
50
|
-
hashdiff (1.0
|
55
|
+
hashdiff (1.1.0)
|
56
|
+
http-cookie (1.0.5)
|
57
|
+
domain_name (~> 0.5)
|
51
58
|
i18n (1.14.1)
|
52
59
|
concurrent-ruby (~> 1.0)
|
53
|
-
json (2.
|
60
|
+
json (2.7.1)
|
54
61
|
language_server-protocol (3.17.0.3)
|
55
|
-
lint_roller (1.1.0)
|
56
62
|
marc (1.2.0)
|
57
63
|
rexml
|
58
64
|
scrub_rb (>= 1.0.1, < 2)
|
59
65
|
unf
|
60
66
|
minitest (5.20.0)
|
61
67
|
mutex_m (0.2.0)
|
62
|
-
parallel (1.
|
63
|
-
parser (3.
|
68
|
+
parallel (1.24.0)
|
69
|
+
parser (3.3.0.2)
|
64
70
|
ast (~> 2.4.1)
|
65
71
|
racc
|
66
72
|
public_suffix (5.0.4)
|
67
73
|
racc (1.7.3)
|
68
74
|
rainbow (3.1.1)
|
69
75
|
rake (13.1.0)
|
70
|
-
regexp_parser (2.8.
|
76
|
+
regexp_parser (2.8.3)
|
71
77
|
rexml (3.2.6)
|
72
78
|
rspec (3.12.0)
|
73
79
|
rspec-core (~> 3.12.0)
|
@@ -82,7 +88,7 @@ GEM
|
|
82
88
|
diff-lcs (>= 1.2.0, < 2.0)
|
83
89
|
rspec-support (~> 3.12.0)
|
84
90
|
rspec-support (3.12.1)
|
85
|
-
rubocop (1.
|
91
|
+
rubocop (1.59.0)
|
86
92
|
json (~> 2.3)
|
87
93
|
language_server-protocol (>= 3.17.0)
|
88
94
|
parallel (~> 1.10)
|
@@ -90,19 +96,19 @@ GEM
|
|
90
96
|
rainbow (>= 2.2.2, < 4.0)
|
91
97
|
regexp_parser (>= 1.8, < 3.0)
|
92
98
|
rexml (>= 3.2.5, < 4.0)
|
93
|
-
rubocop-ast (>= 1.
|
99
|
+
rubocop-ast (>= 1.30.0, < 2.0)
|
94
100
|
ruby-progressbar (~> 1.7)
|
95
101
|
unicode-display_width (>= 2.4.0, < 3.0)
|
96
102
|
rubocop-ast (1.30.0)
|
97
103
|
parser (>= 3.2.1.0)
|
98
|
-
rubocop-capybara (2.
|
104
|
+
rubocop-capybara (2.20.0)
|
99
105
|
rubocop (~> 1.41)
|
100
|
-
rubocop-factory_bot (2.
|
101
|
-
rubocop (~> 1.
|
102
|
-
rubocop-performance (1.
|
103
|
-
rubocop (>= 1.
|
104
|
-
rubocop-ast (>=
|
105
|
-
rubocop-rspec (2.
|
106
|
+
rubocop-factory_bot (2.25.1)
|
107
|
+
rubocop (~> 1.41)
|
108
|
+
rubocop-performance (1.20.1)
|
109
|
+
rubocop (>= 1.48.1, < 2.0)
|
110
|
+
rubocop-ast (>= 1.30.0, < 2.0)
|
111
|
+
rubocop-rspec (2.26.1)
|
106
112
|
rubocop (~> 1.40)
|
107
113
|
rubocop-capybara (~> 2.17)
|
108
114
|
rubocop-factory_bot (~> 2.22)
|
@@ -115,18 +121,6 @@ GEM
|
|
115
121
|
simplecov_json_formatter (~> 0.1)
|
116
122
|
simplecov-html (0.12.3)
|
117
123
|
simplecov_json_formatter (0.1.4)
|
118
|
-
standard (1.32.0)
|
119
|
-
language_server-protocol (~> 3.17.0.2)
|
120
|
-
lint_roller (~> 1.0)
|
121
|
-
rubocop (~> 1.57.2)
|
122
|
-
standard-custom (~> 1.0.0)
|
123
|
-
standard-performance (~> 1.2)
|
124
|
-
standard-custom (1.0.2)
|
125
|
-
lint_roller (~> 1.0)
|
126
|
-
rubocop (~> 1.50)
|
127
|
-
standard-performance (1.2.1)
|
128
|
-
lint_roller (~> 1.1)
|
129
|
-
rubocop-performance (~> 1.19.1)
|
130
124
|
tzinfo (2.0.6)
|
131
125
|
concurrent-ruby (~> 1.0)
|
132
126
|
unf (0.1.4)
|
@@ -151,9 +145,10 @@ DEPENDENCIES
|
|
151
145
|
folio_client!
|
152
146
|
rake (~> 13.0)
|
153
147
|
rspec (~> 3.0)
|
148
|
+
rubocop
|
149
|
+
rubocop-performance
|
154
150
|
rubocop-rspec
|
155
151
|
simplecov
|
156
|
-
standard
|
157
152
|
webmock
|
158
153
|
|
159
154
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -44,14 +44,15 @@ require 'folio_client'
|
|
44
44
|
client = FolioClient.configure(
|
45
45
|
url: Settings.okapi.url,
|
46
46
|
login_params: Settings.okapi.login_params,
|
47
|
-
okapi_headers: Settings.okapi.headers
|
47
|
+
okapi_headers: Settings.okapi.headers,
|
48
|
+
legacy_auth: true # consumers should leave set to true (default) until /login-with-expiry endpoint enabled in Poppy
|
48
49
|
)
|
49
50
|
```
|
50
51
|
|
51
52
|
The client is smart enough to automatically request a new token if it detects the one it is using has expired. If for some reason, you want to immediately request a new token, you can do this:
|
52
53
|
|
53
54
|
```ruby
|
54
|
-
client.
|
55
|
+
client.force_token_refresh! # or `FolioClient.force_token_refresh!` as they are identical
|
55
56
|
```
|
56
57
|
|
57
58
|
## API Coverage
|
data/Rakefile
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
3
|
+
require 'bundler/gem_tasks'
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
require 'rubocop/rake_task'
|
6
6
|
|
7
7
|
RSpec::Core::RakeTask.new(:spec)
|
8
8
|
RuboCop::RakeTask.new
|
data/api_test.rb
CHANGED
@@ -1,27 +1,28 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
require
|
4
|
-
require
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'folio_client'
|
5
6
|
|
6
7
|
marc_files = *ARGV
|
7
8
|
|
8
9
|
client =
|
9
10
|
FolioClient.configure(
|
10
|
-
url: ENV
|
11
|
+
url: ENV.fetch('OKAPI_URL', nil),
|
11
12
|
login_params: {
|
12
|
-
username: ENV
|
13
|
-
password: ENV
|
13
|
+
username: ENV.fetch('OKAPI_USER', nil),
|
14
|
+
password: ENV.fetch('OKAPI_PASSWORD', nil)
|
14
15
|
},
|
15
16
|
okapi_headers: {
|
16
|
-
|
17
|
-
|
17
|
+
'X-Okapi-Tenant': ENV.fetch('OKAPI_TENANT', nil),
|
18
|
+
'User-Agent': 'folio_client gem (testing)'
|
18
19
|
}
|
19
20
|
)
|
20
21
|
|
21
|
-
pp(client.fetch_marc_hash(instance_hrid:
|
22
|
+
pp(client.fetch_marc_hash(instance_hrid: 'a666'))
|
22
23
|
|
23
|
-
puts client.fetch_marc_xml(instance_hrid:
|
24
|
-
puts client.fetch_marc_xml(barcode:
|
24
|
+
puts client.fetch_marc_xml(instance_hrid: 'a666')
|
25
|
+
puts client.fetch_marc_xml(barcode: '20503330279')
|
25
26
|
|
26
27
|
puts client.users(query: 'username=="pet*"')
|
27
28
|
|
@@ -32,8 +33,8 @@ end
|
|
32
33
|
data_importer =
|
33
34
|
client.data_import(
|
34
35
|
records: records,
|
35
|
-
job_profile_id:
|
36
|
-
job_profile_name:
|
36
|
+
job_profile_id: 'e34d7b92-9b83-11eb-a8b3-0242ac130003',
|
37
|
+
job_profile_name: 'Default - Create instance and SRS MARC Bib'
|
37
38
|
)
|
38
39
|
|
39
40
|
puts data_importer.wait_until_complete
|
data/folio_client.gemspec
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
lib = File.expand_path(
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require
|
5
|
+
require 'folio_client/version'
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
|
-
spec.name =
|
8
|
+
spec.name = 'folio_client'
|
9
9
|
spec.version = FolioClient::VERSION
|
10
|
-
spec.authors = [
|
11
|
-
spec.email = [
|
10
|
+
spec.authors = ['Peter Mangiafico']
|
11
|
+
spec.email = ['pmangiafico@stanford.edu']
|
12
12
|
|
13
|
-
spec.summary =
|
14
|
-
spec.description =
|
15
|
-
spec.homepage =
|
16
|
-
spec.required_ruby_version =
|
13
|
+
spec.summary = 'Interface for interacting with the Folio ILS API.'
|
14
|
+
spec.description = 'This provides API interaction with the Folio ILS API'
|
15
|
+
spec.homepage = 'https://github.com/sul-dlss/folio_client'
|
16
|
+
spec.required_ruby_version = '>= 3.0.0'
|
17
17
|
|
18
|
-
spec.metadata[
|
19
|
-
spec.metadata[
|
20
|
-
spec.metadata[
|
21
|
-
spec.metadata[
|
18
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
19
|
+
spec.metadata['source_code_uri'] = 'https://github.com/sul-dlss/folio_client'
|
20
|
+
spec.metadata['changelog_uri'] = 'https://github.com/sul-dlss/folio_client/releases'
|
21
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
22
22
|
|
23
23
|
# Specify which files should be added to the gem when it is released.
|
24
24
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
@@ -27,20 +27,22 @@ Gem::Specification.new do |spec|
|
|
27
27
|
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
|
28
28
|
end
|
29
29
|
end
|
30
|
-
spec.bindir =
|
30
|
+
spec.bindir = 'exe'
|
31
31
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
32
|
-
spec.require_paths = [
|
32
|
+
spec.require_paths = ['lib']
|
33
33
|
|
34
|
-
spec.add_dependency
|
35
|
-
spec.add_dependency
|
36
|
-
spec.add_dependency
|
37
|
-
spec.add_dependency
|
38
|
-
spec.add_dependency
|
34
|
+
spec.add_dependency 'activesupport', '>= 4.2', '< 8'
|
35
|
+
spec.add_dependency 'dry-monads'
|
36
|
+
spec.add_dependency 'faraday'
|
37
|
+
spec.add_dependency 'faraday-cookie_jar'
|
38
|
+
spec.add_dependency 'marc'
|
39
|
+
spec.add_dependency 'zeitwerk'
|
39
40
|
|
40
|
-
spec.add_development_dependency
|
41
|
-
spec.add_development_dependency
|
42
|
-
spec.add_development_dependency
|
43
|
-
spec.add_development_dependency
|
44
|
-
spec.add_development_dependency
|
45
|
-
spec.add_development_dependency
|
41
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
42
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
43
|
+
spec.add_development_dependency 'rubocop'
|
44
|
+
spec.add_development_dependency 'rubocop-performance'
|
45
|
+
spec.add_development_dependency 'rubocop-rspec'
|
46
|
+
spec.add_development_dependency 'simplecov'
|
47
|
+
spec.add_development_dependency 'webmock'
|
46
48
|
end
|