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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0697be61e31e5bad32686e55e4472530705f6ec8503afcf40f99fff455928c1
4
- data.tar.gz: da0395e15eb9185300b15677401a6abf5694cea69ee5a82e1d6d78c6de6ce5a0
3
+ metadata.gz: e11aa6b7c797bddc325923a41e2a2309b9acd7d2af271b72b0c88ea6bbdcd264
4
+ data.tar.gz: df84d64b8163f88ffe3bfd75e5e82535476822b59041a198b7597695c6fd44f2
5
5
  SHA512:
6
- metadata.gz: 584f38fcd6d058a288b692e3e8ccba8a1d744d93e00df79ea86c5bbe4457bf3a522d4f3cd36c86200428431a30cee78e55d0141c1781a80367357eca597b5a51
7
- data.tar.gz: 9f918af8cf25f20d4cf7f012decf8abaa48269fda865c2dd587f188f98356b7fcce2855288d1eae990cbe555b252d85ac4e4c5af2f7a5b6d23427aa1c030952d
6
+ metadata.gz: 9d5e2f4971d7903f97547ad5a76178e4d6cd75bf5d8bb92fa6f895b17b52d1a3b68ed33637bacf6ec6df8eae1aa1967b714dba83cf9583aa997a86bacf9ff25f
7
+ data.tar.gz: 3af6f1d5eda5c2d80073931c5c6668baede8b3e9ea6fb632f2cbd9f44e6684b162f3166689f0bfd6b5b53ab0647b826ba5def700aba64d1da12bdad6748d0849
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
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dor-services-client (14.11.0)
4
+ dor-services-client (14.13.0)
5
5
  activesupport (>= 4.2, < 8)
6
- cocina-models (~> 0.97.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.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.97.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.3-arm64-darwin)
48
- commonmarker (1.1.3-x86_64-darwin)
49
- commonmarker (1.1.3-x86_64-linux)
50
- concurrent-ruby (1.2.3)
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.0)
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.24.0)
114
- parser (3.3.1.0)
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.8)
125
- strscan (>= 3.0.9)
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.0)
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.20.0)
152
+ rubocop-capybara (2.21.0)
153
153
  rubocop (~> 1.41)
154
- rubocop-factory_bot (2.25.1)
154
+ rubocop-factory_bot (2.26.0)
155
155
  rubocop (~> 1.41)
156
- rubocop-rspec (2.29.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.28.3)
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)
@@ -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.97.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 [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.13.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.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-05-29 00:00:00.000000000 Z
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.97.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.97.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.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