dor-services-client 14.14.0 → 14.16.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: b17e776b7a8c068dd71595ca1d2e508c96b69700c87f8516f7247f4a0208f28a
4
- data.tar.gz: 70b426fa3ac52729feb726c8c63e5907ede88b255f8095c91acfbbb9d5a8a724
3
+ metadata.gz: 84c1347c52df031a1e077e9072d72058e37aba7af9d4c1051b0b6c8c6f78a353
4
+ data.tar.gz: 13480656465ac2ce78e4721592edbb2b25d3b1b2ec6fd5016adcaabc4bee6a3e
5
5
  SHA512:
6
- metadata.gz: de501280c3a367a9557f146ad44fe1c8a76dd408904ba6f866c3472722868b64ab650670fb9cffc6da6b06847ac723323d8436a72f77e0b27e17b4f8754ce8e8
7
- data.tar.gz: 3783ee7eead4fc35d9305e9b88482b10708c153cf64b5ad2a695567086be641ec7e0ed9592c55dfd0369a0fadfe6f034e88fa02e29d080a0cb898b4578444a6b
6
+ metadata.gz: 774f6b86cafd3576d39093767f817546e8a4c1b678472225de82a253a4348b31578cb14409b2aa07b33048f728b9a4e697344c4009e173aa4ad418e7a486fe54
7
+ data.tar.gz: f119eadc2bb364047fca2f1d36d9269778327a7bd457d86da9eac5c47238c9b263e456a6b785bedbc650bcf1be775078d6ae6e988324a40aac5d1fd06d438272
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.14.0)
4
+ dor-services-client (14.16.0)
5
5
  activesupport (>= 4.2, < 8)
6
6
  cocina-models (~> 0.98.0)
7
7
  deprecation
@@ -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.98.0)
32
+ cocina-models (0.98.1)
33
33
  activesupport
34
34
  deprecation
35
35
  dry-struct (~> 1.0)
@@ -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,7 +96,8 @@ GEM
95
96
  jsonpath (1.1.5)
96
97
  multi_json
97
98
  language_server-protocol (3.17.0.3)
98
- minitest (5.24.0)
99
+ logger (1.6.0)
100
+ minitest (5.24.1)
99
101
  multi_json (1.15.0)
100
102
  mutex_m (0.2.0)
101
103
  net-http (0.4.1)
@@ -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.0)
126
+ rexml (3.3.1)
125
127
  strscan
126
128
  rspec (3.13.0)
127
129
  rspec-core (~> 3.13.0)
data/README.md CHANGED
@@ -132,6 +132,7 @@ object_client.version.close
132
132
  # Manage user versions
133
133
  object_client.user_version.inventory
134
134
  object_client.user_version.find(2)
135
+ object_client.user_version.solr(2)
135
136
  object_client.user_version.create(object_version: 3)
136
137
  object_client.user_version.update(user_version: Dor::Services::Client::UserVersion::Version.new(version: 3, userVersion: 3, withdrawn: true))
137
138
 
@@ -157,6 +158,7 @@ object_client.administrative_tags.list
157
158
  # Create and list release tags for an object
158
159
  object_client.release_tags.create(tag: Cocina::Models::Tag.new(to: 'Searchworks'))
159
160
  object_client.release_tags.list
161
+ object_client.release_tags.list(public: true) # only public release tags (i.e. last published value)
160
162
 
161
163
  # Create and list events for an object
162
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
 
@@ -35,6 +35,17 @@ module Dor
35
35
  build_cocina_from_response(resp, validate: false)
36
36
  end
37
37
 
38
+ # @return [Hash] the solr document for the user version
39
+ # @raise [UnexpectedResponse] on an unsuccessful response from the server
40
+ def solr(version)
41
+ resp = connection.get do |req|
42
+ req.url "#{base_path}/#{version}/solr"
43
+ end
44
+ raise_exception_based_on_response!(resp) unless resp.success?
45
+
46
+ JSON.parse(resp.body)
47
+ end
48
+
38
49
  # Create a user version for an object
39
50
  #
40
51
  # @param [String] object_version the version of the object to create a user version for
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '14.14.0'
6
+ VERSION = '14.16.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.14.0
4
+ version: 14.16.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-06-27 00:00:00.000000000 Z
12
+ date: 2024-07-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -280,7 +280,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
280
280
  - !ruby/object:Gem::Version
281
281
  version: '0'
282
282
  requirements: []
283
- rubygems_version: 3.4.19
283
+ rubygems_version: 3.5.15
284
284
  signing_key:
285
285
  specification_version: 4
286
286
  summary: A client for dor-services-app