sdr-client 2.17.0 → 2.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 +4 -4
- data/Gemfile.lock +41 -39
- data/lib/sdr_client/deposit/update_resource.rb +5 -2
- data/lib/sdr_client/redesigned_client/update_resource.rb +6 -3
- data/lib/sdr_client/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1e60d4d82ab422c5b5ca90234d4e4113824e6afe72b46161c8cb311f8706c620
|
|
4
|
+
data.tar.gz: 4f16e397d8a4d1c3bb1747b0e0378229a98fd46a860feecc618619f99871cf9f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9244c5483ce300e26f21372a7402c491f98786a680b172c8a66cf107eacb7a5762578674488eb5922a0af6b9e729d1882fcc030a66033a015f47bf2729c446f7
|
|
7
|
+
data.tar.gz: e4dfecc0e59afabc8a2c77abdabf9bea3ae7438df0a172e5bd0b4bebb0222e1ea0c8196f7ea4fdf060db10d0809739c491c1b2367a5109fe43219e445f17029a
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
sdr-client (2.
|
|
4
|
+
sdr-client (2.18.0)
|
|
5
5
|
activesupport
|
|
6
6
|
cocina-models (~> 0.99.0)
|
|
7
7
|
config
|
|
@@ -13,16 +13,17 @@ PATH
|
|
|
13
13
|
GEM
|
|
14
14
|
remote: https://rubygems.org/
|
|
15
15
|
specs:
|
|
16
|
-
activesupport (7.1
|
|
16
|
+
activesupport (7.2.1)
|
|
17
17
|
base64
|
|
18
18
|
bigdecimal
|
|
19
|
-
concurrent-ruby (~> 1.0, >= 1.
|
|
19
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
20
20
|
connection_pool (>= 2.2.5)
|
|
21
21
|
drb
|
|
22
22
|
i18n (>= 1.6, < 2)
|
|
23
|
+
logger (>= 1.4.2)
|
|
23
24
|
minitest (>= 5.1)
|
|
24
|
-
|
|
25
|
-
tzinfo (~> 2.0)
|
|
25
|
+
securerandom (>= 0.3)
|
|
26
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
26
27
|
addressable (2.8.7)
|
|
27
28
|
public_suffix (>= 2.0.2, < 7.0)
|
|
28
29
|
ast (2.4.2)
|
|
@@ -30,7 +31,8 @@ GEM
|
|
|
30
31
|
base64 (0.2.0)
|
|
31
32
|
bigdecimal (3.1.8)
|
|
32
33
|
byebug (11.1.3)
|
|
33
|
-
childprocess (5.
|
|
34
|
+
childprocess (5.1.0)
|
|
35
|
+
logger (~> 1.5)
|
|
34
36
|
cocina-models (0.99.0)
|
|
35
37
|
activesupport
|
|
36
38
|
deprecation
|
|
@@ -46,12 +48,13 @@ GEM
|
|
|
46
48
|
super_diff
|
|
47
49
|
thor
|
|
48
50
|
zeitwerk (~> 2.1)
|
|
49
|
-
commonmarker (1.1.
|
|
50
|
-
commonmarker (1.1.
|
|
51
|
-
commonmarker (1.1.
|
|
52
|
-
concurrent-ruby (1.3.
|
|
53
|
-
config (5.5.
|
|
51
|
+
commonmarker (1.1.5-arm64-darwin)
|
|
52
|
+
commonmarker (1.1.5-x86_64-darwin)
|
|
53
|
+
commonmarker (1.1.5-x86_64-linux)
|
|
54
|
+
concurrent-ruby (1.3.4)
|
|
55
|
+
config (5.5.2)
|
|
54
56
|
deep_merge (~> 1.2, >= 1.2.1)
|
|
57
|
+
ostruct
|
|
55
58
|
connection_pool (2.4.1)
|
|
56
59
|
crack (1.0.0)
|
|
57
60
|
bigdecimal
|
|
@@ -90,13 +93,14 @@ GEM
|
|
|
90
93
|
activesupport (>= 3.0, < 8.0)
|
|
91
94
|
equivalent-xml (0.6.0)
|
|
92
95
|
nokogiri (>= 1.4.3)
|
|
93
|
-
faraday (2.
|
|
94
|
-
faraday-net_http (>= 2.0, < 3.
|
|
96
|
+
faraday (2.12.0)
|
|
97
|
+
faraday-net_http (>= 2.0, < 3.4)
|
|
98
|
+
json
|
|
95
99
|
logger
|
|
96
|
-
faraday-net_http (3.
|
|
100
|
+
faraday-net_http (3.3.0)
|
|
97
101
|
net-http
|
|
98
|
-
hashdiff (1.1.
|
|
99
|
-
i18n (1.14.
|
|
102
|
+
hashdiff (1.1.1)
|
|
103
|
+
i18n (1.14.6)
|
|
100
104
|
concurrent-ruby (~> 1.0)
|
|
101
105
|
ice_nine (0.11.2)
|
|
102
106
|
json (2.7.2)
|
|
@@ -106,10 +110,9 @@ GEM
|
|
|
106
110
|
launchy (3.0.1)
|
|
107
111
|
addressable (~> 2.8)
|
|
108
112
|
childprocess (~> 5.0)
|
|
109
|
-
logger (1.6.
|
|
110
|
-
minitest (5.
|
|
113
|
+
logger (1.6.1)
|
|
114
|
+
minitest (5.25.1)
|
|
111
115
|
multi_json (1.15.0)
|
|
112
|
-
mutex_m (0.2.0)
|
|
113
116
|
net-http (0.4.1)
|
|
114
117
|
uri
|
|
115
118
|
nokogiri (1.16.7-arm64-darwin)
|
|
@@ -122,46 +125,45 @@ GEM
|
|
|
122
125
|
commonmarker (>= 1.0)
|
|
123
126
|
openapi_parser (1.0.0)
|
|
124
127
|
optimist (3.1.0)
|
|
125
|
-
|
|
126
|
-
|
|
128
|
+
ostruct (0.6.0)
|
|
129
|
+
parallel (1.26.3)
|
|
130
|
+
parser (3.3.5.0)
|
|
127
131
|
ast (~> 2.4.1)
|
|
128
132
|
racc
|
|
129
133
|
patience_diff (1.2.0)
|
|
130
134
|
optimist (~> 3.0)
|
|
131
135
|
public_suffix (6.0.1)
|
|
132
|
-
racc (1.8.
|
|
136
|
+
racc (1.8.1)
|
|
133
137
|
rainbow (3.1.1)
|
|
134
138
|
rake (13.2.1)
|
|
135
139
|
regexp_parser (2.9.2)
|
|
136
|
-
rexml (3.3.
|
|
137
|
-
strscan
|
|
140
|
+
rexml (3.3.8)
|
|
138
141
|
rspec (3.13.0)
|
|
139
142
|
rspec-core (~> 3.13.0)
|
|
140
143
|
rspec-expectations (~> 3.13.0)
|
|
141
144
|
rspec-mocks (~> 3.13.0)
|
|
142
|
-
rspec-core (3.13.
|
|
145
|
+
rspec-core (3.13.1)
|
|
143
146
|
rspec-support (~> 3.13.0)
|
|
144
|
-
rspec-expectations (3.13.
|
|
147
|
+
rspec-expectations (3.13.3)
|
|
145
148
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
146
149
|
rspec-support (~> 3.13.0)
|
|
147
|
-
rspec-mocks (3.13.
|
|
150
|
+
rspec-mocks (3.13.2)
|
|
148
151
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
149
152
|
rspec-support (~> 3.13.0)
|
|
150
153
|
rspec-support (3.13.1)
|
|
151
154
|
rspec_junit_formatter (0.6.0)
|
|
152
155
|
rspec-core (>= 2, < 4, != 2.12.0)
|
|
153
|
-
rubocop (1.
|
|
156
|
+
rubocop (1.66.1)
|
|
154
157
|
json (~> 2.3)
|
|
155
158
|
language_server-protocol (>= 3.17.0)
|
|
156
159
|
parallel (~> 1.10)
|
|
157
160
|
parser (>= 3.3.0.2)
|
|
158
161
|
rainbow (>= 2.2.2, < 4.0)
|
|
159
162
|
regexp_parser (>= 2.4, < 3.0)
|
|
160
|
-
|
|
161
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
|
163
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
|
162
164
|
ruby-progressbar (~> 1.7)
|
|
163
165
|
unicode-display_width (>= 2.4.0, < 3.0)
|
|
164
|
-
rubocop-ast (1.
|
|
166
|
+
rubocop-ast (1.32.3)
|
|
165
167
|
parser (>= 3.3.1.0)
|
|
166
168
|
rubocop-capybara (2.21.0)
|
|
167
169
|
rubocop (~> 1.41)
|
|
@@ -177,27 +179,27 @@ GEM
|
|
|
177
179
|
rubocop-rspec_rails (2.29.1)
|
|
178
180
|
rubocop (~> 1.61)
|
|
179
181
|
ruby-progressbar (1.13.0)
|
|
182
|
+
securerandom (0.3.1)
|
|
180
183
|
simplecov (0.22.0)
|
|
181
184
|
docile (~> 1.1)
|
|
182
185
|
simplecov-html (~> 0.11)
|
|
183
186
|
simplecov_json_formatter (~> 0.1)
|
|
184
|
-
simplecov-html (0.
|
|
187
|
+
simplecov-html (0.13.1)
|
|
185
188
|
simplecov_json_formatter (0.1.4)
|
|
186
|
-
|
|
187
|
-
super_diff (0.12.1)
|
|
189
|
+
super_diff (0.13.0)
|
|
188
190
|
attr_extras (>= 6.2.4)
|
|
189
191
|
diff-lcs
|
|
190
192
|
patience_diff
|
|
191
|
-
thor (1.3.
|
|
193
|
+
thor (1.3.2)
|
|
192
194
|
tzinfo (2.0.6)
|
|
193
195
|
concurrent-ruby (~> 1.0)
|
|
194
|
-
unicode-display_width (2.
|
|
195
|
-
uri (0.13.
|
|
196
|
-
webmock (3.
|
|
196
|
+
unicode-display_width (2.6.0)
|
|
197
|
+
uri (0.13.1)
|
|
198
|
+
webmock (3.24.0)
|
|
197
199
|
addressable (>= 2.8.0)
|
|
198
200
|
crack (>= 0.3.2)
|
|
199
201
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
200
|
-
zeitwerk (2.
|
|
202
|
+
zeitwerk (2.7.0)
|
|
201
203
|
|
|
202
204
|
PLATFORMS
|
|
203
205
|
arm64-darwin-23
|
|
@@ -14,12 +14,14 @@ module SdrClient
|
|
|
14
14
|
# @param [Hash<Symbol,String>] the result of the metadata call
|
|
15
15
|
# @param [String] version_description
|
|
16
16
|
# @param [String] user_versions action (none, new, update) to take for user version when closing version
|
|
17
|
-
|
|
17
|
+
# @param [Boolean] accession true if accessioning should be performed
|
|
18
|
+
def initialize(metadata:, logger:, connection:, version_description: nil, user_versions: nil, accession: true) # rubocop:disable Metrics/ParameterLists
|
|
18
19
|
@metadata = metadata
|
|
19
20
|
@logger = logger
|
|
20
21
|
@connection = connection
|
|
21
22
|
@version_description = version_description
|
|
22
23
|
@user_versions = user_versions
|
|
24
|
+
@accession = accession
|
|
23
25
|
end
|
|
24
26
|
|
|
25
27
|
# @param [Hash<Symbol,String>] the result of the metadata call
|
|
@@ -35,7 +37,7 @@ module SdrClient
|
|
|
35
37
|
|
|
36
38
|
private
|
|
37
39
|
|
|
38
|
-
attr_reader :metadata, :logger, :connection, :version_description, :user_versions
|
|
40
|
+
attr_reader :metadata, :logger, :connection, :version_description, :user_versions, :accession
|
|
39
41
|
|
|
40
42
|
# rubocop:disable Metrics/AbcSize
|
|
41
43
|
def metadata_request
|
|
@@ -47,6 +49,7 @@ module SdrClient
|
|
|
47
49
|
'X-Cocina-Models-Version' => Cocina::Models::VERSION) do |req|
|
|
48
50
|
req.params['versionDescription'] = version_description if version_description
|
|
49
51
|
req.params['user_versions'] = user_versions if user_versions.present?
|
|
52
|
+
req.params['accession'] = true if accession
|
|
50
53
|
end
|
|
51
54
|
end
|
|
52
55
|
# rubocop:enable Metrics/AbcSize
|
|
@@ -13,10 +13,12 @@ module SdrClient
|
|
|
13
13
|
# @param [Cocina::Models::DRO] model
|
|
14
14
|
# @param [String] version_description
|
|
15
15
|
# @param [String] user_versions action (none, new, update) to take for user version when closing version
|
|
16
|
-
|
|
16
|
+
# @param [Boolean] accession true if accessioning should be performed
|
|
17
|
+
def initialize(model:, version_description: nil, user_versions: nil, accession: true)
|
|
17
18
|
@model = model
|
|
18
19
|
@version_description = version_description
|
|
19
20
|
@user_versions = user_versions
|
|
21
|
+
@accession = accession
|
|
20
22
|
end
|
|
21
23
|
|
|
22
24
|
# @return [String] job id for the background job result
|
|
@@ -39,7 +41,7 @@ module SdrClient
|
|
|
39
41
|
|
|
40
42
|
private
|
|
41
43
|
|
|
42
|
-
attr_reader :model, :version_description, :user_versions
|
|
44
|
+
attr_reader :model, :version_description, :user_versions, :accession
|
|
43
45
|
|
|
44
46
|
def client
|
|
45
47
|
SdrClient::RedesignedClient.instance
|
|
@@ -56,7 +58,8 @@ module SdrClient
|
|
|
56
58
|
def request_params
|
|
57
59
|
{
|
|
58
60
|
versionDescription: version_description,
|
|
59
|
-
user_versions: user_versions
|
|
61
|
+
user_versions: user_versions,
|
|
62
|
+
accession: accession ? true : nil
|
|
60
63
|
}.compact
|
|
61
64
|
end
|
|
62
65
|
end
|
data/lib/sdr_client/version.rb
CHANGED
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.18.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin Coyne
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-10-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -224,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
224
224
|
- !ruby/object:Gem::Version
|
|
225
225
|
version: '0'
|
|
226
226
|
requirements: []
|
|
227
|
-
rubygems_version: 3.
|
|
227
|
+
rubygems_version: 3.5.11
|
|
228
228
|
signing_key:
|
|
229
229
|
specification_version: 4
|
|
230
230
|
summary: The CLI for https://github.com/sul-dlss/sdr-api
|