dor-services-client 14.11.0 → 14.12.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 +4 -4
- 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 +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0c0ec136ed9ea12e5a6c0efc2c2663a5657f49bc2b956ff057586da83c360a5
|
4
|
+
data.tar.gz: bb9c3b96fc62eb5456f85cea0e08de070e3831df74230fff530575d4df2b791e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f1094a15841a375b9f3542064a4f64b30b1d701e91a2db1b923e056383bdc0ecf35ec1067f9eefcb426e7f3cc7e2acd90d64854e6b59c7458e8f20158c35c7e
|
7
|
+
data.tar.gz: 908f23a64f6c4028f2a6eddb1956ccb0b9823195a6b4a667029ce2dabe6103604fc3f489cdf68e4aa8d4eb982eb1c9c2319330803716ec56385326f504a0acd2
|
data/.circleci/config.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -47,7 +47,7 @@ GEM
|
|
47
47
|
commonmarker (1.1.3-arm64-darwin)
|
48
48
|
commonmarker (1.1.3-x86_64-darwin)
|
49
49
|
commonmarker (1.1.3-x86_64-linux)
|
50
|
-
concurrent-ruby (1.
|
50
|
+
concurrent-ruby (1.3.1)
|
51
51
|
connection_pool (2.4.1)
|
52
52
|
crack (1.0.0)
|
53
53
|
bigdecimal
|
@@ -111,7 +111,7 @@ GEM
|
|
111
111
|
openapi_parser (1.0.0)
|
112
112
|
optimist (3.1.0)
|
113
113
|
parallel (1.24.0)
|
114
|
-
parser (3.3.
|
114
|
+
parser (3.3.2.0)
|
115
115
|
ast (~> 2.4.1)
|
116
116
|
racc
|
117
117
|
patience_diff (1.2.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)
|
@@ -153,7 +153,7 @@ GEM
|
|
153
153
|
rubocop (~> 1.41)
|
154
154
|
rubocop-factory_bot (2.25.1)
|
155
155
|
rubocop (~> 1.41)
|
156
|
-
rubocop-rspec (2.
|
156
|
+
rubocop-rspec (2.30.0)
|
157
157
|
rubocop (~> 1.40)
|
158
158
|
rubocop-capybara (~> 2.17)
|
159
159
|
rubocop-factory_bot (~> 2.22)
|
@@ -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.12.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-05
|
12
|
+
date: 2024-06-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -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
|