dor-services-client 10.2.0 → 11.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -8
- data/dor-services-client.gemspec +1 -1
- data/lib/dor/services/client/accession.rb +1 -1
- data/lib/dor/services/client/metadata.rb +0 -53
- data/lib/dor/services/client/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe7dfec36a8319421bee77745fe97ce0b82d42ae37496dfa0b53da9924520855
|
4
|
+
data.tar.gz: c52d59d1f89e919d634403fad5008034ffff6a49bc7cc36de512bac0075fb4b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9698a746b759eff42f1b12ab31413c5c28527f1080649b8a8d9e62d56200871ae7907308d32161efaae83aa0507e95367e1d1566f401046246f200978e9253a
|
7
|
+
data.tar.gz: d76e0a78928835868bcc058369ea0f38933290110d42517d7b7440ccaa27eb3f45f41432de90e4b7e19031faeea2332f3236f1293edd462fc1feefc05aea6111
|
data/README.md
CHANGED
@@ -138,14 +138,6 @@ object_client.metadata.descriptive
|
|
138
138
|
# Get the public XML representation
|
139
139
|
object_client.metadata.public_xml
|
140
140
|
|
141
|
-
# Update legacy XML representation
|
142
|
-
object_client.metadata.legacy_update(
|
143
|
-
descriptive: {
|
144
|
-
updated: Time.now,
|
145
|
-
content: '<descMetadata/>'
|
146
|
-
}
|
147
|
-
)
|
148
|
-
|
149
141
|
# Return the Cocina metadata
|
150
142
|
object_client.find
|
151
143
|
|
data/dor-services-client.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.required_ruby_version = '>= 2.7', '< 4' # dor-services-app needs 2.7 due to fedora3
|
26
26
|
|
27
27
|
spec.add_dependency 'activesupport', '>= 4.2', '< 8'
|
28
|
-
spec.add_dependency 'cocina-models', '~> 0.
|
28
|
+
spec.add_dependency 'cocina-models', '~> 0.78.0' # leave pinned to patch level until cocina-models hits 1.0
|
29
29
|
spec.add_dependency 'deprecation', '>= 0'
|
30
30
|
spec.add_dependency 'faraday', '~> 2.0'
|
31
31
|
spec.add_dependency 'faraday-retry'
|
@@ -17,7 +17,7 @@ module Dor
|
|
17
17
|
# @param params [Hash<Symbol,String>] optional parameter hash
|
18
18
|
# @option params [String] :significance set significance (major/minor/patch) of version change - required
|
19
19
|
# @option params [String] :description set description of version change - required
|
20
|
-
# @option params [String] :opening_user_name add opening username to the
|
20
|
+
# @option params [String] :opening_user_name add opening username to the event - optional
|
21
21
|
# @option params [String] :workflow the workflow to start - defaults to 'assemblyWF'
|
22
22
|
# @return [Boolean] true on success
|
23
23
|
# @raise [NotFoundResponse] when the response is a 404 (object not found)
|
@@ -13,32 +13,6 @@ module Dor
|
|
13
13
|
@object_identifier = object_identifier
|
14
14
|
end
|
15
15
|
|
16
|
-
# Updates using the legacy SDR/Fedora3 metadata
|
17
|
-
# @param [Hash<Symbol,Hash>] opts the options for legacy update
|
18
|
-
# @option opts [Hash] :administrative Data for administrative metadata
|
19
|
-
# @option opts [Hash] :content Data for structural metadata
|
20
|
-
# @option opts [Hash] :descriptive Data for descriptive metadata
|
21
|
-
# @option opts [Hash] :geo Data for geographic metadata
|
22
|
-
# @option opts [Hash] :identity Data for identity metadata
|
23
|
-
# @option opts [Hash] :provenance Data for provenance metadata
|
24
|
-
# @option opts [Hash] :relationships Data for RELS-EXT metadata
|
25
|
-
# @option opts [Hash] :rights Data for access rights metadata
|
26
|
-
# @option opts [Hash] :technical Data for technical metadata
|
27
|
-
# @option opts [Hash] :version Data for version metadata
|
28
|
-
# @example:
|
29
|
-
# legacy_update(descriptive: { updated: '2001-12-20', content: '<descMetadata />' })
|
30
|
-
def legacy_update(opts)
|
31
|
-
opts = opts.slice(:administrative, :content, :descriptive, :geo, :identity, :provenance, :relationships, :rights, :technical, :version)
|
32
|
-
resp = connection.patch do |req|
|
33
|
-
req.url "#{base_path}/legacy"
|
34
|
-
req.headers['Content-Type'] = 'application/json'
|
35
|
-
req.body = opts.to_json
|
36
|
-
end
|
37
|
-
return if resp.success?
|
38
|
-
|
39
|
-
raise_exception_based_on_response!(resp, object_identifier)
|
40
|
-
end
|
41
|
-
|
42
16
|
# @return [String, NilClass] The Dublin Core XML representation of the object or nil if response is 404
|
43
17
|
# @raise [UnexpectedResponse] on an unsuccessful response from the server
|
44
18
|
def dublin_core
|
@@ -101,33 +75,6 @@ module Dor
|
|
101
75
|
raise_exception_based_on_response!(resp, object_identifier)
|
102
76
|
end
|
103
77
|
|
104
|
-
# rubocop:disable Lint/StructNewOverride
|
105
|
-
Datastream = Struct.new(:label, :dsid, :pid, :size, :mimeType, :versionId, keyword_init: true)
|
106
|
-
# rubocop:enable Lint/StructNewOverride
|
107
|
-
|
108
|
-
# @return [Array] the list of datastreams for the item
|
109
|
-
# @raise [UnexpectedResponse] on an unsuccessful response from the server
|
110
|
-
def datastreams
|
111
|
-
resp = connection.get do |req|
|
112
|
-
req.url "#{base_path}/datastreams"
|
113
|
-
end
|
114
|
-
raise_exception_based_on_response!(resp, object_identifier) unless resp.success?
|
115
|
-
|
116
|
-
JSON.parse(resp.body).map { |params| Datastream.new(**params.symbolize_keys!) }
|
117
|
-
end
|
118
|
-
|
119
|
-
# @param [String] dsid the identifier for the datastream
|
120
|
-
# @return [String] the contents of the specified datastream
|
121
|
-
# @raise [UnexpectedResponse] on an unsuccessful response from the server
|
122
|
-
def datastream(dsid)
|
123
|
-
resp = connection.get do |req|
|
124
|
-
req.url "#{base_path}/datastreams/#{dsid}"
|
125
|
-
end
|
126
|
-
raise_exception_based_on_response!(resp, object_identifier) unless resp.success?
|
127
|
-
|
128
|
-
resp.body
|
129
|
-
end
|
130
|
-
|
131
78
|
private
|
132
79
|
|
133
80
|
attr_reader :object_identifier
|
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:
|
4
|
+
version: 11.0.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: 2022-05-
|
12
|
+
date: 2022-05-04 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.
|
40
|
+
version: 0.78.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.
|
47
|
+
version: 0.78.0
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: deprecation
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
@@ -279,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
279
279
|
- !ruby/object:Gem::Version
|
280
280
|
version: '0'
|
281
281
|
requirements: []
|
282
|
-
rubygems_version: 3.
|
282
|
+
rubygems_version: 3.3.4
|
283
283
|
signing_key:
|
284
284
|
specification_version: 4
|
285
285
|
summary: A client for dor-services-app
|