dor-services-client 14.15.0 → 14.17.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: f2b55c7474fab7b39f9c192e3effa26056d8523e8d319a5915b205d242ae4edf
4
- data.tar.gz: f15fdecc7e97287f58a6e386a4b94f8ba466f5db6d95e5f763ef773852ded901
3
+ metadata.gz: 5f579eff62e38a8878bb92ff186dcff4e78e7017448e9cd4f364b6d0f8f8bf28
4
+ data.tar.gz: bcea7ed5a86afd5a157fde1b248ff77556eb629bc7c7cfa095cfc643bd770220
5
5
  SHA512:
6
- metadata.gz: 324c792ac506b0e4fdd0ff750c6348864bd116a0881dc02ebc657a0ca8ccceeed236c529a36cbf9bfdaedd0261363d5b69e9d5a9526fcfd3116ba29ad34486e1
7
- data.tar.gz: 5aa5c984f0e3815bcb30b39b09292c9b7965113264e26c987d73cc0cbf3e8fe7e94906bb5d1395666da053d4bbde7ef48c3c8fd7611f41dd120e37438b008b1a
6
+ metadata.gz: 6ecddca5342dc5fce144fa6f0e06a9b0335e35f43381d3bb6f789ffcf47eb8b28f21b93b9e2ed1ca927df4495df7544edc51c16088427ab4c458aefac4dc3845
7
+ data.tar.gz: 257295223f99b7ebed7d6c7c4c1b38609789109c093d2034e41c2b347408f9d934378599ad3894c19876ed8f36d343c15deb7adf6cfd5e754917afb42f4971bf
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.1
3
+ ruby-rails: sul-dlss/ruby-rails@4.2.2
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
- dor-services-client (14.15.0)
4
+ dor-services-client (14.17.0)
5
5
  activesupport (>= 4.2, < 8)
6
6
  cocina-models (~> 0.98.0)
7
7
  deprecation
@@ -60,7 +60,7 @@ GEM
60
60
  dry-core (1.0.1)
61
61
  concurrent-ruby (~> 1.0)
62
62
  zeitwerk (~> 2.6)
63
- dry-inflector (1.0.0)
63
+ dry-inflector (1.1.0)
64
64
  dry-logic (1.5.0)
65
65
  concurrent-ruby (~> 1.0)
66
66
  dry-core (~> 1.0, < 2)
@@ -81,8 +81,9 @@ 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.2)
84
+ faraday (2.10.0)
85
85
  faraday-net_http (>= 2.0, < 3.2)
86
+ logger
86
87
  faraday-net_http (3.1.0)
87
88
  net-http
88
89
  faraday-retry (2.2.1)
@@ -95,6 +96,7 @@ GEM
95
96
  jsonpath (1.1.5)
96
97
  multi_json
97
98
  language_server-protocol (3.17.0.3)
99
+ logger (1.6.0)
98
100
  minitest (5.24.1)
99
101
  multi_json (1.15.0)
100
102
  mutex_m (0.2.0)
@@ -111,7 +113,7 @@ GEM
111
113
  openapi_parser (1.0.0)
112
114
  optimist (3.1.0)
113
115
  parallel (1.25.1)
114
- parser (3.3.3.0)
116
+ parser (3.3.4.0)
115
117
  ast (~> 2.4.1)
116
118
  racc
117
119
  patience_diff (1.2.0)
@@ -121,7 +123,7 @@ GEM
121
123
  rainbow (3.1.1)
122
124
  rake (13.2.1)
123
125
  regexp_parser (2.9.2)
124
- rexml (3.3.1)
126
+ rexml (3.3.2)
125
127
  strscan
126
128
  rspec (3.13.0)
127
129
  rspec-core (~> 3.13.0)
@@ -136,13 +138,13 @@ GEM
136
138
  diff-lcs (>= 1.2.0, < 2.0)
137
139
  rspec-support (~> 3.13.0)
138
140
  rspec-support (3.13.1)
139
- rubocop (1.64.1)
141
+ rubocop (1.65.0)
140
142
  json (~> 2.3)
141
143
  language_server-protocol (>= 3.17.0)
142
144
  parallel (~> 1.10)
143
145
  parser (>= 3.3.0.2)
144
146
  rainbow (>= 2.2.2, < 4.0)
145
- regexp_parser (>= 1.8, < 3.0)
147
+ regexp_parser (>= 2.4, < 3.0)
146
148
  rexml (>= 3.2.5, < 4.0)
147
149
  rubocop-ast (>= 1.31.1, < 2.0)
148
150
  ruby-progressbar (~> 1.7)
data/README.md CHANGED
@@ -158,6 +158,7 @@ object_client.administrative_tags.list
158
158
  # Create and list release tags for an object
159
159
  object_client.release_tags.create(tag: Cocina::Models::Tag.new(to: 'Searchworks'))
160
160
  object_client.release_tags.list
161
+ object_client.release_tags.list(public: true) # only public release tags (i.e. last published value)
161
162
 
162
163
  # Create and list events for an object
163
164
  object_client.events.create(type: type, data: data)
@@ -30,13 +30,13 @@ module Dor
30
30
 
31
31
  # List release tags for an object
32
32
  #
33
+ # @param public [Boolean] indicates if we only want public release tags (defaults to false)
33
34
  # @raise [NotFoundResponse] when the response is a 404 (object not found)
34
35
  # @raise [UnexpectedResponse] if the request is unsuccessful.
35
36
  # @return [Array<ReleaseTag>]
36
- def list
37
- resp = connection.get do |req|
38
- req.url "#{api_version}/objects/#{object_identifier}/release_tags"
39
- end
37
+ def list(public: false)
38
+ url = "#{api_version}/objects/#{object_identifier}/release_tags"
39
+ resp = connection.get(url, { public: public })
40
40
 
41
41
  raise_exception_based_on_response!(resp, object_identifier) unless resp.success?
42
42
 
@@ -5,7 +5,19 @@ module Dor
5
5
  class Client
6
6
  # API calls that are about user versions
7
7
  class UserVersion < VersionedService
8
- Version = Struct.new(:version, :userVersion, :withdrawn, keyword_init: true)
8
+ Version = Struct.new(:version, :userVersion, :withdrawn, :withdrawable, :restorable, :head, keyword_init: true) do
9
+ def restorable?
10
+ restorable
11
+ end
12
+
13
+ def withdrawable?
14
+ withdrawable
15
+ end
16
+
17
+ def head?
18
+ head
19
+ end
20
+ end
9
21
 
10
22
  # @param object_identifier [String] the pid for the object
11
23
  def initialize(connection:, version:, object_identifier:)
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '14.15.0'
6
+ VERSION = '14.17.0'
7
7
  end
8
8
  end
9
9
  end
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.15.0
4
+ version: 14.17.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-07-03 00:00:00.000000000 Z
12
+ date: 2024-07-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport