sdr-client 2.3.0 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +13 -13
- data/lib/sdr_client/cli.rb +4 -2
- data/lib/sdr_client/deposit/request.rb +11 -2
- data/lib/sdr_client/deposit.rb +2 -0
- data/lib/sdr_client/version.rb +1 -1
- data/sdr-client.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee6cf6f853cdced4466b332418b612995059f4b4e0ccb815304ddc6284c650bf
|
4
|
+
data.tar.gz: 61144422d1b60823942da6aa7295afc86afc0844af10187dadd7c1e83a6e18c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b45b8adb122a9f69192fffeb39d05f98178aeff268194f779de3c79735af5cce6bfca54a2e5eb8b2adc2c26a2d5c2cefd4bb35dcb0ee5994321ee4e9c20ff57
|
7
|
+
data.tar.gz: 851da7520cce9fa8005f3c50b92fb21fd2b9ea9d8eac18b86cf0ddd06307609091005708e9d0d6372f7316a11117bc1362de4deb4fe368746ae109c293e7e803
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sdr-client (2.
|
4
|
+
sdr-client (2.4.0)
|
5
5
|
activesupport
|
6
|
-
cocina-models (~> 0.
|
6
|
+
cocina-models (~> 0.90.0)
|
7
7
|
config
|
8
8
|
dry-monads
|
9
9
|
faraday (>= 0.16)
|
@@ -12,7 +12,7 @@ PATH
|
|
12
12
|
GEM
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
|
-
activesupport (7.0.4.
|
15
|
+
activesupport (7.0.4.3)
|
16
16
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
17
|
i18n (>= 1.6, < 2)
|
18
18
|
minitest (>= 5.1)
|
@@ -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.
|
25
|
+
cocina-models (0.90.0)
|
26
26
|
activesupport
|
27
27
|
deprecation
|
28
28
|
dry-struct (~> 1.0)
|
@@ -107,7 +107,7 @@ GEM
|
|
107
107
|
multi_json
|
108
108
|
launchy (2.5.2)
|
109
109
|
addressable (~> 2.8)
|
110
|
-
minitest (5.
|
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)
|
@@ -118,7 +118,7 @@ GEM
|
|
118
118
|
openapi_parser (0.15.0)
|
119
119
|
optimist (3.0.1)
|
120
120
|
parallel (1.22.1)
|
121
|
-
parser (3.2.1.
|
121
|
+
parser (3.2.1.1)
|
122
122
|
ast (~> 2.4.1)
|
123
123
|
patience_diff (1.2.0)
|
124
124
|
optimist (~> 3.0)
|
@@ -137,7 +137,7 @@ GEM
|
|
137
137
|
rspec-expectations (3.12.2)
|
138
138
|
diff-lcs (>= 1.2.0, < 2.0)
|
139
139
|
rspec-support (~> 3.12.0)
|
140
|
-
rspec-mocks (3.12.
|
140
|
+
rspec-mocks (3.12.5)
|
141
141
|
diff-lcs (>= 1.2.0, < 2.0)
|
142
142
|
rspec-support (~> 3.12.0)
|
143
143
|
rspec-support (3.12.0)
|
@@ -145,7 +145,7 @@ GEM
|
|
145
145
|
rspec-core (>= 2, < 4, != 2.12.0)
|
146
146
|
rss (0.2.9)
|
147
147
|
rexml
|
148
|
-
rubocop (1.
|
148
|
+
rubocop (1.48.1)
|
149
149
|
json (~> 2.3)
|
150
150
|
parallel (~> 1.10)
|
151
151
|
parser (>= 3.2.0.0)
|
@@ -155,16 +155,16 @@ GEM
|
|
155
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.
|
158
|
+
rubocop-ast (1.28.0)
|
159
159
|
parser (>= 3.2.1.0)
|
160
160
|
rubocop-capybara (2.17.1)
|
161
161
|
rubocop (~> 1.41)
|
162
162
|
rubocop-rake (0.6.0)
|
163
163
|
rubocop (~> 1.0)
|
164
|
-
rubocop-rspec (2.
|
164
|
+
rubocop-rspec (2.19.0)
|
165
165
|
rubocop (~> 1.33)
|
166
166
|
rubocop-capybara (~> 2.17)
|
167
|
-
ruby-progressbar (1.
|
167
|
+
ruby-progressbar (1.13.0)
|
168
168
|
ruby2_keywords (0.0.5)
|
169
169
|
simplecov (0.22.0)
|
170
170
|
docile (~> 1.1)
|
@@ -172,7 +172,7 @@ GEM
|
|
172
172
|
simplecov_json_formatter (~> 0.1)
|
173
173
|
simplecov-html (0.12.3)
|
174
174
|
simplecov_json_formatter (0.1.4)
|
175
|
-
super_diff (0.
|
175
|
+
super_diff (0.10.0)
|
176
176
|
attr_extras (>= 6.2.4)
|
177
177
|
diff-lcs
|
178
178
|
patience_diff
|
@@ -206,4 +206,4 @@ DEPENDENCIES
|
|
206
206
|
webmock (~> 3.7)
|
207
207
|
|
208
208
|
BUNDLED WITH
|
209
|
-
2.3.
|
209
|
+
2.3.22
|
data/lib/sdr_client/cli.rb
CHANGED
@@ -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: '
|
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: '
|
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] = [
|
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
|
|
data/lib/sdr_client/deposit.rb
CHANGED
@@ -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,
|
data/lib/sdr_client/version.rb
CHANGED
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.
|
31
|
+
spec.add_dependency 'cocina-models', '~> 0.90.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.
|
4
|
+
version: 2.4.0
|
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-
|
11
|
+
date: 2023-03-31 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.
|
33
|
+
version: 0.90.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.
|
40
|
+
version: 0.90.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
|
@@ -305,7 +305,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
305
305
|
version: '0'
|
306
306
|
requirements: []
|
307
307
|
rubygems_version: 3.2.32
|
308
|
-
signing_key:
|
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: []
|