dor-services 4.20.0 → 4.20.1

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
  SHA1:
3
- metadata.gz: 4729eacae4302a64db9ac7e92b4f8adbc6e8311e
4
- data.tar.gz: c87321714b6cde55d3a2b62c9125827c5b8bd8aa
3
+ metadata.gz: 13624969a0ca3349c32f708624d03a0d45e1a66c
4
+ data.tar.gz: 479656d446b0d412e43725678172f96986907781
5
5
  SHA512:
6
- metadata.gz: 2065d971335d18534df20609c96fa684c56a0e31d895255279c301195cf04b86fbc63f7deeb8649705dd75f3080618ca91d07fca2e637b33207f2836d45ca4f3
7
- data.tar.gz: a3ea926e1f85ed29e5dbb1bbc623fb9ce8082df73b71fb3122b0a59e20b6489beb598edd11de09a3a49629175e58fa9ab264a1f548d77929a8dabb2713165d68
6
+ metadata.gz: c42c9ff8a0bd12501a0ec71480b0859cccdf276281f2f5d1d3b319f2fe73a96f41000a603659238e95cb55bb625c0de9a31082b76f16fdc66cbfd21e548f7478
7
+ data.tar.gz: 81e10f7546e7a40669ac5f7b8f62ce70ae609ffa9ac156f2b5b5eb542d69005515140118e34a528d4f98d4ba02001be655dd8f2938c9a9fea31e27595214533d
@@ -6,7 +6,7 @@ module Dor
6
6
  DC_NS = {"dc"=>"http://purl.org/dc/elements/1.1/", "oai_dc"=>"http://www.openarchives.org/OAI/2.0/oai_dc/"}
7
7
 
8
8
  def iiif_presentation_manifest_needed? pub_obj_doc
9
- if(pub_obj_doc.at_xpath('/publicObject/contentMetadata[@type="image"]/resource[@type="image"]'))
9
+ if(pub_obj_doc.at_xpath('/publicObject/contentMetadata[contains(@type,"image") or contains(@type,"map")]/resource[@type="image"]'))
10
10
  return true
11
11
  elsif(pub_obj_doc.at_xpath('/publicObject/contentMetadata[@type="book"]/resource[@type="page"]'))
12
12
  return true
@@ -5,8 +5,30 @@ module Dor
5
5
  module Releaseable
6
6
  extend ActiveSupport::Concern
7
7
  include Itemizable
8
-
9
- #Generate XML structure for inclusion to Purl
8
+
9
+ #Add release tags to an item and initialize the item release workflow
10
+ #
11
+ #@params release_tags [Hash or Array] Either a hash of a single release tag. Each tag should be in the form of {:tag=>'Fitch : Batch2',:what=>'self',:to=>'Searchworks',:who=>'petucket', :release=>true/false}
12
+ #
13
+ #@raise [ArgumentError] Raised if the tags are improperly supplied
14
+ #
15
+ #
16
+ def add_release_nodes_and_start_releaseWF(release_tags)
17
+ release_tags = [release_tags] if release_tags.class != Array
18
+
19
+ #Add in each tag
20
+ release_tags.each do |r_tag|
21
+ self.add_release_node(r_tag[:release],r_tag)
22
+ end
23
+
24
+ #Save the item to dor so the robots work with the latest data
25
+ self.save
26
+
27
+ #Intialize the release workflow
28
+ self.initialize_workflow('releaseWF')
29
+ end
30
+
31
+ #Generate XML structure for inclusion to Purl
10
32
  #
11
33
  #@return [String] The XML release node as a string, with ReleaseDigest as the root document
12
34
  def generate_release_xml
@@ -256,7 +278,7 @@ module Dor
256
278
  #
257
279
  #@return [Nokogiri::XML::Element] the tag added if successful
258
280
  #
259
- #@raise [RuntimeError] Raised if attributes are improperly supplied
281
+ #@raise [ArgumentError] Raised if attributes are improperly supplied
260
282
  #
261
283
  #@params tag [Boolean] True or false for the release node
262
284
  #@params attrs [hash] A hash of any attributes to be placed onto the tag
data/lib/dor/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dor
2
- VERSION = '4.20.0'
2
+ VERSION = '4.20.1'
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: 4.20.0
4
+ version: 4.20.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Klein
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2015-04-27 00:00:00.000000000 Z
15
+ date: 2015-05-18 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: active-fedora