sdr-client 2.2.0 → 2.3.1

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: b5d2271809cbee659f5addbef250f582cd47a6b7805f10b4bef1dddb1c103a97
4
- data.tar.gz: 14ec89aada86585f945f36b7c07d70f135cb5270409a2a19ae1149229532d00d
3
+ metadata.gz: 797ccc774c2d310146d945ce3dc5a58d2e2767a40608308cda938df7931bcdf7
4
+ data.tar.gz: b668cc544d1b0c593d2458b47658c768eafdf94bf0ea361be02b6f67c5af4b44
5
5
  SHA512:
6
- metadata.gz: 423aa95f3952d688292db48737029a41f964a257373aa93c296ca197778c19c9452c575f2dffb1bca49da533479ae9c48080fe6bdcf5f76847f95491efbee8a2
7
- data.tar.gz: eb0beeb17cb5c973a5ecd8f26211da4dab1a91846cec715af367b65a6da06311a46fb8dd31a761c3305c54508cafefe72bdf68fc4bb2e3577a43e9bd2239f914
6
+ metadata.gz: b7e999d795ed744dd7b2d51774718c9840a9ffa56430fe0947b53a7cabffa83ff611164af19576bf3c8b68331edcb25cd2a6063ac7bc8ce16acaaa3a58d184d5
7
+ data.tar.gz: f010f0624f37c1208d782ead081ea55610b9edbeffdfe4777b47192462278ea270588e5e8f0bdeb947ffc69bd3bf8712e32fedc8f46de71f4b063f3df563dd75
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sdr-client (2.2.0)
4
+ sdr-client (2.3.1)
5
5
  activesupport
6
- cocina-models (~> 0.88.0)
6
+ cocina-models (~> 0.89.0)
7
7
  config
8
8
  dry-monads
9
9
  faraday (>= 0.16)
@@ -22,7 +22,7 @@ GEM
22
22
  ast (2.4.2)
23
23
  attr_extras (7.1.0)
24
24
  byebug (11.1.3)
25
- cocina-models (0.88.0)
25
+ cocina-models (0.89.1)
26
26
  activesupport
27
27
  deprecation
28
28
  dry-struct (~> 1.0)
@@ -38,7 +38,7 @@ GEM
38
38
  thor
39
39
  zeitwerk (~> 2.1)
40
40
  commonmarker (0.23.8)
41
- concurrent-ruby (1.2.0)
41
+ concurrent-ruby (1.2.2)
42
42
  config (4.1.0)
43
43
  deep_merge (~> 1.2, >= 1.2.1)
44
44
  dry-validation (~> 1.0, >= 1.0.0)
@@ -107,7 +107,7 @@ GEM
107
107
  multi_json
108
108
  launchy (2.5.2)
109
109
  addressable (~> 2.8)
110
- minitest (5.17.0)
110
+ minitest (5.18.0)
111
111
  multi_json (1.15.0)
112
112
  nokogiri (1.14.2-x86_64-darwin)
113
113
  racc (~> 1.4)
@@ -145,17 +145,17 @@ GEM
145
145
  rspec-core (>= 2, < 4, != 2.12.0)
146
146
  rss (0.2.9)
147
147
  rexml
148
- rubocop (1.45.1)
148
+ rubocop (1.48.0)
149
149
  json (~> 2.3)
150
150
  parallel (~> 1.10)
151
151
  parser (>= 3.2.0.0)
152
152
  rainbow (>= 2.2.2, < 4.0)
153
153
  regexp_parser (>= 1.8, < 3.0)
154
154
  rexml (>= 3.2.5, < 4.0)
155
- rubocop-ast (>= 1.24.1, < 2.0)
155
+ rubocop-ast (>= 1.26.0, < 2.0)
156
156
  ruby-progressbar (~> 1.7)
157
157
  unicode-display_width (>= 2.4.0, < 3.0)
158
- rubocop-ast (1.26.0)
158
+ rubocop-ast (1.27.0)
159
159
  parser (>= 3.2.1.0)
160
160
  rubocop-capybara (2.17.1)
161
161
  rubocop (~> 1.41)
@@ -164,7 +164,7 @@ GEM
164
164
  rubocop-rspec (2.18.1)
165
165
  rubocop (~> 1.33)
166
166
  rubocop-capybara (~> 2.17)
167
- ruby-progressbar (1.11.0)
167
+ ruby-progressbar (1.13.0)
168
168
  ruby2_keywords (0.0.5)
169
169
  simplecov (0.22.0)
170
170
  docile (~> 1.1)
@@ -77,7 +77,8 @@ module SdrClient
77
77
  option :label, desc: 'Object label'
78
78
  option :type, enum: %w[image book document map manuscript media three_dimensional object collection admin_policy], desc: 'The object type'
79
79
  option :collection, desc: 'Druid identifier of the collection object'
80
- option :catkey, desc: 'Catkey for this item'
80
+ option :catkey, desc: 'Symphony catkey for this item'
81
+ option :folio_instance_hrid, desc: 'Folio instance HRID for this item'
81
82
  option :copyright, desc: 'Copyright statement'
82
83
  option :use_and_reproduction, desc: 'Use and reproduction statement'
83
84
  option :viewing_direction, enum: %w[left-to-right right-to-left], desc: 'Viewing direction (if a book)'
@@ -96,7 +97,8 @@ module SdrClient
96
97
  option :label, desc: 'Object label'
97
98
  option :type, enum: %w[image book document map manuscript media three_dimensional object collection admin_policy], desc: 'The object type'
98
99
  option :collection, desc: 'Druid identifier of the collection object'
99
- option :catkey, desc: 'Catkey for this item'
100
+ option :catkey, desc: 'Symphony catkey for this item'
101
+ option :folio_instance_hrid, desc: 'Folio instance HRID for this item'
100
102
  option :copyright, desc: 'Copyright statement'
101
103
  option :use_and_reproduction, desc: 'Use and reproduction statement'
102
104
  option :viewing_direction, enum: %w[left-to-right right-to-left], desc: 'Viewing direction (if a book)'
@@ -21,6 +21,7 @@ module SdrClient
21
21
  collection: nil,
22
22
  source_id:,
23
23
  catkey: nil,
24
+ folio_instance_hrid: nil,
24
25
  embargo_release_date: nil,
25
26
  embargo_access: 'world',
26
27
  embargo_download: 'world',
@@ -33,6 +34,7 @@ module SdrClient
33
34
  @source_id = source_id
34
35
  @collection = collection
35
36
  @catkey = catkey
37
+ @folio_instance_hrid = folio_instance_hrid
36
38
  @embargo_release_date = embargo_release_date
37
39
  @embargo_access = embargo_access
38
40
  @embargo_download = embargo_download
@@ -69,6 +71,7 @@ module SdrClient
69
71
  copyright: copyright,
70
72
  source_id: source_id,
71
73
  catkey: catkey,
74
+ folio_instance_hrid: folio_instance_hrid,
72
75
  embargo_release_date: embargo_release_date,
73
76
  embargo_access: embargo_access,
74
77
  embargo_download: embargo_download,
@@ -92,7 +95,7 @@ module SdrClient
92
95
 
93
96
  private
94
97
 
95
- attr_reader :view, :label, :file_sets, :source_id, :catkey, :apo, :collection,
98
+ attr_reader :view, :label, :file_sets, :source_id, :catkey, :folio_instance_hrid, :apo, :collection,
96
99
  :files_metadata, :embargo_release_date, :embargo_access, :embargo_download,
97
100
  :viewing_direction, :use_and_reproduction, :copyright, :download
98
101
 
@@ -104,7 +107,13 @@ module SdrClient
104
107
 
105
108
  def identification
106
109
  { sourceId: source_id }.tap do |json|
107
- json[:catalogLinks] = [{ catalog: 'symphony', catalogRecordId: catkey, refresh: true }] if catkey
110
+ json[:catalogLinks] = []
111
+ json[:catalogLinks] << { catalog: 'symphony', catalogRecordId: catkey, refresh: true } if catkey
112
+ if folio_instance_hrid
113
+ json[:catalogLinks] << { catalog: 'folio', catalogRecordId: folio_instance_hrid,
114
+ refresh: true }
115
+ end
116
+ json.delete(:catalogLinks) if json[:catalogLinks].empty?
108
117
  end
109
118
  end
110
119
 
@@ -22,6 +22,7 @@ module SdrClient
22
22
  apo:,
23
23
  collection: nil,
24
24
  catkey: nil,
25
+ folio_instance_hrid: nil,
25
26
  embargo_release_date: nil,
26
27
  embargo_access: 'world',
27
28
  embargo_download: 'world',
@@ -47,6 +48,7 @@ module SdrClient
47
48
  collection: collection,
48
49
  source_id: source_id,
49
50
  catkey: catkey,
51
+ folio_instance_hrid: folio_instance_hrid,
50
52
  embargo_release_date: embargo_release_date,
51
53
  embargo_access: embargo_access,
52
54
  embargo_download: embargo_download,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SdrClient
4
- VERSION = '2.2.0'
4
+ VERSION = '2.3.1'
5
5
  end
data/sdr-client.gemspec CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.require_paths = ['lib']
29
29
 
30
30
  spec.add_dependency 'activesupport'
31
- spec.add_dependency 'cocina-models', '~> 0.88.0'
31
+ spec.add_dependency 'cocina-models', '~> 0.89.0'
32
32
  spec.add_dependency 'config'
33
33
  spec.add_dependency 'dry-monads'
34
34
  spec.add_dependency 'faraday', '>= 0.16'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sdr-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-22 00:00:00.000000000 Z
11
+ date: 2023-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.88.0
33
+ version: 0.89.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.88.0
40
+ version: 0.89.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: config
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -289,7 +289,7 @@ metadata:
289
289
  source_code_uri: https://github.com/sul-dlss/sdr-client
290
290
  changelog_uri: https://github.com/sul-dlss/sdr-client/releases
291
291
  rubygems_mfa_required: 'true'
292
- post_install_message:
292
+ post_install_message:
293
293
  rdoc_options: []
294
294
  require_paths:
295
295
  - lib
@@ -304,8 +304,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
304
304
  - !ruby/object:Gem::Version
305
305
  version: '0'
306
306
  requirements: []
307
- rubygems_version: 3.3.7
308
- signing_key:
307
+ rubygems_version: 3.2.32
308
+ signing_key:
309
309
  specification_version: 4
310
310
  summary: The CLI for https://github.com/sul-dlss/sdr-api
311
311
  test_files: []