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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06256135ae4d1e556af51bd67aa764f3bdf4095503b5e7c41daf9fa32093be49
4
- data.tar.gz: 9007c044ff70251c24b9216b447b4190c4162b4f97b8ce2d8c488223d75d0d92
3
+ metadata.gz: fe7dfec36a8319421bee77745fe97ce0b82d42ae37496dfa0b53da9924520855
4
+ data.tar.gz: c52d59d1f89e919d634403fad5008034ffff6a49bc7cc36de512bac0075fb4b2
5
5
  SHA512:
6
- metadata.gz: 5ec452bfeb53407eed48aa5342a339e4137c95542547fcf098c7b9d91ba9cb0930e1afb3d42a2ce5c6e6bc0a779e6bd4555250cdb4fb37d566eb1d034b450f4f
7
- data.tar.gz: eda0ad02dec02532b6430a46d997d9df4d5aeb963274efd9f08fedbb645d41721b81791d6a7641b7bd0e9834e9a02bafc8ae9e1ce4ece19e747a61b253351837
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
 
@@ -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.77.0' # leave pinned to patch level until cocina-models hits 1.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 events datastream - optional
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
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '10.2.0'
6
+ VERSION = '11.0.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: 10.2.0
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-02 00:00:00.000000000 Z
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.77.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.77.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.2.32
282
+ rubygems_version: 3.3.4
283
283
  signing_key:
284
284
  specification_version: 4
285
285
  summary: A client for dor-services-app