dor-services-client 14.11.0 → 14.13.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 +18 -18
- data/dor-services-client.gemspec +1 -1
- data/lib/dor/services/client/release_tag.rb +25 -0
- data/lib/dor/services/client/release_tags.rb +3 -3
- data/lib/dor/services/client/version.rb +1 -1
- data/lib/dor/services/client.rb +4 -0
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e11aa6b7c797bddc325923a41e2a2309b9acd7d2af271b72b0c88ea6bbdcd264
|
4
|
+
data.tar.gz: df84d64b8163f88ffe3bfd75e5e82535476822b59041a198b7597695c6fd44f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d5e2f4971d7903f97547ad5a76178e4d6cd75bf5d8bb92fa6f895b17b52d1a3b68ed33637bacf6ec6df8eae1aa1967b714dba83cf9583aa997a86bacf9ff25f
|
7
|
+
data.tar.gz: 3af6f1d5eda5c2d80073931c5c6668baede8b3e9ea6fb632f2cbd9f44e6684b162f3166689f0bfd6b5b53ab0647b826ba5def700aba64d1da12bdad6748d0849
|
data/.circleci/config.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dor-services-client (14.
|
4
|
+
dor-services-client (14.13.0)
|
5
5
|
activesupport (>= 4.2, < 8)
|
6
|
-
cocina-models (~> 0.
|
6
|
+
cocina-models (~> 0.98.0)
|
7
7
|
deprecation
|
8
8
|
faraday (~> 2.0)
|
9
9
|
faraday-retry
|
@@ -12,7 +12,7 @@ PATH
|
|
12
12
|
GEM
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
|
-
activesupport (7.1.3.
|
15
|
+
activesupport (7.1.3.4)
|
16
16
|
base64
|
17
17
|
bigdecimal
|
18
18
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
@@ -29,7 +29,7 @@ GEM
|
|
29
29
|
base64 (0.2.0)
|
30
30
|
bigdecimal (3.1.8)
|
31
31
|
byebug (11.1.3)
|
32
|
-
cocina-models (0.
|
32
|
+
cocina-models (0.98.0)
|
33
33
|
activesupport
|
34
34
|
deprecation
|
35
35
|
dry-struct (~> 1.0)
|
@@ -44,10 +44,10 @@ GEM
|
|
44
44
|
super_diff
|
45
45
|
thor
|
46
46
|
zeitwerk (~> 2.1)
|
47
|
-
commonmarker (1.1.
|
48
|
-
commonmarker (1.1.
|
49
|
-
commonmarker (1.1.
|
50
|
-
concurrent-ruby (1.
|
47
|
+
commonmarker (1.1.4-arm64-darwin)
|
48
|
+
commonmarker (1.1.4-x86_64-darwin)
|
49
|
+
commonmarker (1.1.4-x86_64-linux)
|
50
|
+
concurrent-ruby (1.3.3)
|
51
51
|
connection_pool (2.4.1)
|
52
52
|
crack (1.0.0)
|
53
53
|
bigdecimal
|
@@ -81,7 +81,7 @@ GEM
|
|
81
81
|
activesupport (>= 3.0, < 8.0)
|
82
82
|
equivalent-xml (0.6.0)
|
83
83
|
nokogiri (>= 1.4.3)
|
84
|
-
faraday (2.9.
|
84
|
+
faraday (2.9.1)
|
85
85
|
faraday-net_http (>= 2.0, < 3.2)
|
86
86
|
faraday-net_http (3.1.0)
|
87
87
|
net-http
|
@@ -110,8 +110,8 @@ GEM
|
|
110
110
|
commonmarker (>= 1.0)
|
111
111
|
openapi_parser (1.0.0)
|
112
112
|
optimist (3.1.0)
|
113
|
-
parallel (1.
|
114
|
-
parser (3.3.
|
113
|
+
parallel (1.25.1)
|
114
|
+
parser (3.3.2.0)
|
115
115
|
ast (~> 2.4.1)
|
116
116
|
racc
|
117
117
|
patience_diff (1.2.0)
|
@@ -121,8 +121,8 @@ GEM
|
|
121
121
|
rainbow (3.1.1)
|
122
122
|
rake (13.2.1)
|
123
123
|
regexp_parser (2.9.2)
|
124
|
-
rexml (3.2.
|
125
|
-
strscan
|
124
|
+
rexml (3.2.9)
|
125
|
+
strscan
|
126
126
|
rspec (3.13.0)
|
127
127
|
rspec-core (~> 3.13.0)
|
128
128
|
rspec-expectations (~> 3.13.0)
|
@@ -136,7 +136,7 @@ GEM
|
|
136
136
|
diff-lcs (>= 1.2.0, < 2.0)
|
137
137
|
rspec-support (~> 3.13.0)
|
138
138
|
rspec-support (3.13.1)
|
139
|
-
rubocop (1.64.
|
139
|
+
rubocop (1.64.1)
|
140
140
|
json (~> 2.3)
|
141
141
|
language_server-protocol (>= 3.17.0)
|
142
142
|
parallel (~> 1.10)
|
@@ -149,16 +149,16 @@ GEM
|
|
149
149
|
unicode-display_width (>= 2.4.0, < 3.0)
|
150
150
|
rubocop-ast (1.31.3)
|
151
151
|
parser (>= 3.3.1.0)
|
152
|
-
rubocop-capybara (2.
|
152
|
+
rubocop-capybara (2.21.0)
|
153
153
|
rubocop (~> 1.41)
|
154
|
-
rubocop-factory_bot (2.
|
154
|
+
rubocop-factory_bot (2.26.0)
|
155
155
|
rubocop (~> 1.41)
|
156
|
-
rubocop-rspec (2.
|
156
|
+
rubocop-rspec (2.31.0)
|
157
157
|
rubocop (~> 1.40)
|
158
158
|
rubocop-capybara (~> 2.17)
|
159
159
|
rubocop-factory_bot (~> 2.22)
|
160
160
|
rubocop-rspec_rails (~> 2.28)
|
161
|
-
rubocop-rspec_rails (2.
|
161
|
+
rubocop-rspec_rails (2.29.0)
|
162
162
|
rubocop (~> 1.40)
|
163
163
|
ruby-progressbar (1.13.0)
|
164
164
|
simplecov (0.22.0)
|
data/dor-services-client.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.required_ruby_version = '>= 3.0', '< 4'
|
26
26
|
|
27
27
|
spec.add_dependency 'activesupport', '>= 4.2', '< 8'
|
28
|
-
spec.add_dependency 'cocina-models', '~> 0.
|
28
|
+
spec.add_dependency 'cocina-models', '~> 0.98.0'
|
29
29
|
spec.add_dependency 'deprecation', '>= 0'
|
30
30
|
spec.add_dependency 'faraday', '~> 2.0'
|
31
31
|
spec.add_dependency 'faraday-retry'
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Dor
|
4
|
+
module Services
|
5
|
+
class Client
|
6
|
+
# A tag that indicates the item or collection should be released.
|
7
|
+
class ReleaseTag < Dry::Struct
|
8
|
+
transform_keys(&:to_sym)
|
9
|
+
schema schema.strict
|
10
|
+
# Who did this release
|
11
|
+
# example: petucket
|
12
|
+
attribute? :who, Types::Strict::String
|
13
|
+
# What is being released. This item or the whole collection.
|
14
|
+
# example: self
|
15
|
+
attribute :what, Types::Strict::String.enum('self', 'collection')
|
16
|
+
# When did this action happen
|
17
|
+
attribute? :date, Types::Params::DateTime
|
18
|
+
# What platform is it released to
|
19
|
+
# example: Searchworks
|
20
|
+
attribute? :to, Types::Strict::String
|
21
|
+
attribute :release, Types::Strict::Bool.default(false)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -13,7 +13,7 @@ module Dor
|
|
13
13
|
|
14
14
|
# Create a release tag for an object
|
15
15
|
#
|
16
|
-
# @param tag [
|
16
|
+
# @param tag [ReleaseTag]
|
17
17
|
# @return [Boolean] true if successful
|
18
18
|
# @raise [NotFoundResponse] when the response is a 404 (object not found)
|
19
19
|
# @raise [UnexpectedResponse] if the request is unsuccessful.
|
@@ -32,7 +32,7 @@ module Dor
|
|
32
32
|
#
|
33
33
|
# @raise [NotFoundResponse] when the response is a 404 (object not found)
|
34
34
|
# @raise [UnexpectedResponse] if the request is unsuccessful.
|
35
|
-
# @return [Array<
|
35
|
+
# @return [Array<ReleaseTag>]
|
36
36
|
def list
|
37
37
|
resp = connection.get do |req|
|
38
38
|
req.url "#{api_version}/objects/#{object_identifier}/release_tags"
|
@@ -40,7 +40,7 @@ module Dor
|
|
40
40
|
|
41
41
|
raise_exception_based_on_response!(resp, object_identifier) unless resp.success?
|
42
42
|
|
43
|
-
JSON.parse(resp.body).map { |tag_data|
|
43
|
+
JSON.parse(resp.body).map { |tag_data| ReleaseTag.new(tag_data) }
|
44
44
|
end
|
45
45
|
|
46
46
|
private
|
data/lib/dor/services/client.rb
CHANGED
@@ -78,6 +78,10 @@ module Dor
|
|
78
78
|
# Error that is raised when the remote server returns a 400 Bad Request; apps should not retry the request
|
79
79
|
class BadRequestError < UnexpectedResponse; end
|
80
80
|
|
81
|
+
module Types
|
82
|
+
include Dry.Types()
|
83
|
+
end
|
84
|
+
|
81
85
|
# @param object_identifier [String] the pid for the object
|
82
86
|
# @raise [ArgumentError] when `object_identifier` is `nil`
|
83
87
|
# @return [Dor::Services::Client::Object] an instance of the `Client::Object` class
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dor-services-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 14.
|
4
|
+
version: 14.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-06-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -37,14 +37,14 @@ dependencies:
|
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.98.0
|
41
41
|
type: :runtime
|
42
42
|
prerelease: false
|
43
43
|
version_requirements: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.98.0
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: deprecation
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
@@ -249,6 +249,7 @@ files:
|
|
249
249
|
- lib/dor/services/client/object.rb
|
250
250
|
- lib/dor/services/client/object_version.rb
|
251
251
|
- lib/dor/services/client/objects.rb
|
252
|
+
- lib/dor/services/client/release_tag.rb
|
252
253
|
- lib/dor/services/client/release_tags.rb
|
253
254
|
- lib/dor/services/client/response_error_formatter.rb
|
254
255
|
- lib/dor/services/client/transfer.rb
|
@@ -279,7 +280,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
279
280
|
- !ruby/object:Gem::Version
|
280
281
|
version: '0'
|
281
282
|
requirements: []
|
282
|
-
rubygems_version: 3.5.
|
283
|
+
rubygems_version: 3.5.9
|
283
284
|
signing_key:
|
284
285
|
specification_version: 4
|
285
286
|
summary: A client for dor-services-app
|