dor-services-client 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bfe6441b14958a78f3b20690780ee260abaecaf92341ce8775c8735e311b9a1f
4
- data.tar.gz: 73d11d588c9ab1274415229f2d051f2dda45c4f3a900a4428d564a7d1fc38dd5
3
+ metadata.gz: a2af95c20ad77c9b950660a02df65827f08e9ebf7cb2d0217367fbf665338405
4
+ data.tar.gz: f0bbb4b7e7f0152febb7d2e9d51928bacb744c8ed24959da15302538f5db470e
5
5
  SHA512:
6
- metadata.gz: ee530c3203266a71c5f0e6fc0bf2563f46b03fae774cf29595378dc324e4e8d2ef86116eb72126908639620716e8b15cbe52408c062ed5db284f87867cc090d6
7
- data.tar.gz: 3e90b21e6be05de21faf18b68836c7592b9e8bc3575c4f8cb75397945ea1158392561e51ca89ba3950f008e55817c7aee2dc75433e829a6f8d3ad9b325167f8e
6
+ metadata.gz: dcd5376ca4a422498692db568d0bd7c7a7e909cd06453e13c7979f7cf4fa0d106eedbf51abc0972a02448e5a30d747bfe378bc3a47c0eb1f342a6fd7408e9c3f
7
+ data.tar.gz: 81395050e0396da033e723195d2a37408710ea8a1f18525241895029d8774a3f59b5a33763f65de74fd360d48b1de83f632f37f248952d74773429d926968470
@@ -13,6 +13,7 @@ require 'dor/services/client/release_tags'
13
13
  require 'dor/services/client/sdr'
14
14
  require 'dor/services/client/workflow'
15
15
  require 'dor/services/client/workspace'
16
+ require 'deprecation'
16
17
 
17
18
  module Dor
18
19
  module Services
@@ -29,6 +30,7 @@ module Dor
29
30
  DEFAULT_VERSION = 'v1'
30
31
 
31
32
  include Singleton
33
+ extend Deprecation
32
34
 
33
35
  def object(object)
34
36
  Object.new(connection: connection, version: DEFAULT_VERSION, object: object)
@@ -69,7 +71,7 @@ module Dor
69
71
  self
70
72
  end
71
73
 
72
- delegate :objects, :files, :workflow, :workspace, :release_tags, to: :instance
74
+ delegate :objects, :object, :files, :workflow, :workspace, :release_tags, :sdr, to: :instance
73
75
  private :objects, :files, :workflow, :workspace, :release_tags
74
76
 
75
77
  # Creates a new object in DOR
@@ -133,15 +135,16 @@ module Dor
133
135
 
134
136
  # Notify goobi system of a new object
135
137
  delegate :notify_goobi, to: :objects
136
- end
137
138
 
138
- # Gets the current version number for the object
139
- # @param object [String] the pid for the object
140
- # @raise [UnexpectedResponse] when the response is not successful.
141
- # @raise [MalformedResponse] when the response is not parseable.
142
- # @return [Integer] the current version
143
- def self.current_version(object:)
144
- instance.objects.current_version(object: object)
139
+ # Gets the current version number for the object
140
+ # @param object [String] the pid for the object
141
+ # @raise [UnexpectedResponse] when the response is not successful.
142
+ # @raise [MalformedResponse] when the response is not parseable.
143
+ # @return [Integer] the current version
144
+ def current_version(object:)
145
+ sdr.current_version(object: object)
146
+ end
147
+ deprecation_deprecate current_version: 'use Client.sdr.current_version instead'
145
148
  end
146
149
 
147
150
  attr_writer :url, :username, :password, :connection
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'nokogiri'
4
- require 'deprecation'
5
4
 
6
5
  module Dor
7
6
  module Services
@@ -3,7 +3,7 @@
3
3
  module Dor
4
4
  module Services
5
5
  class Client
6
- VERSION = '0.8.0'
6
+ VERSION = '0.9.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: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne