folio_client 0.17.0 → 0.18.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56da738676b7e388431bd7df800101f1d9263154af720809d72f3710aa1ec492
4
- data.tar.gz: cbdec1ca313e1800b96229ef90ab014ec4a18a3f31e04424aec95da573b83a6d
3
+ metadata.gz: 42f8788a27374e443881099b77bfaa24961f0d38cd7577c36bc85005070a6981
4
+ data.tar.gz: 794a03e9de4d8bb2987efe8889653fdf2b3f043c518f200783310479a6fc02bf
5
5
  SHA512:
6
- metadata.gz: 02bde3498c2bf91d4ea51888cb53672198f59af32f40d36f713237c8631135984790aab6ea447cef99a58fe2c0d6ea849ad43319cba9b888789173b6932242f9
7
- data.tar.gz: 14ebfb14e447dad4d0758566cdc0c12125d397da74d703ada8806c6eeaae9d9f43016ac5aeedc338fbe4e5c26c3c1675ed3e1d667aaec15cf25d4a51ec861bbf
6
+ metadata.gz: fab85671e97be76c1c39d0a4e30b5cf0fe48aaa6794b4d59e4f37b4197bd287e4aa7cf1433a2235205625980b86ce6c45d21790baa0734f1ae4a296d0cd62a45
7
+ data.tar.gz: bf7584bc2416dec88e566b8bfca6f0b69f8d1b6347621f24d8d41ac30ed06e5e503570b5678609847f420f40a4e2a400cd1aa3421beafb73358f2781a8e6e809
data/.rubocop.yml CHANGED
@@ -1,6 +1,9 @@
1
1
  require:
2
+ - rubocop-capybara
3
+ - rubocop-factory_bot
2
4
  - rubocop-performance
3
5
  - rubocop-rspec
6
+ - rubocop-rspec_rails
4
7
 
5
8
  AllCops:
6
9
  TargetRubyVersion: 3.0
@@ -44,11 +47,11 @@ FactoryBot/ConsistentParenthesesStyle: # new in 2.14
44
47
  Enabled: true
45
48
  FactoryBot/SyntaxMethods: # new in 2.7
46
49
  Enabled: true
47
- RSpec/Rails/AvoidSetupHook: # new in 2.4
50
+ RSpecRails/AvoidSetupHook: # new in 2.4
48
51
  Enabled: true
49
- RSpec/Rails/HaveHttpStatus: # new in 2.12
52
+ RSpecRails/HaveHttpStatus: # new in 2.12
50
53
  Enabled: true
51
- RSpec/Rails/InferredSpecType: # new in 2.14
54
+ RSpecRails/InferredSpecType: # new in 2.14
52
55
  Enabled: true
53
56
  Capybara/MatchStyle: # new in 2.17
54
57
  Enabled: true
@@ -66,13 +69,13 @@ RSpec/PendingWithoutReason: # new in 2.16
66
69
  Enabled: true
67
70
  FactoryBot/FactoryNameStyle: # new in 2.16
68
71
  Enabled: true
69
- RSpec/Rails/MinitestAssertions: # new in 2.17
72
+ RSpecRails/MinitestAssertions: # new in 2.17
70
73
  Enabled: true
71
74
  RSpec/RedundantAround: # new in 2.19
72
75
  Enabled: true
73
76
  RSpec/SkipBlockInsideExample: # new in 2.19
74
77
  Enabled: true
75
- RSpec/Rails/TravelAround: # new in 2.19
78
+ RSpecRails/TravelAround: # new in 2.19
76
79
  Enabled: true
77
80
  FactoryBot/AssociationStyle: # new in 2.23
78
81
  Enabled: true
@@ -311,7 +314,7 @@ RSpec/SpecFilePathFormat: # new in 2.24
311
314
  Enabled: true
312
315
  RSpec/SpecFilePathSuffix: # new in 2.24
313
316
  Enabled: true
314
- RSpec/Rails/NegationBeValid: # new in 2.23
317
+ RSpecRails/NegationBeValid: # new in 2.23
315
318
  Enabled: true
316
319
 
317
320
  Performance/AncestorsInclude: # new in 1.7
@@ -351,4 +354,52 @@ Performance/StringIdentifierArgument: # new in 1.13
351
354
  Performance/StringInclude: # new in 1.7
352
355
  Enabled: true
353
356
  Performance/Sum: # new in 1.8
354
- Enabled: true
357
+ Enabled: true
358
+ Gemspec/AddRuntimeDependency: # new in 1.65
359
+ Enabled: true
360
+ Lint/ConstantReassignment: # new in 1.70
361
+ Enabled: true
362
+ Lint/DuplicateSetElement: # new in 1.67
363
+ Enabled: true
364
+ Lint/HashNewWithKeywordArgumentsAsDefault: # new in 1.69
365
+ Enabled: true
366
+ Lint/NumericOperationWithConstantResult: # new in 1.69
367
+ Enabled: true
368
+ Lint/SharedMutableDefault: # new in 1.70
369
+ Enabled: true
370
+ Lint/UnescapedBracketInRegexp: # new in 1.68
371
+ Enabled: true
372
+ Lint/UselessDefined: # new in 1.69
373
+ Enabled: true
374
+ Lint/UselessNumericOperation: # new in 1.66
375
+ Enabled: true
376
+ Style/AmbiguousEndlessMethodDefinition: # new in 1.68
377
+ Enabled: true
378
+ Style/BitwisePredicate: # new in 1.68
379
+ Enabled: true
380
+ Style/CombinableDefined: # new in 1.68
381
+ Enabled: true
382
+ Style/DigChain: # new in 1.69
383
+ Enabled: true
384
+ Style/FileNull: # new in 1.69
385
+ Enabled: true
386
+ Style/FileTouch: # new in 1.69
387
+ Enabled: true
388
+ Style/ItAssignment: # new in 1.70
389
+ Enabled: true
390
+ Style/KeywordArgumentsMerging: # new in 1.68
391
+ Enabled: true
392
+ Style/MapIntoArray: # new in 1.63
393
+ Enabled: true
394
+ Style/RedundantInterpolationUnfreeze: # new in 1.66
395
+ Enabled: true
396
+ Style/SafeNavigationChainLength: # new in 1.68
397
+ Enabled: true
398
+ Style/SendWithLiteralMethodName: # new in 1.64
399
+ Enabled: true
400
+ Style/SuperArguments: # new in 1.64
401
+ Enabled: true
402
+ FactoryBot/ExcessiveCreateList: # new in 2.25
403
+ Enabled: true
404
+ Performance/StringBytesize: # new in 1.23
405
+ Enabled: true
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- folio_client (0.17.0)
5
- activesupport (>= 4.2, < 8)
4
+ folio_client (0.18.0)
5
+ activesupport (>= 4.2)
6
6
  dry-monads
7
7
  faraday
8
8
  faraday-cookie_jar
@@ -12,132 +12,138 @@ PATH
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- activesupport (7.1.3.4)
15
+ activesupport (8.0.1)
16
16
  base64
17
+ benchmark (>= 0.3)
17
18
  bigdecimal
18
- concurrent-ruby (~> 1.0, >= 1.0.2)
19
+ concurrent-ruby (~> 1.0, >= 1.3.1)
19
20
  connection_pool (>= 2.2.5)
20
21
  drb
21
22
  i18n (>= 1.6, < 2)
23
+ logger (>= 1.4.2)
22
24
  minitest (>= 5.1)
23
- mutex_m
24
- tzinfo (~> 2.0)
25
- addressable (2.8.6)
26
- public_suffix (>= 2.0.2, < 6.0)
25
+ securerandom (>= 0.3)
26
+ tzinfo (~> 2.0, >= 2.0.5)
27
+ uri (>= 0.13.1)
28
+ addressable (2.8.7)
29
+ public_suffix (>= 2.0.2, < 7.0)
27
30
  ast (2.4.2)
28
31
  base64 (0.2.0)
29
- bigdecimal (3.1.8)
32
+ benchmark (0.4.0)
33
+ bigdecimal (3.1.9)
30
34
  byebug (11.1.3)
31
- concurrent-ruby (1.3.3)
32
- connection_pool (2.4.1)
35
+ concurrent-ruby (1.3.5)
36
+ connection_pool (2.5.0)
33
37
  crack (1.0.0)
34
38
  bigdecimal
35
39
  rexml
36
40
  diff-lcs (1.5.1)
37
- docile (1.4.0)
41
+ docile (1.4.1)
38
42
  domain_name (0.6.20240107)
39
43
  drb (2.2.1)
40
- dry-core (1.0.1)
44
+ dry-core (1.1.0)
41
45
  concurrent-ruby (~> 1.0)
46
+ logger
42
47
  zeitwerk (~> 2.6)
43
- dry-monads (1.6.0)
48
+ dry-monads (1.7.1)
44
49
  concurrent-ruby (~> 1.0)
45
- dry-core (~> 1.0, < 2)
50
+ dry-core (~> 1.1)
46
51
  zeitwerk (~> 2.6)
47
- faraday (2.9.1)
48
- faraday-net_http (>= 2.0, < 3.2)
52
+ faraday (2.12.2)
53
+ faraday-net_http (>= 2.0, < 3.5)
54
+ json
55
+ logger
49
56
  faraday-cookie_jar (0.0.7)
50
57
  faraday (>= 0.8.0)
51
58
  http-cookie (~> 1.0.0)
52
- faraday-net_http (3.1.0)
53
- net-http
54
- hashdiff (1.1.0)
55
- http-cookie (1.0.6)
59
+ faraday-net_http (3.4.0)
60
+ net-http (>= 0.5.0)
61
+ hashdiff (1.1.2)
62
+ http-cookie (1.0.8)
56
63
  domain_name (~> 0.5)
57
- i18n (1.14.5)
64
+ i18n (1.14.7)
58
65
  concurrent-ruby (~> 1.0)
59
- json (2.7.2)
60
- language_server-protocol (3.17.0.3)
61
- marc (1.2.0)
66
+ json (2.9.1)
67
+ language_server-protocol (3.17.0.4)
68
+ logger (1.6.6)
69
+ marc (1.3.0)
70
+ nokogiri (~> 1.0)
62
71
  rexml
63
- scrub_rb (>= 1.0.1, < 2)
64
- unf
65
- minitest (5.23.1)
66
- mutex_m (0.2.0)
67
- net-http (0.4.1)
72
+ minitest (5.25.4)
73
+ net-http (0.6.0)
68
74
  uri
69
- parallel (1.25.1)
70
- parser (3.3.2.0)
75
+ nokogiri (1.18.2-arm64-darwin)
76
+ racc (~> 1.4)
77
+ nokogiri (1.18.2-x86_64-darwin)
78
+ racc (~> 1.4)
79
+ nokogiri (1.18.2-x86_64-linux-gnu)
80
+ racc (~> 1.4)
81
+ parallel (1.26.3)
82
+ parser (3.3.7.1)
71
83
  ast (~> 2.4.1)
72
84
  racc
73
- public_suffix (5.0.5)
74
- racc (1.8.0)
85
+ public_suffix (6.0.1)
86
+ racc (1.8.1)
75
87
  rainbow (3.1.1)
76
88
  rake (13.2.1)
77
- regexp_parser (2.9.2)
78
- rexml (3.2.9)
79
- strscan
89
+ regexp_parser (2.10.0)
90
+ rexml (3.4.0)
80
91
  rspec (3.13.0)
81
92
  rspec-core (~> 3.13.0)
82
93
  rspec-expectations (~> 3.13.0)
83
94
  rspec-mocks (~> 3.13.0)
84
- rspec-core (3.13.0)
95
+ rspec-core (3.13.3)
85
96
  rspec-support (~> 3.13.0)
86
- rspec-expectations (3.13.0)
97
+ rspec-expectations (3.13.3)
87
98
  diff-lcs (>= 1.2.0, < 2.0)
88
99
  rspec-support (~> 3.13.0)
89
- rspec-mocks (3.13.1)
100
+ rspec-mocks (3.13.2)
90
101
  diff-lcs (>= 1.2.0, < 2.0)
91
102
  rspec-support (~> 3.13.0)
92
- rspec-support (3.13.1)
93
- rubocop (1.64.1)
103
+ rspec-support (3.13.2)
104
+ rubocop (1.71.2)
94
105
  json (~> 2.3)
95
106
  language_server-protocol (>= 3.17.0)
96
107
  parallel (~> 1.10)
97
108
  parser (>= 3.3.0.2)
98
109
  rainbow (>= 2.2.2, < 4.0)
99
- regexp_parser (>= 1.8, < 3.0)
100
- rexml (>= 3.2.5, < 4.0)
101
- rubocop-ast (>= 1.31.1, < 2.0)
110
+ regexp_parser (>= 2.9.3, < 3.0)
111
+ rubocop-ast (>= 1.38.0, < 2.0)
102
112
  ruby-progressbar (~> 1.7)
103
- unicode-display_width (>= 2.4.0, < 3.0)
104
- rubocop-ast (1.31.3)
113
+ unicode-display_width (>= 2.4.0, < 4.0)
114
+ rubocop-ast (1.38.0)
105
115
  parser (>= 3.3.1.0)
106
116
  rubocop-capybara (2.21.0)
107
117
  rubocop (~> 1.41)
108
- rubocop-factory_bot (2.26.0)
109
- rubocop (~> 1.41)
110
- rubocop-performance (1.21.0)
118
+ rubocop-factory_bot (2.26.1)
119
+ rubocop (~> 1.61)
120
+ rubocop-performance (1.23.1)
111
121
  rubocop (>= 1.48.1, < 2.0)
112
122
  rubocop-ast (>= 1.31.1, < 2.0)
113
- rubocop-rspec (2.31.0)
114
- rubocop (~> 1.40)
115
- rubocop-capybara (~> 2.17)
116
- rubocop-factory_bot (~> 2.22)
117
- rubocop-rspec_rails (~> 2.28)
118
- rubocop-rspec_rails (2.29.0)
119
- rubocop (~> 1.40)
123
+ rubocop-rspec (3.4.0)
124
+ rubocop (~> 1.61)
125
+ rubocop-rspec_rails (2.30.0)
126
+ rubocop (~> 1.61)
127
+ rubocop-rspec (~> 3, >= 3.0.1)
120
128
  ruby-progressbar (1.13.0)
121
- scrub_rb (1.0.1)
129
+ securerandom (0.4.1)
122
130
  simplecov (0.22.0)
123
131
  docile (~> 1.1)
124
132
  simplecov-html (~> 0.11)
125
133
  simplecov_json_formatter (~> 0.1)
126
- simplecov-html (0.12.3)
134
+ simplecov-html (0.13.1)
127
135
  simplecov_json_formatter (0.1.4)
128
- strscan (3.1.0)
129
136
  tzinfo (2.0.6)
130
137
  concurrent-ruby (~> 1.0)
131
- unf (0.1.4)
132
- unf_ext
133
- unf_ext (0.0.9.1)
134
- unicode-display_width (2.5.0)
135
- uri (0.13.0)
136
- webmock (3.23.1)
138
+ unicode-display_width (3.1.4)
139
+ unicode-emoji (~> 4.0, >= 4.0.4)
140
+ unicode-emoji (4.0.4)
141
+ uri (1.0.2)
142
+ webmock (3.25.0)
137
143
  addressable (>= 2.8.0)
138
144
  crack (>= 0.3.2)
139
145
  hashdiff (>= 0.4.0, < 2.0.0)
140
- zeitwerk (2.6.15)
146
+ zeitwerk (2.7.1)
141
147
 
142
148
  PLATFORMS
143
149
  arm64-darwin-23
@@ -153,8 +159,11 @@ DEPENDENCIES
153
159
  rake (~> 13.0)
154
160
  rspec (~> 3.0)
155
161
  rubocop
162
+ rubocop-capybara
163
+ rubocop-factory_bot
156
164
  rubocop-performance
157
165
  rubocop-rspec
166
+ rubocop-rspec_rails
158
167
  simplecov
159
168
  webmock
160
169
 
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/folio_client.svg)](https://badge.fury.io/rb/folio_client)
2
2
  [![CircleCI](https://dl.circleci.com/status-badge/img/gh/sul-dlss/folio_client/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/sul-dlss/folio_client/tree/main)
3
- [![Code Climate](https://api.codeclimate.com/v1/badges/34dd73ba47058709c666/maintainability)](https://codeclimate.com/github/sul-dlss/folio_client/maintainability)
4
- [![Code Climate Test Coverage](https://api.codeclimate.com/v1/badges/34dd73ba47058709c666/test_coverage)](https://codeclimate.com/github/sul-dlss/folio_client/test_coverage)
3
+ [![codecov](https://codecov.io/github/sul-dlss/folio_client/graph/badge.svg?token=8HS0JOVVF9)](https://codecov.io/github/sul-dlss/folio_client)
5
4
 
6
5
  # FolioClient
7
6
 
data/folio_client.gemspec CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
32
32
  spec.require_paths = ['lib']
33
33
 
34
- spec.add_dependency 'activesupport', '>= 4.2', '< 8'
34
+ spec.add_dependency 'activesupport', '>= 4.2'
35
35
  spec.add_dependency 'dry-monads'
36
36
  spec.add_dependency 'faraday'
37
37
  spec.add_dependency 'faraday-cookie_jar'
@@ -41,8 +41,11 @@ Gem::Specification.new do |spec|
41
41
  spec.add_development_dependency 'rake', '~> 13.0'
42
42
  spec.add_development_dependency 'rspec', '~> 3.0'
43
43
  spec.add_development_dependency 'rubocop'
44
+ spec.add_development_dependency 'rubocop-capybara'
45
+ spec.add_development_dependency 'rubocop-factory_bot'
44
46
  spec.add_development_dependency 'rubocop-performance'
45
47
  spec.add_development_dependency 'rubocop-rspec'
48
+ spec.add_development_dependency 'rubocop-rspec_rails'
46
49
  spec.add_development_dependency 'simplecov'
47
50
  spec.add_development_dependency 'webmock'
48
51
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class FolioClient
4
- VERSION = '0.17.0'
4
+ VERSION = '0.18.0'
5
5
  end
data/lib/folio_client.rb CHANGED
@@ -291,7 +291,7 @@ class FolioClient
291
291
  response = yield
292
292
 
293
293
  # if unauthorized, token has likely expired. try to get a new token and then retry the same request(s).
294
- if response.status == 401 || response.status == 403
294
+ if [401, 403].include?(response.status)
295
295
  force_token_refresh!
296
296
  response = yield
297
297
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: folio_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Mangiafico
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-06-12 00:00:00.000000000 Z
10
+ date: 2025-02-18 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activesupport
@@ -17,9 +16,6 @@ dependencies:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
18
  version: '4.2'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '8'
23
19
  type: :runtime
24
20
  prerelease: false
25
21
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,9 +23,6 @@ dependencies:
27
23
  - - ">="
28
24
  - !ruby/object:Gem::Version
29
25
  version: '4.2'
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '8'
33
26
  - !ruby/object:Gem::Dependency
34
27
  name: dry-monads
35
28
  requirement: !ruby/object:Gem::Requirement
@@ -142,6 +135,34 @@ dependencies:
142
135
  - - ">="
143
136
  - !ruby/object:Gem::Version
144
137
  version: '0'
138
+ - !ruby/object:Gem::Dependency
139
+ name: rubocop-capybara
140
+ requirement: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: '0'
145
+ type: :development
146
+ prerelease: false
147
+ version_requirements: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ - !ruby/object:Gem::Dependency
153
+ name: rubocop-factory_bot
154
+ requirement: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
159
+ type: :development
160
+ prerelease: false
161
+ version_requirements: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - ">="
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
145
166
  - !ruby/object:Gem::Dependency
146
167
  name: rubocop-performance
147
168
  requirement: !ruby/object:Gem::Requirement
@@ -170,6 +191,20 @@ dependencies:
170
191
  - - ">="
171
192
  - !ruby/object:Gem::Version
172
193
  version: '0'
194
+ - !ruby/object:Gem::Dependency
195
+ name: rubocop-rspec_rails
196
+ requirement: !ruby/object:Gem::Requirement
197
+ requirements:
198
+ - - ">="
199
+ - !ruby/object:Gem::Version
200
+ version: '0'
201
+ type: :development
202
+ prerelease: false
203
+ version_requirements: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - ">="
206
+ - !ruby/object:Gem::Version
207
+ version: '0'
173
208
  - !ruby/object:Gem::Dependency
174
209
  name: simplecov
175
210
  requirement: !ruby/object:Gem::Requirement
@@ -232,7 +267,6 @@ metadata:
232
267
  source_code_uri: https://github.com/sul-dlss/folio_client
233
268
  changelog_uri: https://github.com/sul-dlss/folio_client/releases
234
269
  rubygems_mfa_required: 'true'
235
- post_install_message:
236
270
  rdoc_options: []
237
271
  require_paths:
238
272
  - lib
@@ -247,8 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
281
  - !ruby/object:Gem::Version
248
282
  version: '0'
249
283
  requirements: []
250
- rubygems_version: 3.4.19
251
- signing_key:
284
+ rubygems_version: 3.6.3
252
285
  specification_version: 4
253
286
  summary: Interface for interacting with the Folio ILS API.
254
287
  test_files: []