folio_client 0.16.0 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da03f2878d6f8a2fb1ae082580b5aff119922c4175c8ee728b23a4939280b1f2
4
- data.tar.gz: 53e1db7d78323b83a2e60f4220f3b636f6ab55d11182ab6684b76aaf08c70cfe
3
+ metadata.gz: 42f8788a27374e443881099b77bfaa24961f0d38cd7577c36bc85005070a6981
4
+ data.tar.gz: 794a03e9de4d8bb2987efe8889653fdf2b3f043c518f200783310479a6fc02bf
5
5
  SHA512:
6
- metadata.gz: f4ada8c1720ba8e2942c96bffd6919f1064dab43740f07606153403ff75baf558ac001eb6347c2b271ed8a9d730727acf611c189a212d64a4ecefa68da19d30c
7
- data.tar.gz: 1fffec41e5286364b033f3456b23f73f03aaa83c9d1ab8a8a23c11ce739c0b26adadf4111c9a81434449d3d74635a42aebf45bfeb5c3da9ffff6da8f17233e24
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.16.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,128 +12,141 @@ PATH
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- activesupport (7.1.2)
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.5)
32
+ benchmark (0.4.0)
33
+ bigdecimal (3.1.9)
30
34
  byebug (11.1.3)
31
- concurrent-ruby (1.2.2)
32
- connection_pool (2.4.1)
33
- crack (0.4.5)
35
+ concurrent-ruby (1.3.5)
36
+ connection_pool (2.5.0)
37
+ crack (1.0.0)
38
+ bigdecimal
34
39
  rexml
35
- diff-lcs (1.5.0)
36
- docile (1.4.0)
37
- domain_name (0.6.20231109)
38
- drb (2.2.0)
39
- ruby2_keywords
40
- dry-core (1.0.1)
40
+ diff-lcs (1.5.1)
41
+ docile (1.4.1)
42
+ domain_name (0.6.20240107)
43
+ drb (2.2.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.8.1)
48
- base64
49
- faraday-net_http (>= 2.0, < 3.1)
50
- ruby2_keywords (>= 0.0.4)
52
+ faraday (2.12.2)
53
+ faraday-net_http (>= 2.0, < 3.5)
54
+ json
55
+ logger
51
56
  faraday-cookie_jar (0.0.7)
52
57
  faraday (>= 0.8.0)
53
58
  http-cookie (~> 1.0.0)
54
- faraday-net_http (3.0.2)
55
- hashdiff (1.1.0)
56
- http-cookie (1.0.5)
59
+ faraday-net_http (3.4.0)
60
+ net-http (>= 0.5.0)
61
+ hashdiff (1.1.2)
62
+ http-cookie (1.0.8)
57
63
  domain_name (~> 0.5)
58
- i18n (1.14.1)
64
+ i18n (1.14.7)
59
65
  concurrent-ruby (~> 1.0)
60
- json (2.7.1)
61
- language_server-protocol (3.17.0.3)
62
- 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)
63
71
  rexml
64
- scrub_rb (>= 1.0.1, < 2)
65
- unf
66
- minitest (5.20.0)
67
- mutex_m (0.2.0)
68
- parallel (1.24.0)
69
- parser (3.3.0.2)
72
+ minitest (5.25.4)
73
+ net-http (0.6.0)
74
+ uri
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)
70
83
  ast (~> 2.4.1)
71
84
  racc
72
- public_suffix (5.0.4)
73
- racc (1.7.3)
85
+ public_suffix (6.0.1)
86
+ racc (1.8.1)
74
87
  rainbow (3.1.1)
75
- rake (13.1.0)
76
- regexp_parser (2.8.3)
77
- rexml (3.2.6)
78
- rspec (3.12.0)
79
- rspec-core (~> 3.12.0)
80
- rspec-expectations (~> 3.12.0)
81
- rspec-mocks (~> 3.12.0)
82
- rspec-core (3.12.2)
83
- rspec-support (~> 3.12.0)
84
- rspec-expectations (3.12.3)
88
+ rake (13.2.1)
89
+ regexp_parser (2.10.0)
90
+ rexml (3.4.0)
91
+ rspec (3.13.0)
92
+ rspec-core (~> 3.13.0)
93
+ rspec-expectations (~> 3.13.0)
94
+ rspec-mocks (~> 3.13.0)
95
+ rspec-core (3.13.3)
96
+ rspec-support (~> 3.13.0)
97
+ rspec-expectations (3.13.3)
85
98
  diff-lcs (>= 1.2.0, < 2.0)
86
- rspec-support (~> 3.12.0)
87
- rspec-mocks (3.12.6)
99
+ rspec-support (~> 3.13.0)
100
+ rspec-mocks (3.13.2)
88
101
  diff-lcs (>= 1.2.0, < 2.0)
89
- rspec-support (~> 3.12.0)
90
- rspec-support (3.12.1)
91
- rubocop (1.59.0)
102
+ rspec-support (~> 3.13.0)
103
+ rspec-support (3.13.2)
104
+ rubocop (1.71.2)
92
105
  json (~> 2.3)
93
106
  language_server-protocol (>= 3.17.0)
94
107
  parallel (~> 1.10)
95
- parser (>= 3.2.2.4)
108
+ parser (>= 3.3.0.2)
96
109
  rainbow (>= 2.2.2, < 4.0)
97
- regexp_parser (>= 1.8, < 3.0)
98
- rexml (>= 3.2.5, < 4.0)
99
- rubocop-ast (>= 1.30.0, < 2.0)
110
+ regexp_parser (>= 2.9.3, < 3.0)
111
+ rubocop-ast (>= 1.38.0, < 2.0)
100
112
  ruby-progressbar (~> 1.7)
101
- unicode-display_width (>= 2.4.0, < 3.0)
102
- rubocop-ast (1.30.0)
103
- parser (>= 3.2.1.0)
104
- rubocop-capybara (2.20.0)
105
- rubocop (~> 1.41)
106
- rubocop-factory_bot (2.25.1)
113
+ unicode-display_width (>= 2.4.0, < 4.0)
114
+ rubocop-ast (1.38.0)
115
+ parser (>= 3.3.1.0)
116
+ rubocop-capybara (2.21.0)
107
117
  rubocop (~> 1.41)
108
- rubocop-performance (1.20.1)
118
+ rubocop-factory_bot (2.26.1)
119
+ rubocop (~> 1.61)
120
+ rubocop-performance (1.23.1)
109
121
  rubocop (>= 1.48.1, < 2.0)
110
- rubocop-ast (>= 1.30.0, < 2.0)
111
- rubocop-rspec (2.26.1)
112
- rubocop (~> 1.40)
113
- rubocop-capybara (~> 2.17)
114
- rubocop-factory_bot (~> 2.22)
122
+ rubocop-ast (>= 1.31.1, < 2.0)
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)
115
128
  ruby-progressbar (1.13.0)
116
- ruby2_keywords (0.0.5)
117
- scrub_rb (1.0.1)
129
+ securerandom (0.4.1)
118
130
  simplecov (0.22.0)
119
131
  docile (~> 1.1)
120
132
  simplecov-html (~> 0.11)
121
133
  simplecov_json_formatter (~> 0.1)
122
- simplecov-html (0.12.3)
134
+ simplecov-html (0.13.1)
123
135
  simplecov_json_formatter (0.1.4)
124
136
  tzinfo (2.0.6)
125
137
  concurrent-ruby (~> 1.0)
126
- unf (0.1.4)
127
- unf_ext
128
- unf_ext (0.0.9.1)
129
- unicode-display_width (2.5.0)
130
- webmock (3.19.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)
131
143
  addressable (>= 2.8.0)
132
144
  crack (>= 0.3.2)
133
145
  hashdiff (>= 0.4.0, < 2.0.0)
134
- zeitwerk (2.6.12)
146
+ zeitwerk (2.7.1)
135
147
 
136
148
  PLATFORMS
149
+ arm64-darwin-23
137
150
  x86_64-darwin-19
138
151
  x86_64-darwin-20
139
152
  x86_64-darwin-21
@@ -146,8 +159,11 @@ DEPENDENCIES
146
159
  rake (~> 13.0)
147
160
  rspec (~> 3.0)
148
161
  rubocop
162
+ rubocop-capybara
163
+ rubocop-factory_bot
149
164
  rubocop-performance
150
165
  rubocop-rspec
166
+ rubocop-rspec_rails
151
167
  simplecov
152
168
  webmock
153
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
@@ -28,6 +28,7 @@ class FolioClient
28
28
  parsed_record_id = record_json['parsedRecordId']
29
29
  # setting this field on the JSON we send back is what will allow optimistic locking to catch stale updates
30
30
  record_json['relatedRecordVersion'] = version
31
+ record_json['_actionType'] = 'edit'
31
32
 
32
33
  yield record_json
33
34
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class FolioClient
4
- VERSION = '0.16.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.16.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-01-10 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.22
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: []