dor-services 4.6.3 → 4.6.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -68,22 +68,30 @@ module Dor
68
68
  rights = self.datastreams['rightsMetadata'].ng_xml
69
69
 
70
70
  rights.xpath('//use/human[@type="useAndReproduction"]').each do |use|
71
+ txt = use.text.strip
72
+ next if txt.empty?
71
73
  new_use = doc.create_element("accessCondition", use.text.strip, :type => 'useAndReproduction')
72
74
  doc.root.element_children.last.add_next_sibling new_use
73
75
  end
74
76
  rights.xpath('//copyright/human[@type="copyright"]').each do |cr|
77
+ txt = cr.text.strip
78
+ next if txt.empty?
75
79
  new_use = doc.create_element("accessCondition", cr.text.strip, :type => 'copyright')
76
80
  doc.root.element_children.last.add_next_sibling new_use
77
81
  end
78
- rights.xpath("//use/machine[#{ci_compare('type', 'creativecommons')}]").each do |lic|
79
- next if(lic.text =~ /none/i)
80
- new_text = "CC #{lic.text}: " << rights.at_xpath("//use/human[#{ci_compare('type', 'creativecommons')}]").text.strip
82
+ rights.xpath("//use/machine[#{ci_compare('type', 'creativecommons')}]").each do |lic_type|
83
+ next if lic_type.text =~ /none/i
84
+ lic_text = rights.at_xpath("//use/human[#{ci_compare('type', 'creativecommons')}]").text.strip
85
+ next if lic_text.empty?
86
+ new_text = "CC #{lic_type.text}: #{lic_text}"
81
87
  new_lic = doc.create_element("accessCondition", new_text, :type => 'license')
82
88
  doc.root.element_children.last.add_next_sibling new_lic
83
89
  end
84
- rights.xpath("//use/machine[#{ci_compare('type', 'opendata')}]").each do |lic|
85
- next if(lic.text =~ /none/i)
86
- new_text = "ODC #{lic.text}: " << rights.at_xpath("//use/human[#{ci_compare('type', 'opendata')}]").text.strip
90
+ rights.xpath("//use/machine[#{ci_compare('type', 'opendata')}]").each do |lic_type|
91
+ next if lic_type.text =~ /none/i
92
+ lic_text = rights.at_xpath("//use/human[#{ci_compare('type', 'opendata')}]").text.strip
93
+ next if lic_text.empty?
94
+ new_text = "ODC #{lic_type.text}: #{lic_text}"
87
95
  new_lic = doc.create_element("accessCondition", new_text, :type => 'license')
88
96
  doc.root.element_children.last.add_next_sibling new_lic
89
97
  end
data/lib/dor/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dor
2
- VERSION = '4.6.3'
2
+ VERSION = '4.6.4'
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.6.3
4
+ version: 4.6.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2014-03-07 00:00:00.000000000 Z
16
+ date: 2014-03-10 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: active-fedora