sdr-client 2.17.0 → 2.18.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b9f90e6b2328a165dec0fdc4f1b65a1b1423a58eab004a3ce028d5545a6f717
|
4
|
+
data.tar.gz: 4ae2de10b489328955ebc5687aac298d91121873d9677b128b024975152dcbed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd8b1c6ac2e2c63deddbbfbfa5df0908f33e9448a1226c0f7471a1b96a5da6d493da6d5eaf7236d6b154312ca04a0e28ab44e7522d8273f86b0e72bc5f16e54a
|
7
|
+
data.tar.gz: 91e1eadf611b65c0286438afbac517e7040542e8eb3702b0fad310c5a92812ca41606cdea1ee62bbc777449095ee0d86856be3347c88a92ad31b46db735f3427
|
data/.circleci/config.yml
CHANGED
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.1)
|
5
5
|
activesupport
|
6
6
|
cocina-models (~> 0.99.0)
|
7
7
|
config
|
@@ -13,25 +13,30 @@ PATH
|
|
13
13
|
GEM
|
14
14
|
remote: https://rubygems.org/
|
15
15
|
specs:
|
16
|
-
activesupport (
|
16
|
+
activesupport (8.0.1)
|
17
17
|
base64
|
18
|
+
benchmark (>= 0.3)
|
18
19
|
bigdecimal
|
19
|
-
concurrent-ruby (~> 1.0, >= 1.
|
20
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
20
21
|
connection_pool (>= 2.2.5)
|
21
22
|
drb
|
22
23
|
i18n (>= 1.6, < 2)
|
24
|
+
logger (>= 1.4.2)
|
23
25
|
minitest (>= 5.1)
|
24
|
-
|
25
|
-
tzinfo (~> 2.0)
|
26
|
+
securerandom (>= 0.3)
|
27
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
28
|
+
uri (>= 0.13.1)
|
26
29
|
addressable (2.8.7)
|
27
30
|
public_suffix (>= 2.0.2, < 7.0)
|
28
31
|
ast (2.4.2)
|
29
32
|
attr_extras (7.1.0)
|
30
33
|
base64 (0.2.0)
|
31
|
-
|
34
|
+
benchmark (0.4.0)
|
35
|
+
bigdecimal (3.1.9)
|
32
36
|
byebug (11.1.3)
|
33
|
-
childprocess (5.
|
34
|
-
|
37
|
+
childprocess (5.1.0)
|
38
|
+
logger (~> 1.5)
|
39
|
+
cocina-models (0.99.3)
|
35
40
|
activesupport
|
36
41
|
deprecation
|
37
42
|
dry-struct (~> 1.0)
|
@@ -41,18 +46,15 @@ GEM
|
|
41
46
|
i18n
|
42
47
|
jsonpath
|
43
48
|
nokogiri
|
44
|
-
openapi3_parser
|
45
49
|
openapi_parser (~> 1.0)
|
46
50
|
super_diff
|
47
51
|
thor
|
48
52
|
zeitwerk (~> 2.1)
|
49
|
-
|
50
|
-
|
51
|
-
commonmarker (1.1.4-x86_64-linux)
|
52
|
-
concurrent-ruby (1.3.3)
|
53
|
-
config (5.5.1)
|
53
|
+
concurrent-ruby (1.3.5)
|
54
|
+
config (5.5.2)
|
54
55
|
deep_merge (~> 1.2, >= 1.2.1)
|
55
|
-
|
56
|
+
ostruct
|
57
|
+
connection_pool (2.5.0)
|
56
58
|
crack (1.0.0)
|
57
59
|
bigdecimal
|
58
60
|
rexml
|
@@ -62,106 +64,106 @@ GEM
|
|
62
64
|
diff-lcs (1.5.1)
|
63
65
|
docile (1.4.1)
|
64
66
|
drb (2.2.1)
|
65
|
-
dry-core (1.0
|
67
|
+
dry-core (1.1.0)
|
66
68
|
concurrent-ruby (~> 1.0)
|
69
|
+
logger
|
67
70
|
zeitwerk (~> 2.6)
|
68
|
-
dry-inflector (1.
|
69
|
-
dry-logic (1.
|
71
|
+
dry-inflector (1.2.0)
|
72
|
+
dry-logic (1.6.0)
|
73
|
+
bigdecimal
|
70
74
|
concurrent-ruby (~> 1.0)
|
71
|
-
dry-core (~> 1.
|
75
|
+
dry-core (~> 1.1)
|
72
76
|
zeitwerk (~> 2.6)
|
73
|
-
dry-monads (1.
|
77
|
+
dry-monads (1.7.1)
|
74
78
|
concurrent-ruby (~> 1.0)
|
75
|
-
dry-core (~> 1.
|
79
|
+
dry-core (~> 1.1)
|
76
80
|
zeitwerk (~> 2.6)
|
77
|
-
dry-struct (1.
|
78
|
-
dry-core (~> 1.
|
79
|
-
dry-types (
|
81
|
+
dry-struct (1.7.0)
|
82
|
+
dry-core (~> 1.1)
|
83
|
+
dry-types (~> 1.8)
|
80
84
|
ice_nine (~> 0.11)
|
81
85
|
zeitwerk (~> 2.6)
|
82
|
-
dry-types (1.
|
86
|
+
dry-types (1.8.1)
|
83
87
|
bigdecimal (~> 3.0)
|
84
88
|
concurrent-ruby (~> 1.0)
|
85
89
|
dry-core (~> 1.0)
|
86
90
|
dry-inflector (~> 1.0)
|
87
91
|
dry-logic (~> 1.4)
|
88
92
|
zeitwerk (~> 2.6)
|
89
|
-
edtf (3.
|
90
|
-
activesupport (>= 3.0, <
|
93
|
+
edtf (3.2.0)
|
94
|
+
activesupport (>= 3.0, < 9.0)
|
91
95
|
equivalent-xml (0.6.0)
|
92
96
|
nokogiri (>= 1.4.3)
|
93
|
-
faraday (2.
|
94
|
-
faraday-net_http (>= 2.0, < 3.
|
97
|
+
faraday (2.12.2)
|
98
|
+
faraday-net_http (>= 2.0, < 3.5)
|
99
|
+
json
|
95
100
|
logger
|
96
|
-
faraday-net_http (3.
|
97
|
-
net-http
|
98
|
-
hashdiff (1.1.
|
99
|
-
i18n (1.14.
|
101
|
+
faraday-net_http (3.4.0)
|
102
|
+
net-http (>= 0.5.0)
|
103
|
+
hashdiff (1.1.2)
|
104
|
+
i18n (1.14.7)
|
100
105
|
concurrent-ruby (~> 1.0)
|
101
106
|
ice_nine (0.11.2)
|
102
|
-
json (2.
|
107
|
+
json (2.9.1)
|
103
108
|
jsonpath (1.1.5)
|
104
109
|
multi_json
|
105
110
|
language_server-protocol (3.17.0.3)
|
106
|
-
launchy (3.0
|
111
|
+
launchy (3.1.0)
|
107
112
|
addressable (~> 2.8)
|
108
113
|
childprocess (~> 5.0)
|
109
|
-
|
110
|
-
|
114
|
+
logger (~> 1.6)
|
115
|
+
logger (1.6.5)
|
116
|
+
minitest (5.25.4)
|
111
117
|
multi_json (1.15.0)
|
112
|
-
|
113
|
-
net-http (0.4.1)
|
118
|
+
net-http (0.6.0)
|
114
119
|
uri
|
115
|
-
nokogiri (1.
|
120
|
+
nokogiri (1.18.2-arm64-darwin)
|
116
121
|
racc (~> 1.4)
|
117
|
-
nokogiri (1.
|
122
|
+
nokogiri (1.18.2-x86_64-darwin)
|
118
123
|
racc (~> 1.4)
|
119
|
-
nokogiri (1.
|
124
|
+
nokogiri (1.18.2-x86_64-linux-gnu)
|
120
125
|
racc (~> 1.4)
|
121
|
-
openapi3_parser (0.10.0)
|
122
|
-
commonmarker (>= 1.0)
|
123
126
|
openapi_parser (1.0.0)
|
124
|
-
optimist (3.
|
125
|
-
|
126
|
-
|
127
|
+
optimist (3.2.0)
|
128
|
+
ostruct (0.6.1)
|
129
|
+
parallel (1.26.3)
|
130
|
+
parser (3.3.7.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
|
-
regexp_parser (2.
|
136
|
-
rexml (3.
|
137
|
-
strscan
|
139
|
+
regexp_parser (2.10.0)
|
140
|
+
rexml (3.4.0)
|
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.2)
|
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
|
-
rspec-support (3.13.
|
153
|
+
rspec-support (3.13.2)
|
151
154
|
rspec_junit_formatter (0.6.0)
|
152
155
|
rspec-core (>= 2, < 4, != 2.12.0)
|
153
|
-
rubocop (1.
|
156
|
+
rubocop (1.71.0)
|
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
|
-
regexp_parser (>= 2.
|
160
|
-
|
161
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
162
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
163
|
+
rubocop-ast (>= 1.36.2, < 2.0)
|
162
164
|
ruby-progressbar (~> 1.7)
|
163
|
-
unicode-display_width (>= 2.4.0, <
|
164
|
-
rubocop-ast (1.
|
165
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
166
|
+
rubocop-ast (1.37.0)
|
165
167
|
parser (>= 3.3.1.0)
|
166
168
|
rubocop-capybara (2.21.0)
|
167
169
|
rubocop (~> 1.41)
|
@@ -177,30 +179,33 @@ GEM
|
|
177
179
|
rubocop-rspec_rails (2.29.1)
|
178
180
|
rubocop (~> 1.61)
|
179
181
|
ruby-progressbar (1.13.0)
|
182
|
+
securerandom (0.4.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.15.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 (
|
195
|
-
|
196
|
-
|
196
|
+
unicode-display_width (3.1.4)
|
197
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
198
|
+
unicode-emoji (4.0.4)
|
199
|
+
uri (1.0.2)
|
200
|
+
webmock (3.24.0)
|
197
201
|
addressable (>= 2.8.0)
|
198
202
|
crack (>= 0.3.2)
|
199
203
|
hashdiff (>= 0.4.0, < 2.0.0)
|
200
|
-
zeitwerk (2.
|
204
|
+
zeitwerk (2.7.1)
|
201
205
|
|
202
206
|
PLATFORMS
|
203
207
|
arm64-darwin-23
|
208
|
+
arm64-darwin-24
|
204
209
|
x86_64-darwin-19
|
205
210
|
x86_64-darwin-20
|
206
211
|
x86_64-darwin-21
|
@@ -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
|
@@ -12,7 +12,7 @@ module SdrClient
|
|
12
12
|
|
13
13
|
# @param [String] object_id an ID for an object
|
14
14
|
def initialize(object_id:)
|
15
|
-
@
|
15
|
+
@id = object_id
|
16
16
|
end
|
17
17
|
|
18
18
|
# @raise [Failed] if the find operation fails
|
@@ -24,7 +24,7 @@ module SdrClient
|
|
24
24
|
|
25
25
|
private
|
26
26
|
|
27
|
-
attr_reader :
|
27
|
+
attr_reader :id
|
28
28
|
|
29
29
|
def logger
|
30
30
|
SdrClient::RedesignedClient.config.logger
|
@@ -35,7 +35,7 @@ module SdrClient
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def path
|
38
|
-
format('/v1/resources/%<
|
38
|
+
format('/v1/resources/%<id>s', id: id)
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
@@ -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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-28 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
|