dor-services 5.26.1 → 5.26.2

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
  SHA1:
3
- metadata.gz: 4e9945638442bcf99cd8f10a4d3fdb0a026e979a
4
- data.tar.gz: 8bfe57e68eb93604b9e80e63b0f18b3c8f284d4f
3
+ metadata.gz: 91ea97e67bf6ce3ae1992ac6c9d8cb6d3a9382fc
4
+ data.tar.gz: 173d380e4781c45fed253357148581cff442fe89
5
5
  SHA512:
6
- metadata.gz: 1ae020dc3b185de98e34eecea1c6c1dedb6565a04355a596e0d219136a0ff8b602e62d16ab3cdea229a9cef61dcd502eeecdbdc3e22efce8d6b83ab6bb89ff9e
7
- data.tar.gz: 4671bb3e01d238b8fa051876cb013106918ea5a977e9dad074672b1aa12888959932c20851255d696713d4d36d58e8c05085c2563fa4ee6e002faeaa5a14bc13
6
+ metadata.gz: df1cafcecd2945f1c834ee0ce0ef306ad73ecbb414cb168bf2c1c74938867230b54c2b773e3f2b20fc9c06e5910a6def74676a23982d521a04740c4fd8c5bfa6
7
+ data.tar.gz: 6397e97f65f54111621d4b7ea2fdf83a74ee84581070f6b7a04ba5604c080d4a690d539f6bae5904ee76947e48f6b8987bca2b63a2bcb0c68f6db6fa306dd608
@@ -17,8 +17,14 @@ module Dor
17
17
  ids = resource["identifiers?quantity=#{quantity}"].post('').chomp.split(/\n/).collect { |id| "#{Config.suri.id_namespace}:#{id.strip}" }
18
18
  else
19
19
  repo = ActiveFedora::Base.respond_to?(:connection_for_pid) ? ActiveFedora::Base.connection_for_pid(0) : ActiveFedora.fedora.connection
20
- resp = Nokogiri::XML(repo.next_pid(numPIDs: quantity))
20
+ resp = Nokogiri::XML(repo.api.next_pid(numPIDs: quantity))
21
21
  ids = resp.xpath('/pidList/pid').collect { |node| node.text }
22
+ # With modernish (circa 2015/6) dependencies, including Nokogiri and
23
+ # ActiveFedora/Rubydora, `ids` is `[]` above. If that is the case, try
24
+ # the XPath that works (confirmed with most recent `hydra_etd` work)
25
+ if ids.empty? && resp.root.namespaces.any?
26
+ ids = resp.xpath('/xmlns:pidList/xmlns:pid').collect { |node| node.text }
27
+ end
22
28
  end
23
29
  want_array ? ids : ids.first
24
30
 
@@ -1,3 +1,3 @@
1
1
  module Dor
2
- VERSION = '5.26.1'.freeze
2
+ VERSION = '5.26.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dor-services
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.26.1
4
+ version: 5.26.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Klein
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2018-02-07 00:00:00.000000000 Z
17
+ date: 2018-03-01 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: active-fedora
@@ -684,7 +684,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
684
684
  version: 1.3.6
685
685
  requirements: []
686
686
  rubyforge_project:
687
- rubygems_version: 2.6.11
687
+ rubygems_version: 2.6.13
688
688
  signing_key:
689
689
  specification_version: 4
690
690
  summary: Ruby implmentation of DOR services used by the SULAIR Digital Library