sdr-client 2.16.0 → 2.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +1 -1
- data/Gemfile.lock +57 -53
- 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
- data/sdr-client.gemspec +1 -1
- metadata +5 -5
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/.circleci/config.yml
CHANGED
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.18.0)
|
5
5
|
activesupport
|
6
|
-
cocina-models (~> 0.
|
6
|
+
cocina-models (~> 0.99.0)
|
7
7
|
config
|
8
8
|
dry-monads
|
9
9
|
faraday (>= 0.16)
|
@@ -13,25 +13,27 @@ 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)
|
26
|
-
addressable (2.8.
|
27
|
-
public_suffix (>= 2.0.2, <
|
25
|
+
securerandom (>= 0.3)
|
26
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
27
|
+
addressable (2.8.7)
|
28
|
+
public_suffix (>= 2.0.2, < 7.0)
|
28
29
|
ast (2.4.2)
|
29
30
|
attr_extras (7.1.0)
|
30
31
|
base64 (0.2.0)
|
31
32
|
bigdecimal (3.1.8)
|
32
33
|
byebug (11.1.3)
|
33
|
-
childprocess (5.
|
34
|
-
|
34
|
+
childprocess (5.1.0)
|
35
|
+
logger (~> 1.5)
|
36
|
+
cocina-models (0.99.0)
|
35
37
|
activesupport
|
36
38
|
deprecation
|
37
39
|
dry-struct (~> 1.0)
|
@@ -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
|
@@ -60,12 +63,12 @@ GEM
|
|
60
63
|
deprecation (1.1.0)
|
61
64
|
activesupport
|
62
65
|
diff-lcs (1.5.1)
|
63
|
-
docile (1.4.
|
66
|
+
docile (1.4.1)
|
64
67
|
drb (2.2.1)
|
65
68
|
dry-core (1.0.1)
|
66
69
|
concurrent-ruby (~> 1.0)
|
67
70
|
zeitwerk (~> 2.6)
|
68
|
-
dry-inflector (1.
|
71
|
+
dry-inflector (1.1.0)
|
69
72
|
dry-logic (1.5.0)
|
70
73
|
concurrent-ruby (~> 1.0)
|
71
74
|
dry-core (~> 1.0, < 2)
|
@@ -90,12 +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.
|
95
|
-
|
96
|
+
faraday (2.12.0)
|
97
|
+
faraday-net_http (>= 2.0, < 3.4)
|
98
|
+
json
|
99
|
+
logger
|
100
|
+
faraday-net_http (3.3.0)
|
96
101
|
net-http
|
97
|
-
hashdiff (1.1.
|
98
|
-
i18n (1.14.
|
102
|
+
hashdiff (1.1.1)
|
103
|
+
i18n (1.14.6)
|
99
104
|
concurrent-ruby (~> 1.0)
|
100
105
|
ice_nine (0.11.2)
|
101
106
|
json (2.7.2)
|
@@ -105,66 +110,65 @@ GEM
|
|
105
110
|
launchy (3.0.1)
|
106
111
|
addressable (~> 2.8)
|
107
112
|
childprocess (~> 5.0)
|
108
|
-
|
113
|
+
logger (1.6.1)
|
114
|
+
minitest (5.25.1)
|
109
115
|
multi_json (1.15.0)
|
110
|
-
mutex_m (0.2.0)
|
111
116
|
net-http (0.4.1)
|
112
117
|
uri
|
113
|
-
nokogiri (1.16.
|
118
|
+
nokogiri (1.16.7-arm64-darwin)
|
114
119
|
racc (~> 1.4)
|
115
|
-
nokogiri (1.16.
|
120
|
+
nokogiri (1.16.7-x86_64-darwin)
|
116
121
|
racc (~> 1.4)
|
117
|
-
nokogiri (1.16.
|
122
|
+
nokogiri (1.16.7-x86_64-linux)
|
118
123
|
racc (~> 1.4)
|
119
124
|
openapi3_parser (0.10.0)
|
120
125
|
commonmarker (>= 1.0)
|
121
126
|
openapi_parser (1.0.0)
|
122
127
|
optimist (3.1.0)
|
123
|
-
|
124
|
-
|
128
|
+
ostruct (0.6.0)
|
129
|
+
parallel (1.26.3)
|
130
|
+
parser (3.3.5.0)
|
125
131
|
ast (~> 2.4.1)
|
126
132
|
racc
|
127
133
|
patience_diff (1.2.0)
|
128
134
|
optimist (~> 3.0)
|
129
|
-
public_suffix (
|
130
|
-
racc (1.8.
|
135
|
+
public_suffix (6.0.1)
|
136
|
+
racc (1.8.1)
|
131
137
|
rainbow (3.1.1)
|
132
138
|
rake (13.2.1)
|
133
139
|
regexp_parser (2.9.2)
|
134
|
-
rexml (3.
|
135
|
-
strscan
|
140
|
+
rexml (3.3.8)
|
136
141
|
rspec (3.13.0)
|
137
142
|
rspec-core (~> 3.13.0)
|
138
143
|
rspec-expectations (~> 3.13.0)
|
139
144
|
rspec-mocks (~> 3.13.0)
|
140
|
-
rspec-core (3.13.
|
145
|
+
rspec-core (3.13.1)
|
141
146
|
rspec-support (~> 3.13.0)
|
142
|
-
rspec-expectations (3.13.
|
147
|
+
rspec-expectations (3.13.3)
|
143
148
|
diff-lcs (>= 1.2.0, < 2.0)
|
144
149
|
rspec-support (~> 3.13.0)
|
145
|
-
rspec-mocks (3.13.
|
150
|
+
rspec-mocks (3.13.2)
|
146
151
|
diff-lcs (>= 1.2.0, < 2.0)
|
147
152
|
rspec-support (~> 3.13.0)
|
148
153
|
rspec-support (3.13.1)
|
149
154
|
rspec_junit_formatter (0.6.0)
|
150
155
|
rspec-core (>= 2, < 4, != 2.12.0)
|
151
|
-
rubocop (1.
|
156
|
+
rubocop (1.66.1)
|
152
157
|
json (~> 2.3)
|
153
158
|
language_server-protocol (>= 3.17.0)
|
154
159
|
parallel (~> 1.10)
|
155
160
|
parser (>= 3.3.0.2)
|
156
161
|
rainbow (>= 2.2.2, < 4.0)
|
157
|
-
regexp_parser (>=
|
158
|
-
|
159
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
162
|
+
regexp_parser (>= 2.4, < 3.0)
|
163
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
160
164
|
ruby-progressbar (~> 1.7)
|
161
165
|
unicode-display_width (>= 2.4.0, < 3.0)
|
162
|
-
rubocop-ast (1.
|
166
|
+
rubocop-ast (1.32.3)
|
163
167
|
parser (>= 3.3.1.0)
|
164
168
|
rubocop-capybara (2.21.0)
|
165
169
|
rubocop (~> 1.41)
|
166
|
-
rubocop-factory_bot (2.26.
|
167
|
-
rubocop (~> 1.
|
170
|
+
rubocop-factory_bot (2.26.1)
|
171
|
+
rubocop (~> 1.61)
|
168
172
|
rubocop-rake (0.6.0)
|
169
173
|
rubocop (~> 1.0)
|
170
174
|
rubocop-rspec (2.31.0)
|
@@ -172,30 +176,30 @@ GEM
|
|
172
176
|
rubocop-capybara (~> 2.17)
|
173
177
|
rubocop-factory_bot (~> 2.22)
|
174
178
|
rubocop-rspec_rails (~> 2.28)
|
175
|
-
rubocop-rspec_rails (2.29.
|
176
|
-
rubocop (~> 1.
|
179
|
+
rubocop-rspec_rails (2.29.1)
|
180
|
+
rubocop (~> 1.61)
|
177
181
|
ruby-progressbar (1.13.0)
|
182
|
+
securerandom (0.3.1)
|
178
183
|
simplecov (0.22.0)
|
179
184
|
docile (~> 1.1)
|
180
185
|
simplecov-html (~> 0.11)
|
181
186
|
simplecov_json_formatter (~> 0.1)
|
182
|
-
simplecov-html (0.
|
187
|
+
simplecov-html (0.13.1)
|
183
188
|
simplecov_json_formatter (0.1.4)
|
184
|
-
|
185
|
-
super_diff (0.12.1)
|
189
|
+
super_diff (0.13.0)
|
186
190
|
attr_extras (>= 6.2.4)
|
187
191
|
diff-lcs
|
188
192
|
patience_diff
|
189
|
-
thor (1.3.
|
193
|
+
thor (1.3.2)
|
190
194
|
tzinfo (2.0.6)
|
191
195
|
concurrent-ruby (~> 1.0)
|
192
|
-
unicode-display_width (2.
|
193
|
-
uri (0.13.
|
194
|
-
webmock (3.
|
196
|
+
unicode-display_width (2.6.0)
|
197
|
+
uri (0.13.1)
|
198
|
+
webmock (3.24.0)
|
195
199
|
addressable (>= 2.8.0)
|
196
200
|
crack (>= 0.3.2)
|
197
201
|
hashdiff (>= 0.4.0, < 2.0.0)
|
198
|
-
zeitwerk (2.
|
202
|
+
zeitwerk (2.7.0)
|
199
203
|
|
200
204
|
PLATFORMS
|
201
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
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.99.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.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
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.99.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.99.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: config
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -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.5.
|
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
|