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: 37285399edae9bb74d1accece385687165c413026cc02057bfdbadc1ce2722e2
4
- data.tar.gz: d2c8b5dc9c419d5bc86be7554f332919d7a93b98f8b59ea5487505f19520bfb9
3
+ metadata.gz: 8b9f90e6b2328a165dec0fdc4f1b65a1b1423a58eab004a3ce028d5545a6f717
4
+ data.tar.gz: 4ae2de10b489328955ebc5687aac298d91121873d9677b128b024975152dcbed
5
5
  SHA512:
6
- metadata.gz: f6bf01da5e8499d277d92d6af12d5d6955f49953459844eb67504c7ac42b0d5d313b68ef3276d8c241c85c2c899c8dd4d955ec9f5f97c867382bb7f455cc6369
7
- data.tar.gz: 3b2965522625660452f669c51a31efb70fc7a1bedbd77787d283314e993421114c247b6a780f1575f9572206f88881cebdd6ba3c2396cbc20fa8f85d4532dccb
6
+ metadata.gz: fd8b1c6ac2e2c63deddbbfbfa5df0908f33e9448a1226c0f7471a1b96a5da6d493da6d5eaf7236d6b154312ca04a0e28ab44e7522d8273f86b0e72bc5f16e54a
7
+ data.tar.gz: 91e1eadf611b65c0286438afbac517e7040542e8eb3702b0fad310c5a92812ca41606cdea1ee62bbc777449095ee0d86856be3347c88a92ad31b46db735f3427
data/.circleci/config.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  version: 2.1
2
2
  orbs:
3
- ruby-rails: sul-dlss/ruby-rails@4.2.2
3
+ ruby-rails: sul-dlss/ruby-rails@4.2.3
4
4
  workflows:
5
5
  build:
6
6
  jobs:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sdr-client (2.17.0)
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 (7.1.3.4)
16
+ activesupport (8.0.1)
17
17
  base64
18
+ benchmark (>= 0.3)
18
19
  bigdecimal
19
- concurrent-ruby (~> 1.0, >= 1.0.2)
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
- mutex_m
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
- bigdecimal (3.1.8)
34
+ benchmark (0.4.0)
35
+ bigdecimal (3.1.9)
32
36
  byebug (11.1.3)
33
- childprocess (5.0.0)
34
- cocina-models (0.99.0)
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
- commonmarker (1.1.4-arm64-darwin)
50
- commonmarker (1.1.4-x86_64-darwin)
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
- connection_pool (2.4.1)
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.1)
67
+ dry-core (1.1.0)
66
68
  concurrent-ruby (~> 1.0)
69
+ logger
67
70
  zeitwerk (~> 2.6)
68
- dry-inflector (1.1.0)
69
- dry-logic (1.5.0)
71
+ dry-inflector (1.2.0)
72
+ dry-logic (1.6.0)
73
+ bigdecimal
70
74
  concurrent-ruby (~> 1.0)
71
- dry-core (~> 1.0, < 2)
75
+ dry-core (~> 1.1)
72
76
  zeitwerk (~> 2.6)
73
- dry-monads (1.6.0)
77
+ dry-monads (1.7.1)
74
78
  concurrent-ruby (~> 1.0)
75
- dry-core (~> 1.0, < 2)
79
+ dry-core (~> 1.1)
76
80
  zeitwerk (~> 2.6)
77
- dry-struct (1.6.0)
78
- dry-core (~> 1.0, < 2)
79
- dry-types (>= 1.7, < 2)
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.7.2)
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.1.1)
90
- activesupport (>= 3.0, < 8.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.10.0)
94
- faraday-net_http (>= 2.0, < 3.2)
97
+ faraday (2.12.2)
98
+ faraday-net_http (>= 2.0, < 3.5)
99
+ json
95
100
  logger
96
- faraday-net_http (3.1.1)
97
- net-http
98
- hashdiff (1.1.0)
99
- i18n (1.14.5)
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.7.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.1)
111
+ launchy (3.1.0)
107
112
  addressable (~> 2.8)
108
113
  childprocess (~> 5.0)
109
- logger (1.6.0)
110
- minitest (5.24.1)
114
+ logger (~> 1.6)
115
+ logger (1.6.5)
116
+ minitest (5.25.4)
111
117
  multi_json (1.15.0)
112
- mutex_m (0.2.0)
113
- net-http (0.4.1)
118
+ net-http (0.6.0)
114
119
  uri
115
- nokogiri (1.16.7-arm64-darwin)
120
+ nokogiri (1.18.2-arm64-darwin)
116
121
  racc (~> 1.4)
117
- nokogiri (1.16.7-x86_64-darwin)
122
+ nokogiri (1.18.2-x86_64-darwin)
118
123
  racc (~> 1.4)
119
- nokogiri (1.16.7-x86_64-linux)
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.1.0)
125
- parallel (1.25.1)
126
- parser (3.3.4.0)
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.0)
136
+ racc (1.8.1)
133
137
  rainbow (3.1.1)
134
138
  rake (13.2.1)
135
- regexp_parser (2.9.2)
136
- rexml (3.3.2)
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.0)
145
+ rspec-core (3.13.2)
143
146
  rspec-support (~> 3.13.0)
144
- rspec-expectations (3.13.1)
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.1)
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.1)
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.65.0)
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.4, < 3.0)
160
- rexml (>= 3.2.5, < 4.0)
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, < 3.0)
164
- rubocop-ast (1.31.3)
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.12.3)
187
+ simplecov-html (0.13.1)
185
188
  simplecov_json_formatter (0.1.4)
186
- strscan (3.1.0)
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.1)
193
+ thor (1.3.2)
192
194
  tzinfo (2.0.6)
193
195
  concurrent-ruby (~> 1.0)
194
- unicode-display_width (2.5.0)
195
- uri (0.13.0)
196
- webmock (3.23.1)
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.6.16)
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
- def initialize(metadata:, logger:, connection:, version_description: nil, user_versions: nil)
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
- @object_id = object_id
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 :object_id
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/%<object_id>s', object_id: object_id)
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
- def initialize(model:, version_description: nil, user_versions: nil)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SdrClient
4
- VERSION = '2.17.0'
4
+ VERSION = '2.18.1'
5
5
  end
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.17.0
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: 2024-08-02 00:00:00.000000000 Z
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.4.19
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