Sha256: c99eaf0d3f2d68c8902e4fe4bf0adf514db8c90ace47511c3c4ec99170037890
Contents?: true
Size: 525 Bytes
Versions: 8
Compression:
Stored size: 525 Bytes
Contents
Dor::Identifiable.on_upgrade '3.14.8', 'Fix up invalid URIs in content-augmented datastreams' do |obj| bad_content_location_uri = begin URI.parse(obj.send("content-augmented").dsLocation) false rescue URI::InvalidURIError true rescue false end next unless bad_content_location_uri parts = obj.send("content-augmented").dsLocation.split('/') parts[parts.length - 1] = URI.escape(parts.last) obj.send("content-augmented").dsLocation = parts.join('/') obj.send("content-augmented").save end
Version data entries
8 entries across 8 versions & 1 rubygems