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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0697be61e31e5bad32686e55e4472530705f6ec8503afcf40f99fff455928c1
4
- data.tar.gz: da0395e15eb9185300b15677401a6abf5694cea69ee5a82e1d6d78c6de6ce5a0
3
+ metadata.gz: c0c0ec136ed9ea12e5a6c0efc2c2663a5657f49bc2b956ff057586da83c360a5
4
+ data.tar.gz: bb9c3b96fc62eb5456f85cea0e08de070e3831df74230fff530575d4df2b791e
5
5
  SHA512:
6
- metadata.gz: 584f38fcd6d058a288b692e3e8ccba8a1d744d93e00df79ea86c5bbe4457bf3a522d4f3cd36c86200428431a30cee78e55d0141c1781a80367357eca597b5a51
7
- data.tar.gz: 9f918af8cf25f20d4cf7f012decf8abaa48269fda865c2dd587f188f98356b7fcce2855288d1eae990cbe555b252d85ac4e4c5af2f7a5b6d23427aa1c030952d
6
+ metadata.gz: 9f1094a15841a375b9f3542064a4f64b30b1d701e91a2db1b923e056383bdc0ecf35ec1067f9eefcb426e7f3cc7e2acd90d64854e6b59c7458e8f20158c35c7e
7
+ data.tar.gz: 908f23a64f6c4028f2a6eddb1956ccb0b9823195a6b4a667029ce2dabe6103604fc3f489cdf68e4aa8d4eb982eb1c9c2319330803716ec56385326f504a0acd2
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.0
3
+ ruby-rails: sul-dlss/ruby-rails@4.2.1
4
4
  workflows:
5
5
  build:
6
6
  jobs:
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.2.3)
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.1.0)
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.0)
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.29.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 [Cocina::Models::ReleaseTag]
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<Cocina::Models::ReleaseTag>]
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| Cocina::Models::ReleaseTag.new(tag_data) }
43
+ JSON.parse(resp.body).map { |tag_data| ReleaseTag.new(tag_data) }
44
44
  end
45
45
 
46
46
  private
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '14.11.0'
6
+ VERSION = '14.12.0'
7
7
  end
8
8
  end
9
9
  end
@@ -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.11.0
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-29 00:00:00.000000000 Z
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.10
283
+ rubygems_version: 3.5.9
283
284
  signing_key:
284
285
  specification_version: 4
285
286
  summary: A client for dor-services-app