sul_orcid_client 0.8.0 → 0.9.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: a9f8c0cdbbd579e4e9922b2225c2780d8822b398e937ee1012d48dca1b00ad94
4
- data.tar.gz: edb6936a029080f50ea8de31b2ea57f70a2f26ffe1c00570dd4283087ebaf5d1
3
+ metadata.gz: 14af045ff4e5106b1113cd88f302ab63f5c7f6a60888c1d33f9612e4c6395105
4
+ data.tar.gz: 55c8490af34f5c1950b7b331db36b150f933f066cc180e69e481e994ff0a678b
5
5
  SHA512:
6
- metadata.gz: 7b760b6a8c634233fa2eb71ed7c812226a2f948eaab2e32a5f9104df736bf50f733cad45c395b73d9997f4d95c1adbd0f7e28cb94fe581b63e89a6c9572057c0
7
- data.tar.gz: 78991a512207404b5a3d456c5f3149f091a522c17b4bea4b656d20b2c33d8a182454b4a2fd003e734c0559b46d93e09273409480c26fecc7d60e66d18b4a7590
6
+ metadata.gz: f630346de71178e2e8100cb6549ca1ee71ef60dc6f3d21334729f50183f27826deeec216ece97f9caf43b855c5ba2f9e2ca5865227a728db88109113ca31c82f
7
+ data.tar.gz: 773a1e55df8709bbc88728b2552d2e8bef956fdc047a6a86efd5451d743b2b40895897e7c15c02dcf891645a06353d294002c0e0ecd66ed8f21582cc4e2a20e2
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-capybara
3
3
  - rubocop-factory_bot
4
4
  - rubocop-performance
@@ -40,30 +40,30 @@ RSpec/SubjectDeclaration: # new in 2.5
40
40
  Enabled: true
41
41
  RSpec/VerifiedDoubleReference: # new in 2.10.0
42
42
  Enabled: true
43
- Capybara/NegationMatcher: # new in 2.14
43
+ Capybara/RSpec/NegationMatcher: # new in 2.14
44
44
  Enabled: true
45
45
  Capybara/SpecificActions: # new in 2.14
46
46
  Enabled: true
47
47
  Capybara/SpecificFinders: # new in 2.13
48
48
  Enabled: true
49
- Capybara/SpecificMatcher: # new in 2.12
49
+ Capybara/RSpec/SpecificMatcher: # new in 2.12
50
50
  Enabled: true
51
51
  FactoryBot/ConsistentParenthesesStyle: # new in 2.14
52
52
  Enabled: true
53
53
  FactoryBot/SyntaxMethods: # new in 2.7
54
54
  Enabled: true
55
- RSpec/Rails/AvoidSetupHook: # new in 2.4
55
+ RSpecRails/AvoidSetupHook: # new in 2.4
56
56
  Enabled: true
57
- RSpec/Rails/HaveHttpStatus: # new in 2.12
57
+ RSpecRails/HaveHttpStatus: # new in 2.12
58
58
  Enabled: true
59
- RSpec/Rails/InferredSpecType: # new in 2.14
59
+ RSpecRails/InferredSpecType: # new in 2.14
60
60
  Enabled: true
61
61
 
62
62
  RSpec/MultipleExpectations:
63
63
  Enabled: false
64
64
  RSpec/ExampleLength:
65
65
  Enabled: false
66
- Capybara/MatchStyle: # new in 2.17
66
+ Capybara/RSpec/MatchStyle: # new in 2.17
67
67
  Enabled: true
68
68
  FactoryBot/AssociationStyle: # new in 2.23
69
69
  Enabled: true
@@ -89,9 +89,9 @@ RSpec/RedundantAround: # new in 2.19
89
89
  Enabled: true
90
90
  RSpec/SkipBlockInsideExample: # new in 2.19
91
91
  Enabled: true
92
- RSpec/Rails/MinitestAssertions: # new in 2.17
92
+ RSpecRails/MinitestAssertions: # new in 2.17
93
93
  Enabled: true
94
- RSpec/Rails/TravelAround: # new in 2.19
94
+ RSpecRails/TravelAround: # new in 2.19
95
95
  Enabled: true
96
96
 
97
97
  Gemspec/DeprecatedAttributeAssignment: # new in 1.30
@@ -178,6 +178,11 @@ Metrics/CollectionLiteralLength: # new in 1.47
178
178
  Enabled: true
179
179
  Naming/BlockForwarding: # new in 1.24
180
180
  Enabled: true
181
+ Naming/PredicateMethod: # new in 1.76
182
+ Enabled: true
183
+ AllowedMethods:
184
+ - call
185
+ - update_work
181
186
  Security/CompoundHash: # new in 1.28
182
187
  Enabled: true
183
188
  Security/IoMethods: # new in 1.22
@@ -332,8 +337,6 @@ Performance/StringInclude: # new in 1.7
332
337
  Enabled: true
333
338
  Performance/Sum: # new in 1.8
334
339
  Enabled: true
335
- Capybara/ClickLinkOrButtonStyle: # new in 2.19
336
- Enabled: true
337
340
  Capybara/RedundantWithinFind: # new in 2.20
338
341
  Enabled: true
339
342
  Capybara/RSpec/HaveSelector: # new in 2.19
@@ -354,5 +357,138 @@ RSpec/SpecFilePathFormat: # new in 2.24
354
357
  Enabled: true
355
358
  RSpec/SpecFilePathSuffix: # new in 2.24
356
359
  Enabled: true
357
- RSpec/Rails/NegationBeValid: # new in 2.23
360
+ RSpecRails/NegationBeValid: # new in 2.23
361
+ Enabled: true
362
+
363
+ Gemspec/AddRuntimeDependency: # new in 1.65
364
+ Enabled: true
365
+ Gemspec/AttributeAssignment: # new in 1.77
366
+ Enabled: true
367
+ Layout/EmptyLinesAfterModuleInclusion: # new in 1.79
368
+ Enabled: true
369
+ Lint/ArrayLiteralInRegexp: # new in 1.71
370
+ Enabled: true
371
+ Lint/ConstantReassignment: # new in 1.70
372
+ Enabled: true
373
+ Lint/CopDirectiveSyntax: # new in 1.72
374
+ Enabled: true
375
+ Lint/DataDefineOverride: # new in 1.85
376
+ Enabled: true
377
+ Lint/DuplicateSetElement: # new in 1.67
378
+ Enabled: true
379
+ Lint/HashNewWithKeywordArgumentsAsDefault: # new in 1.69
380
+ Enabled: true
381
+ Lint/NumericOperationWithConstantResult: # new in 1.69
382
+ Enabled: true
383
+ Lint/RedundantTypeConversion: # new in 1.72
384
+ Enabled: true
385
+ Lint/SharedMutableDefault: # new in 1.70
386
+ Enabled: true
387
+ Lint/SuppressedExceptionInNumberConversion: # new in 1.72
388
+ Enabled: true
389
+ Lint/UnescapedBracketInRegexp: # new in 1.68
390
+ Enabled: true
391
+ Lint/UnreachablePatternBranch: # new in 1.85
392
+ Enabled: true
393
+ Lint/UselessConstantScoping: # new in 1.72
394
+ Enabled: true
395
+ Lint/UselessDefaultValueArgument: # new in 1.76
396
+ Enabled: true
397
+ Lint/UselessDefined: # new in 1.69
398
+ Enabled: true
399
+ Lint/UselessNumericOperation: # new in 1.66
400
+ Enabled: true
401
+ Lint/UselessOr: # new in 1.76
402
+ Enabled: true
403
+ Style/AmbiguousEndlessMethodDefinition: # new in 1.68
404
+ Enabled: true
405
+ Style/ArrayIntersectWithSingleElement: # new in 1.81
406
+ Enabled: true
407
+ Style/BitwisePredicate: # new in 1.68
408
+ Enabled: true
409
+ Style/CollectionQuerying: # new in 1.77
410
+ Enabled: true
411
+ Style/CombinableDefined: # new in 1.68
412
+ Enabled: true
413
+ Style/ComparableBetween: # new in 1.74
414
+ Enabled: true
415
+ Style/DigChain: # new in 1.69
416
+ Enabled: true
417
+ Style/EmptyClassDefinition: # new in 1.84
418
+ Enabled: true
419
+ Style/EmptyStringInsideInterpolation: # new in 1.76
420
+ Enabled: true
421
+ Style/FileNull: # new in 1.69
422
+ Enabled: true
423
+ Style/FileOpen: # new in 1.85
424
+ Enabled: true
425
+ Style/FileTouch: # new in 1.69
426
+ Enabled: true
427
+ Style/HashFetchChain: # new in 1.75
428
+ Enabled: true
429
+ Style/HashSlice: # new in 1.71
430
+ Enabled: true
431
+ Style/ItAssignment: # new in 1.70
432
+ Enabled: true
433
+ Style/ItBlockParameter: # new in 1.75
434
+ Enabled: true
435
+ Style/KeywordArgumentsMerging: # new in 1.68
436
+ Enabled: true
437
+ Style/MapIntoArray: # new in 1.63
438
+ Enabled: true
439
+ Style/MapJoin: # new in 1.85
440
+ Enabled: true
441
+ Style/ModuleMemberExistenceCheck: # new in 1.82
442
+ Enabled: true
443
+ Style/NegativeArrayIndex: # new in 1.84
444
+ Enabled: true
445
+ Style/OneClassPerFile: # new in 1.85
446
+ Enabled: true
447
+ Style/PartitionInsteadOfDoubleSelect: # new in 1.85
448
+ Enabled: true
449
+ Style/PredicateWithKind: # new in 1.85
450
+ Enabled: true
451
+ Style/ReduceToHash: # new in 1.85
452
+ Enabled: true
453
+ Style/RedundantArrayFlatten: # new in 1.76
454
+ Enabled: true
455
+ Style/RedundantFormat: # new in 1.72
456
+ Enabled: true
457
+ Style/RedundantInterpolationUnfreeze: # new in 1.66
458
+ Enabled: true
459
+ Style/RedundantMinMaxBy: # new in 1.85
460
+ Enabled: true
461
+ Style/RedundantStructKeywordInit: # new in 1.85
462
+ Enabled: true
463
+ Style/ReverseFind: # new in 1.84
464
+ Enabled: true
465
+ Style/SafeNavigationChainLength: # new in 1.68
466
+ Enabled: true
467
+ Style/SelectByKind: # new in 1.85
468
+ Enabled: true
469
+ Style/SelectByRange: # new in 1.85
470
+ Enabled: true
471
+ Style/SendWithLiteralMethodName: # new in 1.64
472
+ Enabled: true
473
+ Style/SuperArguments: # new in 1.64
474
+ Enabled: true
475
+ Style/TallyMethod: # new in 1.85
476
+ Enabled: true
477
+ Capybara/FindAllFirst: # new in 2.22
478
+ Enabled: true
479
+ Capybara/RSpec/NegationMatcherAfterVisit: # new in 2.22
480
+ Enabled: true
481
+ FactoryBot/ExcessiveCreateList: # new in 2.25
482
+ Enabled: true
483
+ Performance/StringBytesize: # new in 1.23
484
+ Enabled: true
485
+ Performance/ZipWithoutBlock: # new in 1.24
486
+ Enabled: true
487
+ RSpec/IncludeExamples: # new in 3.6
488
+ Enabled: true
489
+ RSpec/LeakyLocalVariable: # new in 3.8
490
+ Enabled: true
491
+ RSpec/Output: # new in 3.9
492
+ Enabled: true
493
+ RSpecRails/HttpStatusNameConsistency: # new in 2.32
358
494
  Enabled: true
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sul_orcid_client (0.8.0)
4
+ sul_orcid_client (0.9.0)
5
5
  activesupport (>= 4.2)
6
6
  cocina-models (~> 0.90)
7
7
  faraday
@@ -12,212 +12,232 @@ PATH
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- activesupport (8.0.2.1)
15
+ activesupport (8.1.3.1)
16
16
  base64
17
- benchmark (>= 0.3)
18
17
  bigdecimal
19
18
  concurrent-ruby (~> 1.0, >= 1.3.1)
20
19
  connection_pool (>= 2.2.5)
21
20
  drb
22
21
  i18n (>= 1.6, < 2)
22
+ json
23
23
  logger (>= 1.4.2)
24
24
  minitest (>= 5.1)
25
25
  securerandom (>= 0.3)
26
26
  tzinfo (~> 2.0, >= 2.0.5)
27
27
  uri (>= 0.13.1)
28
- addressable (2.8.7)
29
- public_suffix (>= 2.0.2, < 7.0)
28
+ addressable (2.9.0)
29
+ public_suffix (>= 2.0.2, < 8.0)
30
+ anonymous_loader (0.1.3)
31
+ version_gem (~> 1.1, >= 1.1.14)
30
32
  ast (2.4.3)
31
33
  attr_extras (7.1.0)
34
+ auth-sanitizer (0.2.3)
35
+ version_gem (~> 1.1, >= 1.1.14)
32
36
  base64 (0.3.0)
33
- benchmark (0.4.1)
34
- bigdecimal (3.2.3)
35
- byebug (12.0.0)
36
- cocina-models (0.106.0)
37
+ bigdecimal (4.1.2)
38
+ byebug (13.0.0)
39
+ reline (>= 0.6.0)
40
+ cocina-models (0.133.0)
37
41
  activesupport
42
+ cocina_display
38
43
  deprecation
39
44
  dry-struct (~> 1.0)
40
45
  dry-types (~> 1.1)
41
46
  edtf
42
47
  equivalent-xml
43
48
  i18n
44
- jsonpath
49
+ jsonschema_rs
45
50
  nokogiri
46
- openapi_parser (~> 1.0)
47
51
  super_diff
48
52
  thor
49
53
  zeitwerk (~> 2.1)
50
- concurrent-ruby (1.3.5)
51
- connection_pool (2.5.4)
52
- crack (1.0.0)
54
+ cocina_display (2.12.0)
55
+ activesupport (>= 7)
56
+ edtf (~> 3.2)
57
+ geo_coord (~> 0.2)
58
+ i18n
59
+ iso8601 (~> 0.13.0)
60
+ janeway-jsonpath (>= 0.6, < 2)
61
+ zeitwerk (~> 2.7)
62
+ concurrent-ruby (1.3.8)
63
+ connection_pool (3.0.2)
64
+ crack (1.0.1)
53
65
  bigdecimal
54
66
  rexml
55
67
  deprecation (1.1.0)
56
68
  activesupport
57
69
  diff-lcs (1.6.2)
58
- docile (1.4.1)
59
70
  drb (2.2.3)
60
- dry-core (1.1.0)
71
+ dry-core (1.2.0)
61
72
  concurrent-ruby (~> 1.0)
62
73
  logger
63
74
  zeitwerk (~> 2.6)
64
- dry-inflector (1.2.0)
75
+ dry-inflector (1.3.1)
65
76
  dry-logic (1.6.0)
66
77
  bigdecimal
67
78
  concurrent-ruby (~> 1.0)
68
79
  dry-core (~> 1.1)
69
80
  zeitwerk (~> 2.6)
70
- dry-struct (1.8.0)
81
+ dry-struct (1.8.1)
71
82
  dry-core (~> 1.1)
72
83
  dry-types (~> 1.8, >= 1.8.2)
73
84
  ice_nine (~> 0.11)
74
85
  zeitwerk (~> 2.6)
75
- dry-types (1.8.3)
76
- bigdecimal (~> 3.0)
86
+ dry-types (1.9.1)
87
+ bigdecimal (>= 3.0)
77
88
  concurrent-ruby (~> 1.0)
78
89
  dry-core (~> 1.0)
79
90
  dry-inflector (~> 1.0)
80
91
  dry-logic (~> 1.4)
81
92
  zeitwerk (~> 2.6)
82
- edtf (3.2.0)
93
+ edtf (3.3.0)
83
94
  activesupport (>= 3.0, < 9.0)
84
95
  equivalent-xml (0.6.0)
85
96
  nokogiri (>= 1.4.3)
86
- faraday (2.13.4)
97
+ faraday (2.14.3)
87
98
  faraday-net_http (>= 2.0, < 3.5)
88
99
  json
89
100
  logger
90
- faraday-net_http (3.4.1)
91
- net-http (>= 0.5.0)
92
- faraday-retry (2.3.2)
101
+ faraday-net_http (3.4.4)
102
+ net-http (~> 0.5)
103
+ faraday-retry (2.4.0)
93
104
  faraday (~> 2.0)
105
+ geo_coord (0.2.0)
94
106
  hashdiff (1.2.1)
95
- hashie (5.0.0)
96
- i18n (1.14.7)
107
+ hashie (5.1.0)
108
+ logger
109
+ i18n (1.15.2)
97
110
  concurrent-ruby (~> 1.0)
98
111
  ice_nine (0.11.2)
99
- json (2.14.1)
100
- jsonpath (1.1.5)
101
- multi_json
102
- jwt (3.1.2)
112
+ io-console (0.9.2)
113
+ iso8601 (0.13.0)
114
+ janeway-jsonpath (1.1.0)
115
+ json (2.21.2)
116
+ jsonschema_rs (0.49.9-arm64-darwin)
117
+ bigdecimal (>= 3.1, < 5)
118
+ jsonschema_rs (0.49.9-x86_64-darwin)
119
+ bigdecimal (>= 3.1, < 5)
120
+ jsonschema_rs (0.49.9-x86_64-linux)
121
+ bigdecimal (>= 3.1, < 5)
122
+ jwt (3.2.0)
103
123
  base64
104
- language_server-protocol (3.17.0.5)
124
+ language_server-protocol (3.17.0.6)
105
125
  lint_roller (1.1.0)
106
126
  logger (1.7.0)
107
- minitest (5.25.5)
108
- multi_json (1.17.0)
109
- multi_xml (0.7.2)
110
- bigdecimal (~> 3.1)
111
- net-http (0.6.0)
112
- uri
113
- nokogiri (1.18.10-arm64-darwin)
127
+ minitest (6.0.6)
128
+ drb (~> 2.0)
129
+ prism (~> 1.5)
130
+ multi_xml (0.9.1)
131
+ bigdecimal (>= 3.1, < 5)
132
+ net-http (0.9.1)
133
+ uri (>= 0.11.1)
134
+ nokogiri (1.19.4-arm64-darwin)
114
135
  racc (~> 1.4)
115
- nokogiri (1.18.10-x86_64-darwin)
136
+ nokogiri (1.19.4-x86_64-darwin)
116
137
  racc (~> 1.4)
117
- nokogiri (1.18.10-x86_64-linux-gnu)
138
+ nokogiri (1.19.4-x86_64-linux-gnu)
118
139
  racc (~> 1.4)
119
- oauth2 (2.0.17)
140
+ oauth2 (2.0.25)
141
+ anonymous_loader (~> 0.1, >= 0.1.3)
142
+ auth-sanitizer (~> 0.2, >= 0.2.3)
120
143
  faraday (>= 0.17.3, < 4.0)
121
144
  jwt (>= 1.0, < 4.0)
122
145
  logger (~> 1.2)
123
146
  multi_xml (~> 0.5)
124
147
  rack (>= 1.2, < 4)
125
- snaky_hash (~> 2.0, >= 2.0.3)
126
- version_gem (~> 1.1, >= 1.1.9)
127
- openapi_parser (1.0.0)
148
+ snaky_hash (~> 2.0, >= 2.0.7)
149
+ version_gem (~> 1.1, >= 1.1.14)
128
150
  optimist (3.2.1)
129
- parallel (1.27.0)
130
- parser (3.3.9.0)
151
+ parallel (2.1.0)
152
+ parser (3.3.12.0)
131
153
  ast (~> 2.4.1)
132
154
  racc
133
155
  patience_diff (1.2.0)
134
156
  optimist (~> 3.0)
135
- prism (1.5.1)
136
- public_suffix (6.0.2)
157
+ prism (1.9.0)
158
+ public_suffix (7.0.5)
137
159
  racc (1.8.1)
138
- rack (3.2.1)
160
+ rack (3.2.7)
139
161
  rainbow (3.1.1)
140
- rake (13.3.0)
141
- regexp_parser (2.11.3)
162
+ rake (13.4.2)
163
+ regexp_parser (2.12.0)
164
+ reline (0.7.0)
165
+ io-console (~> 0.5)
142
166
  rexml (3.4.4)
143
- rspec (3.13.1)
167
+ rspec (3.13.2)
144
168
  rspec-core (~> 3.13.0)
145
169
  rspec-expectations (~> 3.13.0)
146
170
  rspec-mocks (~> 3.13.0)
147
- rspec-core (3.13.5)
171
+ rspec-core (3.13.6)
148
172
  rspec-support (~> 3.13.0)
149
173
  rspec-expectations (3.13.5)
150
174
  diff-lcs (>= 1.2.0, < 2.0)
151
175
  rspec-support (~> 3.13.0)
152
- rspec-mocks (3.13.5)
176
+ rspec-mocks (3.13.8)
153
177
  diff-lcs (>= 1.2.0, < 2.0)
154
178
  rspec-support (~> 3.13.0)
155
- rspec-support (3.13.6)
156
- rubocop (1.80.2)
179
+ rspec-support (3.13.7)
180
+ rubocop (1.89.0)
157
181
  json (~> 2.3)
158
182
  language_server-protocol (~> 3.17.0.2)
159
183
  lint_roller (~> 1.1.0)
160
- parallel (~> 1.10)
184
+ parallel (>= 1.10)
161
185
  parser (>= 3.3.0.2)
162
186
  rainbow (>= 2.2.2, < 4.0)
163
187
  regexp_parser (>= 2.9.3, < 3.0)
164
- rubocop-ast (>= 1.46.0, < 2.0)
188
+ rubocop-ast (>= 1.49.0, < 2.0)
165
189
  ruby-progressbar (~> 1.7)
166
190
  unicode-display_width (>= 2.4.0, < 4.0)
167
- rubocop-ast (1.47.1)
191
+ rubocop-ast (1.50.0)
168
192
  parser (>= 3.3.7.2)
169
- prism (~> 1.4)
170
- rubocop-capybara (2.22.1)
193
+ prism (~> 1.7)
194
+ rubocop-capybara (3.0.0)
171
195
  lint_roller (~> 1.1)
172
- rubocop (~> 1.72, >= 1.72.1)
173
- rubocop-factory_bot (2.27.1)
196
+ rubocop (~> 1.81)
197
+ rubocop-factory_bot (2.28.0)
174
198
  lint_roller (~> 1.1)
175
199
  rubocop (~> 1.72, >= 1.72.1)
176
- rubocop-performance (1.26.0)
200
+ rubocop-performance (1.27.0)
177
201
  lint_roller (~> 1.1)
178
- rubocop (>= 1.75.0, < 2.0)
179
- rubocop-ast (>= 1.44.0, < 2.0)
180
- rubocop-rspec (3.7.0)
202
+ rubocop (>= 1.89.0, < 2.0)
203
+ rubocop-ast (>= 1.47.1, < 2.0)
204
+ rubocop-rspec (3.10.2)
181
205
  lint_roller (~> 1.1)
182
- rubocop (~> 1.72, >= 1.72.1)
183
- rubocop-rspec_rails (2.31.0)
206
+ regexp_parser (>= 2.0)
207
+ rubocop (~> 1.86, >= 1.86.2)
208
+ rubocop-rspec_rails (2.32.0)
184
209
  lint_roller (~> 1.1)
185
210
  rubocop (~> 1.72, >= 1.72.1)
186
211
  rubocop-rspec (~> 3.5)
187
212
  ruby-progressbar (1.13.0)
188
213
  securerandom (0.4.1)
189
- simplecov (0.22.0)
190
- docile (~> 1.1)
191
- simplecov-html (~> 0.11)
192
- simplecov_json_formatter (~> 0.1)
193
- simplecov-html (0.13.2)
194
- simplecov_json_formatter (0.1.4)
195
- snaky_hash (2.0.3)
214
+ simplecov (1.1.1)
215
+ snaky_hash (2.0.7)
196
216
  hashie (>= 0.1.0, < 6)
197
- version_gem (>= 1.1.8, < 3)
198
- super_diff (0.16.0)
199
- attr_extras (>= 6.2.4)
200
- diff-lcs
201
- patience_diff
202
- thor (1.4.0)
217
+ version_gem (~> 1.1, >= 1.1.14)
218
+ super_diff (0.19.0)
219
+ attr_extras (>= 6.2.4, < 8)
220
+ diff-lcs (~> 1.5)
221
+ patience_diff (~> 1.2)
222
+ thor (1.5.0)
203
223
  tzinfo (2.0.6)
204
224
  concurrent-ruby (~> 1.0)
205
225
  unicode-display_width (3.2.0)
206
226
  unicode-emoji (~> 4.1)
207
- unicode-emoji (4.1.0)
208
- uri (1.0.3)
209
- vcr (6.3.1)
210
- base64
211
- version_gem (1.1.9)
212
- webmock (3.25.1)
227
+ unicode-emoji (4.2.0)
228
+ uri (1.1.1)
229
+ vcr (6.4.0)
230
+ version_gem (1.1.15)
231
+ webmock (3.26.2)
213
232
  addressable (>= 2.8.0)
214
233
  crack (>= 0.3.2)
215
234
  hashdiff (>= 0.4.0, < 2.0.0)
216
- zeitwerk (2.7.3)
235
+ zeitwerk (2.8.3)
217
236
 
218
237
  PLATFORMS
219
238
  arm64-darwin-23
220
239
  arm64-darwin-24
240
+ arm64-darwin-25
221
241
  x86_64-darwin-19
222
242
  x86_64-darwin-22
223
243
  x86_64-linux
@@ -238,4 +258,4 @@ DEPENDENCIES
238
258
  webmock
239
259
 
240
260
  BUNDLED WITH
241
- 2.7.2
261
+ 4.0.18
@@ -5,20 +5,8 @@ class SulOrcidClient
5
5
  class CocinaSupport
6
6
  # @param [Cocina::Models::Contributor] contributor to check
7
7
  # @return [String, nil] orcid id including host if present
8
- # rubocop:disable Metrics/AbcSize
9
8
  def self.orcidid(contributor)
10
- identifier = contributor.identifier.find { |check_identifier| check_identifier.type == 'ORCID' }
11
- return unless identifier
12
-
13
- # some records have the full ORCID URI in the data, just return it if so, e.g. druid:gf852zt8324
14
- return identifier.uri if identifier.uri
15
- return identifier.value if identifier.value.start_with?('https://orcid.org/')
16
-
17
- # some records have just the ORCIDID without the URL prefix, add it if so, e.g. druid:tp865ng1792
18
- return URI.join('https://orcid.org/', identifier.value).to_s if identifier.source.uri.blank?
19
-
20
- URI.join(identifier.source.uri, identifier.value).to_s
9
+ contributor.identifier.find { |check_identifier| check_identifier.type == 'ORCID' }&.uri
21
10
  end
22
- # rubocop:enable Metrics/AbcSize
23
11
  end
24
12
  end
@@ -20,6 +20,16 @@ class SulOrcidClient
20
20
  }.compact
21
21
  end
22
22
 
23
+ MARC_RELATOR_MAP = {
24
+ 'aut' => 'author',
25
+ 'cmp' => 'author',
26
+ 'ctb' => 'author',
27
+ 'cre' => 'author',
28
+ 'edt' => 'editor',
29
+ 'rth' => 'principal-investigator'
30
+ }.freeze
31
+ private_constant :MARC_RELATOR_MAP
32
+
23
33
  private
24
34
 
25
35
  attr_reader :contributor
@@ -51,12 +61,12 @@ class SulOrcidClient
51
61
 
52
62
  # find and map an ORCID from a contributor.identifier
53
63
  def map_orcid
54
- identifier = contributor.identifier.find { |check_identifier| check_identifier.type == 'ORCID' }
55
- return unless identifier
64
+ uri = CocinaSupport.orcidid(contributor)
65
+ return unless uri
56
66
 
57
67
  {
58
- uri: URI.join(identifier.source.uri, identifier.value).to_s,
59
- path: identifier.value,
68
+ uri:,
69
+ path: uri.split('/').last,
60
70
  host: 'orcid.org'
61
71
  }
62
72
  end
@@ -67,15 +77,6 @@ class SulOrcidClient
67
77
  }.compact.presence
68
78
  end
69
79
 
70
- MARC_RELATOR_MAP = {
71
- 'aut' => 'author',
72
- 'cmp' => 'author',
73
- 'ctb' => 'author',
74
- 'cre' => 'author',
75
- 'edt' => 'editor',
76
- 'rth' => 'principal-investigator'
77
- }.freeze
78
-
79
80
  def map_role
80
81
  role = contributor.role.find do |check_role|
81
82
  check_role.source&.code == 'marcrelator' && MARC_RELATOR_MAP.key?(check_role.code)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class SulOrcidClient
4
- VERSION = '0.8.0'
4
+ VERSION = '0.9.0'
5
5
  end
@@ -11,6 +11,38 @@ class SulOrcidClient
11
11
  # Error raised by WorkMapper
12
12
  class WorkMapperError < StandardError; end
13
13
 
14
+ H2_TERM_MAP = {
15
+ 'Data' => 'data-set',
16
+ 'Software/Code' => 'software',
17
+ 'Article' => 'journal-article',
18
+ 'Book' => 'book',
19
+ 'Book chapter' => 'book-chapter',
20
+ 'Code' => 'software',
21
+ 'Conference session' => 'lecture-speech',
22
+ 'Course/instructional materials' => 'manual',
23
+ 'Database' => 'data-set',
24
+ 'Dramatic performance' => 'artistic-performance',
25
+ 'Geospatial data' => 'data-set',
26
+ 'Journal/periodical issue' => 'journal-issue',
27
+ 'Performance' => 'artistic-performance',
28
+ 'Poetry reading' => 'artistic-performance',
29
+ 'Poster' => 'conference-poster',
30
+ 'Preprint' => 'preprint',
31
+ 'Presentation recording' => 'lecture-speech',
32
+ 'Questionnaire' => 'research-technique',
33
+ 'Report' => 'report',
34
+ 'Software' => 'software',
35
+ 'Speech' => 'lecture-speech',
36
+ 'Statistical model' => 'research-technique',
37
+ 'Syllabus' => 'manual',
38
+ 'Tabular data' => 'data-set',
39
+ 'Technical report' => 'report',
40
+ 'Text corpus' => 'data-set',
41
+ 'Thesis' => 'dissertation-thesis',
42
+ 'Working paper' => 'working-paper'
43
+ }.freeze
44
+ private_constant :H2_TERM_MAP
45
+
14
46
  def self.map(description:, doi: nil)
15
47
  new(description:, doi:).map
16
48
  end
@@ -127,40 +159,11 @@ class SulOrcidClient
127
159
  end
128
160
 
129
161
  def event_value(type)
130
- description&.event&.find { |event| event.type == type }&.date&.first&.value
162
+ event = description&.event&.find { |description_event| description_event.type == type }
163
+ event_date = event&.date&.first
164
+ event_date&.value
131
165
  end
132
166
 
133
- H2_TERM_MAP = {
134
- 'Data' => 'data-set',
135
- 'Software/Code' => 'software',
136
- 'Article' => 'journal-article',
137
- 'Book' => 'book',
138
- 'Book chapter' => 'book-chapter',
139
- 'Code' => 'software',
140
- 'Conference session' => 'lecture-speech',
141
- 'Course/instructional materials' => 'manual',
142
- 'Database' => 'data-set',
143
- 'Dramatic performance' => 'artistic-performance',
144
- 'Geospatial data' => 'data-set',
145
- 'Journal/periodical issue' => 'journal-issue',
146
- 'Performance' => 'artistic-performance',
147
- 'Poetry reading' => 'artistic-performance',
148
- 'Poster' => 'conference-poster',
149
- 'Preprint' => 'preprint',
150
- 'Presentation recording' => 'lecture-speech',
151
- 'Questionnaire' => 'research-technique',
152
- 'Report' => 'report',
153
- 'Software' => 'software',
154
- 'Speech' => 'lecture-speech',
155
- 'Statistical model' => 'research-technique',
156
- 'Syllabus' => 'manual',
157
- 'Tabular data' => 'data-set',
158
- 'Technical report' => 'report',
159
- 'Text corpus' => 'data-set',
160
- 'Thesis' => 'dissertation-thesis',
161
- 'Working paper' => 'working-paper'
162
- }.freeze
163
-
164
167
  def map_type
165
168
  # See https://info.orcid.org/ufaqs/what-work-types-does-orcid-support/
166
169
  # For now, only mapping H2 terms; if there is not an H2 term, using "other".
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sul_orcid_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Mangiafico
@@ -290,7 +290,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
290
290
  - !ruby/object:Gem::Version
291
291
  version: '0'
292
292
  requirements: []
293
- rubygems_version: 3.7.0
293
+ rubygems_version: 3.6.9
294
294
  specification_version: 4
295
295
  summary: Interface for interacting with the ORCID API.
296
296
  test_files: []